Browse Source

20250225

java8
qiezi 11 months ago
parent
commit
bf73a479e6
  1. 10
      src/main/resources/mapper/pms/InventoryStockMapper.xml

10
src/main/resources/mapper/pms/InventoryStockMapper.xml

@ -37,8 +37,8 @@
<select id="queryPage" resultType="com.xujie.sys.modules.pms.entity.InventoryStockVoData"> <select id="queryPage" resultType="com.xujie.sys.modules.pms.entity.InventoryStockVoData">
SELECT SELECT
A.citem_code,
min(A.id) as id,
a.citem_code,
min(A.id) id,
A.site, A.site,
min(A.warehouse_id) AS warehouse_id, min(A.warehouse_id) AS warehouse_id,
A.part_no,min(A.batch_no) as batch_no, A.part_no,min(A.batch_no) as batch_no,
@ -54,7 +54,6 @@
min(A.first_in_date) AS first_in_date, min(A.first_in_date) AS first_in_date,
B.average_price, B.average_price,
B.umid, B.umid,
sum(isnull(A.qty_of_po,0)) as qty_of_po,
(sum(isnull( A.qty_on_hand , 0 )) * B.average_price) as totalCost, (sum(isnull( A.qty_on_hand , 0 )) * B.average_price) as totalCost,
dbo.get_bu_desc( A.site,A.citem_code) buDesc dbo.get_bu_desc( A.site,A.citem_code) buDesc
from inventory_stock A from inventory_stock A
@ -102,12 +101,9 @@
<if test="query.safetyStock == '安全'"> <if test="query.safetyStock == '安全'">
and A.qty_on_hand <![CDATA[>]]> B.min_stock and A.qty_on_hand <![CDATA[>]]> B.min_stock
</if> </if>
<if test="query.safetyStock == '不安全' and (query.securityMethod == '库存' or query.securityMethod == '' or query.securityMethod == null )">
<if test="query.safetyStock == '不安全'">
and A.qty_on_hand <![CDATA[<=]]> B.min_stock and A.qty_on_hand <![CDATA[<=]]> B.min_stock
</if> </if>
<if test="query.safetyStock == '不安全' and query.securityMethod == '库存和在途'">
and A.qty_on_hand + isnull(A.qty_of_po,0.0) <![CDATA[<=]]> B.min_stock
</if>
</where> </where>
GROUP BY GROUP BY
<if test="query.groupType == 0"> <if test="query.groupType == 0">

Loading…
Cancel
Save