|
|
@ -69,11 +69,11 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
try { |
|
|
try { |
|
|
if (isTimeoutRecovery) { |
|
|
if (isTimeoutRecovery) { |
|
|
log.warn("检测到超时任务,尝试恢复:id={}, palletId={}, transType={}, processStartTime={}, retryCount={}", |
|
|
log.warn("检测到超时任务,尝试恢复:id={}, palletId={}, transType={}, processStartTime={}, retryCount={}", |
|
|
callbackTask.getId(), callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), |
|
|
|
|
|
callbackTask.getProcessStartTime(), callbackTask.getRetryCount()); |
|
|
|
|
|
|
|
|
callbackTask.getId(), callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), |
|
|
|
|
|
callbackTask.getProcessStartTime(), callbackTask.getRetryCount()); |
|
|
} else { |
|
|
} else { |
|
|
log.info("处理WCS回调任务:palletId={}, transType={}, currentStatus={}", |
|
|
log.info("处理WCS回调任务:palletId={}, transType={}, currentStatus={}", |
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), callbackTask.getStatus()); |
|
|
|
|
|
|
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), callbackTask.getStatus()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取用户名 - rqrq |
|
|
// 获取用户名 - rqrq |
|
|
@ -88,21 +88,21 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
// 1. 使用乐观锁更新状态为处理中(防止重复处理)- rqrq |
|
|
// 1. 使用乐观锁更新状态为处理中(防止重复处理)- rqrq |
|
|
int updateCount = wcsIntegrationMapper.updateWcsCallbackTaskStatusWithLock( |
|
|
int updateCount = wcsIntegrationMapper.updateWcsCallbackTaskStatusWithLock( |
|
|
callbackTask.getId(), |
|
|
|
|
|
callbackTask.getStatus(), // 原状态(已录入 or 处理失败 or 处理中) |
|
|
|
|
|
"处理中", |
|
|
|
|
|
new Date() |
|
|
|
|
|
|
|
|
callbackTask.getId(), |
|
|
|
|
|
callbackTask.getStatus(), // 原状态(已录入 or 处理失败 or 处理中) |
|
|
|
|
|
"处理中", |
|
|
|
|
|
new Date() |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
// 2. 如果更新失败,说明已被其他线程处理,直接返回 - rqrq |
|
|
// 2. 如果更新失败,说明已被其他线程处理,直接返回 - rqrq |
|
|
if (updateCount == 0) { |
|
|
if (updateCount == 0) { |
|
|
log.warn("任务已被其他线程处理,跳过:id={}, palletId={}, status={}", |
|
|
log.warn("任务已被其他线程处理,跳过:id={}, palletId={}, status={}", |
|
|
callbackTask.getId(), callbackTask.getPalletId(), callbackTask.getStatus()); |
|
|
|
|
|
|
|
|
callbackTask.getId(), callbackTask.getPalletId(), callbackTask.getStatus()); |
|
|
return; // 跳过,不抛异常 |
|
|
return; // 跳过,不抛异常 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
log.info("成功锁定任务,开始处理:palletId={}, transType={}, isTimeoutRecovery={}", |
|
|
log.info("成功锁定任务,开始处理:palletId={}, transType={}, isTimeoutRecovery={}", |
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), isTimeoutRecovery); |
|
|
|
|
|
|
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), isTimeoutRecovery); |
|
|
|
|
|
|
|
|
// 3. 根据不同的TransTypeDesc执行不同的处理逻辑 - rqrq |
|
|
// 3. 根据不同的TransTypeDesc执行不同的处理逻辑 - rqrq |
|
|
String result = ""; |
|
|
String result = ""; |
|
|
@ -114,11 +114,11 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
// 更新托盘状态 - rqrq |
|
|
// 更新托盘状态 - rqrq |
|
|
if ("入库".equals(callbackTask.getTransTypeDesc())) { |
|
|
if ("入库".equals(callbackTask.getTransTypeDesc())) { |
|
|
updateOrderTaskStatusForInbound(callbackTask); |
|
|
updateOrderTaskStatusForInbound(callbackTask); |
|
|
palletMapper.updateLocationWithPalletId(request.getSite(),request.getPalletId(),request.getToStation(),request.getToStation()); |
|
|
|
|
|
|
|
|
palletMapper.updateLocationWithPalletId(request.getSite(), request.getPalletId(), request.getToStation(), request.getToStation()); |
|
|
|
|
|
|
|
|
wcsIntegrationMapper.updatePalletCallingFlag(callbackTask.getSite(), callbackTask.getPalletId(), "N", "SYS_WMS"); |
|
|
wcsIntegrationMapper.updatePalletCallingFlag(callbackTask.getSite(), callbackTask.getPalletId(), "N", "SYS_WMS"); |
|
|
} else { |
|
|
} else { |
|
|
palletMapper.updateLocationWithPalletId(request.getSite(),request.getPalletId(),"Virtual_AS",null); |
|
|
|
|
|
|
|
|
palletMapper.updateLocationWithPalletId(request.getSite(), request.getPalletId(), "Virtual_AS", null); |
|
|
|
|
|
|
|
|
// wcsIntegrationMapper.updatePalletWcsLocation(callbackTask.getSite(), callbackTask.getPalletId(), null); |
|
|
// wcsIntegrationMapper.updatePalletWcsLocation(callbackTask.getSite(), callbackTask.getPalletId(), null); |
|
|
wcsIntegrationMapper.updatePalletCallingFlag(callbackTask.getSite(), callbackTask.getPalletId(), "Y", "SYS_WMS"); |
|
|
wcsIntegrationMapper.updatePalletCallingFlag(callbackTask.getSite(), callbackTask.getPalletId(), "Y", "SYS_WMS"); |
|
|
@ -129,19 +129,22 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
} else if ("取走栈板".equals(callbackTask.getTransTypeDesc())) { |
|
|
} else if ("取走栈板".equals(callbackTask.getTransTypeDesc())) { |
|
|
// 取走栈板:更新站点状态 - rqrq |
|
|
// 取走栈板:更新站点状态 - rqrq |
|
|
result = processPalletRemoval(callbackTask); |
|
|
result = processPalletRemoval(callbackTask); |
|
|
|
|
|
} else if ("异常位处理".equals(callbackTask.getTransTypeDesc())) { |
|
|
|
|
|
// 取走栈板:更新站点状态 - rqrq |
|
|
|
|
|
result = processErrorStation(callbackTask); |
|
|
} else { |
|
|
} else { |
|
|
throw new RuntimeException("不支持的事务类型:" + callbackTask.getTransTypeDesc()); |
|
|
throw new RuntimeException("不支持的事务类型:" + callbackTask.getTransTypeDesc()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
log.info("WCS回调任务处理成功:palletId={}, transType={}, result={}", |
|
|
log.info("WCS回调任务处理成功:palletId={}, transType={}, result={}", |
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), result); |
|
|
|
|
|
|
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), result); |
|
|
|
|
|
|
|
|
// 6. 更新任务状态为已完成 - rqrq |
|
|
// 6. 更新任务状态为已完成 - rqrq |
|
|
wcsIntegrationMapper.updateWcsCallbackTaskStatus(callbackTask.getId(), "已完成", null, new Date(), null); |
|
|
wcsIntegrationMapper.updateWcsCallbackTaskStatus(callbackTask.getId(), "已完成", null, new Date(), null); |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("处理WCS回调任务失败:palletId={}, transType={}, isTimeoutRecovery={}", |
|
|
log.error("处理WCS回调任务失败:palletId={}, transType={}, isTimeoutRecovery={}", |
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), isTimeoutRecovery, e); |
|
|
|
|
|
|
|
|
callbackTask.getPalletId(), callbackTask.getTransTypeDesc(), isTimeoutRecovery, e); |
|
|
|
|
|
|
|
|
// 更新重试次数(超时恢复的任务也算作一次重试)- rqrq |
|
|
// 更新重试次数(超时恢复的任务也算作一次重试)- rqrq |
|
|
int currentRetryCount = (callbackTask.getRetryCount() == null ? 0 : callbackTask.getRetryCount()); |
|
|
int currentRetryCount = (callbackTask.getRetryCount() == null ? 0 : callbackTask.getRetryCount()); |
|
|
@ -151,7 +154,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
String errorMsg = (isTimeoutRecovery ? "[超时恢复]" : "") + e.getMessage(); |
|
|
String errorMsg = (isTimeoutRecovery ? "[超时恢复]" : "") + e.getMessage(); |
|
|
|
|
|
|
|
|
log.warn("任务处理失败,更新状态:id={}, retryCount={}->{}, status={}", |
|
|
log.warn("任务处理失败,更新状态:id={}, retryCount={}->{}, status={}", |
|
|
callbackTask.getId(), currentRetryCount, newRetryCount, status); |
|
|
|
|
|
|
|
|
callbackTask.getId(), currentRetryCount, newRetryCount, status); |
|
|
|
|
|
|
|
|
// 更新失败状态到日志表 - rqrq |
|
|
// 更新失败状态到日志表 - rqrq |
|
|
wcsIntegrationMapper.updateWcsCallbackTaskStatus(callbackTask.getId(), status, null, null, errorMsg); |
|
|
wcsIntegrationMapper.updateWcsCallbackTaskStatus(callbackTask.getId(), status, null, null, errorMsg); |
|
|
@ -242,6 +245,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 更新入库对应的订单任务状态 |
|
|
* 更新入库对应的订单任务状态 |
|
|
|
|
|
* |
|
|
* @param callbackTask WCS回调任务 |
|
|
* @param callbackTask WCS回调任务 |
|
|
*/ |
|
|
*/ |
|
|
private void updateOrderTaskStatusForInbound(WcsCallbackTask callbackTask) { |
|
|
private void updateOrderTaskStatusForInbound(WcsCallbackTask callbackTask) { |
|
|
@ -256,16 +260,16 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
for (WmsOrderTask orderTask : orderTasks) { |
|
|
for (WmsOrderTask orderTask : orderTasks) { |
|
|
// 更新wms_order_task的status为已完成,wms_status为已完成 |
|
|
// 更新wms_order_task的status为已完成,wms_status为已完成 |
|
|
wcsIntegrationMapper.updateOrderTaskStatusAndWmsStatus( |
|
|
wcsIntegrationMapper.updateOrderTaskStatusAndWmsStatus( |
|
|
orderTask.getId(), "已完成", "已完成" |
|
|
|
|
|
|
|
|
orderTask.getId(), "已完成", "已完成" |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
// 更新对应的wms_order_task_detail状态为已完成 |
|
|
// 更新对应的wms_order_task_detail状态为已完成 |
|
|
wcsIntegrationMapper.updateOrderTaskDetailStatusByTaskNo( |
|
|
wcsIntegrationMapper.updateOrderTaskDetailStatusByTaskNo( |
|
|
orderTask.getTaskNo(), "已完成", "已完成" |
|
|
|
|
|
|
|
|
orderTask.getTaskNo(), "已完成", "已完成" |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
log.info("已更新订单任务状态:taskNo={}, palletId={}", |
|
|
log.info("已更新订单任务状态:taskNo={}, palletId={}", |
|
|
orderTask.getTaskNo(), callbackTask.getPalletId()); |
|
|
|
|
|
|
|
|
orderTask.getTaskNo(), callbackTask.getPalletId()); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
log.warn("未找到对应的组盘入库订单任务:palletId={}", callbackTask.getPalletId()); |
|
|
log.warn("未找到对应的组盘入库订单任务:palletId={}", callbackTask.getPalletId()); |
|
|
@ -273,13 +277,14 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("更新订单任务状态失败:palletId={}, error={}", |
|
|
log.error("更新订单任务状态失败:palletId={}, error={}", |
|
|
callbackTask.getPalletId(), e.getMessage()); |
|
|
|
|
|
|
|
|
callbackTask.getPalletId(), e.getMessage()); |
|
|
// 不抛出异常,避免影响主流程 |
|
|
// 不抛出异常,避免影响主流程 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 调用WCS出库方法 |
|
|
* 调用WCS出库方法 |
|
|
|
|
|
* |
|
|
* @param orderTask 订单任务 |
|
|
* @param orderTask 订单任务 |
|
|
* @return 调用结果 |
|
|
* @return 调用结果 |
|
|
*/ |
|
|
*/ |
|
|
@ -287,7 +292,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
try { |
|
|
try { |
|
|
// 调用具体的WCS出库接口 |
|
|
// 调用具体的WCS出库接口 |
|
|
log.info("调用WCS出库接口:taskNo={}, palletId={}, fromLocation={}, toLocation={}", |
|
|
log.info("调用WCS出库接口:taskNo={}, palletId={}, fromLocation={}, toLocation={}", |
|
|
orderTask.getTaskNo(), orderTask.getPalletId(), orderTask.getFromLocation(), orderTask.getToLocation()); |
|
|
|
|
|
|
|
|
orderTask.getTaskNo(), orderTask.getPalletId(), orderTask.getFromLocation(), orderTask.getToLocation()); |
|
|
|
|
|
|
|
|
wcsApiService.pushWCSTaskApi(orderTask); |
|
|
wcsApiService.pushWCSTaskApi(orderTask); |
|
|
return "WCS出库调用成功"; |
|
|
return "WCS出库调用成功"; |
|
|
@ -300,6 +305,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取当前任务的重试次数 |
|
|
* 获取当前任务的重试次数 |
|
|
|
|
|
* |
|
|
* @param orderTask 订单任务 |
|
|
* @param orderTask 订单任务 |
|
|
* @return 重试次数 |
|
|
* @return 重试次数 |
|
|
*/ |
|
|
*/ |
|
|
@ -319,9 +325,9 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 处理取货通知 - rqrq |
|
|
|
|
|
* @param callbackTask WCS回调任务 |
|
|
* @param callbackTask WCS回调任务 |
|
|
* @return 处理结果 |
|
|
* @return 处理结果 |
|
|
|
|
|
* @Description 处理取货通知 - rqrq |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
* @date 2025/10/24 |
|
|
* @date 2025/10/24 |
|
|
*/ |
|
|
*/ |
|
|
@ -341,12 +347,12 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
if (callbackTask.getTaskNo() != null && callbackTask.getItemNo() != null) { |
|
|
if (callbackTask.getTaskNo() != null && callbackTask.getItemNo() != null) { |
|
|
WmsOrderTask orderTask = wcsIntegrationMapper.findOrderTasksByTaskNoItem( |
|
|
WmsOrderTask orderTask = wcsIntegrationMapper.findOrderTasksByTaskNoItem( |
|
|
callbackTask.getSite(), callbackTask.getTaskNo(), callbackTask.getItemNo()); |
|
|
callbackTask.getSite(), callbackTask.getTaskNo(), callbackTask.getItemNo()); |
|
|
if (orderTask == null){ |
|
|
|
|
|
|
|
|
if (orderTask == null) { |
|
|
return "取货通知处理成功"; |
|
|
return "取货通知处理成功"; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ( !"领料申请单".equals(orderTask.getSourceType()) && !"发货通知单".equals(orderTask.getSourceType())) { |
|
|
|
|
|
|
|
|
if (!"领料申请单".equals(orderTask.getSourceType()) && !"发货通知单".equals(orderTask.getSourceType())) { |
|
|
wcsIntegrationMapper.updateOrderTaskStatusAndWmsStatus( |
|
|
wcsIntegrationMapper.updateOrderTaskStatusAndWmsStatus( |
|
|
orderTask.getId(), "已完成", "已完成"); |
|
|
orderTask.getId(), "已完成", "已完成"); |
|
|
wcsIntegrationMapper.updateOrderTaskDetailStatusByTaskNoPalletId( |
|
|
wcsIntegrationMapper.updateOrderTaskDetailStatusByTaskNoPalletId( |
|
|
@ -365,7 +371,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
callbackTask.getSite(), callbackTask.getPalletId()); |
|
|
callbackTask.getSite(), callbackTask.getPalletId()); |
|
|
|
|
|
|
|
|
if (checkIfHasNeedTask == null) { |
|
|
if (checkIfHasNeedTask == null) { |
|
|
System.out.println("栈板{}没有预约任务,检查是否有预留物料 - rqrq"+callbackTask.getPalletId()); |
|
|
|
|
|
|
|
|
System.out.println("栈板{}没有预约任务,检查是否有预留物料 - rqrq" + callbackTask.getPalletId()); |
|
|
|
|
|
|
|
|
// 获取栈板明细 - rqrq |
|
|
// 获取栈板明细 - rqrq |
|
|
List<PalletDetailData> palletDetailList = wcsIntegrationMapper.getPalletDetailsData( |
|
|
List<PalletDetailData> palletDetailList = wcsIntegrationMapper.getPalletDetailsData( |
|
|
@ -445,14 +451,14 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
// 2. 根据序列号列表查询SOIssueNotifyOrderMaterialList_detail明细 - rqrq |
|
|
// 2. 根据序列号列表查询SOIssueNotifyOrderMaterialList_detail明细 - rqrq |
|
|
List<com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail> notifyDetails = |
|
|
List<com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail> notifyDetails = |
|
|
wcsIntegrationMapper.getSOIssueNotifyDetailsBySerialNos(callbackTask.getSite(), serialNos); |
|
|
|
|
|
|
|
|
wcsIntegrationMapper.getSOIssueNotifyDetailsBySerialNos(callbackTask.getSite(), serialNos); |
|
|
log.info("查询到申请单明细数量:{} - rqrq", notifyDetails.size()); |
|
|
log.info("查询到申请单明细数量:{} - rqrq", notifyDetails.size()); |
|
|
|
|
|
|
|
|
// 3. 批量更新out_wcs_flag为Y(性能优化:一次UPDATE替代N次)- rqrq |
|
|
|
|
|
|
|
|
// 3. 批量更新out_wcs_flag为Y(性能优化:一次UPDATE替代N次)- rqrq |
|
|
if (!notifyDetails.isEmpty()) { |
|
|
if (!notifyDetails.isEmpty()) { |
|
|
List<String> serialNosToUpdate = notifyDetails.stream() |
|
|
List<String> serialNosToUpdate = notifyDetails.stream() |
|
|
.map(com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail::getSerialNo) |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
.map(com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail::getSerialNo) |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
wcsIntegrationMapper.batchUpdateSOIssueNotifyDetailOutWcsFlag(callbackTask.getSite(), serialNosToUpdate); |
|
|
wcsIntegrationMapper.batchUpdateSOIssueNotifyDetailOutWcsFlag(callbackTask.getSite(), serialNosToUpdate); |
|
|
log.info("批量更新{}个序列号的out_wcs_flag为Y - rqrq", serialNosToUpdate.size()); |
|
|
log.info("批量更新{}个序列号的out_wcs_flag为Y - rqrq", serialNosToUpdate.size()); |
|
|
} |
|
|
} |
|
|
@ -467,9 +473,9 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
taskDetailsToUpdate.add(new com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey( |
|
|
taskDetailsToUpdate.add(new com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey( |
|
|
notifyDetail.getTaskRef(), |
|
|
|
|
|
notifyDetail.getTaskItem(), |
|
|
|
|
|
notifyDetail.getTaskSeq() |
|
|
|
|
|
|
|
|
notifyDetail.getTaskRef(), |
|
|
|
|
|
notifyDetail.getTaskItem(), |
|
|
|
|
|
notifyDetail.getTaskSeq() |
|
|
)); |
|
|
)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -481,10 +487,10 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
|
|
|
|
|
|
// 6. 收集涉及的taskNo+itemNo组合(去重)- rqrq |
|
|
// 6. 收集涉及的taskNo+itemNo组合(去重)- rqrq |
|
|
List<com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey> taskKeysToCheck = taskDetailsToUpdate.stream() |
|
|
List<com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey> taskKeysToCheck = taskDetailsToUpdate.stream() |
|
|
.map(detail -> new com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey( |
|
|
|
|
|
detail.getTaskNo(), detail.getItemNo())) |
|
|
|
|
|
.distinct() |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
.map(detail -> new com.gaotao.modules.automatedWarehouse.entity.TaskDetailKey( |
|
|
|
|
|
detail.getTaskNo(), detail.getItemNo())) |
|
|
|
|
|
.distinct() |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
// 7. 批量更新所有已完成任务的主表状态(性能优化:一次UPDATE替代N次SELECT+UPDATE)- rqrq |
|
|
// 7. 批量更新所有已完成任务的主表状态(性能优化:一次UPDATE替代N次SELECT+UPDATE)- rqrq |
|
|
if (!taskKeysToCheck.isEmpty()) { |
|
|
if (!taskKeysToCheck.isEmpty()) { |
|
|
@ -500,7 +506,7 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
ex.printStackTrace(); |
|
|
ex.printStackTrace(); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
System.out.println("栈板{}无预留物料,不创建配送任务 - rqrq"+callbackTask.getPalletId()); |
|
|
|
|
|
|
|
|
System.out.println("栈板{}无预留物料,不创建配送任务 - rqrq" + callbackTask.getPalletId()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
@ -519,9 +525,9 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 处理取走栈板 - rqrq |
|
|
|
|
|
* @param callbackTask WCS回调任务 |
|
|
* @param callbackTask WCS回调任务 |
|
|
* @return 处理结果 |
|
|
* @return 处理结果 |
|
|
|
|
|
* @Description 处理取走栈板 - rqrq |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
* @date 2025/10/24 |
|
|
* @date 2025/10/24 |
|
|
*/ |
|
|
*/ |
|
|
@ -546,4 +552,18 @@ public class WcsTaskServiceImpl implements WcsTaskService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String processErrorStation(WcsCallbackTask callbackTask) { |
|
|
|
|
|
System.out.println("开始处理取走栈板 - rqrq,palletId=" + callbackTask.getPalletId() + ", toStation=" + callbackTask.getToStation()); |
|
|
|
|
|
int rows = palletMapper.updatePalletToErrorStatus( |
|
|
|
|
|
callbackTask.getSite(), |
|
|
|
|
|
callbackTask.getPalletId(), |
|
|
|
|
|
callbackTask.getToStation() |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
log.info("更新托盘为异常状态 - rqrq,site={},palletId={},异常处理位={}", |
|
|
|
|
|
callbackTask.getSite(), |
|
|
|
|
|
callbackTask.getPalletId(), |
|
|
|
|
|
callbackTask.getToStation()); |
|
|
|
|
|
return "异常位处理成功"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |