瀏覽代碼

付跨逻辑完善

qiangxuan 1 天之前
父節點
當前提交
fb6c39eb47

+ 163 - 48
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/impl/StorageBillServiceImpl.java

@@ -33,7 +33,6 @@ import org.jeecg.modules.billet.billetLiftingBill.entity.BilletLiftingBill;
 import org.jeecg.modules.billet.billetLiftingBill.service.IBilletLiftingBillService;
 import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
 import org.jeecg.modules.billet.rollClubOne.entity.RollClubOneDetails;
-import org.jeecg.modules.billet.rollClubOne.mapper.RollClubOneDetailsMapper;
 import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneDetailsService;
 import org.jeecg.modules.billet.rollClubThree.entity.RollClubThree;
 import org.jeecg.modules.billet.rollClubThree.entity.RollClubThreeDetails;
@@ -60,7 +59,6 @@ import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService
 import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippService;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingUpLog;
-import org.jeecg.modules.billet.stackingAndLoadingVehicles.mapper.StackingAndLoadingVehiclesMapper;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingUpLogService;
 import org.jeecg.modules.billet.storageBill.dto.StorageCenterQueryDTO;
 import org.jeecg.modules.billet.storageBill.entity.*;
@@ -215,6 +213,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 x.setBelongTable("roll_club_three");
             }else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
                 x.setBelongTable("roll_out_shipp");
+            }else if ("roll_deputy_cross".equals(billetHotsendDetailsVo.getBelongTable())){
+                x.setBelongTable("roll_deputy_cross");
             }
             x.setUpdateTime(new Date());
         });
@@ -308,6 +308,14 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                                 .or().eq(RollOutShippDetails::getStackAddr, "")));
 
         result.setRollOutShippDetailsList(rollOutShippDetailsList);
+
+        List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = rollDeputyCrossDetailsService.list(
+                new LambdaQueryWrapper<RollDeputyCrossDetails>()
+                        .eq(RollDeputyCrossDetails::getHeatNo, storageBill.getHeatNo())
+                        .and(wrapper -> wrapper.isNull(RollDeputyCrossDetails::getStackAddr)
+                                .or().eq(RollDeputyCrossDetails::getStackAddr, "")));
+        result.setRollDeputyCrossDetailsList(rollDeputyCrossDetailsList);
+
         result.setRollHeightDetails(Collections.emptyList());
 
         return result;
@@ -502,6 +510,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                     x.setBelongTable("roll_club_three");
                 }else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
                     x.setBelongTable("roll_out_shipp");
+                }else if ("roll_deputy_cross".equals(billetHotsendDetailsVo.getBelongTable())){
+                    x.setBelongTable("roll_deputy_cross");
                 }
                 x.setBhtcId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
                 x.setUpdateTime(new Date());
@@ -1110,11 +1120,10 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
                 rollClubTwoService.save(rollClubTwo);
             }else {
-                rollClubTwo.setId(rollClubTwo1.getId());
-                rollClubTwo.setAmountTotal(rollClubTwo1.getAmountTotal() + rollClubCommonList.size());// 总支数
-                rollClubTwo.setBlankOutput(rollClubTwo1.getBlankOutput() + rollClubTwo.getBlankOutput());//出坯量
-                rollClubTwo.setUpdateTime(new Date());
-                rollClubTwoService.updateById(rollClubTwo);
+                rollClubTwo1.setAmountTotal(rollClubTwo1.getAmountTotal() + rollClubCommonList.size());// 总支数
+                rollClubTwo1.setBlankOutput(rollClubTwo1.getBlankOutput() + rollClubTwo.getBlankOutput());//出坯量
+                rollClubTwo1.setUpdateTime(new Date());
+                rollClubTwoService.updateById(rollClubTwo1);
             }
             // 保存棒二明细信息
             List<RollClubTwoDetails> rollClubTwoDetailsList = new ArrayList<>();
