|
@@ -45,8 +45,6 @@ import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingDown
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingUpLogService;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.ClipLayerVo;
|
|
|
import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.LoadingParams;
|
|
|
-import org.jeecg.modules.billet.storageBill.entity.ShiftEnum;
|
|
|
-import org.jeecg.modules.billet.storageBill.entity.ShiftGroupEnum;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.StorageBill;
|
|
|
import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
|
|
|
import org.jeecg.modules.billet.storageCarLog.entity.StorageCarLog;
|
|
@@ -651,23 +649,24 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
}
|
|
|
}
|
|
|
if ("roll_height".equals(loadingParams.getDestinationTable())) {
|
|
|
- heatNoList = rollClubCommonList.stream().map(RollClubCommon::getHeatNo).distinct().collect(Collectors.toList());
|
|
|
- List<Integer> sizeHeightList = rollClubCommonList.stream().map(RollClubCommon::getLength).distinct().collect(Collectors.toList());
|
|
|
- List<String> sizeLists = sizeHeightList.stream().map(String::valueOf).collect(Collectors.toList());
|
|
|
- // 生成钢坯装运单记录
|
|
|
- StorageBill storageBillInfo = createStorageBill(loadingParams, rollClubCommonList, sizeLists);
|
|
|
- storageBillInfo.setId(rollHeightStorageBillId);
|
|
|
- String distinctAssemblyNumber = billetBasicInfoList.stream()
|
|
|
- .map(BilletBasicInfo::getAssemblyNumber)
|
|
|
- .filter(assemblyNumber -> assemblyNumber != null)
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.joining(","));
|
|
|
- storageBillInfo.setAssemblyNumber(distinctAssemblyNumber);
|
|
|
- storageBillService.save(storageBillInfo);
|
|
|
-
|
|
|
- // 生成钢坯储运单记录
|
|
|
- StorageCarLog storageCarLog = createStorageCarLog(storageBillInfo, rollClubCommonList, heatNoList, sizeLists);
|
|
|
- storageCarLogService.save(storageCarLog);
|
|
|
+ // 堆垛去高线不产生 装运单和储运记录
|
|
|
+// heatNoList = rollClubCommonList.stream().map(RollClubCommon::getHeatNo).distinct().collect(Collectors.toList());
|
|
|
+// List<Integer> sizeHeightList = rollClubCommonList.stream().map(RollClubCommon::getLength).distinct().collect(Collectors.toList());
|
|
|
+// List<String> sizeLists = sizeHeightList.stream().map(String::valueOf).collect(Collectors.toList());
|
|
|
+// // 生成钢坯装运单记录
|
|
|
+// StorageBill storageBillInfo = createStorageBill(loadingParams, rollClubCommonList, sizeLists);
|
|
|
+// storageBillInfo.setId(rollHeightStorageBillId);
|
|
|
+// String distinctAssemblyNumber = billetBasicInfoList.stream()
|
|
|
+// .map(BilletBasicInfo::getAssemblyNumber)
|
|
|
+// .filter(assemblyNumber -> assemblyNumber != null)
|
|
|
+// .distinct()
|
|
|
+// .collect(Collectors.joining(","));
|
|
|
+// storageBillInfo.setAssemblyNumber(distinctAssemblyNumber);
|
|
|
+// storageBillService.save(storageBillInfo);
|
|
|
+//
|
|
|
+// // 生成钢坯储运单记录
|
|
|
+// StorageCarLog storageCarLog = createStorageCarLog(storageBillInfo, rollClubCommonList, heatNoList, sizeLists);
|
|
|
+// storageCarLogService.save(storageCarLog);
|
|
|
result.put("success", "堆垛去高线发车操作成功!");
|
|
|
return result;
|
|
|
|
|
@@ -1045,67 +1044,4 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
billetHotsendChangeShiftService.updateById(billetHotsendChangeShift);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 处理高线 装运单信息
|
|
|
- *
|
|
|
- * @param loadingParams
|
|
|
- * @param rollClubCommonList
|
|
|
- * @param sizeList
|
|
|
- * @return
|
|
|
- */
|
|
|
- private StorageBill createStorageBill(LoadingParams loadingParams, List<RollClubCommon> rollClubCommonList, List<String> sizeList) {
|
|
|
- StorageBill storageBillInfo = new StorageBill();
|
|
|
- storageBillInfo.setBtype("1");
|
|
|
- storageBillInfo.setTypeConfigId(loadingParams.getDestinationId());
|
|
|
- storageBillInfo.setDestination("高线");
|
|
|
- storageBillInfo.setShiftGroup(loadingParams.getBilletHotsend().getShiftGroup());
|
|
|
- storageBillInfo.setSteel(loadingParams.getBilletHotsend().getSteel());
|
|
|
- storageBillInfo.setSpec(loadingParams.getBilletHotsend().getSpec());
|
|
|
- storageBillInfo.setShift(loadingParams.getBilletHotsend().getShift());
|
|
|
- storageBillInfo.setAmountTotal(rollClubCommonList.size());
|
|
|
- LambdaQueryWrapper<StorageBill> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper1.eq(StorageBill::getCcmNo, loadingParams.getBilletHotsend().getCcmNo())
|
|
|
- .eq(StorageBill::getLicensePlate, "堆垛辊道")
|
|
|
- .eq(StorageBill::getShiftGroup, loadingParams.getBilletHotsend().getShiftGroup())
|
|
|
- .eq(StorageBill::getShift, loadingParams.getBilletHotsend().getShift())
|
|
|
- .between(StorageBill::getCreateTime, DateUtils.getStartOfDay(), DateUtils.getEndOfDay());
|
|
|
- List<StorageBill> storageBillList = storageBillService.list(queryWrapper1);
|
|
|
- LambdaQueryWrapper<StorageBill> queryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper2.eq(StorageBill::getCcmNo, loadingParams.getBilletHotsend().getCcmNo())
|
|
|
- .between(StorageBill::getCreateTime, DateUtils.getStartOfDay(), DateUtils.getEndOfDay());
|
|
|
- List<StorageBill> storageBillList2 = storageBillService.list(queryWrapper2);
|
|
|
- storageBillInfo.setCarNum(oConvertUtils.listIsNotEmpty(storageBillList) ? storageBillList.size() + 1 : 1);
|
|
|
- storageBillInfo.setCarAllNum(oConvertUtils.listIsNotEmpty(storageBillList2) ? storageBillList.size() + 1 : 1);
|
|
|
- storageBillInfo.setLicensePlate("堆垛辊道");
|
|
|
- storageBillInfo.setCcmNo(loadingParams.getBilletHotsend().getCcmNo());
|
|
|
- storageBillInfo.setSize(String.join(",", sizeList));
|
|
|
- storageBillInfo.setDateTime(new Date());
|
|
|
- storageBillInfo.setCreateTime(new Date());
|
|
|
- String uniqueCode = DateUtils.date2Str(new Date(), DateUtils.yyyymmddhhmmss.get()) + "-" + loadingParams.getBilletHotsend().getCcmNo() + "#" + ShiftEnum.fromCode(loadingParams.getBilletHotsend().getShift()).name() + "-" + ShiftGroupEnum.fromCode(loadingParams.getBilletHotsend().getShiftGroup()).name();
|
|
|
- storageBillInfo.setUniqueCode(uniqueCode);
|
|
|
- return storageBillInfo;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 处理储运记录
|
|
|
- *
|
|
|
- * @param storageBill
|
|
|
- * @param rollClubCommonList
|
|
|
- * @param heatNoList
|
|
|
- * @param sizeList
|
|
|
- * @return
|
|
|
- */
|
|
|
- private StorageCarLog createStorageCarLog(StorageBill storageBill, List<RollClubCommon> rollClubCommonList, List<String> heatNoList, List<String> sizeList) {
|
|
|
- StorageCarLog storageCarLog = new StorageCarLog();
|
|
|
- BeanUtils.copyProperties(storageBill, storageCarLog);
|
|
|
- storageCarLog.setCarNm("堆垛辊道");
|
|
|
- storageCarLog.setDestination("高线");
|
|
|
- storageCarLog.setHeatNo(String.join(",", heatNoList));
|
|
|
- storageCarLog.setSize(String.join(",", sizeList));
|
|
|
- storageCarLog.setAmount(rollClubCommonList.size());
|
|
|
- storageCarLog.setDataTime(new Date());
|
|
|
- return storageCarLog;
|
|
|
- }
|
|
|
}
|