|
@@ -267,6 +267,43 @@
|
|
|
w.f_id = #{fId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectInventoryList" parameterType="TWarehousebills" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ co.f_name AS fName,
|
|
|
+ it.f_bsdate AS fBsdate,
|
|
|
+ leg.f_mblno AS fMblno,
|
|
|
+ it.f_business_type AS fBusinessType,
|
|
|
+ dict.dict_label AS fBusinessTypes,
|
|
|
+ it.f_marks AS fMarks ,
|
|
|
+ go.f_name AS fGoodsName,
|
|
|
+ area.f_name AS fWarehouseLocationids,
|
|
|
+ leg.f_trademodeid AS fTrademodeid,
|
|
|
+ it.f_qty AS fQty,
|
|
|
+ it.f_grossweight AS fGrossweight,
|
|
|
+ it.f_netweight AS fNetweight
|
|
|
+ FROM
|
|
|
+ t_warehousebills leg
|
|
|
+ LEFT JOIN t_warehousebillsitems it ON leg.f_id = it.f_pid
|
|
|
+ LEFT JOIN t_goods go ON it.f_goodsid = go.f_id
|
|
|
+ LEFT JOIN t_corps co ON leg.f_corpid = co.f_id
|
|
|
+ LEFT JOIN sys_dict_data dict ON dict.dict_value = it.f_business_type
|
|
|
+ LEFT JOIN t_warehouse_area area ON area.f_id = it.f_warehouselocid
|
|
|
+ <where>
|
|
|
+ dict.status = '0'
|
|
|
+ AND dict.dict_type = 'storage_type'
|
|
|
+ AND leg.f_billtype in ('SJRk','SJCK')
|
|
|
+ <if test="fBilltype != null">AND leg.f_billtype = #{fBilltype}</if>
|
|
|
+ <if test="fWarehouseid != null ">and leg.f_warehouseid = #{fWarehouseid}</if>
|
|
|
+ <if test="fWarehouseid != null ">and it.f_warehouselocid = #{fWarehouseid}</if>
|
|
|
+ <if test="fGoodsid != null ">and it.f_goodsid = #{fGoodsid}</if>
|
|
|
+
|
|
|
+ <if test="fTrademodeid != null ">and leg.f_trademodeid = #{fTrademodeid}</if>
|
|
|
+ <if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fMblno != null ">and leg.f_mblno = #{fMblno}</if>
|
|
|
+
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertTWarehousebills" parameterType="TWarehousebills" useGeneratedKeys="true" keyProperty="fId">
|
|
|
insert into t_warehousebills
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|