|
|
@@ -13,27 +13,24 @@
|
|
|
<result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="CARRIAGE_NAME" jdbcType="VARCHAR" property="carriageName" />
|
|
|
- <result column="SPOT_NO" jdbcType="VARCHAR" property="spotNo" />
|
|
|
- <result column="SPOT_NAME" jdbcType="VARCHAR" property="spotName" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- CARRIAGE_WEIGHT_NO, CARRIAGE_CODE, CARRIAGE_WEIGHT, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
- CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CARRIAGE_NAME, SPOT_NO,
|
|
|
- SPOT_NAME
|
|
|
+ CARRIAGE_WEIGHT_NO, CARRIAGE_CODE, CARRIAGE_WEIGHT, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
+ CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CARRIAGE_NAME
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.CARRIAGE_WEIGHT_NO, t.CARRIAGE_CODE, t.CARRIAGE_WEIGHT, 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.CARRIAGE_NAME, t.SPOT_NO, t.SPOT_NAME
|
|
|
+ t.CARRIAGE_WEIGHT_NO, t.CARRIAGE_CODE, t.CARRIAGE_WEIGHT, 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.CARRIAGE_NAME
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
+ SELECT <include refid="columns" /> FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="carriageWeightNo != null and carriageWeightNo != ''">
|
|
|
and CARRIAGE_WEIGHT_NO = #{carriageWeightNo}
|
|
|
</if>
|
|
|
@@ -67,16 +64,10 @@
|
|
|
<if test="carriageName != null and carriageName != ''">
|
|
|
and CARRIAGE_NAME = #{carriageName}
|
|
|
</if>
|
|
|
- <if test="spotNo != null and spotNo != ''">
|
|
|
- and SPOT_NO = #{spotNo}
|
|
|
- </if>
|
|
|
- <if test="spotName != null and spotName != ''">
|
|
|
- and SPOT_NAME = #{spotName}
|
|
|
- </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="carriageWeightNo != null and carriageWeightNo != ''">
|
|
|
and CARRIAGE_WEIGHT_NO LIKE '%${carriageWeightNo}%'
|
|
|
</if>
|
|
|
@@ -110,12 +101,6 @@
|
|
|
<if test="carriageName != null and carriageName != ''">
|
|
|
and CARRIAGE_NAME LIKE '%${carriageName}%'
|
|
|
</if>
|
|
|
- <if test="spotNo != null and spotNo != ''">
|
|
|
- and SPOT_NO LIKE '%${spotNo}%'
|
|
|
- </if>
|
|
|
- <if test="spotName != null and spotName != ''">
|
|
|
- and SPOT_NAME LIKE '%${spotName}%'
|
|
|
- </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
@@ -124,55 +109,47 @@
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
- where 1!=1
|
|
|
- <if test="carriageCode != null and carriageCode != ''">
|
|
|
- or CARRIAGE_CODE = #{carriageCode}
|
|
|
- </if>
|
|
|
- <if test="carriageWeight != null">
|
|
|
- or CARRIAGE_WEIGHT = #{carriageWeight}
|
|
|
- </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="carriageName != null and carriageName != ''">
|
|
|
- or CARRIAGE_NAME = #{carriageName}
|
|
|
- </if>
|
|
|
- <if test="spotNo != null and spotNo != ''">
|
|
|
- or SPOT_NO = #{spotNo}
|
|
|
- </if>
|
|
|
- <if test="spotName != null and spotName != ''">
|
|
|
- or SPOT_NAME = #{spotName}
|
|
|
- </if>
|
|
|
+ where 1!=1
|
|
|
+ <if test="carriageCode != null and carriageCode != ''">
|
|
|
+ or CARRIAGE_CODE = #{carriageCode}
|
|
|
+ </if>
|
|
|
+ <if test="carriageWeight != null">
|
|
|
+ or CARRIAGE_WEIGHT = #{carriageWeight}
|
|
|
+ </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="carriageName != null and carriageName != ''">
|
|
|
+ or CARRIAGE_NAME = #{carriageName}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwaycarriageweight.model.MeterBaseRailwayCarriageWeight">
|
|
|
- insert into METER_BASE_RAILWAY_CARRIAGE_WEIGHT (CARRIAGE_WEIGHT_NO, CARRIAGE_CODE, CARRIAGE_WEIGHT,
|
|
|
- VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
- CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
- UPDATE_TIME, CARRIAGE_NAME, SPOT_NO,
|
|
|
- SPOT_NAME)
|
|
|
- values (#{carriageWeightNo,jdbcType=VARCHAR}, #{carriageCode,jdbcType=VARCHAR}, #{carriageWeight,jdbcType=DECIMAL},
|
|
|
- #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{carriageName,jdbcType=VARCHAR}, #{spotNo,jdbcType=VARCHAR},
|
|
|
- #{spotName,jdbcType=VARCHAR})
|
|
|
+ insert into METER_BASE_RAILWAY_CARRIAGE_WEIGHT (CARRIAGE_WEIGHT_NO, CARRIAGE_CODE, CARRIAGE_WEIGHT,
|
|
|
+ VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
+ CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
+ UPDATE_TIME, CARRIAGE_NAME)
|
|
|
+ values (#{carriageWeightNo,jdbcType=VARCHAR}, #{carriageCode,jdbcType=VARCHAR}, #{carriageWeight,jdbcType=DECIMAL},
|
|
|
+ #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{carriageName,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwaycarriageweight.model.MeterBaseRailwayCarriageWeight">
|
|
|
insert into METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
@@ -210,12 +187,6 @@
|
|
|
<if test="carriageName != null">
|
|
|
CARRIAGE_NAME,
|
|
|
</if>
|
|
|
- <if test="spotNo != null">
|
|
|
- SPOT_NO,
|
|
|
- </if>
|
|
|
- <if test="spotName != null">
|
|
|
- SPOT_NAME,
|
|
|
- </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="carriageWeightNo != null">
|
|
|
@@ -251,28 +222,20 @@
|
|
|
<if test="carriageName != null">
|
|
|
#{carriageName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="spotNo != null">
|
|
|
- #{spotNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="spotName != null">
|
|
|
- #{spotName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwaycarriageweight.model.MeterBaseRailwayCarriageWeight">
|
|
|
update METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
set CARRIAGE_CODE = #{carriageCode,jdbcType=VARCHAR},
|
|
|
- CARRIAGE_WEIGHT = #{carriageWeight,jdbcType=DECIMAL},
|
|
|
- VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
|
|
|
- CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
- CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
- UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- CARRIAGE_NAME = #{carriageName,jdbcType=VARCHAR},
|
|
|
- SPOT_NO = #{spotNo,jdbcType=VARCHAR},
|
|
|
- SPOT_NAME = #{spotName,jdbcType=VARCHAR}
|
|
|
+ CARRIAGE_WEIGHT = #{carriageWeight,jdbcType=DECIMAL},
|
|
|
+ VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
|
|
|
+ CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
|
|
|
+ CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
|
|
|
+ UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ CARRIAGE_NAME = #{carriageName,jdbcType=VARCHAR}
|
|
|
where CARRIAGE_WEIGHT_NO = #{carriageWeightNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwaycarriageweight.model.MeterBaseRailwayCarriageWeight">
|
|
|
@@ -308,109 +271,93 @@
|
|
|
<if test="carriageName != null">
|
|
|
CARRIAGE_NAME = #{carriageName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="spotNo != null">
|
|
|
- SPOT_NO = #{spotNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="spotName != null">
|
|
|
- SPOT_NAME = #{spotName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
</set>
|
|
|
where CARRIAGE_WEIGHT_NO = #{carriageWeightNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <include refid="select" />
|
|
|
where CARRIAGE_WEIGHT_NO = #{carriageWeightNo,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_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
- (CARRIAGE_WEIGHT_NO,
|
|
|
- CARRIAGE_CODE, CARRIAGE_WEIGHT,
|
|
|
- VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
- CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
- UPDATE_TIME, CARRIAGE_NAME, SPOT_NO,
|
|
|
- SPOT_NAME)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.carriageWeightNo,jdbcType=VARCHAR},
|
|
|
- #{item.carriageCode,jdbcType=VARCHAR}, #{item.carriageWeight,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.carriageName,jdbcType=VARCHAR}, #{item.spotNo,jdbcType=VARCHAR},
|
|
|
- #{item.spotName,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
+ insert into METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
+ (CARRIAGE_WEIGHT_NO,
|
|
|
+ CARRIAGE_CODE, CARRIAGE_WEIGHT,
|
|
|
+ VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
|
|
|
+ CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
|
|
|
+ UPDATE_TIME, CARRIAGE_NAME)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.carriageWeightNo,jdbcType=VARCHAR},
|
|
|
+ #{item.carriageCode,jdbcType=VARCHAR}, #{item.carriageWeight,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.carriageName,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
- set
|
|
|
- CARRIAGE_WEIGHT_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageWeightNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CARRIAGE_CODE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageCode,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CARRIAGE_WEIGHT=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageWeight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,VALUE_FLAG=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_MAN_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_MAN_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CREATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_MAN_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_MAN_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,CARRIAGE_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,SPOT_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.spotNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,SPOT_NAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case CARRIAGE_WEIGHT_NO" close="end">
|
|
|
- when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.spotName,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where CARRIAGE_WEIGHT_NO in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
- #{item.carriageWeightNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
+ update METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
+ set
|
|
|
+ CARRIAGE_WEIGHT_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageWeightNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CARRIAGE_CODE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageCode,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CARRIAGE_WEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,VALUE_FLAG=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_MAN_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_MAN_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_MAN_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_MAN_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,CARRIAGE_NAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case CARRIAGE_WEIGHT_NO" separator=" ">
|
|
|
+ when #{item.carriageWeightNo,jdbcType=VARCHAR} then #{item.carriageName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where CARRIAGE_WEIGHT_NO in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.carriageWeightNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
- where CARRIAGE_WEIGHT_NO in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ where CARRIAGE_WEIGHT_NO in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
@@ -418,26 +365,19 @@
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
|
<select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
- SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(carriage_weight_no, LENGTH(carriage_weight_no) - 4))),0) + 1,5,'0') carriage_weight_no
|
|
|
+ SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(CARRIAGE_WEIGHT_NO, LENGTH(CARRIAGE_WEIGHT_NO) - 4))),0) + 1,5,'0') CARRIAGE_WEIGHT_NO
|
|
|
FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<select id="queryByTime" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
SELECT * FROM METER_BASE_RAILWAY_CARRIAGE_WEIGHT
|
|
|
WHERE 1=1
|
|
|
- <if test="(beginTime != null and beginTime !='') or (endTime != null and endTime !='')">
|
|
|
+ <if test="(beginTime != null and beginTime !='') and (endTime != null and endTime !='')">
|
|
|
and CREATE_TIME BETWEEN to_date(#{beginTime},'YYYY-MM-DD hh24:mi:ss') and to_date(#{endTime},'YYYY-MM-DD hh24:mi:ss')
|
|
|
</if>
|
|
|
<if test="valueFlag != null and valueFlag != ''" >
|
|
|
and VALUE_FLAG = #{valueFlag}
|
|
|
</if>
|
|
|
- <if test="spotNo != null and spotNo != ''" >
|
|
|
- and SPOT_NO = #{spotNo}
|
|
|
- </if>
|
|
|
- <if test="spotName != null and spotName != ''" >
|
|
|
- and SPOT_NAME = #{spotName}
|
|
|
- </if>
|
|
|
<if test="carriageCode != null and carriageCode != ''" >
|
|
|
and CARRIAGE_CODE like '%${carriageCode}%'
|
|
|
</if>
|