@@ -1157,11 +1166,10 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
                 rollClubThreeService.save(rollClubThree);
             }else {
-                rollClubThree.setId(rollClubThree1.getId());
-                rollClubThree.setAmountTotal(rollClubThree1.getAmountTotal() + rollClubCommonList.size());// 总支数
-                rollClubThree.setBlankOutput(rollClubThree1.getBlankOutput() + rollClubThree.getBlankOutput());//出坯量
-                rollClubThree.setUpdateTime(new Date());
-                rollClubThreeService.updateById(rollClubThree);
+                rollClubThree1.setAmountTotal(rollClubThree1.getAmountTotal() + rollClubCommonList.size());// 总支数
+                rollClubThree1.setBlankOutput(rollClubThree1.getBlankOutput() + rollClubThree.getBlankOutput());//出坯量
+                rollClubThree1.setUpdateTime(new Date());
+                rollClubThreeService.updateById(rollClubThree1);
             }
             // 保存棒三明细信息
             List<RollClubThreeDetails> rollClubThreeDetailsList = new ArrayList<>();
@@ -1207,11 +1215,11 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
                 rollOutShippService.save(rollOutShipp);
             }else {
-                rollOutShipp.setId(rollOutShipp1.getId());
-                rollOutShipp.setAmountTotal(rollOutShipp1.getAmountTotal() + rollClubCommonList.size());// 总支数
-                rollOutShipp.setBlankOutput(rollOutShipp1.getBlankOutput() + rollOutShipp.getBlankOutput());//出坯量
-                rollOutShipp.setUpdateTime(new Date());
-                rollOutShippService.updateById(rollOutShipp);
+                rollOutShipp1.setId(rollOutShipp1.getId());
+                rollOutShipp1.setAmountTotal(rollOutShipp1.getAmountTotal() + rollClubCommonList.size());// 总支数
+                rollOutShipp1.setBlankOutput(rollOutShipp1.getBlankOutput() + rollOutShipp.getBlankOutput());//出坯量
+                rollOutShipp1.setUpdateTime(new Date());
+                rollOutShippService.updateById(rollOutShipp1);
             }
             // 保存上若明细信息
             List<RollOutShippDetails> rollOutShippDetailsList = new ArrayList<>();
@@ -1257,11 +1265,11 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 rollDeputyCross.setAmountTotal(rollClubCommonList.size());// 总支数
                 rollDeputyCrossService.save(rollDeputyCross);
             }else {
-                rollDeputyCross.setId(rollDeputyCross1.getId());
-                rollDeputyCross.setAmountTotal(rollDeputyCross1.getAmountTotal() + rollClubCommonList.size());// 总支数
-                rollDeputyCross.setBlankOutput(rollDeputyCross1.getBlankOutput() + rollDeputyCross.getBlankOutput());//出坯量
-                rollDeputyCross.setUpdateTime(new Date());
-                rollDeputyCrossService.updateById(rollDeputyCross);
+                rollDeputyCross1.setId(rollDeputyCross1.getId());
+                rollDeputyCross1.setAmountTotal(rollDeputyCross1.getAmountTotal() + rollClubCommonList.size());// 总支数
+                rollDeputyCross1.setBlankOutput(rollDeputyCross1.getBlankOutput() + rollDeputyCross.getBlankOutput());//出坯量
+                rollDeputyCross1.setUpdateTime(new Date());
+                rollDeputyCrossService.updateById(rollDeputyCross1);
             }
             // 保存付跨明细信息
             List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = new ArrayList<>();
@@ -2134,7 +2142,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             });
         }
         // 付跨统计
-        // 根据铸机号、班组、班别、时间范围。查询上若明细表
+        // 根据铸机号、班组、班别、时间范围。查询付跨明细表
         LambdaQueryWrapper<RollDeputyCrossDetails> queryWrapper6 = new LambdaQueryWrapper<>();
         queryWrapper6.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
                 .eq(RollDeputyCrossDetails::getShift, shift)
@@ -3192,15 +3200,12 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             return steelDetailsVo;
         }
 
