|
|
@@ -20,17 +20,18 @@
|
|
|
<result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="NOTE" jdbcType="VARCHAR" property="note" />
|
|
|
+ <result column="TARE_TYPE" jdbcType="VARCHAR" property="tareType" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, METER_NAME, METER_TIME,
|
|
|
- UP_WEIGHT, AVG_WEIGHT, METER_NUM, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
|
|
|
- UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, NOTE
|
|
|
+ DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, METER_NAME, METER_TIME,
|
|
|
+ UP_WEIGHT, AVG_WEIGHT, METER_NUM, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
|
|
|
+ UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, NOTE, TARE_TYPE
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.DATA_NO, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CAR_NO, t.METER_WEIGHT, t.METER_NAME,
|
|
|
- t.METER_TIME, t.UP_WEIGHT, t.AVG_WEIGHT, t.METER_NUM, t.VALUE_FLAG, t.CREATE_MAN_NO,
|
|
|
- t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME,
|
|
|
- t.NOTE
|
|
|
+ t.DATA_NO, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CAR_NO, t.METER_WEIGHT, t.METER_NAME,
|
|
|
+ t.METER_TIME, t.UP_WEIGHT, t.AVG_WEIGHT, t.METER_NUM, t.VALUE_FLAG, t.CREATE_MAN_NO,
|
|
|
+ t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME,
|
|
|
+ t.NOTE, t.TARE_TYPE
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM METER_BASE_HIS_TARE_DATA
|
|
|
@@ -39,7 +40,7 @@
|
|
|
SELECT <include refid="columns_alias" /> FROM METER_BASE_HIS_TARE_DATA t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="dataNo != null and dataNo != ''">
|
|
|
and DATA_NO = #{dataNo}
|
|
|
</if>
|
|
|
@@ -94,10 +95,13 @@
|
|
|
<if test="note != null and note != ''">
|
|
|
and NOTE = #{note}
|
|
|
</if>
|
|
|
+ <if test="tareType != null and tareType != ''">
|
|
|
+ and TARE_TYPE = #{tareType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="dataNo != null and dataNo != ''">
|
|
|
and DATA_NO LIKE '%${dataNo}%'
|
|
|
</if>
|
|
|
@@ -152,6 +156,9 @@
|
|
|
<if test="note != null and note != ''">
|
|
|
and NOTE LIKE '%${note}%'
|
|
|
</if>
|
|
|
+ <if test="tareType != null and tareType != ''">
|
|
|
+ and TARE_TYPE LIKE '%${tareType}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
@@ -160,74 +167,77 @@
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from METER_BASE_HIS_TARE_DATA
|
|
|
- where 1!=1
|
|
|
- <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
- or BASE_SPOT_NO = #{baseSpotNo}
|
|
|
- </if>
|
|
|
- <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
- or BASE_SPOT_NAME = #{baseSpotName}
|
|
|
- </if>
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
- or CAR_NO = #{carNo}
|
|
|
- </if>
|
|
|
- <if test="meterWeight != null">
|
|
|
- or METER_WEIGHT = #{meterWeight}
|
|
|
- </if>
|
|
|
- <if test="meterName != null and meterName != ''">
|
|
|
- or METER_NAME = #{meterName}
|
|
|
- </if>
|
|
|
- <if test="meterTime != null">
|
|
|
- or TO_CHAR(METER_TIME,'yyyy-MM-dd') = '#{meterTime}'
|
|
|
- </if>
|
|
|
- <if test="upWeight != null">
|
|
|
- or UP_WEIGHT = #{upWeight}
|
|
|
- </if>
|
|
|
- <if test="avgWeight != null">
|
|
|
- or AVG_WEIGHT = #{avgWeight}
|
|
|
- </if>
|
|
|
- <if test="meterNum != null">
|
|
|
- or METER_NUM = #{meterNum}
|
|
|
- </if>
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
- or VALUE_FLAG = #{valueFlag}
|
|
|
- </if>
|
|
|
- <if test="createManNo != null and createManNo != ''">
|
|
|
- or CREATE_MAN_NO = #{createManNo}
|
|
|
- </if>
|
|
|
- <if test="createManName != null and createManName != ''">
|
|
|
- or CREATE_MAN_NAME = #{createManName}
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
- </if>
|
|
|
- <if test="updateManNo != null and updateManNo != ''">
|
|
|
- or UPDATE_MAN_NO = #{updateManNo}
|
|
|
- </if>
|
|
|
- <if test="updateManName != null and updateManName != ''">
|
|
|
- or UPDATE_MAN_NAME = #{updateManName}
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
- </if>
|
|
|
- <if test="note != null and note != ''">
|
|
|
- or NOTE = #{note}
|
|
|
- </if>
|
|
|
+ where 1!=1
|
|
|
+ <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
+ or BASE_SPOT_NO = #{baseSpotNo}
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
+ or BASE_SPOT_NAME = #{baseSpotName}
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ or CAR_NO = #{carNo}
|
|
|
+ </if>
|
|
|
+ <if test="meterWeight != null">
|
|
|
+ or METER_WEIGHT = #{meterWeight}
|
|
|
+ </if>
|
|
|
+ <if test="meterName != null and meterName != ''">
|
|
|
+ or METER_NAME = #{meterName}
|
|
|
+ </if>
|
|
|
+ <if test="meterTime != null">
|
|
|
+ or TO_CHAR(METER_TIME,'yyyy-MM-dd') = '#{meterTime}'
|
|
|
+ </if>
|
|
|
+ <if test="upWeight != null">
|
|
|
+ or UP_WEIGHT = #{upWeight}
|
|
|
+ </if>
|
|
|
+ <if test="avgWeight != null">
|
|
|
+ or AVG_WEIGHT = #{avgWeight}
|
|
|
+ </if>
|
|
|
+ <if test="meterNum != null">
|
|
|
+ or METER_NUM = #{meterNum}
|
|
|
+ </if>
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
+ or VALUE_FLAG = #{valueFlag}
|
|
|
+ </if>
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
+ or CREATE_MAN_NO = #{createManNo}
|
|
|
+ </if>
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
+ or CREATE_MAN_NAME = #{createManName}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateManNo != null and updateManNo != ''">
|
|
|
+ or UPDATE_MAN_NO = #{updateManNo}
|
|
|
+ </if>
|
|
|
+ <if test="updateManName != null and updateManName != ''">
|
|
|
+ or UPDATE_MAN_NAME = #{updateManName}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ <if test="note != null and note != ''">
|
|
|
+ or NOTE = #{note}
|
|
|
+ </if>
|
|
|
+ <if test="tareType != null and tareType != ''">
|
|
|
+ or TARE_TYPE = #{tareType}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData">
|
|
|
- insert into METER_BASE_HIS_TARE_DATA (DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME,
|
|
|
- CAR_NO, METER_WEIGHT, METER_NAME,
|
|
|
- METER_TIME, UP_WEIGHT, AVG_WEIGHT,
|
|
|
- METER_NUM, VALUE_FLAG, CREATE_MAN_NO,
|
|
|
- CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
|
- UPDATE_MAN_NAME, UPDATE_TIME, NOTE
|
|
|
- )
|
|
|
- values (#{dataNo,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR},
|
|
|
- #{carNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, #{meterName,jdbcType=VARCHAR},
|
|
|
- #{meterTime,jdbcType=TIMESTAMP}, #{upWeight,jdbcType=DECIMAL}, #{avgWeight,jdbcType=DECIMAL},
|
|
|
- #{meterNum,jdbcType=DECIMAL}, #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
|
|
|
- #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
|
|
|
- #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{note,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
+ insert into METER_BASE_HIS_TARE_DATA (DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME,
|
|
|
+ CAR_NO, METER_WEIGHT, METER_NAME,
|
|
|
+ METER_TIME, UP_WEIGHT, AVG_WEIGHT,
|
|
|
+ METER_NUM, VALUE_FLAG, CREATE_MAN_NO,
|
|
|
+ CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
|
|
|
+ UPDATE_MAN_NAME, UPDATE_TIME, NOTE,
|
|
|
+ TARE_TYPE)
|
|
|
+ values (#{dataNo,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR},
|
|
|
+ #{carNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, #{meterName,jdbcType=VARCHAR},
|
|
|
+ #{meterTime,jdbcType=TIMESTAMP}, #{upWeight,jdbcType=DECIMAL}, #{avgWeight,jdbcType=DECIMAL},
|
|
|
+ #{meterNum,jdbcType=DECIMAL}, #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
|
|
|
+ #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
|
|
|
+ #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{note,jdbcType=VARCHAR},
|
|
|
+ #{tareType,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData">
|
|
|
insert into METER_BASE_HIS_TARE_DATA
|
|
|
@@ -286,6 +296,9 @@
|
|
|
<if test="note != null">
|
|
|
NOTE,
|
|
|
</if>
|
|
|
+ <if test="tareType != null">
|
|
|
+ TARE_TYPE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="dataNo != null">
|
|
|
@@ -342,6 +355,9 @@
|
|
|
<if test="note != null">
|
|
|
#{note,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="tareType != null">
|
|
|
+ #{tareType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData">
|
|
|
@@ -362,7 +378,8 @@
|
|
|
UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- NOTE = #{note,jdbcType=VARCHAR}
|
|
|
+ NOTE = #{note,jdbcType=VARCHAR},
|
|
|
+ TARE_TYPE = #{tareType,jdbcType=VARCHAR}
|
|
|
where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData">
|
|
|
@@ -419,6 +436,9 @@
|
|
|
<if test="note != null">
|
|
|
NOTE = #{note,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="tareType != null">
|
|
|
+ TARE_TYPE = #{tareType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where DATA_NO = #{dataNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -435,116 +455,192 @@
|
|
|
<include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
- insert into METER_BASE_HIS_TARE_DATA
|
|
|
- (DATA_NO,
|
|
|
- BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO,
|
|
|
- METER_WEIGHT, METER_NAME, METER_TIME,
|
|
|
- UP_WEIGHT, AVG_WEIGHT, METER_NUM,
|
|
|
- VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
- CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
- UPDATE_TIME, NOTE)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.dataNo,jdbcType=VARCHAR},
|
|
|
- #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.carNo,jdbcType=VARCHAR},
|
|
|
- #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterName,jdbcType=VARCHAR}, #{item.meterTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.upWeight,jdbcType=DECIMAL}, #{item.avgWeight,jdbcType=DECIMAL}, #{item.meterNum,jdbcType=DECIMAL},
|
|
|
- #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
|
|
|
- #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
+ insert into METER_BASE_HIS_TARE_DATA
|
|
|
+ (DATA_NO,
|
|
|
+ BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO,
|
|
|
+ METER_WEIGHT, METER_NAME, METER_TIME,
|
|
|
+ UP_WEIGHT, AVG_WEIGHT, METER_NUM,
|
|
|
+ VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
+ CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
+ UPDATE_TIME, NOTE, TARE_TYPE
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.dataNo,jdbcType=VARCHAR},
|
|
|
+ #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.carNo,jdbcType=VARCHAR},
|
|
|
+ #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterName,jdbcType=VARCHAR}, #{item.meterTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.upWeight,jdbcType=DECIMAL}, #{item.avgWeight,jdbcType=DECIMAL}, #{item.meterNum,jdbcType=DECIMAL},
|
|
|
+ #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR}, #{item.tareType,jdbcType=VARCHAR}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update METER_BASE_HIS_TARE_DATA
|
|
|
- set
|
|
|
- DATA_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.dataNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,BASE_SPOT_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,BASE_SPOT_NAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CAR_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,METER_WEIGHT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,METER_NAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,METER_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UP_WEIGHT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.upWeight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,AVG_WEIGHT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.avgWeight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,METER_NUM=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterNum,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,VALUE_FLAG=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_MAN_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_MAN_NAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_MAN_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_MAN_NAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,NOTE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
- when #{item.dataNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where DATA_NO in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.dataNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
+ update METER_BASE_HIS_TARE_DATA
|
|
|
+ set
|
|
|
+ DATA_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.dataNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,BASE_SPOT_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,BASE_SPOT_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CAR_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,METER_WEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,METER_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,METER_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UP_WEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.upWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,AVG_WEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.avgWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,METER_NUM=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.meterNum,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,VALUE_FLAG=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_MAN_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_MAN_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_MAN_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_MAN_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,NOTE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,TARE_TYPE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
|
|
|
+ when #{item.dataNo,jdbcType=VARCHAR} then #{item.tareType,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where DATA_NO in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.dataNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from METER_BASE_HIS_TARE_DATA
|
|
|
- where DATA_NO in
|
|
|
+ where DATA_NO in
|
|
|
<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(DATA_NO, LENGTH(DATA_NO) - 3))),0) + 1,4,'0') DATA_NO
|
|
|
FROM METER_BASE_HIS_TARE_DATA where instr(DATA_NO,#{afl,jdbcType=VARCHAR})>0
|
|
|
</select>
|
|
|
+ <select id="getList" resultMap="BaseResultMap">
|
|
|
+ <include refid="select_alias"></include>
|
|
|
+ <where>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and t.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and t.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="dataNo != null and dataNo != ''">
|
|
|
+ and DATA_NO = #{dataNo}
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
+ and BASE_SPOT_NO = #{baseSpotNo}
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotName != null and baseSpotName.size() != 0">
|
|
|
+ and base_spot_name in
|
|
|
+ <foreach collection="baseSpotName" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and CAR_NO = #{carNo}
|
|
|
+ </if>
|
|
|
+ <if test="meterWeight != null">
|
|
|
+ and METER_WEIGHT = #{meterWeight}
|
|
|
+ </if>
|
|
|
+ <if test="meterName != null and meterName != ''">
|
|
|
+ and METER_NAME = #{meterName}
|
|
|
+ </if>
|
|
|
+ <if test="meterTime != null">
|
|
|
+ and TO_CHAR(METER_TIME,'yyyy-MM-dd') = #{meterTime}
|
|
|
+ </if>
|
|
|
+ <if test="upWeight != null">
|
|
|
+ and UP_WEIGHT = #{upWeight}
|
|
|
+ </if>
|
|
|
+ <if test="avgWeight != null">
|
|
|
+ and AVG_WEIGHT = #{avgWeight}
|
|
|
+ </if>
|
|
|
+ <if test="meterNum != null">
|
|
|
+ and METER_NUM = #{meterNum}
|
|
|
+ </if>
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
+ and VALUE_FLAG = #{valueFlag}
|
|
|
+ </if>
|
|
|
+ <if test="createManNo != null and createManNo != ''">
|
|
|
+ and CREATE_MAN_NO = #{createManNo}
|
|
|
+ </if>
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
+ and CREATE_MAN_NAME = #{createManName}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateManNo != null and updateManNo != ''">
|
|
|
+ and UPDATE_MAN_NO = #{updateManNo}
|
|
|
+ </if>
|
|
|
+ <if test="updateManName != null and updateManName != ''">
|
|
|
+ and UPDATE_MAN_NAME = #{updateManName}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="note != null and note != ''">
|
|
|
+ and NOTE = #{note}
|
|
|
+ </if>
|
|
|
+ <if test="tareType != null and tareType != ''">
|
|
|
+ and TARE_TYPE = #{tareType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
-</mapper>
|
|
|
+</mapper>
|