qiangxuan пре 6 месеци
родитељ
комит
3204152bfb

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

@@ -1024,26 +1024,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			x.setUpdateTime(new Date());
 		});
 		billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
-
-		// 更新装运单 车次总序号、本车车次
-		if (oConvertUtils.isEmpty(billetHotsendDetailsVo.getStorageBill()) || billetHotsendDetailsVo.getStorageBill() == null){
-			return;
-		}
-		LambdaQueryWrapper<StorageBill> queryWrapperSB = new LambdaQueryWrapper<>();
-		queryWrapperSB.eq(StorageBill::getId, billetHotsendDetailsVo.getStorageBill().getId());
-		StorageBill storageBillInfo = storageBillService.getOne(queryWrapperSB);
-		if (oConvertUtils.isEmpty(storageBillInfo)){
-			storageBill.setAmountTotal(rollClubCommonList.size());
-		}else {
-			storageBill.setAmountTotal(storageBillInfo.getAmountTotal() + rollClubCommonList.size());
-		}
-		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
-		storageBill.setDestination(billetHotsendDetailsVo.getBelongTypeName());// 目的地
-		storageBill.setOutTime(new Date());
-		storageBillService.updateById(storageBill);
-		// 生成储运单
-		StorageCarLog storageCarLog = new StorageCarLog();
-		BeanUtils.copyProperties(storageBill, storageCarLog);
+		//
 		List<String> sizeList = new ArrayList<>();
 		List<String> heatNoList = new ArrayList<>();
 		long count = 0l;
@@ -1084,6 +1065,26 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				count = rollOutShippDetailsList.stream().count();
 			}
 		}
+		// 更新装运单 车次总序号、本车车次
+		if (oConvertUtils.isEmpty(billetHotsendDetailsVo.getStorageBill()) || billetHotsendDetailsVo.getStorageBill() == null){
+			return;
+		}
+		LambdaQueryWrapper<StorageBill> queryWrapperSB = new LambdaQueryWrapper<>();
+		queryWrapperSB.eq(StorageBill::getId, billetHotsendDetailsVo.getStorageBill().getId());
+		StorageBill storageBillInfo = storageBillService.getOne(queryWrapperSB);
+		if (oConvertUtils.isEmpty(storageBillInfo)){
+			storageBill.setAmountTotal(rollClubCommonList.size());
+		}else {
+			storageBill.setAmountTotal(storageBillInfo.getAmountTotal() + rollClubCommonList.size());
+		}
+		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
+		storageBill.setDestination(billetHotsendDetailsVo.getBelongTypeName());// 目的地
+		storageBill.setSize(String.join(",", sizeList));
+		storageBill.setOutTime(new Date());
+		storageBillService.updateById(storageBill);
+		// 生成储运单
+		StorageCarLog storageCarLog = new StorageCarLog();
+		BeanUtils.copyProperties(storageBill, storageCarLog);
 		storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
 		storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
 //			storageCarLog.setFixedWeight();// 定重

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

@@ -752,19 +752,11 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             x.setBhtcId(loadingParams.getDestinationId());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
-        // 6 更新装运单 storage_bill 新增储运信息
-        storageBill.setTypeConfigId(loadingParams.getDestinationId()); // 钢坯配置类型ID
-        storageBill.setDestination(loadingParams.getDestination());// 目的地
-        storageBill.setAmountTotal(storageBill.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4);
-        storageBill.setOutTime(new Date());
-        storageBillService.updateById(storageBill);
-        // 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
-        StorageCarLog storageCarLog = new StorageCarLog();
-        BeanUtils.copyProperties(storageBill, storageCarLog);
+
+        //根据铸机号、钢坯转运单ID查询定尺信息
         List<String> sizeList = new ArrayList<>();
         List<String> heatNoList = new ArrayList<>();
         long count = 0l;
-        //根据铸机号、钢坯转运单ID查询定尺信息
         if ("roll_club_two".equals(loadingParams.getDestinationTable())){
             LambdaQueryWrapper<RollClubTwoDetails> queryWrapperRC = new LambdaQueryWrapper();
             queryWrapperRC.eq(RollClubTwoDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
@@ -801,10 +793,22 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                 count = rollOutShippDetailsList.stream().count();
             }
         }
-        Integer bx =Integer.valueOf((int) count);
+        // 6 更新装运单 storage_bill 新增储运信息
+        storageBill.setSize(String.join(",", sizeList));
+        storageBill.setTypeConfigId(loadingParams.getDestinationId()); // 钢坯配置类型ID
+        storageBill.setDestination(loadingParams.getDestination());// 目的地
+        storageBill.setAmountTotal(storageBill.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4);
+        storageBill.setOutTime(new Date());
+        storageBillService.updateById(storageBill);
+        // 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
+        StorageCarLog storageCarLog = new StorageCarLog();
+        BeanUtils.copyProperties(storageBill, storageCarLog);
+
         LambdaQueryWrapper<StackingDownLog> queryWrappersd = new LambdaQueryWrapper();
         queryWrappersd.eq(StackingDownLog::getCcmNo, storageBill.getCcmNo()).eq(StackingDownLog::getStorageBillId, storageBill.getId());
         List<StackingDownLog> stackingDownLogs = stackingDownLogService.list(queryWrappersd);
+
+        Integer bx =Integer.valueOf((int) count);
         Integer dd = stackingDownLogs.size() * 4 + bx;
         storageCarLog.setDestination(loadingParams.getDestination());// 目的地
         storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号