From ab12c61855089fef199b18316b178e014d4e3780 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: Fri, 30 Jan 2026 16:50:13 +0800 Subject: [PATCH] 1 --- .../service/impl/AgvTaskServiceImpl.java | 33 ++++++++++++++++--- .../WcsIntegrationMapper.xml | 1 + 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java index b251da8..6192273 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java @@ -779,8 +779,20 @@ public class AgvTaskServiceImpl implements AgvTaskService { // 3. 栈板清空位置 - rqrq if (task.getPalletId() != null && !task.getPalletId().isEmpty()) { - System.out.println("清空栈板位置 - rqrq:" + task.getPalletId()); - wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); + // 检查栈板位置对应的区域类型是否为Z105,Z105区域不清空位置 - rqrq + boolean shouldClearLocation = true; + Pallet pallet = palletMapper.selectPalletBySiteAndPalletId(task.getSite(), task.getPalletId()); + if (pallet != null && pallet.getLocationCode() != null) { + AgvStation station = wcsIntegrationMapper.getAgvStation(pallet.getLocationCode()); + if (station != null && "Z105".equals(station.getAreaType())) { + shouldClearLocation = false; + System.out.println("栈板位于Z105区域,不清空位置 - rqrq:" + task.getPalletId()); + } + } + if (shouldClearLocation) { + System.out.println("清空栈板位置 - rqrq:" + task.getPalletId()); + wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); + } wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS"); palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo()); } @@ -839,11 +851,22 @@ public class AgvTaskServiceImpl implements AgvTaskService { // 3. 栈板清空位置 - rqrq if (task.getPalletId() != null && !task.getPalletId().isEmpty()) { String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); - System.out.println("清空栈板位置 - rqrq:" + task.getPalletId()); - wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); + // 检查栈板位置对应的区域类型是否为Z105,Z105区域不清空位置 - rqrq + boolean shouldClearLocation = true; + Pallet pallet = palletMapper.selectPalletBySiteAndPalletId(task.getSite(), task.getPalletId()); + if (pallet != null && pallet.getLocationCode() != null) { + AgvStation station = wcsIntegrationMapper.getAgvStation(pallet.getLocationCode()); + if (station != null && "Z105".equals(station.getAreaType())) { + shouldClearLocation = false; + System.out.println("栈板位于Z105区域,不清空位置 - rqrq:" + task.getPalletId()); + } + } + if (shouldClearLocation) { + System.out.println("清空栈板位置 - rqrq:" + task.getPalletId()); + wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); + } wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS"); palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo()); - } // 4. 更新任务状态 - rqrq diff --git a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml index e93440f..53c2aa7 100644 --- a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml +++ b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml @@ -1131,6 +1131,7 @@ UPDATE pallet SET wcs_location = #{location}, + location_code = #{location}, updated_by = 'wms_sys', updated_time = GETDATE() WHERE site = #{site} AND pallet_id = #{palletId}