-
         // 根据铸机号、班组、班别,amountTotal不等于0 ,查询当班装运单信息
         LambdaQueryWrapper<StorageBill> billQueryWrapper = new LambdaQueryWrapper<>();
         billQueryWrapper.eq(StorageBill::getCcmNo, ccmNo)
                 .gt(StorageBill::getAmountTotal, 0);
-
         //时间范围从 createTime 到当前时间
         billQueryWrapper.between(StorageBill::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
-
         List<StorageBill> storageBillList = baseMapper.selectList(billQueryWrapper);
 
         // 提取 id 集合
@@ -3208,7 +3213,6 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 .map(StorageBill::getId)
                 .filter(Objects::nonNull) // 过滤掉 null 值,避免 NPE
                 .collect(Collectors.toList());
-
         if (oConvertUtils.listIsEmpty(storageBillList)) {
             log.info("{}{}", "查询当班装运单信息为空!", ccmNo);
         }
@@ -3218,12 +3222,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         stackingUpLogQueryWrapper.eq(StackingUpLog::getCcmNo, ccmNo)
                                  .eq(StackingUpLog::getShift, shift)
                                  .eq(StackingUpLog::getShiftGroup, shiftGroup);
-
         stackingUpLogQueryWrapper.between(StackingUpLog::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
-
         List<StackingUpLog> stackingUpLogList = stackingUpLogService.list(stackingUpLogQueryWrapper);
         if (oConvertUtils.listIsNotEmpty(stackingUpLogList)) {
-
             steelDetailsVo.setStackingUpLogList(stackingUpLogList);
         }
 
@@ -3233,10 +3234,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 .eq(RollClubOneDetails::getShift, shift)
                 .eq(RollClubOneDetails::getShiftGroup, shiftGroup)
                 .between(RollClubOneDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
-
         List<RollClubOneDetails> rollClubOneDetailsList = rollClubOneDetailsService.list(queryWrapper1);
         if (oConvertUtils.listIsNotEmpty(rollClubOneDetailsList)) {
-
             steelDetailsVo.setRollClubOneDetailsList(rollClubOneDetailsList);
         }
 
@@ -3249,12 +3248,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             queryWrapper2.eq(RollClubTwoDetails::getCcmNo, ccmNo)
                     .between(RollClubTwoDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
         }
-
         List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapper2);
         if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)) {
-
             steelDetailsVo.setRollClubTwoDetailsList(rollClubTwoDetailsList);
-
         }
 
         // 根据铸机号、装运单id集合或时间范围。查询棒三明细表
@@ -3266,11 +3262,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             queryWrapper3.eq(RollClubThreeDetails::getCcmNo, ccmNo)
                     .between(RollClubThreeDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
         }
-
-
         List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapper3);
         if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)) {
-
             steelDetailsVo.setRollClubThreeDetailsList(rollClubThreeDetailsList);
         }
 
@@ -3280,10 +3273,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 .eq(RollHeightDetails::getShift, shift)
                 .eq(RollHeightDetails::getShiftGroup, shiftGroup)
                 .between(RollHeightDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
-
         List<RollHeightDetails> rollHeightDetailsList = rollHeightDetailsService.list(queryWrapper4);
         if (oConvertUtils.listIsNotEmpty(rollHeightDetailsList)) {
-
             steelDetailsVo.setRollHeightDetails(rollHeightDetailsList);
         }
 
@@ -3296,10 +3287,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             queryWrapper5.eq(RollOutShippDetails::getCcmNo, ccmNo)
                     .between(RollOutShippDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
         }
-
         List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapper5);
         if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)) {
-
             steelDetailsVo.setRollOutShippDetailsList(rollOutShippDetailsList);
         }
 
@@ -3312,10 +3301,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             queryWrapper6.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
                     .between(RollDeputyCrossDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
         }
-
         List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = rollDeputyCrossDetailsService.list(queryWrapper6);
         if (oConvertUtils.listIsNotEmpty(rollDeputyCrossDetailsList)) {
-
             steelDetailsVo.setRollDeputyCrossDetailsList(rollDeputyCrossDetailsList);
         }
 
