|
|
|
@ -49,6 +49,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
@Autowired |
|
|
|
private com.gaotao.modules.automatedWarehouse.service.AutoTaskService autoTaskService; |
|
|
|
@Autowired |
|
|
|
private com.gaotao.config.WmsTaskLimitConfig wmsTaskLimitConfig; // 任务限制配置 - rqrq |
|
|
|
@Autowired |
|
|
|
private com.gaotao.modules.notify.mapper.NewIssureMapper newIssureMapper; |
|
|
|
@Autowired |
|
|
|
private DeliveryTaskService deliveryTaskService; |
|
|
|
@ -2317,8 +2319,17 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
throw new RuntimeException("目标区域不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
//1.5 判断下 如果同一个区域已经有3个未完成的call料单据 那么就不让下达新的 |
|
|
|
|
|
|
|
// 1.5 判断区域未完成的立库取货call料任务数量是否超限 - rqrq |
|
|
|
System.out.println("开始检查区域未完成call料任务数量 - rqrq,targetArea=" + targetArea); |
|
|
|
Integer unfinishedCount = wcsIntegrationMapper.countUnfinishedCallTasksByArea(site, targetArea); |
|
|
|
Integer maxLimit = wmsTaskLimitConfig.getMaxUnfinishedCallTasksPerArea(); |
|
|
|
System.out.println("区域【" + targetArea + "】当前未完成的立库取货call料任务数量:" + unfinishedCount + |
|
|
|
",配置的最大限制:" + maxLimit + " - rqrq"); |
|
|
|
if (unfinishedCount != null && unfinishedCount >= maxLimit) { |
|
|
|
throw new RuntimeException("区域【" + targetArea + "】已有" + unfinishedCount + |
|
|
|
"个未完成的立库取货call料任务(配置限制:" + maxLimit + "个),请等待任务完成后再下达新任务"); |
|
|
|
} |
|
|
|
System.out.println("区域未完成任务数量检查通过 - rqrq"); |
|
|
|
|
|
|
|
// 2. 确定目标站点(自动分配或指定站点)- rqrq |
|
|
|
String finalTargetStation = targetStation; |
|
|
|
|