|
@@ -15,15 +15,17 @@
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
<result column="INBOUND_RESULT_ID" jdbcType="DECIMAL" property="inboundResultId" />
|
|
|
+ <result column="RESULT_MATERIAL_ID" jdbcType="DECIMAL" property="resultMaterialId" />
|
|
|
+<!-- RESULT_MATERIAL_ID,resultMaterialId-->
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
RESULT_ID, OUTBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL, RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
|
|
|
- RESULT_CHECK, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
|
|
|
+ RESULT_CHECK, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID,RESULT_MATERIAL_ID
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.RESULT_ID, t.OUTBOUND_RESULT_ID, t.LOAD_ID, t.RESULT_MATERIAL, t.RESULT_LOAD_TIME,
|
|
|
t.OUTBOUND_MATERIAL_NUMBER, t.RESULT_CHECK, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK ,t.INBOUND_RESULT_ID
|
|
|
+ t.UPDATE_TIME, t.INSERT_UPDATE_REMARK ,t.INBOUND_RESULT_ID,t.RESULT_MATERIAL_ID
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns"/> FROM WMSP_OUTBOUND_SCAN_RESULT
|
|
@@ -72,6 +74,9 @@
|
|
|
<if test="inboundResultId != null">
|
|
|
and INBOUND_RESULT_ID = #{inboundResultId}
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null">
|
|
|
+ and RESULT_MATERIAL_ID = #{resultMaterialId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -115,6 +120,9 @@
|
|
|
<if test="inboundResultId != null and inboundResultId != ''">
|
|
|
and INBOUND_RESULT_ID LIKE '%${inboundResultId}%'
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null and resultMaterialId != ''">
|
|
|
+ and RESULT_MATERIAL_ID LIKE '%${resultMaterialId}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -160,17 +168,20 @@
|
|
|
<if test="inboundResultId != null and inboundResultId != ''">
|
|
|
or INBOUND_RESULT_ID = #{inboundResultId}
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null and resultMaterialId != ''">
|
|
|
+ or RESULT_MATERIAL_ID = #{resultMaterialId}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
|
|
|
insert into WMSP_OUTBOUND_SCAN_RESULT (RESULT_ID, OUTBOUND_RESULT_ID, LOAD_ID,
|
|
|
RESULT_MATERIAL, RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
|
|
|
RESULT_CHECK, INSERT_USERNAME, INSERT_TIME,
|
|
|
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID,RESULT_MATERIAL_ID
|
|
|
)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{outboundResultId,jdbcType=DECIMAL}, #{loadId,jdbcType=DECIMAL},
|
|
|
- #{resultMaterial,jdbcType=VARCHAR}, #{resultLoadTime,jdbcType=TIMESTAMP}, #{outboundMaterialNumber,jdbcType=DECIMAL},
|
|
|
+ #{resultMaterial,jdbcType=VARCHAR}, #{resultLoadTime,jdbcType=TIMESTAMP}, #{outboundMaterialNumber,jdbcType=DECIMAL},
|
|
|
#{resultCheck,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},#{inboundResultId,jdbcType=DECIMAL}
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},#{inboundResultId,jdbcType=DECIMAL},,#{resultMaterialId,jdbcType=DECIMAL}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
|
|
@@ -215,6 +226,9 @@
|
|
|
<if test="inboundResultId != null">
|
|
|
INBOUND_RESULT_ID,
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null">
|
|
|
+ RESULT_MATERIAL_ID,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -256,6 +270,9 @@
|
|
|
<if test="inboundResultId != null">
|
|
|
#{inboundResultId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null">
|
|
|
+ #{resultMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
|
|
@@ -272,6 +289,7 @@
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
|
|
|
+ RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL},
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspOutboundScanResult">
|
|
@@ -313,6 +331,9 @@
|
|
|
<if test="inboundResultId != null">
|
|
|
INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="resultMaterialId != null">
|
|
|
+ RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -335,7 +356,7 @@
|
|
|
RESULT_LOAD_TIME, OUTBOUND_MATERIAL_NUMBER,
|
|
|
RESULT_CHECK, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,INBOUND_RESULT_ID,RESULT_MATERIAL_ID
|
|
|
)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
@@ -343,8 +364,8 @@
|
|
|
#{item.outboundResultId,jdbcType=DECIMAL}, #{item.loadId,jdbcType=DECIMAL}, #{item.resultMaterial,jdbcType=VARCHAR},
|
|
|
#{item.resultLoadTime,jdbcType=TIMESTAMP}, #{item.outboundMaterialNumber,jdbcType=DECIMAL},
|
|
|
#{item.resultCheck,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.inboundResultId,jdbcType=DECIMAL}
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.inboundResultId,jdbcType=DECIMAL}, #{item.resultMaterialId,jdbcType=DECIMAL}
|
|
|
from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
@@ -403,6 +424,10 @@
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundResultId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,RESULT_MATERIAL_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -470,7 +495,10 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getResultStrs" resultType="java.lang.String">
|
|
|
- select RESULT_MATERIAL "resultMaterial" from WMSP_OUTBOUND_SCAN_RESULT where OUTBOUND_RESULT_ID=#{resultId}
|
|
|
+ select wosr.RESULT_MATERIAL "resultMaterial" from WMSP_OUTBOUND_SCAN_RESULT wosr
|
|
|
+ left join WMSP_OUTBOUND_RESULT_MATERIAL worm
|
|
|
+ on wosr.RESULT_MATERIAL_ID=worm.RESULT_MATERIAL_ID
|
|
|
+ where wosr.OUTBOUND_RESULT_ID=#{resultId} and worm.STATUS=1
|
|
|
</select>
|
|
|
|
|
|
|