From 57bbca99548b54f3cbfc330989af17bf6a547b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Thu, 4 Dec 2025 16:27:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BD=90=E5=A5=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WcsIntegrationMapper.xml | 145 ++++++++++-------- .../mapper/notify/NewIssureMapper.xml | 11 +- .../mapper/warehouse/PalletMapper.xml | 14 +- 3 files changed, 99 insertions(+), 71 deletions(-) diff --git a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml index d84da61..99029bc 100644 --- a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml +++ b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml @@ -159,10 +159,11 @@ + + + @@ -214,9 +218,10 @@ + @@ -250,10 +255,11 @@ + @@ -324,9 +330,10 @@ + SELECT calling_flag - FROM pallet + FROM pallet WITH (NOLOCK) WHERE site = #{site} AND pallet_id = #{palletId} AND is_deleted = '0' @@ -419,9 +427,10 @@ + @@ -523,28 +532,29 @@ + + + @@ -655,16 +665,17 @@ AND wcs_flag = 0 + WITH RankedRecords AS ( @@ -1031,9 +1042,13 @@ AND status = #{oldStatus} + - update pallet set wcs_location = #{location},updated_by='wms_sys',updated_time=getdate() - where site = #{site} and pallet_id = #{palletId} + UPDATE pallet WITH (ROWLOCK) + SET wcs_location = #{location}, + updated_by = 'wms_sys', + updated_time = GETDATE() + WHERE site = #{site} AND pallet_id = #{palletId} @@ -1229,9 +1244,10 @@ + SELECT p.calling_flag AS callingFlag, s.station_id AS currentStationId, s.station_code AS currentStationCode - FROM pallet p - LEFT JOIN agv_station s ON p.location_code = s.station_code + FROM pallet p WITH (NOLOCK) + LEFT JOIN agv_station s WITH (NOLOCK) ON p.location_code = s.station_code WHERE p.site = #{site} AND p.pallet_id = #{palletId} AND p.is_deleted = '0' @@ -1322,20 +1339,20 @@ + SELECT p.pallet_id AS palletId, @@ -1393,16 +1411,15 @@ s.station_id AS currentStationId, CASE WHEN EXISTS ( - SELECT 1 FROM pallet_detail pd + SELECT 1 FROM pallet_detail pd WITH (NOLOCK) WHERE pd.site = p.site AND pd.pallet_id = p.pallet_id - ) THEN 'N' ELSE 'Y' END AS isEmpty - FROM pallet p - LEFT JOIN agv_station s ON p.location_code = s.station_code + FROM pallet p WITH (NOLOCK) + LEFT JOIN agv_station s WITH (NOLOCK) ON p.location_code = s.station_code WHERE p.site = #{site} AND p.pallet_id = #{palletId} AND p.is_deleted = '0' @@ -1453,37 +1470,40 @@ + + + @@ -1518,6 +1538,7 @@ + + + + + + @@ -341,9 +343,10 @@ + SELECT p.id, @@ -34,9 +35,9 @@ pt.max_layer as maxLayer, pt.active as active, pf.pallet_family_desc as palletFamilyDesc - FROM pallet p - LEFT JOIN pallet_type pt ON p.site = pt.site AND p.pallet_type = pt.pallet_type - LEFT JOIN pallet_family pf ON p.site = pf.site AND p.pallet_family = pf.pallet_family + FROM pallet p WITH (NOLOCK) + LEFT JOIN pallet_type pt WITH (NOLOCK) ON p.site = pt.site AND p.pallet_type = pt.pallet_type + LEFT JOIN pallet_family pf WITH (NOLOCK) ON p.site = pf.site AND p.pallet_family = pf.pallet_family AND p.site = #{query.site} @@ -67,6 +68,7 @@ +