|
@@ -217,7 +217,10 @@
|
|
|
(select ifnull(sum(num),0) from tld_ask_goods_vitrual where wbs = #{wbs} and wllb_code = #{wllbCode} and storage_location_code = #{storageLocationCode} and produc_date = #{producDate} and account_sleeve = #{companyNumber}
|
|
|
<if test="serial != null and serial !=''">
|
|
|
and serial = #{serial}
|
|
|
- </if>) as vitrualNum
|
|
|
+ </if>
|
|
|
+ <if test="attribute != null and attribute !=''">
|
|
|
+ and attribute = #{attribute}
|
|
|
+ </if>) as vitrualNum
|
|
|
from dual
|
|
|
</select>
|
|
|
<!-- 查询销售交货单原始数据 -->
|
|
@@ -290,4 +293,26 @@
|
|
|
insert into tld_removal_half_product(wllb_code,num,user_id,scrq,ask_goods_id,storage_code,wbs,company_number,transmission_type)
|
|
|
value(#{materialCode},#{outNum},#{userId},now(),#{deliveryId},#{storageCode},#{wbs},#{companyNumber},0)
|
|
|
</insert>
|
|
|
+ <!-- 查询销售订单 -->
|
|
|
+ <select id="getDeliveryInfo" resultType="com.tld.model.Delivery">
|
|
|
+ select out_num,gs_delivery_num from tld_delivery where delivery_id = #{askGoodsId} and entry_number = #{entryNumber}
|
|
|
+ </select>
|
|
|
+ <!-- 查询指定库存 -->
|
|
|
+ <select id="getInventoryVal" resultType="com.tld.model.Inventory">
|
|
|
+ select amount from tld_inventory where id = #{id}
|
|
|
+ </select>
|
|
|
+ <!-- 查询指定销售单扫描数量 -->
|
|
|
+ <select id="getScanNumDelivery" resultType="String">
|
|
|
+ select ifnull(sum(num), 0) as num from tld_ask_goods_vitrual where ask_goods_id = #{askGoodsId} and entry_number = #{entryNumber}
|
|
|
+ </select>
|
|
|
+ <!-- 虚拟表此物料占用数量 -->
|
|
|
+ <select id="getAllScanNumDelivery" resultType="String">
|
|
|
+ select ifnull(sum(num), 0) as num from tld_ask_goods_vitrual where wllb_code = #{wllbCode} and account_sleeve = #{accountSleeve} and wbs = #{wbs}
|
|
|
+ <if test="producDate != null and producDate != ''">
|
|
|
+ and produc_date = #{producDate}
|
|
|
+ </if>
|
|
|
+ <if test="serial != null and serial != ''">
|
|
|
+ and serial = #{serial}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|