Browse Source

2025-11-03

pda调整扫描、查询、确认逻辑(采购退货)
master
fengyuan_yang 2 months ago
parent
commit
4a05deeb80
  1. 49
      src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml
  2. 32
      src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml
  3. 1
      src/main/resources/mapper/wms/WmsPrintMapper.xml

49
src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml

@ -71,7 +71,7 @@
a.order_qty, a.order_qty,
a.related_order_no, a.related_order_no,
a.related_order_line_no, a.related_order_line_no,
dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.part_no, 'CRT') as actualStockInQty
dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.related_order_no,a.related_order_line_no, 'in') as actualStockInQty
FROM inbound_notification_detail as a FROM inbound_notification_detail as a
left join WareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.in_warehouse = b.WareHouseID left join WareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.in_warehouse = b.WareHouseID
<where> <where>
@ -152,22 +152,39 @@
</update> </update>
<select id="getInboundDetail2" resultType="com.gaotao.modules.trans.entity.TransDetailSub"> <select id="getInboundDetail2" resultType="com.gaotao.modules.trans.entity.TransDetailSub">
<!-- select-->
<!-- de.site,-->
<!-- de.orderRef2,-->
<!-- sub.subNo,-->
<!-- sub.subQty,-->
<!-- isnull(WareHouseName, sub.OrderRef4) as OrderRef4,-->
<!-- isnull(LocationName, sub.OrderRef5) as OrderRef5,-->
<!-- UserID as userId,-->
<!-- UserName as userName,-->
<!-- He.TransDate-->
<!-- from TransHeader He-->
<!-- inner join TransDetail de ON He.Site = de.site and He.OrderRef2 = de.orderRef2 and He.TransNo = de.transNo-->
<!-- inner join TransDetailSub sub on de.site = sub.site and de.transNo = sub.transNo and de.orderRef2 = sub.orderRef2 and de.itemNo = sub.itemNo-->
<!-- left join WareHouse wa on wa.Site = sub.site and wa.bu_no = sub.OrderRef2 and wa.WareHouseID = sub.OrderRef4-->
<!-- left join Location lo on lo.Site = sub.site and lo.bu_no = sub.OrderRef2 and lo.WareHouseID = sub.OrderRef4 and lo.LocationID = sub.OrderRef5-->
<!-- where de.site = #{site} and de.orderRef2 = #{buNo} AND he.orderRef1 = #{orderNo} and de.partNo = #{partNo}-->
select select
de.site,
de.orderRef2,
sub.subNo,
sub.subQty,
isnull(WareHouseName, sub.OrderRef4) as OrderRef4,
isnull(LocationName, sub.OrderRef5) as OrderRef5,
UserID as userId,
UserName as userName,
He.TransDate
from TransHeader He
inner join TransDetail de ON He.Site = de.site and He.OrderRef2 = de.orderRef2 and He.TransNo = de.transNo
inner join TransDetailSub sub on de.site = sub.site and de.transNo = sub.transNo and de.orderRef2 = sub.orderRef2 and de.itemNo = sub.itemNo
left join WareHouse wa on wa.Site = sub.site and wa.bu_no = sub.OrderRef2 and wa.WareHouseID = sub.OrderRef4
left join Location lo on lo.Site = sub.site and lo.bu_no = sub.OrderRef2 and lo.WareHouseID = sub.OrderRef4 and lo.LocationID = sub.OrderRef5
where de.site = #{site} and de.orderRef2 = #{buNo} AND he.orderRef1 = #{orderNo} and de.partNo = #{partNo}
A.site,
A.bu_no AS orderRef2,
A. roll_no AS subNo,
A. roll_qty AS subQty,
isnull(WareHouseName, A.warehouse_id) as OrderRef4,
isnull(LocationName, A.location_id) as OrderRef5,
transaction_by as userId,
C.user_display as userName,
A.transaction_date AS TransDate
from StockTransactionLog A
left join WareHouse wa on wa.Site = A.site and wa.bu_no = A.bu_no and wa.WareHouseID = A.warehouse_id
left join Location lo on lo.Site = A.site and lo.bu_no = A.bu_no and lo.WareHouseID = A.warehouse_id and lo.LocationID = A.location_id
LEFT JOIN sys_user C ON A.site = C.site AND C.username = A.transaction_by
where A.site = #{site} and A.bu_no = #{buNo} AND A.document_type = #{orderType}
AND A.document_no = #{orderNo} AND A.order_no = #{relatedOrderNo} AND A.order_line_no = #{relatedOrderLineNo}
</select> </select>
<select id="getInboundShopOrderList" resultType="com.gaotao.modules.inboundNotification.entity.vo.InboundNotificationDetailVo"> <select id="getInboundShopOrderList" resultType="com.gaotao.modules.inboundNotification.entity.vo.InboundNotificationDetailVo">