@@ -5100,7 +5087,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 .collect(Collectors.toList());
 
         if (oConvertUtils.listIsEmpty(storageBillList)){
-            log.info("{}{}", "查询当班装运单信息为空!", ccmNo);
+            return onDutyStorageBillStatistics;
         }
         int allCarNum = storageBillList.size();
 
@@ -5286,6 +5273,33 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                 }
             });
         }
+
+        // 根据铸机号、班组、班别、时间范围。查询付跨明细表
+        LambdaQueryWrapper<RollDeputyCrossDetails> queryWrapper6 = new LambdaQueryWrapper<>();
+        if (idList != null && !idList.isEmpty()) {
+            queryWrapper6.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
+                    .in(RollDeputyCrossDetails::getStorageBillId, idList)
+                    .between(RollDeputyCrossDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
+        } else {
+            queryWrapper6.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
+                    .between(RollDeputyCrossDetails::getCreateTime, billetHotsendChangeShift.getCreateTime(), new Date());
+        }
+
+        List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = rollDeputyCrossDetailsService.list(queryWrapper6);
+        if (oConvertUtils.listIsNotEmpty(rollDeputyCrossDetailsList)){
+            // 付跨热装总支数
+            int count = (int) rollDeputyCrossDetailsList.stream().filter(details -> details.getStackAddr() == null).count();
+            hotChargeSum = hotChargeSum + count;
+
+            rollDeputyCrossDetailsList.forEach(x ->{
+                DetailStatistics detailStatistics = new DetailStatistics();
+                if(oConvertUtils.isEmpty(x.getStackAddr())){
+                    detailStatistics.setAmountTotal(1);
+                    detailStatistics.setBlankOutput(x.getBlankOutput());
+                    detailStatistics.setSize(x.getSize());
+                }
+            });
+        }
         onDutyStorageBillStatistics.setHotChargeSum(hotChargeSum);
         onDutyStorageBillStatistics.setHotSendSum(hotSendSum);
         onDutyStorageBillStatistics.setStackingSum(stackingSum);
@@ -5383,6 +5397,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         List<RollClubTwoDetails> rollClubTwoList = new ArrayList<>();
         List<RollClubThreeDetails> rollClubThreeList = new ArrayList<>();
         List<RollOutShippDetails> rollOutShippList = new ArrayList<>();
+        List<RollDeputyCrossDetails> rollDeputyCrossList = new ArrayList<>();
 
         for (StorageBill storageBill : storageBillList) {
             if ("棒二".equals(storageBill.getDestination())) {
@@ -5421,6 +5436,18 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
 
                 rollOutShippList.addAll(rollOutShippDetailsList);
             }
+
+            if ("付跨".equals(storageBill.getDestination())) {
+                LambdaQueryWrapper<RollDeputyCrossDetails> queryWrapper4 = new LambdaQueryWrapper<>();
+                queryWrapper4.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
+                        .eq(RollDeputyCrossDetails::getStorageBillId, storageBill.getId())
+                        .and(qw -> qw.isNull(RollDeputyCrossDetails::getStackAddr)
+                                .or()
+                                .eq(RollDeputyCrossDetails::getStackAddr, ""));;
+                List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = rollDeputyCrossDetailsService.list(queryWrapper4);
+
+                rollDeputyCrossList.addAll(rollDeputyCrossDetailsList);
+            }
         }
 
         int storageBillCount1 = Math.toIntExact(
@@ -5444,12 +5471,21 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                         .count()
         );
 
+        int storageBillCount4 = Math.toIntExact(
+                rollDeputyCrossList.stream()
+                        .map(RollDeputyCrossDetails::getStorageBillId)
+                        .distinct()
+                        .count()
+        );
+
         onDutyHotChargeVo.setRollClubTwoNum(rollClubTwoList.size());
         onDutyHotChargeVo.setRollClubTwoTrainNum(storageBillCount1);
         onDutyHotChargeVo.setRollClubThreeNum(rollClubThreeList.size());
         onDutyHotChargeVo.setRollClubThreeTrainNum(storageBillCount2);
         onDutyHotChargeVo.setRollOutShippNum(rollOutShippList.size());
         onDutyHotChargeVo.setRollOutShippTrainNum(storageBillCount3);
+        onDutyHotChargeVo.setRollDeputyCrossNum(rollDeputyCrossList.size());
+        onDutyHotChargeVo.setRollDeputyCrossTrainNum(storageBillCount4);
 
         return onDutyHotChargeVo;
     }
