|
@@ -889,7 +889,7 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
//转发任务
|
|
|
if (StringUtils.isNotEmpty(wcsTask.getTaskType())
|
|
|
&& wcsTask.getTaskType().equals(Constant.TASK_TYPE.FORWARD.getValue())) {
|
|
|
- log.info("进入转发任务{}=={}========", wcsTask.getTaskType(), wcsTask.getExt7());
|
|
|
+ log.info("进入转发任务{}=={}========", wcsTask.getTaskNo(), wcsTask.getExt7());
|
|
|
// 判断如果是出库任务
|
|
|
if (StringUtils.isNotEmpty(wcsTask.getExt7())
|
|
|
&& (wcsTask.getExt7().equals(String.valueOf(Constant.FLOW_CONFIG_ID.FOURTEEN.getValue()))
|
|
@@ -927,19 +927,26 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
BaseLocationInfo baseLocationInfo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(wcsTask.getLocationTo(), Constant.WAREHOUSE_ID);
|
|
|
// 目标地同列里面是否有被占用的库位
|
|
|
List<BaseLocationInfo> occupyByLocs = baseLocationInfoMapper.queryByListOccupyByLocOR(baseLocationInfo);
|
|
|
+ boolean isFinish = true;
|
|
|
for (int i = 0; i < occupyByLocs.size(); i++) {
|
|
|
// 查询前方是否有未取货完成的任务
|
|
|
WcsTask wTask = wcsTaskService.selectWcsTaskByLocationTo(occupyByLocs.get(i).getId());
|
|
|
if (wTask != null) {
|
|
|
wcsTask.setRemark("目标库位同列后方存在未取货完成的任务,请等待!");
|
|
|
+ wcsTaskService.updateWcsTask(wcsTask);
|
|
|
+ log.info("目标库位同列后方存在未取货完成的任务,任务号:{}",wcsTask.getTaskNo());
|
|
|
+ isFinish = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ // 如果有未取货完成的任务 遍历下一个任务
|
|
|
+ if (!isFinish) continue;
|
|
|
//同列前方是否有阻挡
|
|
|
List<BaseLocationInfo> inStockByLocs = baseLocationInfoMapper.queryByListInStockByLoc(baseLocationInfo);
|
|
|
if (inStockByLocs.size() > 0) {
|
|
|
- log.info("同列有阻挡=========={}", inStockByLocs);
|
|
|
+ log.info("目标库位同列里面有阻挡======={}", baseLocationInfo.getId());
|
|
|
wcsTask.setRemark("目标库位同列有阻挡,请处理!");
|
|
|
+ wcsTaskService.updateWcsTask(wcsTask);
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
@@ -982,10 +989,12 @@ public class BusinessServiceImpl implements IBusinessService {
|
|
|
BaseLocationInfo locationTo = this.checkTheSameColumnLocation(locationToList, Long.valueOf(wcsTask.getExt8()), true);
|
|
|
// 没有分配到目标库位
|
|
|
if (locationTo == null){
|
|
|
+ log.info("=====再次分配目标库位失败,任务编号:{}",wcsTask.getTaskNo());
|
|
|
return true;
|
|
|
}
|
|
|
wcsTask.setAreaTo(flowConfigHeaderVO.getLocationTo());
|
|
|
wcsTask.setLocationTo(locationTo.getId().toString());
|
|
|
+ wcsTask.setUpdateDate(new Date());
|
|
|
// 更改任务的目标库位
|
|
|
wcsTaskService.updateWcsTask(wcsTask);
|
|
|
// 更改目标库位状态为占用(有任务)
|