|
|
|
@ -243,7 +243,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
|
|
|
|
|
|
|
|
// 1. 查询空闲状态的站点
|
|
|
|
// 1. 查询空闲状态的站点
|
|
|
|
|
|
|
|
|
|
|
|
List<StationVO> freeStationList = stationService.getStatusStationList(STATUS_FREE, null,CONVEYOR_LINE_RECEIVE_ONLY,false); |
|
|
|
List<StationVO> freeStationList = stationService.getStatusStationList(STATUS_FREE, true,null, CONVEYOR_LINE_RECEIVE_ONLY, false); |
|
|
|
// 2. 构建返回列表(默认添加输送线回库选项)
|
|
|
|
// 2. 构建返回列表(默认添加输送线回库选项)
|
|
|
|
List<BsWorkCenterVO> resultList = new ArrayList<>(); |
|
|
|
List<BsWorkCenterVO> resultList = new ArrayList<>(); |
|
|
|
BsWorkCenterVO conveyorVO = new BsWorkCenterVO(); |
|
|
|
BsWorkCenterVO conveyorVO = new BsWorkCenterVO(); |
|
|
|
@ -254,10 +254,10 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
// 3. 补充空闲站点关联的工位信息
|
|
|
|
// 3. 补充空闲站点关联的工位信息
|
|
|
|
if (!CollectionUtils.isEmpty(freeStationList)) { |
|
|
|
if (!CollectionUtils.isEmpty(freeStationList)) { |
|
|
|
List<Long> wcIdList = freeStationList.stream() |
|
|
|
List<Long> wcIdList = freeStationList.stream() |
|
|
|
.map( StationVO::getWcId) |
|
|
|
.map(StationVO::getWcId) |
|
|
|
.distinct() |
|
|
|
.distinct() |
|
|
|
.collect(Collectors.toList()); |
|
|
|
.collect(Collectors.toList()); |
|
|
|
List<BsWorkCenterVO> wcVOList = bsWorkCenterService.getByIds(wcIdList,freeStationList); |
|
|
|
List<BsWorkCenterVO> wcVOList = bsWorkCenterService.getByIds(wcIdList, freeStationList); |
|
|
|
if (!CollectionUtils.isEmpty(wcVOList)) { |
|
|
|
if (!CollectionUtils.isEmpty(wcVOList)) { |
|
|
|
resultList.addAll(wcVOList); |
|
|
|
resultList.addAll(wcVOList); |
|
|
|
log.info("【回库工位查询】查询到{}个空闲工位", wcVOList.size()); |
|
|
|
log.info("【回库工位查询】查询到{}个空闲工位", wcVOList.size()); |
|
|
|
@ -350,7 +350,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
Task task = new Task(); |
|
|
|
Task task = new Task(); |
|
|
|
|
|
|
|
|
|
|
|
// 3. 处理起始站点编码
|
|
|
|
// 3. 处理起始站点编码
|
|
|
|
R<?> startStationResult = handleStartStationCode(returnToWarehouseDto,agvSend); |
|
|
|
R<?> startStationResult = handleStartStationCode(returnToWarehouseDto, agvSend); |
|
|
|
if (!startStationResult.isSuccess()) { |
|
|
|
if (!startStationResult.isSuccess()) { |
|
|
|
return startStationResult; |
|
|
|
return startStationResult; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -371,6 +371,9 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
// 5. 设置结束工位ID并处理不同回库类型
|
|
|
|
// 5. 设置结束工位ID并处理不同回库类型
|
|
|
|
Long endWcId = returnToWarehouseDto.getEndWcId(); |
|
|
|
Long endWcId = returnToWarehouseDto.getEndWcId(); |
|
|
|
task.setWcId(endWcId); |
|
|
|
task.setWcId(endWcId); |
|
|
|
|
|
|
|
if (!returnToWarehouseDto.getStationRegion().isEmpty()) { |
|
|
|
|
|
|
|
task.setStationRegion(returnToWarehouseDto.getStationRegion()); |
|
|
|
|
|
|
|
} |
|
|
|
if (endWcId == 0) { |
|
|
|
if (endWcId == 0) { |
|
|
|
// 5.1 输送线回库:校验空箱数量
|
|
|
|
// 5.1 输送线回库:校验空箱数量
|
|
|
|
// R<?> conveyorCheckResult = checkConveyorEmptyBoxCount();
|
|
|
|
// R<?> conveyorCheckResult = checkConveyorEmptyBoxCount();
|
|
|
|
@ -381,7 +384,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
endStationCode = DROPOFF_CONVEYOR_LINE; |
|
|
|
endStationCode = DROPOFF_CONVEYOR_LINE; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 5.2 普通工位回库:分配站点/库位
|
|
|
|
// 5.2 普通工位回库:分配站点/库位
|
|
|
|
R<?> locationResult = allocateSiteOrLocation(startStationCode, task,agvSend); |
|
|
|
R<?> locationResult = allocateSiteOrLocation(returnToWarehouseDto, task, agvSend); |
|
|
|
if (!locationResult.isSuccess()) { |
|
|
|
if (!locationResult.isSuccess()) { |
|
|
|
return locationResult; |
|
|
|
return locationResult; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -408,6 +411,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
// 8. 发送AGV调度任务(可选)
|
|
|
|
// 8. 发送AGV调度任务(可选)
|
|
|
|
if (agvSend) { |
|
|
|
if (agvSend) { |
|
|
|
R<?> reult = sendAgvSchedulingTask(task, startStationCode, endStationCode); |
|
|
|
R<?> reult = sendAgvSchedulingTask(task, startStationCode, endStationCode); |
|
|
|
|
|
|
|
|
|
|
|
if (!reult.isSuccess()) { |
|
|
|
if (!reult.isSuccess()) { |
|
|
|
taskService.removeById(task); |
|
|
|
taskService.removeById(task); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -430,7 +434,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
* </ul> |
|
|
|
* </ul> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R<Long> getWcId(String boxBarcode) { |
|
|
|
public R<LinkedHashMap<String, Object>> getWcId(String boxBarcode) { |
|
|
|
log.info("【工位ID查询】开始处理 - 箱条码:{}", boxBarcode); |
|
|
|
log.info("【工位ID查询】开始处理 - 箱条码:{}", boxBarcode); |
|
|
|
|
|
|
|
|
|
|
|
// 1. 参数校验
|
|
|
|
// 1. 参数校验
|
|
|
|
@ -449,17 +453,25 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
log.warn("【工位ID查询】箱条码{}未绑定任何订单", boxBarcode); |
|
|
|
log.warn("【工位ID查询】箱条码{}未绑定任何订单", boxBarcode); |
|
|
|
return R.fail("该箱子没有绑定数据"); |
|
|
|
return R.fail("该箱子没有绑定数据"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Long wcID = orderBindList.get(0).getWcID(); |
|
|
|
|
|
|
|
BsWorkCenterEntity workCenter = bsWorkCenterService.getById(wcID); |
|
|
|
|
|
|
|
|
|
|
|
// 3. 查询工位ID
|
|
|
|
LinkedHashMap<String, Object> map = new LinkedHashMap<>(); |
|
|
|
// Long orderId = orderBindList.get(0).getOrderId();
|
|
|
|
map.put("wcId",wcID); |
|
|
|
// Long wcId = yieldOrderService.getWcId(orderId);
|
|
|
|
if (DistinguishRegionsEnum.includeByWcName(workCenter.getWcName())) { |
|
|
|
// log.info("【工位ID查询】箱条码{}对应的工位ID:{}", boxBarcode, wcId);
|
|
|
|
String useDept = yieldOrderService.list(new LambdaQueryWrapper<YieldOrder>().eq(YieldOrder::getCardNo, orderBindList.get(0).getCardNo())).get(0).getUseDept(); |
|
|
|
|
|
|
|
String code = DistinguishRegionsEnum.wcNameByCode(workCenter.getWcName()); |
|
|
|
|
|
|
|
String logisticsAnagementRegion = DictCache.getValue(code, useDept); |
|
|
|
|
|
|
|
map.put("stationRegion",logisticsAnagementRegion); |
|
|
|
|
|
|
|
|
|
|
|
return R.data(orderBindList.get(0).getWcID()); |
|
|
|
}else { |
|
|
|
|
|
|
|
List<StationVO> statusStationList = stationService.getStatusStationList(STATUS_FREE, true,wcID, CONVEYOR_LINE_RECEIVE_ONLY, false); |
|
|
|
|
|
|
|
map.put("stationRegion",statusStationList.get(0).getStationRegion()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.data(map); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ========================== 私有工具方法 ==========================
|
|
|
|
// ========================== 私有工具方法 ==========================
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -537,6 +549,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
.filter(Objects::nonNull) |
|
|
|
.filter(Objects::nonNull) |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 计算订单列表总重量 |
|
|
|
* 计算订单列表总重量 |
|
|
|
* <p>累加订单的实际称重值,过滤null值,初始值为0</p> |
|
|
|
* <p>累加订单的实际称重值,过滤null值,初始值为0</p> |
|
|
|
@ -565,7 +578,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
* @param orderIdList 订单ID列表 |
|
|
|
* @param orderIdList 订单ID列表 |
|
|
|
* @return R<?> 保存结果 |
|
|
|
* @return R<?> 保存结果 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private R<?> saveOrderBoxBinding(String boxBarcode, ArrayList<String> orderIdList,Long wcId) { |
|
|
|
private R<?> saveOrderBoxBinding(String boxBarcode, ArrayList<String> orderIdList, Long wcId) { |
|
|
|
if (CollectionUtils.isEmpty(orderIdList)) { |
|
|
|
if (CollectionUtils.isEmpty(orderIdList)) { |
|
|
|
return R.fail("订单id不能为空"); |
|
|
|
return R.fail("订单id不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -609,15 +622,15 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
if (CollectionUtils.isEmpty(stationList)) { |
|
|
|
if (CollectionUtils.isEmpty(stationList)) { |
|
|
|
return R.fail("站点编码不存在"); |
|
|
|
return R.fail("站点编码不存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 校验站点是否空闲
|
|
|
|
// // 校验站点是否空闲
|
|
|
|
if (!stationList.get(0).getStationStatus().equals(STATUS_FREE)) { |
|
|
|
// if (!stationList.get(0).getStationStatus().equals(STATUS_FREE)) {
|
|
|
|
return R.fail("起始站点非空闲状态,无法使用"); |
|
|
|
// return R.fail("起始站点非空闲状态,无法使用");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
log.info(String.valueOf(stationList.get(0))); |
|
|
|
log.info(String.valueOf(stationList.get(0))); |
|
|
|
// 校验站点是否可以发送数据
|
|
|
|
// 校验站点是否可以发送数据
|
|
|
|
if (stationList.get(0).getStatus().equals(CONVEYOR_LINE_RECEIVE_ONLY)&&agvSend) { |
|
|
|
if (stationList.get(0).getStatus().equals(CONVEYOR_LINE_RECEIVE_ONLY) && agvSend) { |
|
|
|
return R.fail("起始站点站码无法当开始站点编码"); |
|
|
|
return R.fail("起始站点站码无法当开始站点编码"); |
|
|
|
}else if (!stationList.get(0).getStatus().equals(CONVEYOR_LINE_RECEIVE_ONLY)&&!agvSend) { |
|
|
|
} else if (!stationList.get(0).getStatus().equals(CONVEYOR_LINE_RECEIVE_ONLY) && !agvSend) { |
|
|
|
return R.fail("起始站点站码无法当开始站点编码"); |
|
|
|
return R.fail("起始站点站码无法当开始站点编码"); |
|
|
|
} |
|
|
|
} |
|
|
|
return R.data(startStationCode); |
|
|
|
return R.data(startStationCode); |
|
|
|
@ -671,26 +684,29 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分配站点/库位资源(优先级:站点 → 库位) |
|
|
|
* 分配站点/库位资源(优先级:站点 → 库位) |
|
|
|
* |
|
|
|
* |
|
|
|
* @param startStationCode |
|
|
|
* @param returnToWarehouseDto |
|
|
|
* @param task 任务对象(含工位ID) |
|
|
|
* @param task 任务对象(含工位ID) |
|
|
|
* @param agvSend |
|
|
|
* @param agvSend |
|
|
|
* @return R<Task> 分配后的任务对象 |
|
|
|
* @return R<Task> 分配后的任务对象 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private R<Task> allocateSiteOrLocation(String startStationCode, Task task, Boolean agvSend) { |
|
|
|
private R<Task> allocateSiteOrLocation(ReturnToWarehouseDto returnToWarehouseDto, Task task, Boolean agvSend) { |
|
|
|
// 1. 尝试分配空闲站点
|
|
|
|
// 1. 尝试分配空闲站点
|
|
|
|
// List<Station> freeStationList = stationService.list(
|
|
|
|
List<StationVO> freeStationList = null; |
|
|
|
// new LambdaQueryWrapper<Station>()
|
|
|
|
|
|
|
|
// .eq(Station::getWcId, task.getWcId())
|
|
|
|
|
|
|
|
// .eq(Station::getStationStatus, STATUS_FREE)
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
List<StationVO> freeStationList =null; |
|
|
|
|
|
|
|
if (agvSend) { |
|
|
|
if (agvSend) { |
|
|
|
freeStationList=stationService.getStatusStationList(STATUS_FREE, task.getWcId(), CONVEYOR_LINE_RECEIVE_ONLY, false); |
|
|
|
freeStationList = stationService.getStatusStationList(STATUS_FREE, true,task.getWcId(), CONVEYOR_LINE_RECEIVE_ONLY, false); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
freeStationList=stationService.getStatusStationList(STATUS_FREE, task.getWcId(), STATION_RECEIVE_ONLY, false); |
|
|
|
freeStationList = stationService.getStatusStationList(STATUS_FREE, true,task.getWcId(), STATION_RECEIVE_ONLY, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String wcName = bsWorkCenterService.getById(task.getWcId()).getWcName(); |
|
|
|
|
|
|
|
if (freeStationList!=null&&freeStationList.size()!=0) { |
|
|
|
|
|
|
|
//判断是不是镀后库作业中心
|
|
|
|
|
|
|
|
if (DistinguishRegionsEnum.includeByWcName(wcName)&&!agvSend) { |
|
|
|
|
|
|
|
log.info("是读后库"); |
|
|
|
|
|
|
|
freeStationList=freeStationList.stream().filter(s->s.getStationRegion().equals(task.getStationRegion())).toList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(freeStationList)) { |
|
|
|
} |
|
|
|
|
|
|
|
if (freeStationList!=null&&freeStationList.size()!=0) { |
|
|
|
StationVO station = null; |
|
|
|
StationVO station = null; |
|
|
|
station = freeStationList.get(0); |
|
|
|
station = freeStationList.get(0); |
|
|
|
task.setStationId(station.getId()); |
|
|
|
task.setStationId(station.getId()); |
|
|
|
@ -939,7 +955,6 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R getQuantityLocation(String boxBarcode) { |
|
|
|
public R getQuantityLocation(String boxBarcode) { |
|
|
|
// 1. 校验箱条码非空(增加空白字符校验)
|
|
|
|
// 1. 校验箱条码非空(增加空白字符校验)
|
|
|
|
@ -969,13 +984,14 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
} |
|
|
|
} |
|
|
|
quantityLocationVO.setWcName(workCenter.getWcName()); |
|
|
|
quantityLocationVO.setWcName(workCenter.getWcName()); |
|
|
|
List<StationCenter> stationCenterList = stationCenterService.list(new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, firstOrderBind.getWcID())); |
|
|
|
List<StationCenter> stationCenterList = stationCenterService.list(new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, firstOrderBind.getWcID())); |
|
|
|
if (stationCenterList==null||stationCenterList.size()==0) { |
|
|
|
if (stationCenterList == null || stationCenterList.size() == 0) { |
|
|
|
return R.fail("获取站点区域有问题"); |
|
|
|
return R.fail("获取站点区域有问题"); |
|
|
|
} |
|
|
|
} |
|
|
|
List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().eq(Station::getId, stationCenterList.get(0).getStationId())); |
|
|
|
List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().eq(Station::getId, stationCenterList.get(0).getStationId())); |
|
|
|
quantityLocationVO.setStationRegion(stationList.get(0).getStationRegion()); |
|
|
|
quantityLocationVO.setStationRegion(stationList.get(0).getStationRegion()); |
|
|
|
return R.data(quantityLocationVO); |
|
|
|
return R.data(quantityLocationVO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R getBoxbarcodeDetails(String boxBarcode) { |
|
|
|
public R getBoxbarcodeDetails(String boxBarcode) { |
|
|
|
if (StringUtils.isBlank(boxBarcode)) { |
|
|
|
if (StringUtils.isBlank(boxBarcode)) { |
|
|
|
@ -1040,12 +1056,16 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, wcId) |
|
|
|
new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, wcId) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (stationCenterList!=null||stationCenterList.size()!=0) { |
|
|
|
if (stationCenterList != null || stationCenterList.size() > 0) { |
|
|
|
StationCenter stationCenter = stationCenterList.get(0); |
|
|
|
// StationCenter stationCenter = stationCenterList.get(0);
|
|
|
|
Station station = stationService.getById(stationCenter.getStationId()); |
|
|
|
// Station station = stationService.getById(stationCenter.getStationId());
|
|
|
|
if (station != null) { |
|
|
|
List<Long> stationIdList = stationCenterList.stream().map(s -> s.getStationId()).toList(); |
|
|
|
detailsVO.setStationRegion(station.getStationRegion()); |
|
|
|
List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().in(Station::getId, stationIdList)); |
|
|
|
|
|
|
|
List<String> list = stationList.stream().map(s -> s.getStationRegion()).distinct().toList(); |
|
|
|
|
|
|
|
if (list.size()==1) { |
|
|
|
|
|
|
|
detailsVO.setStationRegion(stationList.get(0).getStationRegion()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return R.data(detailsVO); |
|
|
|
return R.data(detailsVO); |
|
|
|
@ -1061,7 +1081,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
StationNameBoxBarcodeVO stationNameBoxBarcodeVO = new StationNameBoxBarcodeVO(); |
|
|
|
StationNameBoxBarcodeVO stationNameBoxBarcodeVO = new StationNameBoxBarcodeVO(); |
|
|
|
stationNameBoxBarcodeVO.setStation(station); |
|
|
|
stationNameBoxBarcodeVO.setStation(station); |
|
|
|
List<Task> taskList = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getStationId, station.getId()).orderByDesc(Task::getUpdateTime)); |
|
|
|
List<Task> taskList = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getStationId, station.getId()).orderByDesc(Task::getUpdateTime)); |
|
|
|
if (taskList==null||taskList.size()==0) { |
|
|
|
if (taskList == null || taskList.size() == 0) { |
|
|
|
return R.data(stationNameBoxBarcodeVO); |
|
|
|
return R.data(stationNameBoxBarcodeVO); |
|
|
|
} |
|
|
|
} |
|
|
|
R boxbarcodeDetailsR = getBoxbarcodeDetails(taskList.get(0).getBoxBarcode()); |
|
|
|
R boxbarcodeDetailsR = getBoxbarcodeDetails(taskList.get(0).getBoxBarcode()); |
|
|
|
@ -1075,8 +1095,12 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R getStationRegion() { |
|
|
|
public R getStationRegion() { |
|
|
|
List<StationVO> freeStationList = stationService.getStatusStationList(STATUS_FREE, null,CONVEYOR_LINE_RECEIVE_ONLY,false); |
|
|
|
List<StationVO> freeStationList = stationService.getStatusStationList(STATUS_FREE,false, null, CONVEYOR_LINE_RECEIVE_ONLY, false); |
|
|
|
List<String> stationRegionList = freeStationList.stream().map(StationVO::getStationRegion).distinct().collect(Collectors.toUnmodifiableList()); |
|
|
|
|
|
|
|
|
|
|
|
if (freeStationList==null||freeStationList.size()==0) { |
|
|
|
|
|
|
|
return R.fail("没有占用区域"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<String> stationRegionList = freeStationList.stream().map(StationVO::getStationRegion).distinct().toList(); |
|
|
|
ArrayList<StationRegionVo> list = new ArrayList<>(); |
|
|
|
ArrayList<StationRegionVo> list = new ArrayList<>(); |
|
|
|
for (String stationRegion : stationRegionList) { |
|
|
|
for (String stationRegion : stationRegionList) { |
|
|
|
StationRegionVo stationRegionVo = new StationRegionVo(); |
|
|
|
StationRegionVo stationRegionVo = new StationRegionVo(); |
|
|
|
@ -1091,6 +1115,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 箱条码绑定主入口 |
|
|
|
* 箱条码绑定主入口 |
|
|
|
@ -1134,16 +1159,16 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
wcId = (Long) checkResult.getData(); |
|
|
|
wcId = (Long) checkResult.getData(); |
|
|
|
} |
|
|
|
} |
|
|
|
//判断是不是镀后库作业中心
|
|
|
|
//判断是不是镀后库作业中心
|
|
|
|
if(DistinguishRegionsEnum.includeByWcName( bsWorkCenterService.getById(wcId).getWcName())){ |
|
|
|
if (DistinguishRegionsEnum.includeByWcName(bsWorkCenterService.getById(wcId).getWcName())) { |
|
|
|
List<String> deptList = yieldOrderService.list(new LambdaQueryWrapper<YieldOrder>().in(YieldOrder::getCardNo, orderBindList)).stream().map(s -> s.getUseDept()).toList(); |
|
|
|
List<String> deptList = yieldOrderService.list(new LambdaQueryWrapper<YieldOrder>().in(YieldOrder::getCardNo, orderBindList)).stream().map(s -> s.getUseDept()).toList(); |
|
|
|
String code = DistinguishRegionsEnum.wcNameByCode(bsWorkCenterService.getById(wcId).getWcName()); |
|
|
|
String code = DistinguishRegionsEnum.wcNameByCode(bsWorkCenterService.getById(wcId).getWcName()); |
|
|
|
String stationRegion=""; |
|
|
|
String stationRegion = ""; |
|
|
|
for (String s : deptList) { |
|
|
|
for (String s : deptList) { |
|
|
|
String logisticsAnagementRegion = DictCache.getValue(code, s); |
|
|
|
String logisticsAnagementRegion = DictCache.getValue(code, s); |
|
|
|
if (logisticsAnagementRegion==null) { |
|
|
|
if (logisticsAnagementRegion == null) { |
|
|
|
return R.fail("站点区域异常"); |
|
|
|
return R.fail("站点区域异常"); |
|
|
|
}else if (stationRegion==null) { |
|
|
|
} else if (stationRegion == null) { |
|
|
|
stationRegion= logisticsAnagementRegion; |
|
|
|
stationRegion = logisticsAnagementRegion; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!stationRegion.equals(logisticsAnagementRegion)) { |
|
|
|
if (!stationRegion.equals(logisticsAnagementRegion)) { |
|
|
|
return R.fail("站点区域异常,站点区域配送不统一"); |
|
|
|
return R.fail("站点区域异常,站点区域配送不统一"); |
|
|
|
@ -1262,6 +1287,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
// 未找到任何订单
|
|
|
|
// 未找到任何订单
|
|
|
|
return R.fail(orderCardNo + "车间订单异常"); |
|
|
|
return R.fail(orderCardNo + "车间订单异常"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 统一校验作业中心:空值校验 + 一致性校验 |
|
|
|
* 统一校验作业中心:空值校验 + 一致性校验 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|