@@ -5493,6 +5529,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         List<RollClubTwoDetails> rollClubTwoList = new ArrayList<>();
         List<RollClubThreeDetails> rollClubThreeList = new ArrayList<>();
         List<RollOutShippDetails> rollOutShippList = new ArrayList<>();
+        List<RollDeputyCrossDetails> rollDeputyCrossList = new ArrayList<>();
 
         for (StorageBill storageBill : storageBillList) {
             if ("棒二".equals(storageBill.getDestination())) {
@@ -5526,6 +5563,17 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
 
                 rollOutShippList.addAll(rollOutShippDetailsList);
             }
+
+            if ("付跨".equals(storageBill.getDestination())) {
+                LambdaQueryWrapper<RollDeputyCrossDetails> queryWrapper4 = new LambdaQueryWrapper<>();
+                queryWrapper4.eq(RollDeputyCrossDetails::getCcmNo, ccmNo)
+                        .eq(RollDeputyCrossDetails::getStorageBillId, storageBill.getId())
+                        .isNotNull(RollDeputyCrossDetails::getStackAddr) // stackAddr 不能为 NULL
+                        .ne(RollDeputyCrossDetails::getStackAddr, ""); // stackAddr 不能是空字符串
+                List<RollDeputyCrossDetails> rollDeputyCrossDetailsList = rollDeputyCrossDetailsService.list(queryWrapper4);
+
+                rollDeputyCrossList.addAll(rollDeputyCrossDetailsList);
+            }
         }
 
         int storageBillCount1 = Math.toIntExact(
@@ -5549,12 +5597,21 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                         .count()
         );
 
+        int storageBillCount4 = Math.toIntExact(
+                rollDeputyCrossList.stream()
+                        .map(RollDeputyCrossDetails::getStorageBillId)
+                        .distinct()
+                        .count()
+        );
+
         onDutyColdChargeVo.setRollClubTwoNum(rollClubTwoList.size()* 4);
         onDutyColdChargeVo.setRollClubTwoTrainNum(storageBillCount1);
         onDutyColdChargeVo.setRollClubThreeNum(rollClubThreeList.size()* 4);
         onDutyColdChargeVo.setRollClubThreeTrainNum(storageBillCount2);
         onDutyColdChargeVo.setRollOutShippNum(rollOutShippList.size()* 4);
         onDutyColdChargeVo.setRollOutShippTrainNum(storageBillCount3);
+        onDutyColdChargeVo.setRollDeputyCrossNum(rollDeputyCrossList.size()* 4);
+        onDutyColdChargeVo.setRollDeputyCrossTrainNum(storageBillCount4);
 
         return onDutyColdChargeVo;
     }
@@ -6252,8 +6309,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                             .eq(RollClubTwo::getShiftGroup, y.getShiftGroup())
                             .eq(RollClubTwo::getStorageBillId, storageBill.getId());
                     RollClubTwo rollClubTwo1 = rollClubTwoService.getOne(queryWrapper1);
