|
@@ -37,6 +37,17 @@
|
|
|
<result property="modTime" column="mod_time"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="listCusAcqGoodsSeat" resultMap="cusAcqGoodsSeat" parameterType="List">
|
|
|
+ select * from acq_goods_on_seat
|
|
|
+ <where>
|
|
|
+ <foreach collection="list" item="i" index="idx" open="(" separator="or" close=")">
|
|
|
+ <if test="i.seatNo !=null and i.seatNo !=''">
|
|
|
+ sku_no=#{i.skuNo} and seat_no=#{i.seatNo}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 库位货物数据 -->
|
|
|
<insert id="addCusAcqGoodsSeat06" parameterType="List">
|
|
|
INSERT INTO acq_goods_on_seat (
|
|
@@ -62,4 +73,146 @@
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
+ <update id="updateCusAcqGoodsSeat06" parameterType="List">
|
|
|
+ UPDATE acq_goods_on_seat
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
+ <trim prefix="goods_name =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.goodsName !=null and i.goodsName !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.goodsName, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="code_ts =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.codeTs !=null and i.codeTs !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.codeTs, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="form_no_dec =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.formNoDec !=null and i.formNoDec !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.formNoDec, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="form_no =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.formNo !=null and i.formNo !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.formNo, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="g_unit =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.gUnit !=null and i.gUnit !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.gUnit, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="g_qyt =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.gQty !=null and i.gQty !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.gQty, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="legal_unit =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.legalUnit !=null and i.legalUnit !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.legalUnit, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="legal_qyt =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.legalQty !=null and i.legalQty !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.legalQty, jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="goods_model =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.goodsModel !=null and i.goodsModel !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.goodsModel, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="owner_code =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.ownerCode !=null and i.ownerCode !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.ownerCode, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="owner_name =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.ownerName !=null and i.ownerName !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.ownerName, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="store_company_name =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.storeCompanyName !=null and i.storeCompanyName !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.storeCompanyName, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="store_usc_code =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.storeUscCode !=null and i.storeUscCode !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.storeUscCode, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="store_customs_code =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.storeCustomsCode !=null and i.storeCustomsCode !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.storeCustomsCode, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="store_code =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.storeCode !=null and i.storeCode !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.storeCode, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="moder_sn =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.moderSn !=null and i.moderSn !=''">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.moderSn, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="mod_time =case" suffix="end,">
|
|
|
+ <foreach collection="list" item="i" index="idx">
|
|
|
+ <if test="i.modTime !=null">
|
|
|
+ when sku_no=#{i.skuNo} and seat_no=#{i.seatNo} then #{i.modTime, jdbcType=DATE}
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </trim>
|
|
|
+ <where>
|
|
|
+ <if test="list != null and list.size()>0">
|
|
|
+ <foreach collection="list" item="i" index="index" open="(" separator="or" close=")">
|
|
|
+ sku_no=#{i.skuNo} and seat_no=#{i.seatNo}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteCusAcqGoodsSeat06" parameterType="List">
|
|
|
+ DELETE FROM acq_goods_on_seat
|
|
|
+ <where>
|
|
|
+ <if test="list != null and list.size()>0">
|
|
|
+ <foreach collection="list" item="i" index="index" open="id IN (" separator="," close=")">
|
|
|
+ #{i.id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </delete>
|
|
|
</mapper>
|