|
@@ -40,6 +40,10 @@ import org.jeecg.modules.rollClubTwo.entity.RollClubTwo;
|
|
|
import org.jeecg.modules.rollClubTwo.entity.RollClubTwoDetails;
|
|
|
import org.jeecg.modules.rollClubTwo.service.IRollClubTwoDetailsService;
|
|
|
import org.jeecg.modules.rollClubTwo.service.IRollClubTwoService;
|
|
|
+import org.jeecg.modules.rollDeputyCross.entity.RollDeputyCross;
|
|
|
+import org.jeecg.modules.rollDeputyCross.entity.RollDeputyCrossDetails;
|
|
|
+import org.jeecg.modules.rollDeputyCross.service.IRollDeputyCrossDetailsService;
|
|
|
+import org.jeecg.modules.rollDeputyCross.service.IRollDeputyCrossService;
|
|
|
import org.jeecg.modules.rollHeight.entity.RollHeight;
|
|
|
import org.jeecg.modules.rollHeight.entity.RollHeightDetails;
|
|
|
import org.jeecg.modules.rollHeight.service.IRollHeightDetailsService;
|
|
@@ -132,6 +136,10 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
private IOperateLogService operateLogService;
|
|
|
@Autowired
|
|
|
private ConfigMqttMapper configMqttMapper;
|
|
|
+ @Autowired
|
|
|
+ private IRollDeputyCrossService rollDeputyCrossService;
|
|
|
+ @Autowired
|
|
|
+ private IRollDeputyCrossDetailsService rollDeputyCrossDetailsService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -474,6 +482,8 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
billetHotsend.setRollclubthreeNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubthreeNum()) ? idExistBh.getRollclubthreeNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
|
|
|
}else if ("roll_out_shipp".equals(loadingParams.getDestinationTable())){
|
|
|
billetHotsend.setRolloutshippNum(oConvertUtils.isNotEmpty(idExistBh.getRolloutshippNum()) ? idExistBh.getRolloutshippNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
|
|
|
+ }else if ("roll_deputy_cross".equals(loadingParams.getDestinationTable())){
|
|
|
+ billetHotsend.setRollDeputyCrossNum(oConvertUtils.isNotEmpty(idExistBh.getRollDeputyCrossNum()) ? idExistBh.getRollDeputyCrossNum() + groupRollClubCommonList.size() : groupRollClubCommonList.size());
|
|
|
}
|
|
|
billetHotsend.setUpdateTime(new Date());
|
|
|
billetHotsendBaseService.updateById(billetHotsend);
|
|
@@ -489,6 +499,8 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
x.setBelongTable("roll_out_shipp");
|
|
|
}else if ("billet_auto_tmp".equals(loadingParams.getBelongTable())){
|
|
|
x.setBelongTable("billet_auto_tmp");
|
|
|
+ }else if ("roll_deputy_cross".equals(loadingParams.getBelongTable())){
|
|
|
+ x.setBelongTable("roll_deputy_cross");
|
|
|
}
|
|
|
x.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
|
|
|
x.setUpdateTime(new Date());
|
|
@@ -691,6 +703,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
List<RollClubTwoDetails> addRollClubTwoDetailsList = new ArrayList<>();
|
|
|
List<RollClubThreeDetails> addRollClubThreeDetailsList = new ArrayList<>();
|
|
|
List<RollOutShippDetails> addRollOutShippDetailsList = new ArrayList<>();
|
|
|
+ List<RollDeputyCrossDetails> addRollDeputyCrossDetailsList = new ArrayList<>();
|
|
|
List<BilletAutoTmp> billetAutoTmpList = new ArrayList<>();
|
|
|
stackingAndLoadingVehiclesList.forEach(x ->{
|
|
|
StackingDownLog stackingDownLog = new StackingDownLog();
|
|
@@ -911,6 +924,63 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
.collect(Collectors.joining(","));
|
|
|
rollOutShippDetails.setAssemblyNumber(distinctAssemblyNumber);
|
|
|
addRollOutShippDetailsList.add(rollOutShippDetails);
|
|
|
+ }else if ("roll_deputy_cross".equals(loadingParams.getDestinationTable())) {
|
|
|
+ billetBasicInfoList.forEach(y -> {
|
|
|
+ LambdaQueryWrapper<RollDeputyCross> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(RollDeputyCross::getCcmNo, y.getCcmNo().toString())
|
|
|
+ .eq(RollDeputyCross::getHeatNo, y.getHeatNo())
|
|
|
+ .eq(RollDeputyCross::getShift, y.getShift())
|
|
|
+ .eq(RollDeputyCross::getShiftGroup, y.getShiftGroup())
|
|
|
+ .eq(RollDeputyCross::getStorageBillId, storageBill.getId());
|
|
|
+ RollDeputyCross rollDeputyCross1 = rollDeputyCrossService.getOne(queryWrapper1);
|
|
|
+ if (oConvertUtils.isEmpty(rollDeputyCross1)) {
|
|
|
+ RollDeputyCross rollDeputyCross = new RollDeputyCross();
|
|
|
+ // 堆垛保存发车时 目的地为为副跨 保存副跨信息
|
|
|
+ rollDeputyCross.setId(String.valueOf(IdWorker.getId()));
|
|
|
+ rollDeputyCross.setCcmNo(y.getCcmNo().toString());
|
|
|
+ rollDeputyCross.setHeatNo(y.getHeatNo());
|
|
|
+ rollDeputyCross.setSize(y.getLength().toString());
|
|
|
+ rollDeputyCross.setAmountTotal(1);
|
|
|
+ rollDeputyCross.setSteel(y.getGrade());
|
|
|
+ rollDeputyCross.setSpec(y.getSpec());
|
|
|
+ rollDeputyCross.setShiftGroup(y.getShiftGroup());
|
|
|
+ rollDeputyCross.setShift(y.getShift());
|
|
|
+ rollDeputyCross.setBlankOutput(oConvertUtils.isEmpty(y.getBilletWeight()) ? 0L : y.getBilletWeight());
|
|
|
+ rollDeputyCross.setStorageBillId(storageBill.getId());
|
|
|
+ rollDeputyCross.setCreateDate(new Date());
|
|
|
+ rollDeputyCross.setCreateTime(new Date());
|
|
|
+ rollDeputyCrossService.save(rollDeputyCross);
|
|
|
+ } else {
|
|
|
+ // 堆垛保存发车时 目的地为为副跨 更新副跨信息
|
|
|
+ rollDeputyCross1.setAmountTotal(rollDeputyCross1.getAmountTotal() + 1);// 总支数
|
|
|
+ rollDeputyCross1.setBlankOutput(rollDeputyCross1.getBlankOutput() + y.getBilletWeight());
|
|
|
+ rollDeputyCross1.setUpdateTime(new Date());
|
|
|
+ rollDeputyCrossService.updateById(rollDeputyCross1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ RollDeputyCrossDetails rollDeputyCrossDetails = new RollDeputyCrossDetails();
|
|
|
+ BeanUtils.copyProperties(x, rollDeputyCrossDetails);
|
|
|
+ rollDeputyCrossDetails.setHeatNo(String.join(",", heatNos));
|
|
|
+ rollDeputyCrossDetails.setBilletNo(x.getBilletNos());
|
|
|
+ rollDeputyCrossDetails.setShiftGroup(billetBasicInfo.getShiftGroup());
|
|
|
+ rollDeputyCrossDetails.setShift(billetBasicInfo.getShift());
|
|
|
+ rollDeputyCrossDetails.setStorageBillId(storageBill.getId());
|
|
|
+ rollDeputyCrossDetails.setStackStorey(x.getLayer());
|
|
|
+ rollDeputyCrossDetails.setStackNum(x.getAddress());
|
|
|
+ rollDeputyCrossDetails.setLicensePlate(storageBill.getLicensePlate());
|
|
|
+ rollDeputyCrossDetails.setId(String.valueOf(IdWorker.getId()));
|
|
|
+ rollDeputyCrossDetails.setCreateTime(new Date());
|
|
|
+ rollDeputyCrossDetails.setUpdateTime(new Date());
|
|
|
+ rollDeputyCrossDetails.setBlankOutput(billetWeightTotal);//出坯量
|
|
|
+
|
|
|
+ String distinctAssemblyNumber = rollClubCommonList.stream()
|
|
|
+ .map(RollClubCommon::getAssemblyNumber)
|
|
|
+ .filter(assemblyNumber -> oConvertUtils.isNotEmpty(assemblyNumber))
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.joining(","));
|
|
|
+ rollDeputyCrossDetails.setAssemblyNumber(distinctAssemblyNumber);
|
|
|
+ addRollDeputyCrossDetailsList.add(rollDeputyCrossDetails);
|
|
|
}
|
|
|
AtomicLong timeOffset = new AtomicLong(); // 初始时间偏移量,单位毫秒,可以根据实际需求调整每次的偏移量大小
|
|
|
if ("billet_auto_tmp".equals(loadingParams.getDestinationTable())){
|
|
@@ -963,6 +1033,9 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
|
|
|
billetAutoTmpService.saveBatch(billetAutoTmpList);
|
|
|
// 更新交班表中的热送总支数
|
|
|
updateShiftInfoByType(billetHotsend.getCcmNo(), billetHotsend.getShift(), billetHotsend.getShiftGroup(), billetAutoTmpList.size(), "hotCharge");
|
|
|
+ }else if ("roll_deputy_cross".equals(loadingParams.getDestinationTable())){
|
|
|
+ rollDeputyCrossDetailsService.saveBatch(addRollDeputyCrossDetailsList);
|
|
|
+ updateShiftInfoByType(billetHotsend.getCcmNo(), billetHotsend.getShift(), billetHotsend.getShiftGroup(), addRollDeputyCrossDetailsList.size(), "hotCharge");
|
|
|
}
|
|
|
}
|
|
|
|