|
@@ -12,14 +12,19 @@
|
|
|
<result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
+ <result column="REQUIREMENT_UNLOAD_UNIT_ID" jdbcType="DECIMAL" property="requirementUnloadUnitId" />
|
|
|
+ <result column="REQUIREMENT_PLATFORM_ID" jdbcType="DECIMAL" property="requirementPlatformId" />
|
|
|
+ <result column="LOAD_UNLOAD_SEQUENCE" jdbcType="DECIMAL" property="loadUnloadSequence" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- REQUIREMENT_MATERIAL_ID, REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT, MATERIAL_COUNT,
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
+ REQUIREMENT_MATERIAL_ID, REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT, MATERIAL_COUNT,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID, LOAD_UNLOAD_SEQUENCE
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.REQUIREMENT_MATERIAL_ID, t.REQUIREMENT_ID, t.MATERIAL_ID, t.MATERIAL_WEIGHT, t.MATERIAL_COUNT,
|
|
|
- t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
|
|
|
+ t.REQUIREMENT_MATERIAL_ID, t.REQUIREMENT_ID, t.MATERIAL_ID, t.MATERIAL_WEIGHT, t.MATERIAL_COUNT,
|
|
|
+ t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
|
|
|
+ t.REQUIREMENT_UNLOAD_UNIT_ID, t.REQUIREMENT_PLATFORM_ID, t.LOAD_UNLOAD_SEQUENCE
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM AMSTRUCK_REQUIREMENT_MATERIAL
|
|
@@ -28,7 +33,7 @@
|
|
|
SELECT <include refid="columns_alias" /> FROM AMSTRUCK_REQUIREMENT_MATERIAL t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="requirementMaterialId != null">
|
|
|
and REQUIREMENT_MATERIAL_ID = #{requirementMaterialId}
|
|
|
</if>
|
|
@@ -59,10 +64,19 @@
|
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
</if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ and REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ and REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="requirementMaterialId != null">
|
|
|
and REQUIREMENT_MATERIAL_ID = #{requirementMaterialId}
|
|
|
</if>
|
|
@@ -93,52 +107,74 @@
|
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
</if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ and REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ and REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
|
delete from AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
- where 1!=1
|
|
|
- <if test="requirementId != null">
|
|
|
- or REQUIREMENT_ID = #{requirementId}
|
|
|
- </if>
|
|
|
- <if test="materialId != null">
|
|
|
- or MATERIAL_ID = #{materialId}
|
|
|
- </if>
|
|
|
- <if test="materialWeight != null">
|
|
|
- or MATERIAL_WEIGHT = #{materialWeight}
|
|
|
- </if>
|
|
|
- <if test="materialCount != null">
|
|
|
- or MATERIAL_COUNT = #{materialCount}
|
|
|
- </if>
|
|
|
- <if test="insertUsername != null and insertUsername != ''">
|
|
|
- or INSERT_USERNAME = #{insertUsername}
|
|
|
- </if>
|
|
|
- <if test="insertTime != null">
|
|
|
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
- </if>
|
|
|
- <if test="updateUsername != null and updateUsername != ''">
|
|
|
- or UPDATE_USERNAME = #{updateUsername}
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
- </if>
|
|
|
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
- </if>
|
|
|
+ where 1!=1
|
|
|
+ <if test="requirementId != null">
|
|
|
+ or REQUIREMENT_ID = #{requirementId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="materialWeight != null">
|
|
|
+ or MATERIAL_WEIGHT = #{materialWeight}
|
|
|
+ </if>
|
|
|
+ <if test="materialCount != null">
|
|
|
+ or MATERIAL_COUNT = #{materialCount}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ or REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ or REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ or LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
|
- insert into AMSTRUCK_REQUIREMENT_MATERIAL (REQUIREMENT_MATERIAL_ID, REQUIREMENT_ID,
|
|
|
- MATERIAL_ID, MATERIAL_WEIGHT, MATERIAL_COUNT,
|
|
|
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK)
|
|
|
- values (#{requirementMaterialId,jdbcType=DECIMAL}, #{requirementId,jdbcType=DECIMAL},
|
|
|
- #{materialId,jdbcType=DECIMAL}, #{materialWeight,jdbcType=DECIMAL}, #{materialCount,jdbcType=DECIMAL},
|
|
|
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
|
|
|
+ insert into AMSTRUCK_REQUIREMENT_MATERIAL (REQUIREMENT_MATERIAL_ID, REQUIREMENT_ID,
|
|
|
+ MATERIAL_ID, MATERIAL_WEIGHT, MATERIAL_COUNT,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, REQUIREMENT_UNLOAD_UNIT_ID,
|
|
|
+ REQUIREMENT_PLATFORM_ID, LOAD_UNLOAD_SEQUENCE
|
|
|
+ )
|
|
|
+ values (#{requirementMaterialId,jdbcType=DECIMAL}, #{requirementId,jdbcType=DECIMAL},
|
|
|
+ #{materialId,jdbcType=DECIMAL}, #{materialWeight,jdbcType=DECIMAL}, #{materialCount,jdbcType=DECIMAL},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{requirementUnloadUnitId,jdbcType=DECIMAL},
|
|
|
+ #{requirementPlatformId,jdbcType=DECIMAL}, #{loadUnloadSequence,jdbcType=DECIMAL}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
@@ -173,6 +209,15 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
INSERT_UPDATE_REMARK,
|
|
|
</if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ REQUIREMENT_UNLOAD_UNIT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ REQUIREMENT_PLATFORM_ID,
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ LOAD_UNLOAD_SEQUENCE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="requirementMaterialId != null">
|
|
@@ -205,6 +250,15 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
#{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ #{requirementUnloadUnitId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ #{requirementPlatformId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ #{loadUnloadSequence,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
@@ -217,7 +271,10 @@
|
|
|
INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId,jdbcType=DECIMAL},
|
|
|
+ REQUIREMENT_PLATFORM_ID = #{requirementPlatformId,jdbcType=DECIMAL},
|
|
|
+ LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence,jdbcType=DECIMAL}
|
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
@@ -250,10 +307,19 @@
|
|
|
<if test="insertUpdateRemark != null">
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="requirementUnloadUnitId != null">
|
|
|
+ REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="requirementPlatformId != null">
|
|
|
+ REQUIREMENT_PLATFORM_ID = #{requirementPlatformId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="loadUnloadSequence != null">
|
|
|
+ LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -265,89 +331,116 @@
|
|
|
<include refid="select" />
|
|
|
<include refid="whereLike" />
|
|
|
</select>
|
|
|
- <select id="getOffsetWarehouse" resultType="java.util.Map">
|
|
|
- SELECT rw.warehouse_id AS "id",
|
|
|
- rw.warehouse_id AS "value",
|
|
|
- rw.warehouse_name AS "label"
|
|
|
- FROM rms_warehouse rw
|
|
|
- where rw.warehouse_type_id = 2
|
|
|
-
|
|
|
- </select>
|
|
|
- <insert id="batchInsert" parameterType="java.util.List">
|
|
|
- insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
- (REQUIREMENT_MATERIAL_ID,
|
|
|
- REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT,
|
|
|
- MATERIAL_COUNT, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
- )
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.requirementMaterialId,jdbcType=DECIMAL},
|
|
|
- #{item.requirementId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.materialWeight,jdbcType=DECIMAL},
|
|
|
- #{item.materialCount,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- from dual
|
|
|
- </foreach> )
|
|
|
+ <select id="getRequirementMaterial" resultType="java.util.Map">
|
|
|
+ select rw1.warehouse_name "unloadName",
|
|
|
+ rw1.WAREHOUSE_ID "unloadId",
|
|
|
+ rw2.warehouse_name "loadName",
|
|
|
+ rw2.WAREHOUSE_ID "loadId",
|
|
|
+ arm.material_weight "materialWeight",
|
|
|
+ arm.material_count "materialCount",
|
|
|
+ arm.MATERIAL_ID "materialId",
|
|
|
+ rm.material_name || rm.material_specification || '(' ||
|
|
|
+ rm.material_model || ')' "materialName",
|
|
|
+ arm.load_unload_sequence "loadSequence"
|
|
|
+ from amstruck_requirement_material arm
|
|
|
+ left join rms_warehouse rw1
|
|
|
+ on rw1.warehouse_id = arm.requirement_unload_unit_id
|
|
|
+ left join rms_warehouse rw2
|
|
|
+ on rw2.warehouse_id = arm.requirement_platform_id
|
|
|
+ left join rms_material rm
|
|
|
+ on rm.material_id = arm.material_id
|
|
|
+ left join amstruck_inward_requirement air
|
|
|
+ on air.requirement_id = arm.requirement_id
|
|
|
+ where air.requirement_id = #{requirementId}
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
+ (REQUIREMENT_MATERIAL_ID,
|
|
|
+ REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT,
|
|
|
+ MATERIAL_COUNT, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID,
|
|
|
+ LOAD_UNLOAD_SEQUENCE)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.requirementMaterialId,jdbcType=DECIMAL},
|
|
|
+ #{item.requirementId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.materialWeight,jdbcType=DECIMAL},
|
|
|
+ #{item.materialCount,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{item.requirementUnloadUnitId,jdbcType=DECIMAL}, #{item.requirementPlatformId,jdbcType=DECIMAL},
|
|
|
+ #{item.loadUnloadSequence,jdbcType=DECIMAL} from dual
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
- set
|
|
|
- REQUIREMENT_MATERIAL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,REQUIREMENT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,MATERIAL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,MATERIAL_WEIGHT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialWeight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,MATERIAL_COUNT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialCount,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,UPDATE_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
- when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where REQUIREMENT_MATERIAL_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
+ update AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
+ set
|
|
|
+ REQUIREMENT_MATERIAL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,REQUIREMENT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_WEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialWeight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_COUNT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialCount,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,REQUIREMENT_UNLOAD_UNIT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementUnloadUnitId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,REQUIREMENT_PLATFORM_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.requirementPlatformId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,LOAD_UNLOAD_SEQUENCE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.loadUnloadSequence,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where REQUIREMENT_MATERIAL_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from AMSTRUCK_REQUIREMENT_MATERIAL
|
|
|
- where REQUIREMENT_MATERIAL_ID in
|
|
|
+ where REQUIREMENT_MATERIAL_ID in
|
|
|
<foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
</mapper>
|