|
|
@@ -32,6 +32,7 @@
|
|
|
<result column="BASE_SPOT_NO5" jdbcType="VARCHAR" property="baseSpotNo5" />
|
|
|
<result column="BASE_SPOT_NAME5" jdbcType="VARCHAR" property="baseSpotName5" />
|
|
|
<result column="COMPARE_TYPE" jdbcType="VARCHAR" property="compareType" />
|
|
|
+ <result column="SCALE_NO" jdbcType="VARCHAR" property="scaleNo" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
COMPARE_SPOT_ID, VALUE_FLAG, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NAME, UPDATE_TIME,
|
|
|
@@ -39,7 +40,7 @@
|
|
|
WEIGHT_DATE2, WEIGHT_NUM3, WEIGHT_DATE3, WEIGHT_NUM4, WEIGHT_DATE4, WEIGHT_NUM5,
|
|
|
WEIGHT_DATE5, BASE_SPOT_NO1, BASE_SPOT_NAME1, BASE_SPOT_NO2, BASE_SPOT_NAME2, BASE_SPOT_NO3,
|
|
|
BASE_SPOT_NAME3, BASE_SPOT_NO4, BASE_SPOT_NAME4, BASE_SPOT_NO5, BASE_SPOT_NAME5,
|
|
|
- COMPARE_TYPE
|
|
|
+ COMPARE_TYPE, SCALE_NO
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.COMPARE_SPOT_ID, t.VALUE_FLAG, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NAME,
|
|
|
@@ -47,13 +48,13 @@
|
|
|
t.WEIGHT_NUM2, t.WEIGHT_DATE2, t.WEIGHT_NUM3, t.WEIGHT_DATE3, t.WEIGHT_NUM4, t.WEIGHT_DATE4,
|
|
|
t.WEIGHT_NUM5, t.WEIGHT_DATE5, t.BASE_SPOT_NO1, t.BASE_SPOT_NAME1, t.BASE_SPOT_NO2,
|
|
|
t.BASE_SPOT_NAME2, t.BASE_SPOT_NO3, t.BASE_SPOT_NAME3, t.BASE_SPOT_NO4, t.BASE_SPOT_NAME4,
|
|
|
- t.BASE_SPOT_NO5, t.BASE_SPOT_NAME5, t.COMPARE_TYPE
|
|
|
+ t.BASE_SPOT_NO5, t.BASE_SPOT_NAME5, t.COMPARE_TYPE, t.SCALE_NO
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM METER_WORK_COMPARE_SPOT
|
|
|
+ SELECT <include refid="columns" /> FROM METER_WORK_COMPARE_SPOT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM METER_WORK_COMPARE_SPOT t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM METER_WORK_COMPARE_SPOT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
|
@@ -147,6 +148,9 @@
|
|
|
<if test="compareType != null and compareType != ''">
|
|
|
and COMPARE_TYPE = #{compareType}
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null and scaleNo != ''">
|
|
|
+ and SCALE_NO = #{scaleNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
@@ -241,6 +245,9 @@
|
|
|
<if test="compareType != null and compareType != ''">
|
|
|
and COMPARE_TYPE LIKE '%${compareType}%'
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null and scaleNo != ''">
|
|
|
+ and SCALE_NO LIKE '%${scaleNo}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
@@ -337,6 +344,9 @@
|
|
|
<if test="compareType != null and compareType != ''">
|
|
|
or COMPARE_TYPE = #{compareType}
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null and scaleNo != ''">
|
|
|
+ or SCALE_NO = #{scaleNo}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
|
|
|
insert into METER_WORK_COMPARE_SPOT (COMPARE_SPOT_ID, VALUE_FLAG, CREATE_MAN_NAME,
|
|
|
@@ -348,8 +358,8 @@
|
|
|
WEIGHT_DATE5, BASE_SPOT_NO1, BASE_SPOT_NAME1,
|
|
|
BASE_SPOT_NO2, BASE_SPOT_NAME2, BASE_SPOT_NO3,
|
|
|
BASE_SPOT_NAME3, BASE_SPOT_NO4, BASE_SPOT_NAME4,
|
|
|
- BASE_SPOT_NO5, BASE_SPOT_NAME5, COMPARE_TYPE
|
|
|
- )
|
|
|
+ BASE_SPOT_NO5, BASE_SPOT_NAME5, COMPARE_TYPE,
|
|
|
+ SCALE_NO)
|
|
|
values (#{compareSpotId,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{createManPhone,jdbcType=VARCHAR}, #{updateManPhone,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR},
|
|
|
@@ -359,8 +369,8 @@
|
|
|
#{weightDate5,jdbcType=TIMESTAMP}, #{baseSpotNo1,jdbcType=VARCHAR}, #{baseSpotName1,jdbcType=VARCHAR},
|
|
|
#{baseSpotNo2,jdbcType=VARCHAR}, #{baseSpotName2,jdbcType=VARCHAR}, #{baseSpotNo3,jdbcType=VARCHAR},
|
|
|
#{baseSpotName3,jdbcType=VARCHAR}, #{baseSpotNo4,jdbcType=VARCHAR}, #{baseSpotName4,jdbcType=VARCHAR},
|
|
|
- #{baseSpotNo5,jdbcType=VARCHAR}, #{baseSpotName5,jdbcType=VARCHAR}, #{compareType,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
+ #{baseSpotNo5,jdbcType=VARCHAR}, #{baseSpotName5,jdbcType=VARCHAR}, #{compareType,jdbcType=VARCHAR},
|
|
|
+ #{scaleNo,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
|
|
|
insert into METER_WORK_COMPARE_SPOT
|
|
|
@@ -455,6 +465,9 @@
|
|
|
<if test="compareType != null">
|
|
|
COMPARE_TYPE,
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null">
|
|
|
+ SCALE_NO,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="compareSpotId != null">
|
|
|
@@ -547,6 +560,9 @@
|
|
|
<if test="compareType != null">
|
|
|
#{compareType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null">
|
|
|
+ #{scaleNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
|
|
|
@@ -579,7 +595,8 @@
|
|
|
BASE_SPOT_NAME4 = #{baseSpotName4,jdbcType=VARCHAR},
|
|
|
BASE_SPOT_NO5 = #{baseSpotNo5,jdbcType=VARCHAR},
|
|
|
BASE_SPOT_NAME5 = #{baseSpotName5,jdbcType=VARCHAR},
|
|
|
- COMPARE_TYPE = #{compareType,jdbcType=VARCHAR}
|
|
|
+ COMPARE_TYPE = #{compareType,jdbcType=VARCHAR},
|
|
|
+ SCALE_NO = #{scaleNo,jdbcType=VARCHAR}
|
|
|
where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
|
|
|
@@ -672,20 +689,23 @@
|
|
|
<if test="compareType != null">
|
|
|
COMPARE_TYPE = #{compareType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="scaleNo != null">
|
|
|
+ SCALE_NO = #{scaleNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <include refid="select" />
|
|
|
where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="where"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="whereLike"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
insert into METER_WORK_COMPARE_SPOT
|
|
|
@@ -700,7 +720,7 @@
|
|
|
BASE_SPOT_NAME1, BASE_SPOT_NO2, BASE_SPOT_NAME2,
|
|
|
BASE_SPOT_NO3, BASE_SPOT_NAME3, BASE_SPOT_NO4,
|
|
|
BASE_SPOT_NAME4, BASE_SPOT_NO5, BASE_SPOT_NAME5,
|
|
|
- COMPARE_TYPE)
|
|
|
+ COMPARE_TYPE, SCALE_NO)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.compareSpotId,jdbcType=VARCHAR},
|
|
|
@@ -714,145 +734,157 @@
|
|
|
#{item.baseSpotName1,jdbcType=VARCHAR}, #{item.baseSpotNo2,jdbcType=VARCHAR}, #{item.baseSpotName2,jdbcType=VARCHAR},
|
|
|
#{item.baseSpotNo3,jdbcType=VARCHAR}, #{item.baseSpotName3,jdbcType=VARCHAR}, #{item.baseSpotNo4,jdbcType=VARCHAR},
|
|
|
#{item.baseSpotName4,jdbcType=VARCHAR}, #{item.baseSpotNo5,jdbcType=VARCHAR}, #{item.baseSpotName5,jdbcType=VARCHAR},
|
|
|
- #{item.compareType,jdbcType=VARCHAR} from dual
|
|
|
+ #{item.compareType,jdbcType=VARCHAR}, #{item.scaleNo,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
update METER_WORK_COMPARE_SPOT
|
|
|
set
|
|
|
COMPARE_SPOT_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.compareSpotId,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,VALUE_FLAG=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,CREATE_MAN_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,CREATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_MAN_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,CREATE_MAN_PHONE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createManPhone,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,UPDATE_MAN_PHONE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateManPhone,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,CAR_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,WEIGHT_NUM1=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum1,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,WEIGHT_DATE1=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate1,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,WEIGHT_NUM2=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum2,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,WEIGHT_DATE2=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate2,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,WEIGHT_NUM3=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum3,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,WEIGHT_DATE3=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate3,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,WEIGHT_NUM4=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum4,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,WEIGHT_DATE4=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate4,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,WEIGHT_NUM5=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum5,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,WEIGHT_DATE5=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate5,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NO1=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo1,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NAME1=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName1,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NO2=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo2,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NAME2=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName2,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NO3=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo3,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NAME3=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName3,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NO4=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo4,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NAME4=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName4,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NO5=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo5,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,BASE_SPOT_NAME5=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName5,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,COMPARE_TYPE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.compareType,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,SCALE_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case COMPARE_SPOT_ID" separator=" ">
|
|
|
+ when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.scaleNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
where COMPARE_SPOT_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.compareSpotId,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from METER_WORK_COMPARE_SPOT
|
|
|
where COMPARE_SPOT_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
+ SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(COMPARE_SPOT_ID, LENGTH(COMPARE_SPOT_ID) - 4))),0) + 1,5,'0') COMPARE_SPOT_ID
|
|
|
+ FROM METER_WORK_COMPARE_SPOT
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="isExistWithinHour" resultType="java.lang.String">
|
|
|
+ SELECT COMPARE_SPOT_ID FROM (SELECT * FROM METER_WORK_COMPARE_SPOT WHERE (CREATE_TIME BETWEEN SYSDATE-(#{time}/24) AND SYSDATE) AND CAR_NO = #{carNo} AND COMPARE_TYPE = #{type} ORDER BY CREATE_TIME DESC ) WHERE ROWNUM = 1
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|