|
|
|
@ -286,8 +286,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
List<String> dbTableColumnNames = pointDeviceout.stream().map(BasePointDeviceVo::getPointNo).collect(Collectors.toList()); |
|
|
|
List<String> dbTableColumnNames = pointDeviceout.stream().map(BasePointDeviceVo::getPointNo).collect(Collectors.toList()); |
|
|
|
String urgencyBefore = null; |
|
|
|
String urgencyBefore = null; |
|
|
|
String urgencyAfter = null; |
|
|
|
String urgencyAfter = null; |
|
|
|
for (String str : dbTableColumnNames |
|
|
|
for (String str : dbTableColumnNames) { |
|
|
|
) { |
|
|
|
|
|
|
|
// TODO 中科 测试 需要还原
|
|
|
|
// TODO 中科 测试 需要还原
|
|
|
|
if (str.equals(ParameterConstants.ParameterSystem.assemble_point_after)) { |
|
|
|
if (str.equals(ParameterConstants.ParameterSystem.assemble_point_after)) { |
|
|
|
urgencyAfter = str; |
|
|
|
urgencyAfter = str; |
|
|
|
@ -329,8 +328,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
task.setTraverseDate(DateUtils.parseDate(baseBarcodesOut.getTraverseDate())); |
|
|
|
task.setTraverseDate(DateUtils.parseDate(baseBarcodesOut.getTraverseDate())); |
|
|
|
task.setTaskPath(urgencyBefore); |
|
|
|
task.setTaskPath(urgencyBefore); |
|
|
|
task.setTaskStatus("0"); |
|
|
|
task.setTaskStatus("0"); |
|
|
|
// TODO 测试注释 要打开
|
|
|
|
|
|
|
|
// task.setDistinction("2");
|
|
|
|
|
|
|
|
if (proportionStatus) { |
|
|
|
if (proportionStatus) { |
|
|
|
task.setDistinction("1"); |
|
|
|
task.setDistinction("1"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -381,8 +379,6 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
businDataTask.setCreateTime(DateUtils.getNowDate()); |
|
|
|
businDataTask.setCreateTime(DateUtils.getNowDate()); |
|
|
|
businDataTask.setTraverseDate(DateUtils.parseDate(baseBarcodesOut.getTraverseDate())); |
|
|
|
businDataTask.setTraverseDate(DateUtils.parseDate(baseBarcodesOut.getTraverseDate())); |
|
|
|
businDataTask.setTaskPath(urgencyAfter); |
|
|
|
businDataTask.setTaskPath(urgencyAfter); |
|
|
|
// TODO 测试注释 要打开
|
|
|
|
|
|
|
|
// task.setDistinction("1");
|
|
|
|
|
|
|
|
if (proportionStatus) { |
|
|
|
if (proportionStatus) { |
|
|
|
businDataTask.setDistinction("1"); |
|
|
|
businDataTask.setDistinction("1"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -1063,9 +1059,8 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
//排序后的巷道货位数(降序)
|
|
|
|
//排序后的巷道货位数(降序)
|
|
|
|
Map<String, Integer> tunnelLocQtyDicSort = new LinkedHashMap<>(); |
|
|
|
Map<String, Integer> tunnelLocQtyDicSort = new LinkedHashMap<>(); |
|
|
|
tunnelLocQtyDic.entrySet().stream().sorted(Map.Entry.<String, Long>comparingByValue().reversed()).forEachOrdered(e -> tunnelLocQtyDicSort.put(e.getKey(), e.getValue().intValue())); |
|
|
|
tunnelLocQtyDic.entrySet().stream().sorted(Map.Entry.<String, Long>comparingByValue().reversed()).forEachOrdered(e -> tunnelLocQtyDicSort.put(e.getKey(), e.getValue().intValue())); |
|
|
|
//log.info("查询到的保险杠所在的货位信息:"+JsonUtil.toJSONString(tunnelVo));
|
|
|
|
|
|
|
|
List<String> tunnelall = tunnelVo.stream().map(e -> e.getTunnel()).collect(Collectors.toList()); |
|
|
|
List<String> tunnelall = tunnelVo.stream().map(e -> e.getTunnel()).collect(Collectors.toList()); |
|
|
|
// log.info("查询到保险杠所在的巷道:"+JsonUtil.toJSONString(tunnelall));
|
|
|
|
|
|
|
|
//拿到任务数最少的巷道并且库存量是最大的
|
|
|
|
//拿到任务数最少的巷道并且库存量是最大的
|
|
|
|
String tunnelone = this.quickSortTaskQty(tunnelLocQtyDicSort); |
|
|
|
String tunnelone = this.quickSortTaskQty(tunnelLocQtyDicSort); |
|
|
|
log.info("任务数最少的巷道:" + tunnelone); |
|
|
|
log.info("任务数最少的巷道:" + tunnelone); |
|
|
|
@ -1158,15 +1153,11 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
.eq(BusinDataTaskGoods::getTaskCode, id)); |
|
|
|
.eq(BusinDataTaskGoods::getTaskCode, id)); |
|
|
|
|
|
|
|
|
|
|
|
//根据货位查询物料信息
|
|
|
|
//根据货位查询物料信息
|
|
|
|
// SysStockDetailQueryBo stockDetailQueryBo = new SysStockDetailQueryBo();
|
|
|
|
|
|
|
|
// stockDetailQueryBo.setLocationId(baseLocationVo.getId());
|
|
|
|
|
|
|
|
// stockDetailQueryBo.setQty(new BigDecimal("1"));
|
|
|
|
|
|
|
|
List<SysStockDetail> sysStockDetailList = iSysStockDetailService.list(new LambdaQueryWrapper<SysStockDetail>() |
|
|
|
List<SysStockDetail> sysStockDetailList = iSysStockDetailService.list(new LambdaQueryWrapper<SysStockDetail>() |
|
|
|
.eq(SysStockDetail::getLocationId, baseLocationVo.getId()) |
|
|
|
.eq(SysStockDetail::getLocationId, baseLocationVo.getId()) |
|
|
|
.eq(SysStockDetail::getQty, 1) |
|
|
|
.eq(SysStockDetail::getQty, 1) |
|
|
|
.isNull(SysStockDetail::getOutQty)); |
|
|
|
.isNull(SysStockDetail::getOutQty)); |
|
|
|
// List<SysStockDetail> sysStockDetailList = iSysStockDetailService.queryList(stockDetailQueryBo);
|
|
|
|
|
|
|
|
// System.out.println("是否相等"+sysStockDetailList.get(0).getGoodsNo().equals(businDataTaskGoodsList.get(0).getGoodsNo()));
|
|
|
|
|
|
|
|
for (SysStockDetail stockDetail : sysStockDetailList) { |
|
|
|
for (SysStockDetail stockDetail : sysStockDetailList) { |
|
|
|
businDataTaskGoodsList.stream().forEach( |
|
|
|
businDataTaskGoodsList.stream().forEach( |
|
|
|
e -> { |
|
|
|
e -> { |
|
|
|
|