|
@@ -111,8 +111,12 @@
|
|
|
</select>
|
|
|
<!-- 新增出库虚拟表 -->
|
|
|
<insert id="addAskGoodsVitrual">
|
|
|
- insert into tld_ask_goods_vitrual(unique_code,supplier_id,serial,wllb_code,produc_date,ask_goods_id,type,storage_location_code,num,user_id,department)
|
|
|
- values(#{uniqueCode},#{supplierId},#{serial},#{wllbCode},#{producDate},#{askGoodsId},#{type},#{storageLocationCode},#{num},#{userId},#{department})
|
|
|
+ insert into tld_ask_goods_vitrual(unique_code, supplier_id, serial, wllb_code, produc_date, ask_goods_id, type,
|
|
|
+ storage_location_code, num, user_id, department, attribute, account_sleeve,
|
|
|
+ storage_location_code_rk, wbs)
|
|
|
+ values (#{uniqueCode}, #{supplierId}, #{serial}, #{wllbCode}, #{producDate}, #{askGoodsId}, #{type},
|
|
|
+ #{storageLocationCode}, #{num}, #{userId}, #{department}, #{attribute}, #{companyNumber},
|
|
|
+ #{storageLocationCodeRk}, #{wbs})
|
|
|
</insert>
|
|
|
<!-- 查询指定库存内容 -->
|
|
|
<select id="getInventory" resultType="com.tld.model.Inventory">
|
|
@@ -134,7 +138,18 @@
|
|
|
wllb_code,
|
|
|
produc_date,
|
|
|
scrq
|
|
|
- from tld_inventory where supplier_id = #{supplierId} and serial = #{serial} and wllb_code = #{wllbCode} and produc_date = #{producDate}
|
|
|
+ from tld_inventory
|
|
|
+ where supplier_id = #{supplierId}
|
|
|
+ and serial = #{serial}
|
|
|
+ and wllb_code = #{wllbCode}
|
|
|
+ and produc_date = #{producDate}
|
|
|
+ and account_sleeve = #{companyNumber}
|
|
|
+ <if test="wbs != '' and wbs != null">
|
|
|
+ and wbs = #{wbs}
|
|
|
+ </if>
|
|
|
+ <if test="wbs == ''.toString() or wbs == null ">
|
|
|
+ and wbs is null
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<!-- 查询库存是否充足 -->
|
|
|
<select id="getAsk" resultType="com.tld.model.AskGoods">
|
|
@@ -179,20 +194,21 @@
|
|
|
</select>
|
|
|
<!-- 查询虚拟表指定pda跟状态的的数据 -->
|
|
|
<select id="getVirtualUniqueCode" resultType="com.tld.model.AskGoods">
|
|
|
- select
|
|
|
- id,
|
|
|
- unique_code,
|
|
|
- supplier_id,
|
|
|
- serial,
|
|
|
- wllb_code,
|
|
|
- produc_date,
|
|
|
- ask_goods_id,
|
|
|
- type,
|
|
|
- storage_location_code,
|
|
|
- num,
|
|
|
- user_id,
|
|
|
- department,
|
|
|
- account_sleeve
|
|
|
+ select id,
|
|
|
+ unique_code,
|
|
|
+ supplier_id,
|
|
|
+ serial,
|
|
|
+ wllb_code,
|
|
|
+ produc_date,
|
|
|
+ ask_goods_id,
|
|
|
+ type,
|
|
|
+ storage_location_code,
|
|
|
+ num,
|
|
|
+ user_id,
|
|
|
+ department,
|
|
|
+ account_sleeve,
|
|
|
+ wbs,
|
|
|
+ storage_location_code_rk
|
|
|
from tld_ask_goods_vitrual where unique_code = #{uniqueCode} and type = #{type} and ask_goods_id = #{askGoodsId}
|
|
|
</select>
|
|
|
<!-- 删除库存 -->
|