32
src/main/resources/mapper/outboundNotification/OutboundNotificationDetailMapper.xml

@ -23,7 +23,7 @@
a.order_qty, a.order_qty,
a.related_order_no, a.related_order_no,
a.related_order_line_no, a.related_order_line_no,
dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.part_no, 'OUT') as actualStockOutQty
dbo.Get_InboundQty(a.site, a.bu_no, a.order_no, a.related_order_no,a.related_order_line_no, 'out') as actualStockOutQty
FROM outbound_notification_detail as a FROM outbound_notification_detail as a
left join WareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.out_warehouse = b.WareHouseID left join WareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.out_warehouse = b.WareHouseID
<where> <where>
@ -153,21 +153,21 @@
<select id="getOutboundDetail2" resultType="com.gaotao.modules.trans.entity.TransDetailSub"> <select id="getOutboundDetail2" resultType="com.gaotao.modules.trans.entity.TransDetailSub">
select select
de.site,
de.orderRef2,
sub.subNo,
sub.subQty,
isnull(WareHouseName, sub.OrderRef4) as OrderRef4,
isnull(LocationName, sub.OrderRef5) as OrderRef5,
UserID as userId,
UserName as userName,
He.TransDate
from TransHeader He
inner join TransDetail de ON He.Site = de.site and He.OrderRef2 = de.orderRef2 and He.TransNo = de.transNo
inner join TransDetailSub sub on de.site = sub.site and de.transNo = sub.transNo and de.orderRef2 = sub.orderRef2 and de.itemNo = sub.itemNo
left join WareHouse wa on wa.Site = sub.site and wa.bu_no = sub.OrderRef2 and wa.WareHouseID = sub.OrderRef4
left join Location lo on lo.Site = sub.site and lo.bu_no = sub.OrderRef2 and lo.WareHouseID = sub.OrderRef4 and lo.LocationID = sub.OrderRef5
where de.site = #{site} and de.orderRef2 = #{buNo} AND he.orderRef1 = #{orderNo} and de.partNo = #{partNo}
A.site,
A.bu_no AS orderRef2,
A. roll_no AS subNo,
A. roll_qty AS subQty,
isnull(WareHouseName, A.warehouse_id) as OrderRef4,
isnull(LocationName, A.location_id) as OrderRef5,
transaction_by as userId,
C.user_display as userName,
A.transaction_date AS TransDate
from StockTransactionLog A
left join WareHouse wa on wa.Site = A.site and wa.bu_no = A.bu_no and wa.WareHouseID = A.warehouse_id
left join Location lo on lo.Site = A.site and lo.bu_no = A.bu_no and lo.WareHouseID = A.warehouse_id and lo.LocationID = A.location_id
LEFT JOIN sys_user C ON A.site = C.site AND C.username = A.transaction_by
where A.site = #{site} and A.bu_no = #{buNo} AND A.document_type = #{orderType}
AND A.document_no = #{orderNo} AND A.order_no = #{relatedOrderNo} AND A.order_line_no = #{relatedOrderLineNo}
</select> </select>
<select id="getOutboundShopOrderList" resultType="com.gaotao.modules.outboundNotification.entity.vo.OutboundNotificationDetailVo"> <select id="getOutboundShopOrderList" resultType="com.gaotao.modules.outboundNotification.entity.vo.OutboundNotificationDetailVo">

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

@ -204,7 +204,6 @@
LEFT JOIN Location L ON a.site = L.Site AND a.location_id = L.LocationID LEFT JOIN Location L ON a.site = L.Site AND a.location_id = L.LocationID
<where> <where>
a.site in (select site from AccessSite where userID = #{query.userName}) a.site in (select site from AccessSite where userID = #{query.userName})
and a.status != '出库'
<if test="query.warehouseIdList != null and query.warehouseIdList.size() > 0"> <if test="query.warehouseIdList != null and query.warehouseIdList.size() > 0">
and A.warehouse_id in and A.warehouse_id in
<foreach collection="query.warehouseIdList" item="warehouseId" open="(" separator="," close=")"> <foreach collection="query.warehouseIdList" item="warehouseId" open="(" separator="," close=")">

Loading…
Cancel
Save