-                    RollClubTwo rollClubTwo = new RollClubTwo();
                     if (oConvertUtils.isEmpty(rollClubTwo1)){
+                        RollClubTwo rollClubTwo = new RollClubTwo();
                         // 堆垛保存时 目的地为为棒二 保存棒二信息
                         rollClubTwo.setId(String.valueOf(IdWorker.getId()));
                         rollClubTwo.setCcmNo(y.getCcmNo().toString());
@@ -6309,8 +6366,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                             .eq(RollClubThree::getShiftGroup, y.getShiftGroup())
                             .eq(RollClubThree::getStorageBillId, storageBill.getId());
                     RollClubThree rollClubThree1 = rollClubThreeService.getOne(queryWrapper1);
-                    RollClubThree rollClubThree = new RollClubThree();
                     if (oConvertUtils.isEmpty(rollClubThree1)){
+                        RollClubThree rollClubThree = new RollClubThree();
                         // 堆垛保存发车时  目的地为为棒三 保存棒三信息
                         rollClubThree.setId(String.valueOf(IdWorker.getId()));
                         rollClubThree.setCcmNo(y.getCcmNo().toString());
@@ -6367,8 +6424,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                             .eq(RollOutShipp::getShiftGroup, y.getShiftGroup())
                             .eq(RollOutShipp::getStorageBillId, storageBill.getId());
                     RollOutShipp rollOutShipp1 = rollOutShippService.getOne(queryWrapper1);
-                    RollOutShipp rollOutShipp = new RollOutShipp();
                     if (oConvertUtils.isEmpty(rollOutShipp1)){
+                        RollOutShipp rollOutShipp = new RollOutShipp();
                         // 堆垛保存发车时 目的地为为上若 保存上若信息
                         rollOutShipp.setId(String.valueOf(IdWorker.getId()));
                         rollOutShipp.setCcmNo(y.getCcmNo().toString());
@@ -6416,6 +6473,64 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
                         .collect(Collectors.joining(","));
                 rollOutShippDetails.setAssemblyNumber(distinctAssemblyNumber);
                 addRollOutShippDetailsList.add(rollOutShippDetails);
+            }else if ("roll_deputy_cross".equals(billetHotsendTypeConfig.getBelongTable())){
+                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(billetBasicInfoList.get(0).getShiftGroup());
+                rollDeputyCrossDetails.setShift(billetBasicInfoList.get(0).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.setBlankOutput(billetWeightTotal);//出坯量
+                rollDeputyCrossDetails.setSpec(billetBasicInfoList.get(0).getSpec());
+                rollDeputyCrossDetails.setSize(billetBasicInfoList.get(0).getLength().toString());
+                rollDeputyCrossDetails.setSteel(billetBasicInfoList.get(0).getGrade());
+                String distinctAssemblyNumber = rollClubCommonList.stream()
+                        .map(RollClubCommon::getAssemblyNumber)
+                        .filter(assemblyNumber -> oConvertUtils.isNotEmpty(assemblyNumber))
+                        .distinct()
+                        .collect(Collectors.joining(","));
+                rollDeputyCrossDetails.setAssemblyNumber(distinctAssemblyNumber);
+                addRollDeputyCrossDetailsList.add(rollDeputyCrossDetails);
             }
         });
 

+ 6 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/vo/OnDutyColdChargeVo.java

@@ -23,4 +23,10 @@ public class OnDutyColdChargeVo {
 
     @ApiModelProperty(value = "上若冷装车次")
     private Integer rollOutShippTrainNum;
+
+    @ApiModelProperty(value = "付跨接收支数")
+    private Integer rollDeputyCrossNum;
+
+    @ApiModelProperty(value = "付跨冷装车次")
+    private Integer rollDeputyCrossTrainNum;
 }

+ 7 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/vo/OnDutyHotChargeVo.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.billet.storageBill.vo;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.jeecg.modules.billet.rollDeputyCross.entity.RollDeputyCrossDetails;
 
 @Data
 public class OnDutyHotChargeVo {
@@ -25,5 +26,11 @@ public class OnDutyHotChargeVo {
     @ApiModelProperty(value = "上若热装车次")
     private Integer rollOutShippTrainNum;
 
+    @ApiModelProperty(value = "付跨接收支数")
+    private Integer rollDeputyCrossNum;
+
+    @ApiModelProperty(value = "付跨热装车次")
+    private Integer rollDeputyCrossTrainNum;
+
 
 }