qiangxuan 6 months ago
parent
commit
f0ba93a78c

+ 2 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/impl/BilletHotsendBaseServiceImpl.java

@@ -1159,9 +1159,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			log.info("{}{}", ">>>>>棒线统计当前班次" + operationName + "总支数:", sum + "班组:" + cacheShintGroup + "班次:" + cacheShint);
 			billetHotsendChangeShift.setUpdateTime(new Date());
 			if ("hotSend".equals(updateType)){
-				billetHotsendChangeShift.setHotsendAmount(sum);
+				billetHotsendChangeShift.setHotsendAmount(billetHotsendChangeShift.getHotsendAmount() + sum);
 			}else{
-				billetHotsendChangeShift.setHotfeignAmount(sum);
+				billetHotsendChangeShift.setHotfeignAmount(billetHotsendChangeShift.getHotfeignAmount() + sum);
 			}
 			billetHotsendChangeShiftService.updateById(billetHotsendChangeShift);
 		}

+ 19 - 6
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/service/impl/StackingAndLoadingVehiclesServiceImpl.java

@@ -513,6 +513,13 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                     .eq(BilletHotsend::getHeatNo, x.getHeatNo());
             BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper1);
             idExistBh.setStackNum(idExistBh.getStackNum() - 4);
+            if ("roll_club_two".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRollclubtwoNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubtwoNum()) ? idExistBh.getRollclubtwoNum() + 4 : 4);
+            }else if ("roll_club_three".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRollclubthreeNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubthreeNum()) ? idExistBh.getRollclubthreeNum() + 4 : 4);
+            }else if ("roll_out_shipp".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRolloutshippNum(oConvertUtils.isNotEmpty(idExistBh.getRolloutshippNum()) ? idExistBh.getRolloutshippNum() + 4 : 4);
+            }
             billetHotsendBaseService.updateById(idExistBh);
         });
         String finalCacheShint1 = cacheShint;
@@ -595,13 +602,12 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
         //5 查询并批量更新钢坯基础信息 belongTable
         LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
                 .eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
-                .eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
                 .in(BilletBasicInfo::getBilletNo, billetNosList);
         List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
         billetBasicInfoList.forEach(x ->{
-            x.setBelongTable("stacking_and_loading_vehicles");
-            x.setUpdateTime(new Date());
+            x.setBelongTable(loadingParams.getDestinationTable());
             x.setBhtcId(loadingParams.getDestinationId());
+            x.setUpdateTime(new Date());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
         StorageBill storageBill = loadingParams.getStorageBill();
@@ -651,6 +657,13 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                     .eq(BilletHotsend::getHeatNo, x.getHeatNo());
             BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper1);
             idExistBh.setStackNum(idExistBh.getStackNum() - 4);
+            if ("roll_club_two".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRollclubtwoNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubtwoNum()) ? idExistBh.getRollclubtwoNum() + 4 : 4);
+            }else if ("roll_club_three".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRollclubthreeNum(oConvertUtils.isNotEmpty(idExistBh.getRollclubthreeNum()) ? idExistBh.getRollclubthreeNum() + 4 : 4);
+            }else if ("roll_out_shipp".equals(loadingParams.getDestinationTable())){
+                idExistBh.setRolloutshippNum(oConvertUtils.isNotEmpty(idExistBh.getRolloutshippNum()) ? idExistBh.getRolloutshippNum() + 4 : 4);
+            }
             billetHotsendBaseService.updateById(idExistBh);
         });
         StorageBill storageBill = loadingParams.getStorageBill();
@@ -735,7 +748,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                 .in(BilletBasicInfo::getBilletNo, billetNosList);
         List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
         billetBasicInfoList.forEach(x ->{
-            x.setBelongTable("stacking_and_loading_vehicles");
+            x.setBelongTable(loadingParams.getDestinationTable());
             x.setBhtcId(loadingParams.getDestinationId());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
@@ -1155,9 +1168,9 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             log.info("{}{}", ">>>>>堆垛统计当前班次" + operationName + "总支数:", sum + "班组:" + cacheShintGroup + "班次:" + cacheShint);
             billetHotsendChangeShift.setUpdateTime(new Date());
             if ("hotSend".equals(type)){
-                billetHotsendChangeShift.setHotfeignAmount(sum);
+                billetHotsendChangeShift.setHotfeignAmount(billetHotsendChangeShift.getHotfeignAmount() + sum);
             }else if ("stackingUp".equals(type)){
-                billetHotsendChangeShift.setStackAmount(sum);
+                billetHotsendChangeShift.setStackAmount(billetHotsendChangeShift.getStackAmount() + sum);
             }
             billetHotsendChangeShiftService.updateById(billetHotsendChangeShift);
         }