|
@@ -43,6 +43,8 @@ import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShipp;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShippDetails;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService;
|
|
|
import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
|
|
|
+import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingUpLog;
|
|
|
+import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingUpLogService;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.*;
|
|
|
import org.jeecg.modules.billet.storageBill.mapper.StorageBillMapper;
|
|
|
import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
|
|
@@ -132,6 +134,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
@Autowired
|
|
|
private IBilletLiftingBillService billetLiftingBillService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IStackingUpLogService stackingUpLogService;
|
|
|
+
|
|
|
@Override
|
|
|
public void departHandle(BilletHotsendDetailsVo billetHotsendDetailsVo) {
|
|
|
StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
|
|
@@ -1794,6 +1799,50 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
double hotChargeTotalWeight = 0d;
|
|
|
int stackingSum = 0;
|
|
|
double stackingTotalWeight = 0d;
|
|
|
+
|
|
|
+ // 根据铸机号、班组、班别、时间范围。查询棒二明细表
|
|
|
+ LambdaQueryWrapper<StackingUpLog> stackingUpLogQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo)
|
|
|
+ .eq(StackingUpLog::getShift, shift)
|
|
|
+ .eq(StackingUpLog::getShiftGroup, shiftGroup);
|
|
|
+ // 检查 billetHotsendChangeShift 是否为空
|
|
|
+ if (oConvertUtils.isEmpty(changeShiftId)) {
|
|
|
+ // 当 changeShiftId 为空时,时间范围从 createTime 到当前时间
|
|
|
+ stackingUpLogQueryWrapper.between(StackingUpLog::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
|
|
|
+ } else {
|
|
|
+ // 当 changeShiftId 不为空时,时间范围从 createTime 到 updateTime
|
|
|
+ stackingUpLogQueryWrapper.between(StackingUpLog::getCreateTime, billetHotsendChangeShift.getCreateTime(), billetHotsendChangeShift.getChangeShiftTime());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<StackingUpLog> stackingUpLogList = stackingUpLogService.list(stackingUpLogQueryWrapper);
|
|
|
+ if (oConvertUtils.listIsNotEmpty(stackingUpLogList)) {
|
|
|
+
|
|
|
+ for (StackingUpLog stackingUpLog : stackingUpLogList) {
|
|
|
+ DetailStatistics detailStatistics = new DetailStatistics();
|
|
|
+ if (oConvertUtils.isNotEmpty(stackingUpLog.getBilletNo())) {
|
|
|
+
|
|
|
+ List<String> billetNoList = Arrays.asList(stackingUpLog.getBilletNo().split(","));
|
|
|
+ LambdaQueryWrapper<BilletBasicInfo> basicInfoQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ basicInfoQueryWrapper.in(BilletBasicInfo::getBilletNo, billetNoList);
|
|
|
+ List<BilletBasicInfo> billetBasicInfos = billetBasicInfoService.list(basicInfoQueryWrapper);
|
|
|
+ if (oConvertUtils.isNotEmpty(billetBasicInfos)) {
|
|
|
+ double stackingTotalBlankOutput = billetBasicInfos.stream()
|
|
|
+ .mapToDouble(BilletBasicInfo::getBilletWeight).sum();
|
|
|
+
|
|
|
+ stackingTotalWeight = stackingTotalWeight + stackingTotalBlankOutput;
|
|
|
+ detailStatistics.setBlankOutput(stackingTotalBlankOutput);
|
|
|
+
|
|
|
+ }
|
|
|
+ detailStatistics.setAmountTotal(billetNoList.size());
|
|
|
+ }
|
|
|
+ detailStatistics.setSize(stackingUpLog.getSize());
|
|
|
+ stackingDetailStatisticsList.add(detailStatistics);
|
|
|
+ }
|
|
|
+
|
|
|
+ stackingSum = stackingSum + stackingUpLogList.size();
|
|
|
+ }
|
|
|
+
|
|
|
// 根据铸机号、班组、班别、时间范围。查询棒一明细表
|
|
|
LambdaQueryWrapper<RollClubOneDetails> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
// 添加通用的查询条件
|
|
@@ -1851,25 +1900,25 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
.mapToDouble(RollClubTwoDetails::getBlankOutput).sum();
|
|
|
hotChargeTotalWeight = hotChargeTotalWeight + hotChargeTotalBlankOutput;
|
|
|
|
|
|
- // 棒二堆垛总支数 获取堆垛编号不为空的条数,即为堆垛
|
|
|
- int count1 = rollClubTwoDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
- .mapToInt(details -> 4)
|
|
|
- .sum();
|
|
|
- stackingSum = stackingSum + count1;
|
|
|
- // 棒二堆垛出坯量 获取堆垛编号不为空的条数,即为堆垛
|
|
|
- double stackingTotalBlankOutput = rollClubTwoDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null)
|
|
|
- .mapToDouble(RollClubTwoDetails::getBlankOutput).sum();
|
|
|
- stackingTotalWeight = stackingTotalWeight + stackingTotalBlankOutput;
|
|
|
+// // 棒二堆垛总支数 获取堆垛编号不为空的条数,即为堆垛
|
|
|
+// int count1 = rollClubTwoDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
+// .mapToInt(details -> 4)
|
|
|
+// .sum();
|
|
|
+// stackingSum = stackingSum + count1;
|
|
|
+// // 棒二堆垛出坯量 获取堆垛编号不为空的条数,即为堆垛
|
|
|
+// double stackingTotalBlankOutput = rollClubTwoDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null)
|
|
|
+// .mapToDouble(RollClubTwoDetails::getBlankOutput).sum();
|
|
|
+// stackingTotalWeight = stackingTotalWeight + stackingTotalBlankOutput;
|
|
|
|
|
|
rollClubTwoDetailsList.forEach(x ->{
|
|
|
DetailStatistics detailStatistics = new DetailStatistics();
|
|
|
if(x.getStackAddr() != null && !x.getStackAddr().isEmpty()){
|
|
|
- detailStatistics.setAmountTotal(4);
|
|
|
- detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
- detailStatistics.setSize(x.getSize());
|
|
|
- stackingDetailStatisticsList.add(detailStatistics);
|
|
|
+// detailStatistics.setAmountTotal(4);
|
|
|
+// detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
+// detailStatistics.setSize(x.getSize());
|
|
|
+// stackingDetailStatisticsList.add(detailStatistics);
|
|
|
}else {
|
|
|
detailStatistics.setAmountTotal(1);
|
|
|
detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
@@ -1903,25 +1952,25 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
.mapToDouble(RollClubThreeDetails::getBlankOutput).sum();
|
|
|
hotChargeTotalWeight = hotChargeTotalWeight + hotChargeTotalBlankOutput;
|
|
|
|
|
|
- // 棒三堆垛总支数
|
|
|
- int count1 = rollClubThreeDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
- .mapToInt(details -> 4)
|
|
|
- .sum();
|
|
|
- stackingSum = stackingSum + count1;
|
|
|
- // 棒三堆垛出坯量
|
|
|
- double stackingTotalBlankOutput = rollClubThreeDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null)
|
|
|
- .mapToDouble(RollClubThreeDetails::getBlankOutput).sum();
|
|
|
- stackingTotalWeight = stackingTotalWeight + stackingTotalBlankOutput;
|
|
|
+// // 棒三堆垛总支数
|
|
|
+// int count1 = rollClubThreeDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
+// .mapToInt(details -> 4)
|
|
|
+// .sum();
|
|
|
+// stackingSum = stackingSum + count1;
|
|
|
+// // 棒三堆垛出坯量
|
|
|
+// double stackingTotalBlankOutput = rollClubThreeDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null)
|
|
|
+// .mapToDouble(RollClubThreeDetails::getBlankOutput).sum();
|
|
|
+// stackingTotalWeight = stackingTotalWeight + stackingTotalBlankOutput;
|
|
|
|
|
|
rollClubThreeDetailsList.forEach(x ->{
|
|
|
DetailStatistics detailStatistics = new DetailStatistics();
|
|
|
if(x.getStackAddr() != null && !x.getStackAddr().isEmpty()){
|
|
|
- detailStatistics.setAmountTotal(4);
|
|
|
- detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
- detailStatistics.setSize(x.getSize());
|
|
|
- stackingDetailStatisticsList.add(detailStatistics);
|
|
|
+// detailStatistics.setAmountTotal(4);
|
|
|
+// detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
+// detailStatistics.setSize(x.getSize());
|
|
|
+// stackingDetailStatisticsList.add(detailStatistics);
|
|
|
}else {
|
|
|
detailStatistics.setAmountTotal(1);
|
|
|
detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
@@ -1990,26 +2039,26 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
.filter(details -> details.getStackAddr() == null)
|
|
|
.mapToDouble(RollOutShippDetails::getBlankOutput).sum();
|
|
|
hotChargeTotalWeight = hotChargeTotalWeight + hotChargeShippTotalWeight;
|
|
|
- // 上若堆垛总支数
|
|
|
- int count1 = rollOutShippDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
- .mapToInt(details -> 4)
|
|
|
- .sum();
|
|
|
-
|
|
|
- stackingSum = stackingSum + count1;
|
|
|
- // 上若堆垛出坯量
|
|
|
- double stackingShippTotalWeight = rollOutShippDetailsList.stream()
|
|
|
- .filter(details -> details.getStackAddr() != null)
|
|
|
- .mapToDouble(RollOutShippDetails::getBlankOutput).sum();
|
|
|
- stackingTotalWeight = stackingTotalWeight + stackingShippTotalWeight;
|
|
|
+// // 上若堆垛总支数
|
|
|
+// int count1 = rollOutShippDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null && !details.getStackAddr().isEmpty())
|
|
|
+// .mapToInt(details -> 4)
|
|
|
+// .sum();
|
|
|
+//
|
|
|
+// stackingSum = stackingSum + count1;
|
|
|
+// // 上若堆垛出坯量
|
|
|
+// double stackingShippTotalWeight = rollOutShippDetailsList.stream()
|
|
|
+// .filter(details -> details.getStackAddr() != null)
|
|
|
+// .mapToDouble(RollOutShippDetails::getBlankOutput).sum();
|
|
|
+// stackingTotalWeight = stackingTotalWeight + stackingShippTotalWeight;
|
|
|
|
|
|
rollOutShippDetailsList.forEach(x ->{
|
|
|
DetailStatistics detailStatistics = new DetailStatistics();
|
|
|
if(x.getStackAddr() != null && !x.getStackAddr().isEmpty()){
|
|
|
- detailStatistics.setAmountTotal(4);
|
|
|
- detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
- detailStatistics.setSize(x.getSize());
|
|
|
- stackingDetailStatisticsList.add(detailStatistics);
|
|
|
+// detailStatistics.setAmountTotal(4);
|
|
|
+// detailStatistics.setBlankOutput(x.getBlankOutput());
|
|
|
+// detailStatistics.setSize(x.getSize());
|
|
|
+// stackingDetailStatisticsList.add(detailStatistics);
|
|
|
}else {
|
|
|
detailStatistics.setAmountTotal(1);
|
|
|
detailStatistics.setBlankOutput(x.getBlankOutput());
|