|
@@ -15,16 +15,18 @@
|
|
<result column="REQUIREMENT_UNLOAD_UNIT_ID" jdbcType="DECIMAL" property="requirementUnloadUnitId" />
|
|
<result column="REQUIREMENT_UNLOAD_UNIT_ID" jdbcType="DECIMAL" property="requirementUnloadUnitId" />
|
|
<result column="REQUIREMENT_PLATFORM_ID" jdbcType="DECIMAL" property="requirementPlatformId" />
|
|
<result column="REQUIREMENT_PLATFORM_ID" jdbcType="DECIMAL" property="requirementPlatformId" />
|
|
<result column="LOAD_UNLOAD_SEQUENCE" jdbcType="DECIMAL" property="loadUnloadSequence" />
|
|
<result column="LOAD_UNLOAD_SEQUENCE" jdbcType="DECIMAL" property="loadUnloadSequence" />
|
|
|
|
+ <result column="MATERIAL_LUNO" jdbcType="VARCHAR" property="materialLuno" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<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_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID, LOAD_UNLOAD_SEQUENCE
|
|
|
|
|
|
+ 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, MATERIAL_LUNO
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<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_UNLOAD_UNIT_ID, t.REQUIREMENT_PLATFORM_ID, t.LOAD_UNLOAD_SEQUENCE
|
|
|
|
|
|
+ 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,
|
|
|
|
+ t.MATERIAL_LUNO
|
|
</sql>
|
|
</sql>
|
|
<sql id="select">
|
|
<sql id="select">
|
|
SELECT <include refid="columns" /> FROM AMSTRUCK_REQUIREMENT_MATERIAL
|
|
SELECT <include refid="columns" /> FROM AMSTRUCK_REQUIREMENT_MATERIAL
|
|
@@ -73,6 +75,9 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null and materialLuno != ''">
|
|
|
|
+ and MATERIAL_LUNO = #{materialLuno}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
@@ -116,6 +121,9 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
and LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null and materialLuno != ''">
|
|
|
|
+ and MATERIAL_LUNO LIKE '%${materialLuno}%'
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
<delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
@@ -161,20 +169,23 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
or LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
or LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null and materialLuno != ''">
|
|
|
|
+ or MATERIAL_LUNO = #{materialLuno}
|
|
|
|
+ </if>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL (REQUIREMENT_MATERIAL_ID, REQUIREMENT_ID,
|
|
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
|
|
|
|
- )
|
|
|
|
|
|
+ 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,
|
|
|
|
+ MATERIAL_LUNO)
|
|
values (#{requirementMaterialId,jdbcType=DECIMAL}, #{requirementId,jdbcType=DECIMAL},
|
|
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}
|
|
|
|
- )
|
|
|
|
|
|
+ #{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},
|
|
|
|
+ #{materialLuno,jdbcType=VARCHAR})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
@@ -218,6 +229,9 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
LOAD_UNLOAD_SEQUENCE,
|
|
LOAD_UNLOAD_SEQUENCE,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null">
|
|
|
|
+ MATERIAL_LUNO,
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="requirementMaterialId != null">
|
|
<if test="requirementMaterialId != null">
|
|
@@ -259,22 +273,26 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
#{loadUnloadSequence,jdbcType=DECIMAL},
|
|
#{loadUnloadSequence,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null">
|
|
|
|
+ #{materialLuno,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
update AMSTRUCK_REQUIREMENT_MATERIAL
|
|
update AMSTRUCK_REQUIREMENT_MATERIAL
|
|
set REQUIREMENT_ID = #{requirementId,jdbcType=DECIMAL},
|
|
set REQUIREMENT_ID = #{requirementId,jdbcType=DECIMAL},
|
|
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
- MATERIAL_WEIGHT = #{materialWeight,jdbcType=DECIMAL},
|
|
|
|
- MATERIAL_COUNT = #{materialCount,jdbcType=DECIMAL},
|
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
- 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}
|
|
|
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ MATERIAL_WEIGHT = #{materialWeight,jdbcType=DECIMAL},
|
|
|
|
+ MATERIAL_COUNT = #{materialCount,jdbcType=DECIMAL},
|
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ 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},
|
|
|
|
+ MATERIAL_LUNO = #{materialLuno,jdbcType=VARCHAR}
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckRequirementMaterial">
|
|
@@ -316,6 +334,9 @@
|
|
<if test="loadUnloadSequence != null">
|
|
<if test="loadUnloadSequence != null">
|
|
LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence,jdbcType=DECIMAL},
|
|
LOAD_UNLOAD_SEQUENCE = #{loadUnloadSequence,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="materialLuno != null">
|
|
|
|
+ MATERIAL_LUNO = #{materialLuno,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
where REQUIREMENT_MATERIAL_ID = #{requirementMaterialId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
@@ -331,30 +352,7 @@
|
|
<include refid="select" />
|
|
<include refid="select" />
|
|
<include refid="whereLike" />
|
|
<include refid="whereLike" />
|
|
</select>
|
|
</select>
|
|
- <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 id="batchInsert" parameterType="java.util.List">
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
insert into AMSTRUCK_REQUIREMENT_MATERIAL
|
|
(REQUIREMENT_MATERIAL_ID,
|
|
(REQUIREMENT_MATERIAL_ID,
|
|
REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT,
|
|
REQUIREMENT_ID, MATERIAL_ID, MATERIAL_WEIGHT,
|
|
@@ -362,7 +360,8 @@
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID,
|
|
REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID,
|
|
- LOAD_UNLOAD_SEQUENCE)
|
|
|
|
|
|
+ LOAD_UNLOAD_SEQUENCE, MATERIAL_LUNO
|
|
|
|
+ )
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
select
|
|
select
|
|
#{item.requirementMaterialId,jdbcType=DECIMAL},
|
|
#{item.requirementMaterialId,jdbcType=DECIMAL},
|
|
@@ -371,7 +370,8 @@
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
#{item.requirementUnloadUnitId,jdbcType=DECIMAL}, #{item.requirementPlatformId,jdbcType=DECIMAL},
|
|
#{item.requirementUnloadUnitId,jdbcType=DECIMAL}, #{item.requirementPlatformId,jdbcType=DECIMAL},
|
|
- #{item.loadUnloadSequence,jdbcType=DECIMAL} from dual
|
|
|
|
|
|
+ #{item.loadUnloadSequence,jdbcType=DECIMAL}, #{item.materialLuno,jdbcType=VARCHAR}
|
|
|
|
+ from dual
|
|
</foreach> )
|
|
</foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -429,6 +429,10 @@
|
|
<foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
<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}
|
|
when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.loadUnloadSequence,jdbcType=DECIMAL}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ ,MATERIAL_LUNO=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_MATERIAL_ID" separator=" ">
|
|
|
|
+ when #{item.requirementMaterialId,jdbcType=DECIMAL} then #{item.materialLuno,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
where REQUIREMENT_MATERIAL_ID in
|
|
where REQUIREMENT_MATERIAL_ID in
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
#{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
#{item.requirementMaterialId,jdbcType=DECIMAL}
|
|
@@ -442,13 +446,14 @@
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
<!-- 友情提示!!!-->
|
|
<!-- 友情提示!!!-->
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<select id="getMaterialId" resultType="java.math.BigDecimal" parameterType="map">
|
|
<select id="getMaterialId" resultType="java.math.BigDecimal" parameterType="map">
|
|
select RM.MATERIAL_ID from RMS_MATERIAL RM
|
|
select RM.MATERIAL_ID from RMS_MATERIAL RM
|
|
- left join RMS_MATERIAL_TYPE RMT
|
|
|
|
- on rmt.MATERIAL_TYPE_ID = rm.MATERIAL_TYPE_ID
|
|
|
|
- where rmt.MATERIAL_TYPE_NAME = '钢坯'
|
|
|
|
- and rm.MATERIAL_MODEL = #{model}
|
|
|
|
- and rm.MATERIAL_SPECIFICATION = #{type}
|
|
|
|
|
|
+ where rm.MATERIAL_NAME = '钢坯'
|
|
|
|
+ AND RM.MATERIAL_SPECIFICATION = #{type}
|
|
|
|
+ AND RM.MATERIAL_MODEL = #{model}
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|