|
@@ -37,11 +37,12 @@
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
+ <result property="fOriginalbilldate" column="f_originalbilldate"/>
|
|
|
<result property="remark" column="remark"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTWhgenlegVo">
|
|
|
- select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_warehouseid, f_originalbillno, f_marks, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty, f_pregrossweight, f_prenetweight, f_qtyD, f_volumnD, f_grossweightD, f_netweightD, f_volumnC, f_qtyC, f_qtyblc, f_grossweightC, f_netweightC, f_grossweightblc, f_netweightblc, f_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_whgenleg
|
|
|
+ select f_accyear, f_id, f_accmonth, f_corpid, f_mblno, f_originalbilldate, f_warehouseid, f_originalbillno, f_marks, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty, f_pregrossweight, f_prenetweight, f_qtyD, f_volumnD, f_grossweightD, f_netweightD, f_volumnC, f_qtyC, f_qtyblc, f_grossweightC, f_netweightC, f_grossweightblc, f_netweightblc, f_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_whgenleg
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTWhgenlegList" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
|
|
@@ -57,6 +58,7 @@
|
|
|
<if test="fVolumnd != null ">and f_volumnD = #{fVolumnd}</if>
|
|
|
<if test="fWarehouseid != null ">and f_warehouseid = #{fWarehouseid}</if>
|
|
|
<if test="fGrossweightd != null ">and f_grossweightD = #{fGrossweightd}</if>
|
|
|
+ <if test="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
|
|
|
<if test="fNetweightd != null ">and f_netweightD = #{fNetweightd}</if>
|
|
|
<if test="fVolumnc != null ">and f_volumnC = #{fVolumnc}</if>
|
|
|
<if test="fQtyc != null ">and f_qtyC = #{fQtyc}</if>
|
|
@@ -75,11 +77,12 @@
|
|
|
select
|
|
|
leg.f_id AS fId,
|
|
|
corp.f_name AS fCorpid,
|
|
|
- area.f_name AS fWarehouseLocationid,
|
|
|
- leg.f_warehouse_locationid AS fWarehouseLocationids,
|
|
|
+ area.f_name AS fWarehouseLocationids,
|
|
|
+ leg.f_originalbillno AS fOriginalbillno,
|
|
|
+ leg.f_warehouse_locationid AS fWarehouseLocationid,
|
|
|
leg.f_trademodeid AS fTrademodeid,
|
|
|
- goods.f_name AS fGoodsid,
|
|
|
- leg.f_goodsid AS fGoodsids,
|
|
|
+ goods.f_name AS fGoodsids,
|
|
|
+ leg.f_goodsid AS fGoodsid,
|
|
|
leg.f_volumnD AS fVolumnD,
|
|
|
leg.f_qtyD AS fQtyD,
|
|
|
leg.f_mblno AS fMblno,
|
|
@@ -94,6 +97,7 @@
|
|
|
leg.f_netweightblc AS fNetweightblc,
|
|
|
leg.f_marks AS fMarks,
|
|
|
DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
|
|
|
+ DATE_FORMAT( leg.f_originalbilldate, '%Y-%m-%d' ) AS fOriginalbilldate,
|
|
|
leg.f_cntrno AS fCntrno
|
|
|
FROM
|
|
|
t_whgenleg leg
|
|
@@ -101,19 +105,29 @@
|
|
|
LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
|
|
|
LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
|
|
|
<where>
|
|
|
- <if test="fOriginalbillno != null and fOriginalbillno != ''">and leg.f_originalbillno = #{fOriginalbillno}</if>
|
|
|
+ <if test="fOriginalbillno != null and fOriginalbillno != ''">and leg.f_originalbillno =
|
|
|
+ #{fOriginalbillno}
|
|
|
+ </if>
|
|
|
<if test="fPreqty != null ">and leg.f_preqty = #{fPreqty}</if>
|
|
|
<if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
|
|
|
<if test="fMblno != null ">and leg.f_mblno = #{fMblno}</if>
|
|
|
+ <if test='orgStorageDate != null and orgStorageDate[0] != null and orgStorageDate[0]!= ""'>
|
|
|
+ and leg.f_originalbilldate >= #{orgStorageDate[0]}
|
|
|
+ </if>
|
|
|
+ <if test='orgStorageDate != null and orgStorageDate[1] != null and orgStorageDate[1]!= ""'>
|
|
|
+ and leg.f_originalbilldate <= #{orgStorageDate[1]}
|
|
|
+ </if>
|
|
|
<if test="fPregrossweight != null ">and leg.f_pregrossweight = #{fPregrossweight}</if>
|
|
|
<if test="fPrenetweight != null ">and leg.f_prenetweight = #{fPrenetweight}</if>
|
|
|
<if test="fQtyd != null ">and leg.f_qtyD = #{fQtyd}</if>
|
|
|
+ <if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
|
|
|
<if test="fWarehouseid != null ">and leg.f_warehouseid = #{fWarehouseid}</if>
|
|
|
<if test="fVolumnd != null ">and leg.f_volumnD = #{fVolumnd}</if>
|
|
|
<if test="fGrossweightd != null ">and leg.f_grossweightD = #{fGrossweightd}</if>
|
|
|
<if test="fNetweightd != null ">and leg.f_netweightD = #{fNetweightd}</if>
|
|
|
<if test="fVolumnc != null ">and leg.f_volumnC = #{fVolumnc}</if>
|
|
|
<if test="fQtyc != null ">and leg.f_qtyC = #{fQtyc}</if>
|
|
|
+ <if test="fOriginalbilldate != null ">and leg.f_originalbilldate = #{fOriginalbilldate}</if>
|
|
|
<if test="fMarks != null and fMarks != ''">and leg.f_marks = #{fMarks}</if>
|
|
|
<if test="fQtyblc != null ">and leg.f_qtyblc = #{fQtyblc}</if>
|
|
|
<if test="fGrossweightc != null ">and leg.f_grossweightC = #{fGrossweightc}</if>
|
|
@@ -157,16 +171,16 @@
|
|
|
<if test="fWarehouseid != null">f_warehouseid,</if>
|
|
|
<if test="fPregrossweight != null">f_pregrossweight,</if>
|
|
|
<if test="fPrenetweight != null">f_prenetweight,</if>
|
|
|
- <if test="fVolumnd != null">f_volumnD,</if>
|
|
|
<if test="fQtyd != null">f_qtyD,</if>
|
|
|
+ <if test="fVolumnd != null">f_volumnD,</if>
|
|
|
<if test="fGrossweightd != null">f_grossweightD,</if>
|
|
|
<if test="fNetweightd != null">f_netweightD,</if>
|
|
|
<if test="fVolumnc != null">f_volumnC,</if>
|
|
|
<if test="fQtyc != null">f_qtyC,</if>
|
|
|
- <if test="fQtyblc != null">f_qtyblc,</if>
|
|
|
<if test="fGrossweightc != null">f_grossweightC,</if>
|
|
|
- <if test="fGrossweightblc != null">f_grossweightblc,</if>
|
|
|
+ <if test="fQtyblc != null">f_qtyblc,</if>
|
|
|
<if test="fNetweightc != null">f_netweightC,</if>
|
|
|
+ <if test="fGrossweightblc != null">f_grossweightblc,</if>
|
|
|
<if test="fNetweightblc != null">f_netweightblc,</if>
|
|
|
<if test="fCntrno != null">f_cntrno,</if>
|
|
|
<if test="fStatus != null">f_status,</if>
|
|
@@ -177,6 +191,7 @@
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
+ <if test="fOriginalbilldate != null">f_originalbilldate,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fAccyear != null">#{fAccyear},</if>
|
|
@@ -192,16 +207,16 @@
|
|
|
<if test="fWarehouseid != null">#{fWarehouseid},</if>
|
|
|
<if test="fPregrossweight != null">#{fPregrossweight},</if>
|
|
|
<if test="fPrenetweight != null">#{fPrenetweight},</if>
|
|
|
- <if test="fVolumnd != null">#{fVolumnd},</if>
|
|
|
<if test="fQtyd != null">#{fQtyd},</if>
|
|
|
+ <if test="fVolumnd != null">#{fVolumnd},</if>
|
|
|
<if test="fGrossweightd != null">#{fGrossweightd},</if>
|
|
|
<if test="fNetweightd != null">#{fNetweightd},</if>
|
|
|
<if test="fVolumnc != null">#{fVolumnc},</if>
|
|
|
<if test="fQtyc != null">#{fQtyc},</if>
|
|
|
- <if test="fQtyblc != null">#{fQtyblc},</if>
|
|
|
<if test="fGrossweightc != null">#{fGrossweightc},</if>
|
|
|
- <if test="fGrossweightblc != null">#{fGrossweightblc},</if>
|
|
|
+ <if test="fQtyblc != null">#{fQtyblc},</if>
|
|
|
<if test="fNetweightc != null">#{fNetweightc},</if>
|
|
|
+ <if test="fGrossweightblc != null">#{fGrossweightblc},</if>
|
|
|
<if test="fNetweightblc != null">#{fNetweightblc},</if>
|
|
|
<if test="fCntrno != null">#{fCntrno},</if>
|
|
|
<if test="fStatus != null">#{fStatus},</if>
|
|
@@ -212,6 +227,7 @@
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
+ <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -230,16 +246,16 @@
|
|
|
<if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
|
|
|
<if test="fPregrossweight != null">f_pregrossweight = #{fPregrossweight},</if>
|
|
|
<if test="fPrenetweight != null">f_prenetweight = #{fPrenetweight},</if>
|
|
|
- <if test="fVolumnd != null">f_volumnD = #{fVolumnd},</if>
|
|
|
<if test="fQtyd != null">f_qtyD = #{fQtyd},</if>
|
|
|
+ <if test="fVolumnd != null">f_volumnD = #{fVolumnd},</if>
|
|
|
<if test="fGrossweightd != null">f_grossweightD = #{fGrossweightd},</if>
|
|
|
<if test="fNetweightd != null">f_netweightD = #{fNetweightd},</if>
|
|
|
<if test="fVolumnc != null">f_volumnC = #{fVolumnc},</if>
|
|
|
<if test="fQtyc != null">f_qtyC = #{fQtyc},</if>
|
|
|
- <if test="fQtyblc != null">f_qtyblc = #{fQtyblc},</if>
|
|
|
<if test="fGrossweightc != null">f_grossweightC = #{fGrossweightc},</if>
|
|
|
- <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</if>
|
|
|
+ <if test="fQtyblc != null">f_qtyblc = #{fQtyblc},</if>
|
|
|
<if test="fNetweightc != null">f_netweightC = #{fNetweightc},</if>
|
|
|
+ <if test="fGrossweightblc != null">f_grossweightblc = #{fGrossweightblc},</if>
|
|
|
<if test="fNetweightblc != null">f_netweightblc = #{fNetweightblc},</if>
|
|
|
<if test="fCntrno != null">f_cntrno = #{fCntrno},</if>
|
|
|
<if test="fStatus != null">f_status = #{fStatus},</if>
|
|
@@ -250,6 +266,7 @@
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
|
|
|
</trim>
|
|
|
where f_accyear = #{fAccyear}
|
|
|
</update>
|
|
@@ -289,7 +306,7 @@
|
|
|
f_grossweightC = f_grossweightC - #{map.warehousebillsitems.fGrossweight},
|
|
|
f_qtyblc = f_qtyblc + #{map.warehousebillsitems.fQty}
|
|
|
</if>
|
|
|
--- update_by = NOW()
|
|
|
+ -- update_by = NOW()
|
|
|
</trim>
|
|
|
where f_id = #{map.whgenlegId}
|
|
|
</update>
|