Browse Source

2025-10-16

取值优化
master
fengyuan_yang 3 months ago
parent
commit
0d03674333
  1. 3
      src/main/resources/mapper/orderIssure/IssureNotifyMapper.xml
  2. 23
      src/main/resources/mapper/wms/WmsPrintMapper.xml

3
src/main/resources/mapper/orderIssure/IssureNotifyMapper.xml

@ -322,7 +322,7 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu)
a.issueType,
b.needDate,
a.remark,
c.issue_method,
isnull(c.issue_method,d.issue_method) issue_method,
a.warehouse_id,
W.WareHouseName AS warehouseName,
a.BOMItemNo as bOMItemNo,
@ -332,6 +332,7 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu)
from SOIssueNotifyOrderMaterialList a
left join SOIssueNotifyOrderList b on a.site = b.site and a.NotifyNo = b.NotifyNo and a.ItemNo = b.ItemNo
left join SOBOM c on c.site = A.site and b.SOOrderNo = c.OrderNo and c.ItemNo = A.BOMItemNo and c.ComponentPartNo = a.ComponentPartNo
left join part d on d.site = a.site and d.PartNo = a.ComponentPartNo
left join WareHouse w on a.site = w.site and a.warehouse_id = w.WareHouseID
where a.NotifyNo = #{notifyNo} and a.site = #{site}
order by b.needDate, a.ItemNo

23
src/main/resources/mapper/wms/WmsPrintMapper.xml

@ -17,7 +17,7 @@
c.supplierID AS supplierId,
b.inspector_date,
b.submit_date,
a.order_qty,
d.required_qty as order_qty,
roll_qty,
roll_count,
inspection_result,
@ -102,13 +102,24 @@
</select>
<select id="getInboundQcResultOtherData" resultType="PoOrderRollNoOutData">
select
top 1 b.expiration_day, b.expiration_flag, b.exceed_in_ratio, b.expiration_warning_day,
isnull(a.batch_qualified_qty,0)-isnull((select sum(roll_qty) from po_order_roll_no where site=#{site} and bu_no=#{buNo} and inspection_no=#{orderNo} ),0) as remainingIssuableQty
SELECT
b.expiration_day,
ISNULL(b.expiration_flag ,'N') AS expiration_flag,
b.exceed_in_ratio,
b.expiration_warning_day,
ISNULL(a.batch_qualified_qty, 0) * (1 + ISNULL(b.exceed_in_ratio, 0) / 100.0)
- ISNULL((
SELECT SUM(roll_qty)
FROM po_order_roll_no
WHERE site = #{site}
AND bu_no = #{buNo}
AND inspection_no = #{orderNo}
), 0) AS remainingIssuableQty
from qc_iqc_record a
left join part b on a.site=b.site and a.bu_no=b.bu_No and a.part_no=b.PartNo
and a.inspection_no=#{orderNo} and a.site=#{site} and a.bu_no=#{buNo}
left join part b on a.site = b.site and a.bu_no = b.bu_No and a.part_no = b.PartNo
where a.inspection_no = #{orderNo} and a.site = #{site} and a.bu_no = #{buNo}
</select>
<insert id="savePoOrderRollNo">
insert into po_order_roll_no
(site,bu_no,inspection_no,order_no,item_no,roll_no,roll_qty,part_no,part_desc,supplier_id,supplier_name,order_qty,

Loading…
Cancel
Save