|
|
@ -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()) { |
|
|
|
|
|
// 检查栈板位置对应的区域类型是否为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()); |
|
|
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(); |
|
|
|
|
|
// 检查栈板位置对应的区域类型是否为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()); |
|
|
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 |
|
|
|