常熟吴彦祖 1 month ago
parent
commit
ab12c61855
  1. 25
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java
  2. 1
      src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

25
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvTaskServiceImpl.java

@ -779,8 +779,20 @@ public class AgvTaskServiceImpl implements AgvTaskService {
// 3. 栈板清空位置 - rqrq // 3. 栈板清空位置 - rqrq
if (task.getPalletId() != null && !task.getPalletId().isEmpty()) { if (task.getPalletId() != null && !task.getPalletId().isEmpty()) {
// 检查栈板位置对应的区域类型是否为Z105Z105区域不清空位置 - 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()); System.out.println("清空栈板位置 - rqrq:" + task.getPalletId());
wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null);
}
wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS"); wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS");
palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo()); palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo());
} }
@ -839,11 +851,22 @@ public class AgvTaskServiceImpl implements AgvTaskService {
// 3. 栈板清空位置 - rqrq // 3. 栈板清空位置 - rqrq
if (task.getPalletId() != null && !task.getPalletId().isEmpty()) { if (task.getPalletId() != null && !task.getPalletId().isEmpty()) {
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername();
// 检查栈板位置对应的区域类型是否为Z105Z105区域不清空位置 - 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()); System.out.println("清空栈板位置 - rqrq:" + task.getPalletId());
wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null); wcsIntegrationMapper.updatePalletWcsLocation(task.getSite(), task.getPalletId(), null);
}
wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS"); wcsIntegrationMapper.updatePalletCallingFlag(task.getSite(), task.getPalletId(), "N", null, "SYS_WMS");
palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo()); palletOperationLogService.logPalletOperation(task.getPalletId(), task.getSite(),"调用托盘","AGV取消任务停止调用托盘","是否调用","Y","N",username,task.getTaskNo());
} }
// 4. 更新任务状态 - rqrq // 4. 更新任务状态 - rqrq

1
src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

@ -1131,6 +1131,7 @@
<update id="updatePalletWcsLocation" > <update id="updatePalletWcsLocation" >
UPDATE pallet UPDATE pallet
SET wcs_location = #{location}, SET wcs_location = #{location},
location_code = #{location},
updated_by = 'wms_sys', updated_by = 'wms_sys',
updated_time = GETDATE() updated_time = GETDATE()
WHERE site = #{site} AND pallet_id = #{palletId} WHERE site = #{site} AND pallet_id = #{palletId}

Loading…
Cancel
Save