|
@@ -31,6 +31,18 @@
|
|
|
<result property="modTime" column="mod_time"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="listAcqInventoryInfo03" resultMap="cusAcqInventoryInfo" parameterType="List">
|
|
|
+ select * from acq_inventory_info
|
|
|
+ <where>
|
|
|
+ <if test="list != null and list.size()>0">
|
|
|
+ sku IN
|
|
|
+ <foreach collection="list" item="i" index="idx" open="(" separator="," close=")">
|
|
|
+ #{i.sku}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 库存数据 -->
|
|
|
<insert id="addAcqInventoryInfo03" parameterType="List">
|
|
|
INSERT INTO acq_inventory_info (goods_name, code_ts, sku_no, goods_id,
|
|
@@ -51,4 +63,130 @@
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
+ <update id="updateAcqInventoryInfo03" parameterType="List">
|
|
|
+ UPDATE acq_inventory_info
|
|
|
+ <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} 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} then #{i.codeTs, 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} 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} 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} 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} 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} 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} 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} 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} 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} 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} 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} 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} 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} 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" separator="or" >
|
|
|
+ sku_no=#{i.skuNo}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|