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

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

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

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

Loading…
Cancel
Save