Browse Source

Merge branch 'master' of 123.57.213.14:guoqiang.duan/zgzt-bus-java

guoqiang 6 months ago
parent
commit
0121ac8d3d
20 changed files with 967 additions and 381 deletions
  1. 1 2
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/actualControl/billetActual/billetActual/controller/BilletBasicInfoController.java
  2. 18 13
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/controller/BilletHotsendBaseController.java
  3. 2 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/IBilletHotsendBaseService.java
  4. 465 84
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/impl/BilletHotsendBaseServiceImpl.java
  5. 4 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubThree/entity/RollClubThreeDetails.java
  6. 1 1
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubTwo/controller/RollClubTwoDetailsController.java
  7. 4 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubTwo/entity/RollClubTwoDetails.java
  8. 4 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollOutShipp/entity/RollOutShippDetails.java
  9. 40 11
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/controller/StackingAndLoadingVehiclesController.java
  10. 1 3
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/entity/StackingAndLoadingVehicles.java
  11. 1 1
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/entity/StackingUpLog.java
  12. 4 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/service/IStackingAndLoadingVehiclesService.java
  13. 321 247
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/service/impl/StackingAndLoadingVehiclesServiceImpl.java
  14. 6 4
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/vo/LoadingParams.java
  15. 27 1
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java
  16. 22 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/BilletHotsendDetails.java
  17. 10 7
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/StorageBill.java
  18. 3 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/IStorageBillService.java
  19. 30 0
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/impl/StorageBillServiceImpl.java
  20. 3 7
      zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageCarLog/entity/StorageCarLog.java

+ 1 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/actualControl/billetActual/billetActual/controller/BilletBasicInfoController.java

@@ -22,7 +22,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @Description: 钢坯基础信息
@@ -178,7 +177,7 @@ public class BilletBasicInfoController extends JeecgController<BilletBasicInfo,
 	 public Result<?> queryBilletLengthList(@RequestParam(name="ccmNo") Integer ccmNo, @RequestParam(name="heatNo") String heatNo) {
 		 List<Integer> billetLengthList = billetBasicInfoService.queryBilletLengthList(ccmNo, heatNo);
 		 if (billetLengthList.size() == 0){
-			 return Result.error("钢坯定尺信息不存在!");
+			 return Result.error("当前浇铸炉号不存在!");
 		 }
 		 return Result.OK(billetLengthList);
 	 }

+ 18 - 13
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/controller/BilletHotsendBaseController.java

@@ -1,9 +1,7 @@
 package org.jeecg.modules.billet.billetHotsend.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -98,18 +96,25 @@ public class BilletHotsendBaseController extends JeecgController<BilletHotsend,
     @ApiOperation(value="钢坯热送基础信息-添加", notes="钢坯热送基础信息-添加")
     @PostMapping(value = "/add")
     public Result<?> add(@RequestBody BilletHotsendDetailsVo billetHotsendDetailsVo) {
-        BilletHotsend billetHotsend = billetHotsendDetailsVo.getBilletHotsend();
-        billetHotsend.setId(String.valueOf(IdWorker.getId()));
-        billetHotsendDetailsVo.setBilletHotsend(billetHotsend);
-        LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo()).eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo());
-        BilletHotsend check = billetHotsendBaseService.getOne(queryWrapper);
-        if (oConvertUtils.isNotEmpty(check) && billetHotsend.getIsUpd() ){
-            return Result.error("该铸机和炉号信息已存在,添加失败!");
-        }
         billetHotsendBaseService.saveBilletHotsendDetails(billetHotsendDetailsVo);
-        operateLogService.add(billetHotsend,null,BilletHotsend.class);
-        return Result.OK("新增成功!");
+//        operateLogService.add(billetHotsend,null,BilletHotsend.class);
+        return Result.OK("棒线新增成功!");
+    }
+
+
+    /**
+     *   添加
+     *
+     *
+     * @return
+     */
+    @AutoLog(value = "钢坯棒线发车")
+    @ApiOperation(value="钢坯棒线发车", notes="钢坯棒线发车")
+    @PostMapping(value = "/rodLineDepart")
+    public Result<?> adds(@RequestBody BilletHotsendDetailsVo billetHotsendDetailsVo) {
+        billetHotsendBaseService.saveBilletHotsendDetailsCar(billetHotsendDetailsVo);
+//        operateLogService.add(billetHotsend,null,BilletHotsend.class);
+        return Result.OK("棒线发车成功!");
     }
 
 

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

@@ -25,4 +25,6 @@ public interface IBilletHotsendBaseService extends IService<BilletHotsend> {
     void saveBilletHotsendDetails(BilletHotsendDetailsVo billetHotsendDetailsVo);
 
     Integer queryEndNumByCcmNo(String ccmNo, String heatNo, String belongTable);
+
+    void saveBilletHotsendDetailsCar(BilletHotsendDetailsVo billetHotsendDetailsVo);
 }

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

@@ -1,6 +1,5 @@
 package org.jeecg.modules.billet.billetHotsend.service.impl;
 
-import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -17,6 +16,7 @@ import org.jeecg.modules.billet.billetHotsend.service.IBilletHotsendBaseService;
 import org.jeecg.modules.billet.billetHotsend.service.IRulerDefaultConfigService;
 import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
+import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
 import org.jeecg.modules.billet.rollClubOne.entity.RollClubOne;
 import org.jeecg.modules.billet.rollClubOne.entity.RollClubOneDetails;
 import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneDetailsService;
@@ -62,7 +62,8 @@ import java.util.stream.Collectors;
 @Service
 @Slf4j
 public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseMapper, BilletHotsend> implements IBilletHotsendBaseService {
-
+	@Autowired
+	private IOperateLogService operateLogService;
 	@Autowired
 	private BilletHotsendBaseMapper billetHotsendBaseMapper;
 	@Autowired
@@ -305,40 +306,87 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 
 	@Override
 	public void saveBilletHotsendDetails(BilletHotsendDetailsVo billetHotsendDetailsVo) {
+		// 根据billetHotsendTypeConfigId 查询基础垛位信息
+		BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
+		List<RollClubCommon> rollClubCommonList = billetHotsendDetailsVo.getRollClubCommonList();
 		BilletHotsend billetHotsend = new BilletHotsend();
-		StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
 		// 新保存 钢坯热送基础信息
 		BeanUtils.copyProperties(billetHotsendDetailsVo.getBilletHotsend(), billetHotsend);
 		billetHotsend.setCreateDate(new Date());
-		List<RollClubCommon> rollClubCommonList = billetHotsendDetailsVo.getRollClubCommonList();
-		billetHotsend.setAmountTotal(rollClubCommonList.size());
-		if (billetHotsend.getIsUpd()){
+//		billetHotsend.setAmountTotal(rollClubCommonList.size()); //总支数
+		LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
+		queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+				.eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+				.eq(BilletHotsend::getShift, billetHotsend.getShift())
+				.eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
+		BilletHotsend check = baseMapper.selectOne(queryWrapper);
+		if (oConvertUtils.isNotEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
+			return;
+		}
+		if (oConvertUtils.isEmpty(check)){
+			billetHotsend.setRollclubtwoNum(0);
+			billetHotsend.setRollcluboneNum(0);
+			billetHotsend.setRolloutshippNum(0);
+			billetHotsend.setRollheightNum(0);
+			billetHotsend.setRollclubthreeNum(0);
+			billetHotsend.setAmountTotal(0);
+			billetHotsend.setStackNum(0);
 			baseMapper.insert(billetHotsend);
+			billetHotsend.setId(billetHotsend.getId());
+			operateLogService.add(billetHotsend,null,BilletHotsend.class);
+			return;
 		}else {
+			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollcluboneNum(check.getRollcluboneNum() + rollClubCommonList.size());
+			}else if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubtwoNum(check.getRollclubtwoNum() + rollClubCommonList.size());
+			}else if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubthreeNum(check.getRollclubthreeNum() + rollClubCommonList.size());
+			}else if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollheightNum(check.getRollheightNum() + rollClubCommonList.size());
+			}else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRolloutshippNum(check.getRolloutshippNum() + rollClubCommonList.size());
+			}
 			LambdaUpdateWrapper<BilletHotsend> updateWrapper = new LambdaUpdateWrapper<>();
-			updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo()).eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo());
+			updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+					.eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+					.eq(BilletHotsend::getShift, billetHotsend.getShift())
+					.eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
 			baseMapper.update(billetHotsend,  updateWrapper);
-		}
-		if (oConvertUtils.isEmpty(billetHotsendDetailsVo.getBelongTable())){
-			log.info("{}{}", ">>>>>>>>>钢坯热送基础信息-添加或发车失败,belongTable参数为空:", JSON.toJSON(billetHotsendDetailsVo));
-			return;
+			billetHotsend.setId(check.getId());
+			operateLogService.add(billetHotsend,null,BilletHotsend.class);
 		}
 		List<String> billetNos = new ArrayList<>();
+		StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
 		// 保存 钢坯热送单炉支数传递单明细
 		if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable())){
 			// 保存棒一信息
 			RollClubOne rollClubOne = new RollClubOne();
 			BeanUtils.copyProperties(billetHotsend, rollClubOne);
-			rollClubOne.setAmountTotal(rollClubCommonList.size());// 总支数
 			rollClubOne.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
 //			rollClubOne.setBlankOutput();// 出坯量
 //			rollClubOne.setDecideWeight();// 定重
-			rollClubOneService.save(rollClubOne);
+			LambdaQueryWrapper<RollClubOne> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubOne::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubOne::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubOne::getShift, billetHotsend.getShift())
+					.eq(RollClubOne::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubOne rollClubOne1 = rollClubOneService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubOne1)){
+				rollClubOne.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubOneService.save(rollClubOne);
+			}else {
+				rollClubOne.setAmountTotal(rollClubOne1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubOne.setId(rollClubOne1.getId());
+				rollClubOneService.updateById(rollClubOne);
+			}
 			// 保存棒二明细信息
 			List<RollClubOneDetails> rollClubOneDetailsList = new ArrayList<>();
 			rollClubCommonList.forEach(x ->{
 				RollClubOneDetails rollClubOneDetails = new RollClubOneDetails();
 				BeanUtils.copyProperties(x, rollClubOneDetails);
+				rollClubOneDetails.setShift(billetHotsend.getShift());
+				rollClubOneDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				billetNos.add(x.getBilletNo());
 				rollClubOneDetailsList.add(rollClubOneDetails);
 			});
@@ -349,17 +397,32 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒一信息
 			RollClubTwo rollClubTwo = new RollClubTwo();
 			BeanUtils.copyProperties(billetHotsend, rollClubTwo);
-			rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
 			rollClubTwo.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
 //			rollClubTwo.setBlankOutput();// 出坯量
 //			rollClubTwo.setDecideWeight();// 定重
-			rollClubTwoService.save(rollClubTwo);
+			LambdaQueryWrapper<RollClubTwo> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubTwo::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubTwo::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubTwo::getShift, billetHotsend.getShift())
+					.eq(RollClubTwo::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubTwo rollClubTwo1 = rollClubTwoService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubTwo1)){
+				rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubTwoService.save(rollClubTwo);
+			}else {
+				rollClubTwo.setId(rollClubTwo1.getId());
+				rollClubTwo.setAmountTotal(rollClubTwo1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubTwoService.updateById(rollClubTwo);
+			}
 			// 保存棒二明细信息
 			List<RollClubTwoDetails> rollClubTwoDetailsList = new ArrayList<>();
 			rollClubCommonList.forEach(x ->{
 				RollClubTwoDetails rollClubTwoDetails = new RollClubTwoDetails();
 				BeanUtils.copyProperties(x, rollClubTwoDetails);
+				rollClubTwoDetails.setShift(billetHotsend.getShift());
+				rollClubTwoDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubTwoDetails.setStorageBillId(storageBill.getId());
+				rollClubTwoDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubTwoDetailsList.add(rollClubTwoDetails);
 			});
@@ -370,17 +433,34 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			// 保存棒三信息
 			RollClubThree rollClubThree = new RollClubThree();
 			BeanUtils.copyProperties(billetHotsend, rollClubThree);
-			rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
+
 			rollClubThree.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
-			rollClubThreeService.save(rollClubThree);
+
+			LambdaQueryWrapper<RollClubThree> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubThree::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubThree::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubThree::getShift, billetHotsend.getShift())
+					.eq(RollClubThree::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubThree rollClubThree1 = rollClubThreeService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubThree1)){
+				rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubThreeService.save(rollClubThree);
+			}else {
+				rollClubThree.setId(rollClubThree1.getId());
+				rollClubThree.setAmountTotal(rollClubThree1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubThreeService.updateById(rollClubThree);
+			}
 			// 保存棒三明细信息
 			List<RollClubThreeDetails> rollClubThreeDetailsList = new ArrayList<>();
 			rollClubCommonList.forEach(x ->{
 				RollClubThreeDetails rollClubThreeDetails = new RollClubThreeDetails();
 				BeanUtils.copyProperties(x, rollClubThreeDetails);
+				rollClubThreeDetails.setShift(billetHotsend.getShift());
+				rollClubThreeDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubThreeDetails.setStorageBillId(storageBill.getId());
+				rollClubThreeDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubThreeDetailsList.add(rollClubThreeDetails);
 			});
@@ -393,16 +473,30 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable())){
 			RollHeight rollHeight = new RollHeight();
 			BeanUtils.copyProperties(billetHotsend, rollHeight);
-			rollHeight.setAmountTotal(rollClubCommonList.size());// 总支数
 			rollHeight.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
 //			rollClubThree.setBlankOutput();// 出坯量
 //			rollClubThree.setDecideWeight();// 定重
-			rollHeightService.save(rollHeight);
+			LambdaQueryWrapper<RollHeight> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollHeight::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollHeight::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollHeight::getShift, billetHotsend.getShift())
+					.eq(RollHeight::getShiftGroup, billetHotsend.getShiftGroup());
+			RollHeight rollHeight1 = rollHeightService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollHeight1)){
+				rollHeight.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollHeightService.save(rollHeight);
+			}else {
+				rollHeight.setAmountTotal(rollHeight1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollHeight.setId(rollHeight1.getId());
+				rollHeightService.updateById(rollHeight);
+			}
 			// 保存高线明细信息
 			List<RollHeightDetails> rollHeightDetailsList = new ArrayList<>();
 			rollClubCommonList.forEach(x ->{
 				RollHeightDetails rollHeightDetails = new RollHeightDetails();
 				BeanUtils.copyProperties(x, rollHeightDetails);
+				rollHeightDetails.setShift(billetHotsend.getShift());
+				rollHeightDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				billetNos.add(x.getBilletNo());
 				rollHeightDetailsList.add(rollHeightDetails);
 			});
@@ -415,28 +509,44 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
 			RollOutShipp rollOutShipp = new RollOutShipp();
 			BeanUtils.copyProperties(billetHotsend, rollOutShipp);
-			rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
+
 			rollOutShipp.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
 //			rollOutShipp.setBlankOutput();// 出坯量
 //			rollOutShipp.setDecideWeight();// 定重
-			rollOutShippService.save(rollOutShipp);
+			LambdaQueryWrapper<RollOutShipp> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollOutShipp::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollOutShipp::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollOutShipp::getShift, billetHotsend.getShift())
+					.eq(RollOutShipp::getShiftGroup, billetHotsend.getShiftGroup());
+			RollOutShipp rollOutShipp1 = rollOutShippService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollOutShipp1)){
+				rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollOutShippService.save(rollOutShipp);
+			}else {
+				rollOutShipp.setId(rollOutShipp1.getId());
+				rollOutShipp.setAmountTotal(rollOutShipp1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollOutShippService.updateById(rollOutShipp);
+			}
 			// 保存上若明细信息
 			List<RollOutShippDetails> rollOutShippDetailsList = new ArrayList<>();
 			rollClubCommonList.forEach(x ->{
 				RollOutShippDetails rollOutShippDetails = new RollOutShippDetails();
 				BeanUtils.copyProperties(x, rollOutShippDetails);
+				rollOutShippDetails.setShift(billetHotsend.getShift());
+				rollOutShippDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollOutShippDetails.setStorageBillId(storageBill.getId());
+				rollOutShippDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollOutShippDetailsList.add(rollOutShippDetails);
 			});
 			rollOutShippDetailsService.saveBatch(rollOutShippDetailsList);
 		}
 		//查询并批量更新钢坯基础信息 belongTable
-		LambdaQueryWrapper<BilletBasicInfo> queryWrapper = new LambdaQueryWrapper<BilletBasicInfo>()
+		LambdaQueryWrapper<BilletBasicInfo> queryWrapperls = new LambdaQueryWrapper<BilletBasicInfo>()
 				.eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
 				.eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
 				.in(BilletBasicInfo::getBilletNo, billetNos);
-		List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapper);
+		List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperls);
 		billetBasicInfoList.forEach(x ->{
 			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable())){
 				x.setBelongTable("roll_club_one");
@@ -449,70 +559,10 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			}else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
 				x.setBelongTable("roll_out_shipp");
 			}
+			x.setBhtcId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
 			x.setUpdateTime(new Date());
 		});
 		billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
-		// 更新装运单 车次总序号、本车车次
-		if (!billetHotsend.getIsUpd() && oConvertUtils.isNotEmpty(storageBill)){
-			storageBill.setCarAllNum(oConvertUtils.isEmpty(storageBill.getCarAllNum()) ? "1" : String.valueOf(Integer.valueOf(storageBill.getCarAllNum())+1));// 车次总序号
-			storageBill.setCarNum(storageBill.getCarNum() + 1);// 本车车次
-			storageBillService.updateById(storageBill);
-			// 生成储运单
-			StorageCarLog storageCarLog = new StorageCarLog();
-			BeanUtils.copyProperties(storageBill, storageCarLog);
-			List<String> sizeList = new ArrayList<>();
-			List<String> heatNoList = new ArrayList<>();
-			long count = 0l;
-			//根据铸机号、钢坯转运单ID查询定尺信息
-			if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable())){
-				LambdaQueryWrapper<RollClubTwoDetails> queryWrapperRC = new LambdaQueryWrapper();
-				queryWrapperRC.eq(RollClubTwoDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
-				List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapperRC);
-				sizeList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getSize).distinct()
-						.collect(Collectors.toList());
-				heatNoList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getHeatNo).distinct()
-						.collect(Collectors.toList());
-				if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
-					count = rollClubTwoDetailsList.stream().count();
-				}
-			}
-			if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable())){
-				LambdaQueryWrapper<RollClubThreeDetails> queryWrapperCT = new LambdaQueryWrapper();
-				queryWrapperCT.eq(RollClubThreeDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
-				List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapperCT);
-				sizeList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getSize).distinct()
-						.collect(Collectors.toList());
-				heatNoList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getHeatNo).distinct()
-						.collect(Collectors.toList());
-				if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)){
-					count = rollClubThreeDetailsList.stream().count();
-				}
-			}
-			if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
-				LambdaQueryWrapper<RollOutShippDetails> queryWrapperROS = new LambdaQueryWrapper();
-				queryWrapperROS.eq(RollOutShippDetails::getCcmNo, storageBill.getCcmNo()).eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
-				List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapperROS);
-				sizeList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getSize).distinct()
-						.collect(Collectors.toList());
-				heatNoList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getHeatNo).distinct()
-						.collect(Collectors.toList());
-				if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)){
-					count = rollOutShippDetailsList.stream().count();
-				}
-			}
-			// 根据billetHotsendTypeConfigId 查询基础垛位信息
-			BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
-			storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
-			storageCarLog.setCarNm(storageCarLog.getCarNm());// 车号
-//			storageCarLog.setFixedWeight();// 定重
-			storageCarLog.setOutCarNum(storageCarLog.getOutCarNum()); // 出车号
-			storageCarLog.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
-			storageCarLog.setHeatNo(String.join(",", heatNoList));
-			storageCarLog.setSize(String.join(",", sizeList));// 定尺
-			storageCarLog.setAmount(String.valueOf(count));// 支数
-			storageCarLog.setDataTime(new Date());
-			storageCarLogService.save(storageCarLog);
-		}
 	}
 
 	@Override
@@ -556,4 +606,335 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		}
 		return null;
 	}
+
+	@Override
+	public void saveBilletHotsendDetailsCar(BilletHotsendDetailsVo billetHotsendDetailsVo) {
+		// 根据billetHotsendTypeConfigId 查询基础垛位信息
+		BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
+		List<RollClubCommon> rollClubCommonList = billetHotsendDetailsVo.getRollClubCommonList();
+
+		BilletHotsend billetHotsend = new BilletHotsend();
+		// 新保存 钢坯热送基础信息
+		BeanUtils.copyProperties(billetHotsendDetailsVo.getBilletHotsend(), billetHotsend);
+		billetHotsend.setCreateDate(new Date());
+		//	billetHotsend.setAmountTotal(rollClubCommonList.size()); //总支数
+		LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
+		queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+				.eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+				.eq(BilletHotsend::getShift, billetHotsend.getShift())
+				.eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
+		BilletHotsend check = baseMapper.selectOne(queryWrapper);
+		if (oConvertUtils.isEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
+			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollcluboneNum(rollClubCommonList.size());
+			}else if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubtwoNum(rollClubCommonList.size());
+			}else if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubthreeNum(rollClubCommonList.size());
+			}else if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollheightNum(rollClubCommonList.size());
+			}else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRolloutshippNum(rollClubCommonList.size());
+			}
+			billetHotsend.setRollclubtwoNum(0);
+			billetHotsend.setRollcluboneNum(0);
+			billetHotsend.setRolloutshippNum(0);
+			billetHotsend.setRollheightNum(0);
+			billetHotsend.setRollclubthreeNum(0);
+			baseMapper.insert(billetHotsend);
+			billetHotsend.setId(check.getId());
+			operateLogService.add(billetHotsend,null,BilletHotsend.class);
+		}else {
+			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollcluboneNum(check.getRollcluboneNum() + rollClubCommonList.size());
+			}else if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubtwoNum(check.getRollclubtwoNum() + rollClubCommonList.size());
+			}else if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollclubthreeNum(check.getRollclubthreeNum() + rollClubCommonList.size());
+			}else if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRollheightNum(check.getRollheightNum() + rollClubCommonList.size());
+			}else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable()) && "0".equals(billetHotsendTypeConfig.getBelongType().toString())){
+				billetHotsend.setRolloutshippNum(check.getRolloutshippNum() + rollClubCommonList.size());
+			}
+			LambdaUpdateWrapper<BilletHotsend> updateWrapper = new LambdaUpdateWrapper<>();
+			updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+					.eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+					.eq(BilletHotsend::getShift, billetHotsend.getShift())
+					.eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
+			baseMapper.update(billetHotsend,  updateWrapper);
+			billetHotsend.setId(check.getId());
+			operateLogService.add(billetHotsend,null,BilletHotsend.class);
+		}
+		StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
+		List<String> billetNos = new ArrayList<>();
+		// 保存 钢坯热送单炉支数传递单明细
+		if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable())){
+			// 保存棒一信息
+			RollClubOne rollClubOne = new RollClubOne();
+			BeanUtils.copyProperties(billetHotsend, rollClubOne);
+			rollClubOne.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+//			rollClubOne.setBlankOutput();// 出坯量
+//			rollClubOne.setDecideWeight();// 定重
+			LambdaQueryWrapper<RollClubOne> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubOne::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubOne::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubOne::getShift, billetHotsend.getShift())
+					.eq(RollClubOne::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubOne rollClubOne1 = rollClubOneService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubOne1)){
+				rollClubOne.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubOneService.save(rollClubOne);
+			}else {
+				rollClubOne.setAmountTotal(rollClubOne1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubOne.setId(rollClubOne1.getId());
+				rollClubOneService.updateById(rollClubOne);
+			}
+			// 保存棒二明细信息
+			List<RollClubOneDetails> rollClubOneDetailsList = new ArrayList<>();
+			rollClubCommonList.forEach(x ->{
+				RollClubOneDetails rollClubOneDetails = new RollClubOneDetails();
+				BeanUtils.copyProperties(x, rollClubOneDetails);
+				rollClubOneDetails.setShift(billetHotsend.getShift());
+				rollClubOneDetails.setShiftGroup(billetHotsend.getShiftGroup());
+				billetNos.add(x.getBilletNo());
+				rollClubOneDetailsList.add(rollClubOneDetails);
+			});
+			rollClubOneDetailsService.saveBatch(rollClubOneDetailsList);
+		}
+
+		if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable())){
+			// 保存棒一信息
+			RollClubTwo rollClubTwo = new RollClubTwo();
+			BeanUtils.copyProperties(billetHotsend, rollClubTwo);
+			rollClubTwo.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+//			rollClubTwo.setBlankOutput();// 出坯量
+//			rollClubTwo.setDecideWeight();// 定重
+			LambdaQueryWrapper<RollClubTwo> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubTwo::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubTwo::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubTwo::getShift, billetHotsend.getShift())
+					.eq(RollClubTwo::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubTwo rollClubTwo1 = rollClubTwoService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubTwo1)){
+				rollClubTwo.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubTwoService.save(rollClubTwo);
+			}else {
+				rollClubTwo.setId(rollClubTwo1.getId());
+				rollClubTwo.setAmountTotal(rollClubTwo1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubTwoService.updateById(rollClubTwo);
+			}
+			// 保存棒二明细信息
+			List<RollClubTwoDetails> rollClubTwoDetailsList = new ArrayList<>();
+			rollClubCommonList.forEach(x ->{
+				RollClubTwoDetails rollClubTwoDetails = new RollClubTwoDetails();
+				BeanUtils.copyProperties(x, rollClubTwoDetails);
+				rollClubTwoDetails.setShift(billetHotsend.getShift());
+				rollClubTwoDetails.setShiftGroup(billetHotsend.getShiftGroup());
+				rollClubTwoDetails.setStorageBillId(storageBill.getId());
+				rollClubTwoDetails.setLicensePlate(storageBill.getLicensePlate());
+				billetNos.add(x.getBilletNo());
+				rollClubTwoDetailsList.add(rollClubTwoDetails);
+			});
+			rollClubTwoDetailsService.saveBatch(rollClubTwoDetailsList);
+		}
+		if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable())){
+			// 保存棒三信息
+			RollClubThree rollClubThree = new RollClubThree();
+			BeanUtils.copyProperties(billetHotsend, rollClubThree);
+
+			rollClubThree.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+//			rollClubThree.setBlankOutput();// 出坯量
+//			rollClubThree.setDecideWeight();// 定重
+
+			LambdaQueryWrapper<RollClubThree> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollClubThree::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollClubThree::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollClubThree::getShift, billetHotsend.getShift())
+					.eq(RollClubThree::getShiftGroup, billetHotsend.getShiftGroup());
+			RollClubThree rollClubThree1 = rollClubThreeService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollClubThree1)){
+				rollClubThree.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollClubThreeService.save(rollClubThree);
+			}else {
+				rollClubThree.setId(rollClubThree1.getId());
+				rollClubThree.setAmountTotal(rollClubThree1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollClubThreeService.updateById(rollClubThree);
+			}
+			// 保存棒三明细信息
+			List<RollClubThreeDetails> rollClubThreeDetailsList = new ArrayList<>();
+			rollClubCommonList.forEach(x ->{
+				RollClubThreeDetails rollClubThreeDetails = new RollClubThreeDetails();
+				BeanUtils.copyProperties(x, rollClubThreeDetails);
+				rollClubThreeDetails.setShift(billetHotsend.getShift());
+				rollClubThreeDetails.setShiftGroup(billetHotsend.getShiftGroup());
+				rollClubThreeDetails.setStorageBillId(storageBill.getId());
+				rollClubThreeDetails.setLicensePlate(storageBill.getLicensePlate());
+				billetNos.add(x.getBilletNo());
+				rollClubThreeDetailsList.add(rollClubThreeDetails);
+			});
+			rollClubThreeDetailsService.saveBatch(rollClubThreeDetailsList);
+		}
+		/**
+		 * 保存高线信息
+		 */
+		if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable())){
+			RollHeight rollHeight = new RollHeight();
+			BeanUtils.copyProperties(billetHotsend, rollHeight);
+			rollHeight.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+//			rollClubThree.setBlankOutput();// 出坯量
+//			rollClubThree.setDecideWeight();// 定重
+			LambdaQueryWrapper<RollHeight> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollHeight::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollHeight::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollHeight::getShift, billetHotsend.getShift())
+					.eq(RollHeight::getShiftGroup, billetHotsend.getShiftGroup());
+			RollHeight rollHeight1 = rollHeightService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollHeight1)){
+				rollHeight.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollHeightService.save(rollHeight);
+			}else {
+				rollHeight.setAmountTotal(rollHeight1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollHeight.setId(rollHeight1.getId());
+				rollHeightService.updateById(rollHeight);
+			}
+			// 保存高线明细信息
+			List<RollHeightDetails> rollHeightDetailsList = new ArrayList<>();
+			rollClubCommonList.forEach(x ->{
+				RollHeightDetails rollHeightDetails = new RollHeightDetails();
+				BeanUtils.copyProperties(x, rollHeightDetails);
+				rollHeightDetails.setShift(billetHotsend.getShift());
+				rollHeightDetails.setShiftGroup(billetHotsend.getShiftGroup());
+				billetNos.add(x.getBilletNo());
+				rollHeightDetailsList.add(rollHeightDetails);
+			});
+			rollHeightDetailsService.saveBatch(rollHeightDetailsList);
+		}
+
+		/**
+		 * 保存上若信息
+		 */
+		if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
+			RollOutShipp rollOutShipp = new RollOutShipp();
+			BeanUtils.copyProperties(billetHotsend, rollOutShipp);
+			rollOutShipp.setSize(rollClubCommonList.stream().findFirst().orElse(null).getSize()); //定尺
+//			rollOutShipp.setBlankOutput();// 出坯量
+//			rollOutShipp.setDecideWeight();// 定重
+			LambdaQueryWrapper<RollOutShipp> queryWrapper1 = new LambdaQueryWrapper<>();
+			queryWrapper1.eq(RollOutShipp::getCcmNo, billetHotsend.getCcmNo())
+					.eq(RollOutShipp::getHeatNo, billetHotsend.getHeatNo())
+					.eq(RollOutShipp::getShift, billetHotsend.getShift())
+					.eq(RollOutShipp::getShiftGroup, billetHotsend.getShiftGroup());
+			RollOutShipp rollOutShipp1 = rollOutShippService.getOne(queryWrapper1);
+			if (oConvertUtils.isEmpty(rollOutShipp1)){
+				rollOutShipp.setAmountTotal(rollClubCommonList.size());// 总支数
+				rollOutShippService.save(rollOutShipp);
+			}else {
+				rollOutShipp.setId(rollOutShipp1.getId());
+				rollOutShipp.setAmountTotal(rollOutShipp1.getAmountTotal() + rollClubCommonList.size());// 总支数
+				rollOutShippService.updateById(rollOutShipp);
+			}
+			// 保存上若明细信息
+			List<RollOutShippDetails> rollOutShippDetailsList = new ArrayList<>();
+			rollClubCommonList.forEach(x ->{
+				RollOutShippDetails rollOutShippDetails = new RollOutShippDetails();
+				BeanUtils.copyProperties(x, rollOutShippDetails);
+				rollOutShippDetails.setShift(billetHotsend.getShift());
+				rollOutShippDetails.setShiftGroup(billetHotsend.getShiftGroup());
+				rollOutShippDetails.setStorageBillId(storageBill.getId());
+				rollOutShippDetails.setLicensePlate(storageBill.getLicensePlate());
+				billetNos.add(x.getBilletNo());
+				rollOutShippDetailsList.add(rollOutShippDetails);
+			});
+			rollOutShippDetailsService.saveBatch(rollOutShippDetailsList);
+		}
+		//查询并批量更新钢坯基础信息 belongTable
+		LambdaQueryWrapper<BilletBasicInfo> queryWrapperls = new LambdaQueryWrapper<BilletBasicInfo>()
+				.eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
+				.eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
+				.in(BilletBasicInfo::getBilletNo, billetNos);
+		List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperls);
+		billetBasicInfoList.forEach(x ->{
+			if ("roll_club_one".equals(billetHotsendDetailsVo.getBelongTable())){
+				x.setBelongTable("roll_club_one");
+			}else if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable())){
+				x.setBelongTable("roll_club_two");
+			}else if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable())){
+				x.setBelongTable("roll_club_three");
+			}else if ("roll_height".equals(billetHotsendDetailsVo.getBelongTable())){
+				x.setBelongTable("roll_height");
+			}else if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
+				x.setBelongTable("roll_out_shipp");
+			}
+			x.setBhtcId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
+			x.setUpdateTime(new Date());
+		});
+		billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
+
+		// 更新装运单 车次总序号、本车车次
+		LambdaQueryWrapper<StorageBill> queryWrapperSB = new LambdaQueryWrapper<>();
+		queryWrapperSB.eq(StorageBill::getCcmNo, storageBill.getCcmNo())
+				.eq(StorageBill::getShift, storageBill.getShift())
+				.eq(StorageBill::getShiftGroup, storageBill.getShiftGroup())
+				.eq(StorageBill::getLicensePlate, storageBill.getLicensePlate());
+		List<StorageBill> storageBillList = storageBillService.list(queryWrapperSB);
+		storageBill.setCarNum(oConvertUtils.listIsEmpty(storageBillList) ? 0 : storageBillList.size() + 1);// 本车车次
+		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
+		storageBill.setDestination(billetHotsendDetailsVo.getStorageBill().getDestination());// 目的地
+		storageBill.setAmountTotal(rollClubCommonList.size());
+		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;
+		//根据铸机号、钢坯转运单ID查询定尺信息
+		if ("roll_club_two".equals(billetHotsendDetailsVo.getBelongTable())){
+			LambdaQueryWrapper<RollClubTwoDetails> queryWrapperRC = new LambdaQueryWrapper();
+			queryWrapperRC.eq(RollClubTwoDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
+			List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapperRC);
+			sizeList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getSize).distinct()
+					.collect(Collectors.toList());
+			heatNoList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getHeatNo).distinct()
+					.collect(Collectors.toList());
+			if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
+				count = rollClubTwoDetailsList.stream().count();
+			}
+		}
+		if ("roll_club_three".equals(billetHotsendDetailsVo.getBelongTable())){
+			LambdaQueryWrapper<RollClubThreeDetails> queryWrapperCT = new LambdaQueryWrapper();
+			queryWrapperCT.eq(RollClubThreeDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
+			List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapperCT);
+			sizeList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getSize).distinct()
+					.collect(Collectors.toList());
+			heatNoList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getHeatNo).distinct()
+					.collect(Collectors.toList());
+			if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)){
+				count = rollClubThreeDetailsList.stream().count();
+			}
+		}
+		if ("roll_out_shipp".equals(billetHotsendDetailsVo.getBelongTable())){
+			LambdaQueryWrapper<RollOutShippDetails> queryWrapperROS = new LambdaQueryWrapper();
+			queryWrapperROS.eq(RollOutShippDetails::getCcmNo, storageBill.getCcmNo()).eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
+			List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapperROS);
+			sizeList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getSize).distinct()
+					.collect(Collectors.toList());
+			heatNoList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getHeatNo).distinct()
+					.collect(Collectors.toList());
+			if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)){
+				count = rollOutShippDetailsList.stream().count();
+			}
+		}
+		storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
+		storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
+//			storageCarLog.setFixedWeight();// 定重
+		storageCarLog.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
+		storageCarLog.setHeatNo(String.join(",", heatNoList));
+		storageCarLog.setSize(String.join(",", sizeList));// 定尺
+		storageCarLog.setAmount(Integer.valueOf((int) count));// 支数
+		storageCarLog.setDataTime(new Date());
+		storageCarLogService.save(storageCarLog);
+
+	}
 }

+ 4 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubThree/entity/RollClubThreeDetails.java

@@ -121,4 +121,8 @@ public class RollClubThreeDetails implements Serializable {
     @ApiModelProperty(value = "定尺")
     @Dict(dicCode = "lg_dcgg")
     private String size;
+
+    @Excel(name = "车牌号", width = 15)
+    @ApiModelProperty(value = "车牌号")
+    private String licensePlate;
 }

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubTwo/controller/RollClubTwoDetailsController.java

@@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
 
- /**
+/**
  * @Description: 棒二明细信息
  * @Author: jeecg-boot
  * @Date:   2024-11-20

+ 4 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubTwo/entity/RollClubTwoDetails.java

@@ -121,4 +121,8 @@ public class RollClubTwoDetails implements Serializable {
     @ApiModelProperty(value = "定尺")
     @Dict(dicCode = "lg_dcgg")
     private String size;
+
+    @Excel(name = "车牌号", width = 15)
+    @ApiModelProperty(value = "车牌号")
+    private String licensePlate;
 }

+ 4 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollOutShipp/entity/RollOutShippDetails.java

@@ -121,4 +121,8 @@ public class RollOutShippDetails implements Serializable {
     @ApiModelProperty(value = "定尺")
     @Dict(dicCode = "lg_dcgg")
     private String size;
+
+    @Excel(name = "车牌号", width = 15)
+    @ApiModelProperty(value = "车牌号")
+    private String licensePlate;
 }

+ 40 - 11
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/controller/StackingAndLoadingVehiclesController.java

@@ -13,12 +13,15 @@ import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
+import org.jeecg.modules.billet.billetHotsend.service.IBilletHotsendBaseService;
 import org.jeecg.modules.billet.billetHotsend.service.IRulerDefaultConfigService;
+import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.UpdateBatchParams;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.service.IStackingAndLoadingVehiclesService;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.LoadingParams;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.vo.SavVo;
+import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
@@ -45,6 +48,10 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 	private IStackingAndLoadingVehiclesService stackingAndLoadingVehiclesService;
 	 @Autowired
 	 private IRulerDefaultConfigService rulerDefaultConfigService;
+	 @Autowired
+	 private IBilletHotsendBaseService billetHotsendBaseService;
+	 @Autowired
+	 private IOperateLogService operateLogService;
 	
 	/**
 	 * 分页列表查询
@@ -80,9 +87,6 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 	 @GetMapping(value = "/getListByTypeConfigId")
 	 public Result<?> getListByTypeConfigId(@RequestParam(name="typeConfigId") String typeConfigId){
 		 List<StackingAndLoadingVehicles> res = stackingAndLoadingVehiclesService.getListByTypeConfigId(typeConfigId);
-		 if (oConvertUtils.listIsEmpty(res)){
-			 return Result.OK("获取堆垛信息为空!");
-		 }
 		 return Result.OK(res);
 	 }
 
@@ -110,7 +114,7 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 	 @ApiOperation(value="垛位装车-添加或保存", notes="垛位装车-添加或保存")
 	 @PostMapping(value = "/saveOrUpdate")
 	 public Result<String> saveOrUpdate(@RequestBody StackingAndLoadingVehicles stackingAndLoadingVehicles) {
-		 stackingAndLoadingVehiclesService.saveOrUpdate(stackingAndLoadingVehicles);
+		 stackingAndLoadingVehiclesService.save(stackingAndLoadingVehicles);
 		 return Result.OK("添加成功!");
 	 }
 
@@ -272,21 +276,47 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
         return super.importExcel(request, response, StackingAndLoadingVehicles.class);
     }
 
-     @ApiOperation(value="垛位装车-发车", notes="垛位装车-发车")
+
+	 @ApiOperation(value="钢坯-新增堆垛", notes="钢坯-新增堆垛")
+	 @PostMapping(value = "/addStacking")
+	 public Result<?> addStackInfo(@RequestBody LoadingParams loadingParams){
+		 stackingAndLoadingVehiclesService.addStackInfo(loadingParams);
+		 return Result.OK("新增堆垛操作成功");
+	 }
+
+     @ApiOperation(value="钢坯-垛位装车", notes="钢坯-垛位装车")
      @PostMapping(value = "/loading")
      public Result<?> loading(@RequestBody LoadingParams loadingParams){
-    	if(loadingParams.getStackingAndLoadingVehiclesList() == null || loadingParams.getStackingAndLoadingVehiclesList().size() < 3){
-    		return Result.OK("请至少装入3夹钢坯!");
-		}
+    	 if(oConvertUtils.listIsEmpty(loadingParams.getStackingAndLoadingVehiclesList())){
+    		return Result.OK("请装入钢坯!");
+		 }
 		 Set<String> heats = new HashSet<>();
 		 for (StackingAndLoadingVehicles stackingAndLoadingVehicles : loadingParams.getStackingAndLoadingVehiclesList()) {
 			 heats.add(stackingAndLoadingVehicles.getHeatNo());
 		 }
 		 if(heats.size()>3)return Result.error("一次只能选择三种炉次的钢坯");
-    	stackingAndLoadingVehiclesService.loadingHandle(loadingParams);
-		return Result.OK("发车成功");
+		 StorageBill storageBill = loadingParams.getStorageBill();
+		 if (oConvertUtils.isEmpty(storageBill)){
+			 return Result.OK("钢坯装运单不存在,垛位装车失败!");
+		 }
+    	 stackingAndLoadingVehiclesService.loadingHandle(loadingParams);
+		return Result.OK("垛位装车操作成功");
      }
 
+
+	 @ApiOperation(value="钢坯-垛位发车", notes="钢坯-垛位发车")
+	 @PostMapping(value = "/stackDepart")
+	 public Result<?> stackDepartHandle(@RequestBody LoadingParams loadingParams){
+
+		 StorageBill storageBill = loadingParams.getStorageBill();
+		 if (oConvertUtils.isEmpty(storageBill)){
+			 return Result.OK("钢坯装运单不存在,垛位发车失败!");
+		 }
+		 stackingAndLoadingVehiclesService.stackDepartHandle(loadingParams);
+//		 operateLogService.add(billetHotsend,null,BilletHotsend.class);
+		 return Result.OK("垛位发车操作成功");
+	 }
+
      @ApiOperation(value="堆垛-发车", notes="堆垛-发车")
      @PostMapping(value = "/startCar")
      public Result<?> startCar(@RequestBody SavVo savVo){
@@ -325,5 +355,4 @@ public class StackingAndLoadingVehiclesController extends JeecgController<Stacki
 		 stackingAndLoadingVehiclesService.startHeight(savVo);
 		 return Result.OK("操作成功");
 	 }
-
 }

+ 1 - 3
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/entity/StackingAndLoadingVehicles.java

@@ -1,8 +1,6 @@
 package org.jeecg.modules.billet.stackingAndLoadingVehicles.entity;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.*;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/entity/StackingUpLog.java

@@ -75,7 +75,7 @@ public class StackingUpLog implements Serializable {
 	/**支数*/
 	@Excel(name = "支数", width = 15)
     @ApiModelProperty(value = "支数")
-    private String amount;
+    private Integer amount;
 	/**所在层数(1-20)*/
 	@Excel(name = "所在层数(1-20)", width = 15)
     @ApiModelProperty(value = "所在层数(1-20)")

+ 4 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/service/IStackingAndLoadingVehiclesService.java

@@ -39,4 +39,8 @@ public interface IStackingAndLoadingVehiclesService extends IService<StackingAnd
     List<StackingAndLoadingVehicles> getListByTypeConfigId(String typeConfigId);
 
     void loadingHandle(LoadingParams loadingParams);
+
+    void stackDepartHandle(LoadingParams loadingParams);
+
+    void addStackInfo(LoadingParams loadingParams);
 }

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

@@ -1,33 +1,21 @@
 package org.jeecg.modules.billet.stackingAndLoadingVehicles.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBasicInfo;
 import org.jeecg.modules.actualControl.billetActual.billetActual.service.IBilletBasicInfoService;
 import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsend;
+import org.jeecg.modules.billet.billetHotsend.entity.RollClubCommon;
 import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
-import org.jeecg.modules.billet.billetHotsend.mapper.RulerDefaultConfigMapper;
 import org.jeecg.modules.billet.billetHotsend.service.IBilletHotsendBaseService;
 import org.jeecg.modules.billet.billetHotsend.service.IRulerDefaultConfigService;
 import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
-import org.jeecg.modules.billet.rollClubOne.service.IRollClubOneService;
-import org.jeecg.modules.billet.rollClubThree.entity.RollClubThree;
-import org.jeecg.modules.billet.rollClubThree.entity.RollClubThreeDetails;
-import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeDetailsService;
-import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeService;
-import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwo;
-import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwoDetails;
-import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoDetailsService;
-import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoService;
-import org.jeecg.modules.billet.rollHeight.service.IRollHeightDetailsService;
-import org.jeecg.modules.billet.rollHeight.service.IRollHeightService;
-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.operateLog.service.IOperateLogService;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingDownLog;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingUpLog;
@@ -59,46 +47,31 @@ import java.util.stream.Collectors;
  * @Version: V1.0
  */
 @Service
+@Slf4j
 public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingAndLoadingVehiclesMapper, StackingAndLoadingVehicles> implements IStackingAndLoadingVehiclesService {
 
     @Autowired
     private IRulerDefaultConfigService rulerDefaultConfigService;
     @Autowired
-    private RulerDefaultConfigMapper rulerDefaultConfigMapper;
-    @Autowired
     private IBilletHotsendBaseService billetHotsendBaseService;
     @Autowired
     private IStorageBillService storageBillService;
     @Autowired
     private IStorageBillModelService storageBillModelService;
     @Autowired
-    private IRollClubOneService rollClubOneService;
-    @Autowired
-    private IRollClubTwoService rollClubTwoService;
-    @Autowired
-    private IRollClubThreeService rollClubThreeService;
-    @Autowired
-    private IRollHeightService rollHeightService;
-    @Autowired
-    private IRollOutShippService rollOutShippService;
-    @Autowired
     private IBilletHotsendTypeConfigService billetHotsendTypeConfigService;
     @Autowired
     private IStackingUpLogService stackingUpLogService;
     @Autowired
     private IStackingDownLogService stackingDownLogService;
     @Autowired
-    private IRollClubTwoDetailsService rollClubTwoDetailsService;
-    @Autowired
-    private IRollClubThreeDetailsService rollClubThreeDetailsService;
-    @Autowired
-    private IRollHeightDetailsService rollHeightDetailsService;
-    @Autowired
-    private IRollOutShippDetailsService rollOutShippDetailsService;
-    @Autowired
     private IBilletBasicInfoService billetBasicInfoService;
     @Autowired
     private IStorageCarLogService storageCarLogService;
+    @Autowired
+    private IOperateLogService operateLogService;
+    @Autowired
+    private StackingAndLoadingVehiclesMapper stackingAndLoadingVehiclesMapper;
 
     @Override
     public List<List<StackingAndLoadingVehicles>> getListBySatck(String typeConfigId) {
@@ -135,41 +108,41 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
 
     @Override
     public void addBatch(SavVo savVo) {
-        if(oConvertUtils.listIsNotEmpty(savVo.getSavs())){
-            RulerDefaultConfig last = rulerDefaultConfigService.getLast(savVo.getCastMachine());
-            String furnace = null;
-            if(last!=null){
-                furnace = last.getPourHeats();
-                last.setShiftProduct((last.getShiftProduct()==null?0:last.getShiftProduct())+4*savVo.getSavs().size());
-                rulerDefaultConfigMapper.updateById(last);
-            }
-
-            String finalFurnace = furnace;
-            savVo.getSavs().forEach(item->{
-                if(oConvertUtils.isEmpty(item.getHeatNo()))item.setHeatNo(finalFurnace);
-            });
-            this.addBilletHotsend(savVo.getSavs(),"1",null,savVo.getCastMachine(),"5");
-            String destination = "";
-            switch (savVo.getSavs().get(0).getStackAddr()){
-                case "601":
-                    destination = "601堆垛";
-                    break;
-                case "602":
-                    destination = "602堆垛";
-                    break;
-                case "604":
-                    destination = "604堆垛";
-                    break;
-                case "6":
-                    destination = "步进冷床";
-                    break;
-                case "501":
-                    destination = "501堆垛";
-                    break;
-            }
-            addStorageBill(savVo.getSavs(),savVo.getCastMachine(),"默认",destination);
-
-        }
+//        if(oConvertUtils.listIsNotEmpty(savVo.getSavs())){
+//            RulerDefaultConfig last = rulerDefaultConfigService.getLast(savVo.getCastMachine());
+//            String furnace = null;
+//            if(last!=null){
+//                furnace = last.getPourHeats();
+//                last.setShiftProduct((last.getShiftProduct()==null?0:last.getShiftProduct())+4*savVo.getSavs().size());
+//                rulerDefaultConfigMapper.updateById(last);
+//            }
+//
+//            String finalFurnace = furnace;
+//            savVo.getSavs().forEach(item->{
+//                if(oConvertUtils.isEmpty(item.getHeatNo()))item.setHeatNo(finalFurnace);
+//            });
+//            this.addBilletHotsend(savVo.getSavs(),"1",null,savVo.getCastMachine(),"5");
+//            String destination = "";
+//            switch (savVo.getSavs().get(0).getStackAddr()){
+//                case "601":
+//                    destination = "601堆垛";
+//                    break;
+//                case "602":
+//                    destination = "602堆垛";
+//                    break;
+//                case "604":
+//                    destination = "604堆垛";
+//                    break;
+//                case "6":
+//                    destination = "步进冷床";
+//                    break;
+//                case "501":
+//                    destination = "501堆垛";
+//                    break;
+//            }
+//            addStorageBill(savVo.getSavs(),savVo.getCastMachine(),"默认",destination);
+//
+//        }
     }
 
     @Override
@@ -477,205 +450,306 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
 
     @Override
     public void loadingHandle(LoadingParams loadingParams) {
-        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesListParam = loadingParams.getStackingAndLoadingVehiclesList();
-        StorageBill storageBill = loadingParams.getStorageBill();
-        // 2 先移除 堆垛公共容器中的记录 stacking_and_loading_vehicles
-        List<String> ids = stackingAndLoadingVehiclesListParam.stream().map(StackingAndLoadingVehicles::getId).collect(Collectors.toList());
-        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = baseMapper.selectBatchIds(ids);
-        if (oConvertUtils.listIsEmpty(stackingAndLoadingVehiclesList)){
+        // 根据billetHotsendTypeConfigId 查询基础垛位信息
+        BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
+        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = loadingParams.getStackingAndLoadingVehiclesList();
+        BilletHotsend billetHotsend = new BilletHotsend();
+        //1 新保存 钢坯热送基础信息
+        BeanUtils.copyProperties(loadingParams.getBilletHotsend(), billetHotsend);
+        LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
+        BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper);
+        if (oConvertUtils.isEmpty(idExistBh)){
+            log.info("{}{}", "钢坯热送基础信息不存在,垛位装车失败!", JSON.toJSONString(loadingParams));
             return;
+        }else {
+            int result = Integer.compare(idExistBh.getStackNum(), stackingAndLoadingVehiclesList.size() * 4);
+            billetHotsend.setStackNum(result > 0 ? idExistBh.getStackNum() - stackingAndLoadingVehiclesList.size() * 4 : 0);
+            LambdaUpdateWrapper<BilletHotsend> updateWrapper = new LambdaUpdateWrapper<>();
+            updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                    .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                    .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                    .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
+            billetHotsendBaseService.update(billetHotsend, updateWrapper);
+            billetHotsend.setId(idExistBh.getId());
+            operateLogService.add(billetHotsend,null, BilletHotsend.class);
         }
-        baseMapper.deleteBatchIds(stackingAndLoadingVehiclesList.stream().map(StackingAndLoadingVehicles::getId).collect(Collectors.toList()));
-        // 3 保存 下垛日志    stacking_down_log
+        // 根据铸机号、位置、层数、类型配置ID更新 初始化容器中的垛位信息
+        stackingAndLoadingVehiclesList.forEach(x ->{
+            LambdaUpdateWrapper<StackingAndLoadingVehicles> updateWrapper = new LambdaUpdateWrapper();
+            updateWrapper.eq(StackingAndLoadingVehicles::getId, x.getId())
+                    .set(StackingAndLoadingVehicles::getBilletNos, null)
+                    .set(StackingAndLoadingVehicles::getSpec, null)
+                    .set(StackingAndLoadingVehicles::getSteel, null)
+                    .set(StackingAndLoadingVehicles::getSize, null)
+                    .set(StackingAndLoadingVehicles::getShift, null)
+                    .set(StackingAndLoadingVehicles::getHeatNo, null)
+                    .set(StackingAndLoadingVehicles::getCreateDate, null)
+                    .set(StackingAndLoadingVehicles::getShiftGroup, null);
+            StackingAndLoadingVehicles stackingAndLoadingVehicles = new StackingAndLoadingVehicles();
+            BeanUtils.copyProperties(x, stackingAndLoadingVehicles);
+            stackingAndLoadingVehiclesMapper.update(stackingAndLoadingVehicles, updateWrapper);
+        });
+
+        // 3 保存 下垛日志    stacking_up_log
         List<StackingDownLog> stackingDownLogList = new ArrayList<>();
-        stackingAndLoadingVehiclesListParam.forEach(x ->{
+        stackingAndLoadingVehiclesList.forEach(x ->{
             StackingDownLog stackingDownLog = new StackingDownLog();
             BeanUtils.copyProperties(x, stackingDownLog);
             stackingDownLog.setBilletNo(x.getBilletNos());
-            if (storageBill != null){
-                stackingDownLog.setStorageBillId(storageBill.getId());// 装运单ID
-            }
+            stackingDownLog.setStorageBillId(loadingParams.getStorageBill().getId());
             stackingDownLog.setStackStorey(x.getLayer());// 堆垛层号(1-20)
             stackingDownLog.setStackNum(x.getAddress());// 堆垛编号(1-9)
+            stackingDownLog.setStackAddr(billetHotsendTypeConfig.getTypeName());
+//            stackingUpLog.setFromStackingId(stackingAndLoadingVehicles.getId());
+            stackingDownLogList.add(stackingDownLog);
+        });
+        stackingDownLogService.saveBatch(stackingDownLogList);
+
+        // 获取所有的坯号集合
+        List<String> billetNosList = stackingAndLoadingVehiclesList.stream().map(StackingAndLoadingVehicles::getBilletNos)
+                .flatMap(billetNos -> {
+                    if (billetNos!= null) {
+                        return java.util.stream.Stream.of(billetNos.split(","));
+                    } else {
+                        return java.util.stream.Stream.empty();
+                    }
+                }).collect(Collectors.toList());
+
+        //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.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
+        });
+        billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
+        StorageBill storageBill = loadingParams.getStorageBill();
+        storageBill.setAmountTotal(stackingAndLoadingVehiclesList.size() * 4);
+        storageBillService.updateById(storageBill);
+    }
+
+    @Override
+    public void stackDepartHandle(LoadingParams loadingParams) {
+        // 根据billetHotsendTypeConfigId 查询基础垛位信息
+        BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
+        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = loadingParams.getStackingAndLoadingVehiclesList();
+        BilletHotsend billetHotsend = new BilletHotsend();
+        //1 新保存 钢坯热送基础信息
+        BeanUtils.copyProperties(loadingParams.getBilletHotsend(), billetHotsend);
+        LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
+        BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper);
+        if (oConvertUtils.isEmpty(idExistBh)){
+            log.info("{}{}", "钢坯热送基础信息不存在,垛位发车失败!", JSON.toJSONString(loadingParams));
+            return;
+        } else {
+            int result = Integer.compare(idExistBh.getStackNum(), stackingAndLoadingVehiclesList.size() * 4);
+            billetHotsend.setStackNum(result > 0 ? idExistBh.getStackNum() - stackingAndLoadingVehiclesList.size() * 4 : 0);// 垛位总支数
+            LambdaUpdateWrapper<BilletHotsend> updateWrapper = new LambdaUpdateWrapper<>();
+            updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                    .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                    .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                    .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
+            billetHotsendBaseService.update(billetHotsend, updateWrapper);
+            billetHotsend.setId(idExistBh.getId());
+            operateLogService.add(billetHotsend,null, BilletHotsend.class);
+        }
+
+        // 3 发车后,动态更新容器中的垛位信息 初始化
+        stackingAndLoadingVehiclesList.forEach(x ->{
+            LambdaUpdateWrapper<StackingAndLoadingVehicles> updateWrapper = new LambdaUpdateWrapper();
+            updateWrapper.eq(StackingAndLoadingVehicles::getId, x.getId())
+                    .set(StackingAndLoadingVehicles::getBilletNos, null)
+                    .set(StackingAndLoadingVehicles::getSpec, null)
+                    .set(StackingAndLoadingVehicles::getSteel, null)
+                    .set(StackingAndLoadingVehicles::getSize, null)
+                    .set(StackingAndLoadingVehicles::getShift, null)
+                    .set(StackingAndLoadingVehicles::getHeatNo, null)
+                    .set(StackingAndLoadingVehicles::getCreateDate, null)
+                    .set(StackingAndLoadingVehicles::getShiftGroup, null);
+            StackingAndLoadingVehicles stackingAndLoadingVehicles = new StackingAndLoadingVehicles();
+            BeanUtils.copyProperties(x, stackingAndLoadingVehicles);
+            stackingAndLoadingVehiclesMapper.update(stackingAndLoadingVehicles, updateWrapper);
+        });
+
+        // 4 保存 下垛日志    stacking_down_log
+        List<StackingDownLog> stackingDownLogList = new ArrayList<>();
+        stackingAndLoadingVehiclesList.forEach(x ->{
+            StackingDownLog stackingDownLog = new StackingDownLog();
+            BeanUtils.copyProperties(x, stackingDownLog);
+            stackingDownLog.setBilletNo(x.getBilletNos());
+            stackingDownLog.setStorageBillId(loadingParams.getStorageBill().getId());// 装运单ID
+            stackingDownLog.setStackStorey(x.getLayer());
+            stackingDownLog.setStackNum(x.getAddress());
             stackingDownLogList.add(stackingDownLog);
         });
         stackingDownLogService.saveBatch(stackingDownLogList);
-        // 4 保存或更新 钢坯热送基础信息 billet_hotsend
+
+        // 获取所有的坯号集合
+        List<String> billetNosList = stackingAndLoadingVehiclesList.stream().map(StackingAndLoadingVehicles::getBilletNos)
+                .flatMap(billetNos -> {
+                    if (billetNos!= null) {
+                        return java.util.stream.Stream.of(billetNos.split(","));
+                    } else {
+                        return java.util.stream.Stream.empty();
+                    }
+                }).collect(Collectors.toList());
+        //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.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
+        });
+        billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
+        // 6 更新装运单 storage_bill 新增储运信息
+        StorageBill storageBill = loadingParams.getStorageBill();
+        LambdaQueryWrapper<StorageBill> queryWrapperSB = new LambdaQueryWrapper<>();
+        queryWrapperSB.eq(StorageBill::getCcmNo, storageBill.getCcmNo())
+                     .eq(StorageBill::getShift, storageBill.getShift())
+                   .eq(StorageBill::getShiftGroup, storageBill.getShiftGroup())
+                    .eq(StorageBill::getLicensePlate, storageBill.getLicensePlate());
+        List<StorageBill> storageBillList = storageBillService.list(queryWrapperSB);
+        storageBill.setCarNum(oConvertUtils.listIsEmpty(storageBillList) ? 0 : storageBillList.size() + 1);// 本车车次
+        storageBill.setTypeConfigId(loadingParams.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
+        storageBill.setDestination(loadingParams.getStorageBill().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);
+        storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
+        storageCarLog.setCarNm(storageBill.getLicensePlate());// 车牌号
+        storageCarLog.setTypeConfigId(billetHotsendTypeConfig.getId()); // 钢坯配置类型ID
+        storageCarLog.setHeatNo(billetHotsend.getHeatNo());
+//			  storageCarLog.setFixedWeight();// 定重
+//            storageCarLog.setSize();// 定尺
+        // 查询上垛记录,计算出总支数
+        LambdaQueryWrapper<StackingUpLog> queryWrapperSU = new LambdaQueryWrapper<>();
+        queryWrapperSU.eq(StackingUpLog::getCcmNo, billetHotsend.getCcmNo())
+                .eq(StackingUpLog::getHeatNo, billetHotsend.getHeatNo())
+                .eq(StackingUpLog::getShift, billetHotsend.getShift())
+                .eq(StackingUpLog::getShiftGroup, billetHotsend.getShiftGroup());
+        List<StackingUpLog> stackingUpLogList = stackingUpLogService.list(queryWrapperSU);
+        storageCarLog.setAmount(storageBill.getAmountTotal());// 支数
+        storageCarLogService.save(storageCarLog);
+    }
+
+    @Override
+    public void addStackInfo(LoadingParams loadingParams) {
+        // 根据billetHotsendTypeConfigId 查询基础垛位信息
+        BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
+        List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList = loadingParams.getStackingAndLoadingVehiclesList();
+        List<RollClubCommon> rollClubCommonList = loadingParams.getRollClubCommonList();
         BilletHotsend billetHotsend = new BilletHotsend();
+        //1 新保存 钢坯热送基础信息
         BeanUtils.copyProperties(loadingParams.getBilletHotsend(), billetHotsend);
-        billetHotsend.setCreateDate(new Date());
-        billetHotsend.setAmountTotal(stackingAndLoadingVehiclesListParam.size());// 总支数
-        if (billetHotsend.getIsUpd()){
+        LambdaQueryWrapper<BilletHotsend> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());
+        BilletHotsend idExistBh = billetHotsendBaseService.getOne(queryWrapper);
+        if (oConvertUtils.isNotEmpty(idExistBh) && oConvertUtils.listIsEmpty(rollClubCommonList)){
+            return;
+        }
+        if (oConvertUtils.isEmpty(idExistBh) && oConvertUtils.listIsEmpty(rollClubCommonList)){
+            billetHotsend.setStackNum(0);
+            billetHotsend.setAmountTotal(0);
             billetHotsendBaseService.save(billetHotsend);
+            return;
         }else {
+            billetHotsend.setStackNum(idExistBh.getStackNum() + stackingAndLoadingVehiclesList.size() * 4); // 堆垛总支数
+//            billetHotsend.setAmountTotal(idExistBh.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4); //总支数
             LambdaUpdateWrapper<BilletHotsend> updateWrapper = new LambdaUpdateWrapper<>();
-            updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo()).eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo());
-            billetHotsendBaseService.update(billetHotsend,  updateWrapper);
-        }
-        List<String> billetNos = new ArrayList<>();
-        // 5 根据所属表 保存对应的棒线和对象信息,明细信息 roll_club_two、roll_club_two_details、roll_club_three、roll_club_three_details、roll_out_shipp、roll_out_shipp_details
-        if ("roll_club_two".equals(loadingParams.getBelongTable())){
-            // 保存棒一信息
-            RollClubTwo rollClubTwo = new RollClubTwo();
-            BeanUtils.copyProperties(billetHotsend, rollClubTwo);
-            rollClubTwo.setAmountTotal(stackingAndLoadingVehiclesListParam.size());// 总支数
-            rollClubTwo.setSize(stackingAndLoadingVehiclesListParam.stream().findFirst().orElse(null).getSize()); //定尺
-//			rollClubTwo.setBlankOutput();// 出坯量
-//			rollClubTwo.setDecideWeight();// 定重
-            rollClubTwoService.save(rollClubTwo);
-            // 保存棒二明细信息
-            List<RollClubTwoDetails> rollClubTwoDetailsList = new ArrayList<>();
-            stackingAndLoadingVehiclesListParam.forEach(x ->{
-                RollClubTwoDetails rollClubTwoDetails = new RollClubTwoDetails();
-                BeanUtils.copyProperties(x, rollClubTwoDetails);
-                rollClubTwoDetails.setBilletNo(x.getBilletNos());// 坯号
-                rollClubTwoDetails.setStackStorey(x.getLayer()); // 堆垛层号(1-20)
-                rollClubTwoDetails.setStackNum(x.getAddress());// 堆垛编号(1-9)
-                rollClubTwoDetails.setStorageBillId(storageBill.getId()); // 装运单ID
-//                rollClubTwoDetails.setStartNum() // 起始根数
-//                rollClubTwoDetails.setEndNumStack(); // 堆垛结束跟
-                billetNos.add(x.getBilletNos());
-                rollClubTwoDetailsList.add(rollClubTwoDetails);
-            });
-            rollClubTwoDetailsService.saveBatch(rollClubTwoDetailsList);
+            updateWrapper.eq(BilletHotsend::getCcmNo, billetHotsend.getCcmNo())
+                    .eq(BilletHotsend::getHeatNo, billetHotsend.getHeatNo())
+                    .eq(BilletHotsend::getShift, billetHotsend.getShift())
+                    .eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
+            billetHotsendBaseService.update(billetHotsend, updateWrapper);
         }
 
-        if ("roll_club_three".equals(loadingParams.getBelongTable())){
-            // 保存棒三信息
-            RollClubThree rollClubThree = new RollClubThree();
-            BeanUtils.copyProperties(billetHotsend, rollClubThree);
-            rollClubThree.setAmountTotal(stackingAndLoadingVehiclesListParam.size());// 总支数
-            rollClubThree.setSize(stackingAndLoadingVehiclesListParam.stream().findFirst().orElse(null).getSize()); //定尺
-//			rollClubThree.setBlankOutput();// 出坯量
-//			rollClubThree.setDecideWeight();// 定重
-            rollClubThreeService.save(rollClubThree);
-            // 保存棒三明细信息
-            List<RollClubThreeDetails> rollClubThreeDetailsList = new ArrayList<>();
-            stackingAndLoadingVehiclesListParam.forEach(x ->{
-                RollClubThreeDetails rollClubThreeDetails = new RollClubThreeDetails();
-                BeanUtils.copyProperties(x, rollClubThreeDetails);
-                rollClubThreeDetails.setBilletNo(x.getBilletNos());// 坯号
-                rollClubThreeDetails.setStackStorey(x.getLayer()); // 堆垛层号(1-20)
-                rollClubThreeDetails.setStackNum(x.getAddress());// 堆垛编号(1-9)
-                rollClubThreeDetails.setStorageBillId(storageBill.getId()); // 装运单ID
-//                rollClubThreeDetails.setStartNum() // 起始根数
-//                rollClubThreeDetails.setEndNumStack(); // 堆垛结束跟
-                billetNos.add(x.getBilletNos());
-                rollClubThreeDetailsList.add(rollClubThreeDetails);
-            });
-            rollClubThreeDetailsService.saveBatch(rollClubThreeDetailsList);
-        }
-        /**
-         * 保存上若信息
-         */
-        if ("roll_out_shipp".equals(loadingParams.getBelongTable())){
-            RollOutShipp rollOutShipp = new RollOutShipp();
-            BeanUtils.copyProperties(billetHotsend, rollOutShipp);
-            rollOutShipp.setAmountTotal(stackingAndLoadingVehiclesListParam.size());// 总支数
-            rollOutShipp.setSize(stackingAndLoadingVehiclesListParam.stream().findFirst().orElse(null).getSize()); //定尺
-//			rollOutShipp.setBlankOutput();// 出坯量
-//			rollOutShipp.setDecideWeight();// 定重
-            rollOutShippService.save(rollOutShipp);
-            // 保存高线明细信息
-            List<RollOutShippDetails> rollOutShippDetailsList = new ArrayList<>();
-            stackingAndLoadingVehiclesListParam.forEach(x ->{
-                RollOutShippDetails rollOutShippDetails = new RollOutShippDetails();
-                BeanUtils.copyProperties(x, rollOutShippDetails);
-                rollOutShippDetails.setBilletNo(x.getBilletNos());// 坯号
-                rollOutShippDetails.setStackStorey(x.getLayer()); // 堆垛层号(1-20)
-                rollOutShippDetails.setStackNum(x.getAddress());// 堆垛编号(1-9)
-                rollOutShippDetails.setStorageBillId(storageBill.getId()); // 装运单ID
-                billetNos.add(x.getBilletNos());
-                rollOutShippDetailsList.add(rollOutShippDetails);
-            });
-            rollOutShippDetailsService.saveBatch(rollOutShippDetailsList);
-        }
-        //查询并批量更新钢坯基础信息 belongTable
-        LambdaQueryWrapper<BilletBasicInfo> queryWrapper = new LambdaQueryWrapper<BilletBasicInfo>()
+        // 2 发车后,动态更新容器中的垛位信息 初始化
+        stackingAndLoadingVehiclesList.forEach(x ->{
+            LambdaUpdateWrapper<StackingAndLoadingVehicles> queryWrapperSA = new LambdaUpdateWrapper<>();
+            queryWrapperSA.eq(StackingAndLoadingVehicles::getCcmNo, x.getCcmNo())
+                    .eq(StackingAndLoadingVehicles::getLayer, x.getLayer())
+                    .eq(StackingAndLoadingVehicles::getAddress, x.getAddress())
+                    .eq(StackingAndLoadingVehicles::getTypeConfigId, loadingParams.getBilletHotsendTypeConfigId());;
+            StackingAndLoadingVehicles stackingAndLoadingVehicles = createInitializedVehicle();
+            BeanUtils.copyProperties(x, stackingAndLoadingVehicles);
+            stackingAndLoadingVehicles.setCreateDate(new Date());
+            baseMapper.update(stackingAndLoadingVehicles, queryWrapperSA);
+        });
+
+        // 3 保存 起垛日志    stacking_up_log
+        List<StackingUpLog> stackingUpLogList = new ArrayList<>();
+        stackingAndLoadingVehiclesList.forEach(x ->{
+            StackingUpLog stackingUpLog = new StackingUpLog();
+            BeanUtils.copyProperties(x, stackingUpLog);
+            stackingUpLog.setBilletNo(x.getBilletNos());
+            stackingUpLog.setAmount(4); // 支数
+            stackingUpLog.setLayer(x.getLayer());// 堆垛层号(1-20)
+            stackingUpLog.setAddress(x.getAddress());// 堆垛编号(1-9)
+            stackingUpLog.setStackAddr(billetHotsendTypeConfig.getTypeName());
+            stackingUpLogList.add(stackingUpLog);
+        });
+        stackingUpLogService.saveBatch(stackingUpLogList);
+
+        //4 获取所有的坯号集合
+        List<String> billetNosList = stackingAndLoadingVehiclesList.stream().map(StackingAndLoadingVehicles::getBilletNos)
+                .flatMap(billetNoss -> {
+                    if (billetNoss!= null) {
+                        return java.util.stream.Stream.of(billetNoss.split(","));
+                    } else {
+                        return java.util.stream.Stream.empty();
+                    }
+                }).collect(Collectors.toList());
+        //5 查询并批量更新钢坯基础信息 belongTable
+        LambdaQueryWrapper<BilletBasicInfo> queryWrapperBB = new LambdaQueryWrapper<BilletBasicInfo>()
                 .eq(BilletBasicInfo::getCcmNo, Integer.valueOf(billetHotsend.getCcmNo()))
                 .eq(BilletBasicInfo::getHeatNo, billetHotsend.getHeatNo())
-                .in(BilletBasicInfo::getBilletNo, billetNos);
-        List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapper);
+                .in(BilletBasicInfo::getBilletNo, billetNosList);
+        List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapperBB);
         billetBasicInfoList.forEach(x ->{
-            if ("roll_club_one".equals(loadingParams.getBelongTable())){
-                x.setBelongTable("roll_club_one");
-            }else if ("roll_club_two".equals(loadingParams.getBelongTable())){
-                x.setBelongTable("roll_club_two");
-            }else if ("roll_club_three".equals(loadingParams.getBelongTable())){
-                x.setBelongTable("roll_club_three");
-            }else if ("roll_height".equals(loadingParams.getBelongTable())){
-                x.setBelongTable("roll_height");
-            }else if ("roll_out_shipp".equals(loadingParams.getBelongTable())){
-                x.setBelongTable("roll_out_shipp");
-            }
-            x.setUpdateTime(new Date());
+            x.setBelongTable("stacking_and_loading_vehicles");
+            x.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
-        /**
-         * IsUpd为false代表页面保存
-         */
-        if (!billetHotsend.getIsUpd() && oConvertUtils.isNotEmpty(storageBill)){
-            // 6 更新装运单 storage_bill 《IsUpd为false代表页面保存:不操作装运单和储运车信息》
-            storageBill.setCarAllNum(oConvertUtils.isEmpty(storageBill.getCarAllNum()) ? "1" : String.valueOf(Integer.valueOf(storageBill.getCarAllNum())+1));// 车次总序号
-            storageBill.setCarNum(storageBill.getCarNum() + 1);// 本车车次
-            storageBill.setUpdateTime(new Date());
-            storageBillService.updateById(storageBill);
-            // 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
-            StorageCarLog storageCarLog = new StorageCarLog();
-            BeanUtils.copyProperties(storageBill, storageCarLog);
-            List<String> sizeList = new ArrayList<>();
-            List<String> heatNoList = new ArrayList<>();
-            long count = 0l;
-            //根据铸机号、钢坯转运单ID查询定尺信息
-            if ("roll_club_two".equals(loadingParams.getBelongTable())){
-                LambdaQueryWrapper<RollClubTwoDetails> queryWrapperRCT = new LambdaQueryWrapper();
-                queryWrapperRCT.eq(RollClubTwoDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubTwoDetails::getStorageBillId, storageBill.getId());
-                List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(queryWrapperRCT);
-                sizeList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getSize).distinct()
-                        .collect(Collectors.toList());
-                heatNoList = rollClubTwoDetailsList.stream().map(RollClubTwoDetails::getHeatNo).distinct()
-                        .collect(Collectors.toList());
-                if (oConvertUtils.listIsNotEmpty(rollClubTwoDetailsList)){
-                    count = rollClubTwoDetailsList.stream().count();
-                }
-            }
-            if ("roll_club_three".equals(loadingParams.getBelongTable())){
-                LambdaQueryWrapper<RollClubThreeDetails> queryWrapperCTS = new LambdaQueryWrapper();
-                queryWrapperCTS.eq(RollClubThreeDetails::getCcmNo, storageBill.getCcmNo()).eq(RollClubThreeDetails::getStorageBillId, storageBill.getId());
-                List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(queryWrapperCTS);
-                sizeList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getSize).distinct()
-                        .collect(Collectors.toList());
-                heatNoList = rollClubThreeDetailsList.stream().map(RollClubThreeDetails::getHeatNo).distinct()
-                        .collect(Collectors.toList());
-                if (oConvertUtils.listIsNotEmpty(rollClubThreeDetailsList)){
-                    count = rollClubThreeDetailsList.stream().count();
-                }
-            }
-            if ("roll_out_shipp".equals(loadingParams.getBelongTable())){
-                LambdaQueryWrapper<RollOutShippDetails> queryWrapperROS = new LambdaQueryWrapper();
-                queryWrapperROS.eq(RollOutShippDetails::getCcmNo, storageBill.getCcmNo()).eq(RollOutShippDetails::getStorageBillId, storageBill.getId());
-                List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(queryWrapperROS);
-                sizeList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getSize).distinct()
-                        .collect(Collectors.toList());
-                heatNoList = rollOutShippDetailsList.stream().map(RollOutShippDetails::getHeatNo).distinct()
-                        .collect(Collectors.toList());
-                if (oConvertUtils.listIsNotEmpty(rollOutShippDetailsList)){
-                    count = rollOutShippDetailsList.stream().count();
-                }
-            }
-            // 根据billetHotsendTypeConfigId 查询基础垛位信息
-            BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(loadingParams.getBilletHotsendTypeConfigId());
-            storageCarLog.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
-            storageCarLog.setCarNm(storageCarLog.getCarNm());// 车号
-//			storageCarLog.setFixedWeight();// 定重
-            storageCarLog.setOutCarNum(storageCarLog.getOutCarNum()); // 出车号
-            storageCarLog.setTypeConfigId(billetHotsendTypeConfig.getId()); // 钢坯配置类型ID
-            storageCarLog.setHeatNo(String.join(",", heatNoList));
-            storageCarLog.setSize(String.join(",", sizeList));// 定尺
-            storageCarLog.setAmount(String.valueOf(count));// 支数
-            storageCarLog.setDataTime(new Date());
-            storageCarLogService.save(storageCarLog);
-        }
+
+    }
+
+
+    /**
+     * 初始化StackingAndLoadingVehicles对象
+     * @return
+     */
+    private StackingAndLoadingVehicles createInitializedVehicle() {
+        StackingAndLoadingVehicles vehicle = new StackingAndLoadingVehicles();
+        vehicle.setBilletNos(null);
+        vehicle.setSpec(null);
+        vehicle.setSteel(null);
+        vehicle.setSize(null);
+        vehicle.setShift(null);
+        vehicle.setHeatNo(null);
+        vehicle.setShiftGroup(null);
+        vehicle.setCreateDate(null);
+        return vehicle;
     }
 
     public void addStorageBill(List<StackingAndLoadingVehicles> savs,String castMachine,String carNum,String destination){

+ 6 - 4
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/stackingAndLoadingVehicles/vo/LoadingParams.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.billet.stackingAndLoadingVehicles.vo;
 
 import lombok.Data;
 import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsend;
+import org.jeecg.modules.billet.billetHotsend.entity.RollClubCommon;
 import org.jeecg.modules.billet.stackingAndLoadingVehicles.entity.StackingAndLoadingVehicles;
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 
@@ -9,15 +10,16 @@ import java.util.List;
 
 @Data
 public class LoadingParams {
+
     /**
-     * 已选择的 拼接好的钢坯基础信息 4个钢坯号为1组数据
+     * 钢坯基础信息
      */
-    private List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList;
+    private List<RollClubCommon> rollClubCommonList;
 
     /**
-     * 已选择的 拆分为四个的所有钢坯号集合
+     * 已选择的 拼接好的钢坯基础信息 4个钢坯号为1组数据
      */
-    private List<String> billetNos;
+    private List<StackingAndLoadingVehicles> stackingAndLoadingVehiclesList;
 
     /**
      * 钢坯热送基础信息

+ 27 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java

@@ -12,12 +12,15 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsendDetailsVo;
 import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
+import org.jeecg.modules.billet.storageBill.entity.BilletHotsendDetails;
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
 import org.jeecg.modules.billet.storageBill.service.ITripsManageService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -47,6 +50,9 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 	@Autowired
 	private ITripsManageService tripsManageService;
 
+	@Autowired
+	public RedisTemplate redisTemplate;
+
 	/**
 	 * 分页列表查询
 	 *
@@ -69,6 +75,15 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 		return Result.OK(pageList);
 	}
 
+
+	@ApiOperation(value="钢坯装运单-分页列表查询", notes="钢坯装运单-分页列表查询")
+	@GetMapping(value = "/details")
+	public Result<BilletHotsendDetails> queryPageDetailsList(StorageBill storageBill) {
+		BilletHotsendDetails pageList = storageBillService.findBilletHotsendDetails(storageBill);
+		return Result.OK(pageList);
+	}
+
+
 	 /**
 	  *   添加
 	  *
@@ -79,6 +94,17 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 	 @ApiOperation(value="钢坯装运单-添加", notes="钢坯装运单-添加")
 	 @PostMapping(value = "/add")
 	 public Result<String> add(@RequestBody StorageBill storageBill) {
+		 storageBill.setCarAllNum(oConvertUtils.listIsEmpty(storageBillService.list()) ? 0 : storageBillService.list().size() + 1);// 车次总序号
+		 storageBill.setDateTime(new Date());// 日期
+		 storageBill.setArrivalTime(new Date());// 到达时间
+		 storageBill.setCarNum(0);
+		 storageBill.setAmountTotal(oConvertUtils.isEmpty(storageBill.getAmountTotal()) ? 0 : storageBill.getAmountTotal());
+		 String keyShiftGroup = String.format("class:shift:group:%s", storageBill.getCcmNo());
+		 String keyShift = String.format("class:shift:%s", storageBill.getCcmNo());
+		 String text1 = oConvertUtils.getString(redisTemplate.opsForValue().get(keyShiftGroup));
+		 String text2 = oConvertUtils.getString(redisTemplate.opsForValue().get(keyShift));
+		 storageBill.setShiftGroup(text1);
+		 storageBill.setShift(text2);
 		 storageBillService.save(storageBill);
 		 operateLogService.add(storageBill,null,StorageBill.class);
 		 return Result.OK("添加成功!");
@@ -216,7 +242,7 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 	 /**
 	  * 通过铸机号查询未发车的车辆信息
 	  *
-	  * @param castMachine
+	  * @param ccmNo
 	  * @return
 	  */
 	 @ApiOperation(value="查询未发车的车辆信息-通过铸机号查询", notes="查询未发车的车辆信息-通过铸机号查询")

+ 22 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/BilletHotsendDetails.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.billet.storageBill.entity;
+
+import lombok.Data;
+import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBasicInfo;
+import org.jeecg.modules.billet.rollClubThree.entity.RollClubThreeDetails;
+import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwoDetails;
+import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShippDetails;
+
+import java.util.List;
+
+@Data
+public class BilletHotsendDetails {
+
+    private List<RollClubTwoDetails> rollClubTwoDetailsList;
+
+    private List<RollClubThreeDetails> rollClubThreeDetailsList;
+
+    private List<RollOutShippDetails> rollOutShippDetailsList;
+
+    private List<BilletBasicInfo> billetBasicInfoList;
+
+}

+ 10 - 7
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/entity/StorageBill.java

@@ -56,11 +56,13 @@ public class StorageBill implements Serializable {
     /**序号*/
     @Excel(name = "车次总序号", width = 15)
     @ApiModelProperty(value = "车次总序号")
-    private String carAllNum;
+    private Integer carAllNum;
     /**日期*/
     @Excel(name = "日期", width = 15)
     @ApiModelProperty(value = "日期")
-    private String dateTime;
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date dateTime;
     /**铸机*/
     @Excel(name = "铸机", width = 15)
     @ApiModelProperty(value = "铸机")
@@ -125,11 +127,6 @@ public class StorageBill implements Serializable {
     @ApiModelProperty(value = "本车车次")
     private Integer carNum;
 
-    /**备注*/
-    @Excel(name = "备注", width = 15)
-    @ApiModelProperty(value = "备注")
-    private String remarks;
-
     /**备注*/
     @Excel(name = "目的地", width = 15)
     @ApiModelProperty(value = "目的地")
@@ -139,4 +136,10 @@ public class StorageBill implements Serializable {
     @ApiModelProperty(value = "钢坯配置类型ID")
     private String typeConfigId;
 
+    /**备注*/
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
 }

+ 3 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/IStorageBillService.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.billet.storageBill.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsendDetailsVo;
+import org.jeecg.modules.billet.storageBill.entity.BilletHotsendDetails;
 import org.jeecg.modules.billet.storageBill.entity.GetStatsResponse;
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 
@@ -19,4 +20,6 @@ public interface IStorageBillService extends IService<StorageBill> {
     GetStatsResponse getStats();
 
     void departHandle(BilletHotsendDetailsVo billetHotsendDetailsVo);
+
+    BilletHotsendDetails findBilletHotsendDetails(StorageBill storageBill);
 }

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

@@ -10,9 +10,13 @@ import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsendDetailsVo;
 import org.jeecg.modules.billet.billetHotsend.entity.RollClubCommon;
 import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
+import org.jeecg.modules.billet.rollClubThree.entity.RollClubThreeDetails;
 import org.jeecg.modules.billet.rollClubThree.service.IRollClubThreeDetailsService;
+import org.jeecg.modules.billet.rollClubTwo.entity.RollClubTwoDetails;
 import org.jeecg.modules.billet.rollClubTwo.service.IRollClubTwoDetailsService;
+import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShippDetails;
 import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService;
+import org.jeecg.modules.billet.storageBill.entity.BilletHotsendDetails;
 import org.jeecg.modules.billet.storageBill.entity.GetStatsResponse;
 import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.jeecg.modules.billet.storageBill.mapper.StorageBillMapper;
@@ -108,4 +112,30 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
     }
+
+    @Override
+    public BilletHotsendDetails findBilletHotsendDetails(StorageBill storageBill) {
+        BilletHotsendDetails result = new BilletHotsendDetails();
+        //根据部门orgCode查询部门,需要将职位id进行传递
+        BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(storageBill.getTypeConfigId());
+        if (oConvertUtils.isEmpty(billetHotsendTypeConfig)){
+            return null;
+        }
+        // 如果是5号机棒二、棒三、上若  6号机 棒二、棒三 查询对应的明细信息
+        if ("1".equals(billetHotsendTypeConfig.getIsTrucking().toString()) && "棒二".equals(billetHotsendTypeConfig.getTypeName())){
+            List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(new LambdaQueryWrapper<RollClubTwoDetails>().eq(RollClubTwoDetails::getStorageBillId, storageBill.getId()).eq(RollClubTwoDetails::getCcmNo,  storageBill.getCcmNo()));
+            result.setRollClubTwoDetailsList(rollClubTwoDetailsList);
+        }else if ("1".equals(billetHotsendTypeConfig.getIsTrucking().toString()) && "棒三".equals(billetHotsendTypeConfig.getTypeName())){
+            List<RollClubThreeDetails> rollClubThreeDetailsList = rollClubThreeDetailsService.list(new LambdaQueryWrapper<RollClubThreeDetails>().eq(RollClubThreeDetails::getStorageBillId, storageBill.getId()).eq(RollClubThreeDetails::getCcmNo, storageBill.getCcmNo()));
+            result.setRollClubThreeDetailsList(rollClubThreeDetailsList);
+        }else if ("1".equals(billetHotsendTypeConfig.getIsTrucking().toString()) && "上若".equals(billetHotsendTypeConfig.getTypeName())){
+            List<RollOutShippDetails> rollOutShippDetailsList = rollOutShippDetailsService.list(new LambdaQueryWrapper<RollOutShippDetails>().eq(RollOutShippDetails::getStorageBillId, storageBill.getId()).eq(RollOutShippDetails::getCcmNo, storageBill.getCcmNo()));
+            result.setRollOutShippDetailsList(rollOutShippDetailsList);
+        }else {
+            // 其他所有非车运的查询钢坯基础信息
+            List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(new LambdaQueryWrapper<BilletBasicInfo>().eq(BilletBasicInfo::getBhtcId, storageBill.getTypeConfigId()).eq(BilletBasicInfo::getCcmNo, storageBill.getCcmNo()));
+            result.setBilletBasicInfoList(billetBasicInfoList);
+        }
+        return result;
+    }
 }

+ 3 - 7
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageCarLog/entity/StorageCarLog.java

@@ -53,18 +53,14 @@ public class StorageCarLog implements Serializable {
 	/**所属部门*/
     @ApiModelProperty(value = "所属部门")
     private String sysOrgCode;
-	/**出车号*/
-	@Excel(name = "出车号", width = 15)
-    @ApiModelProperty(value = "出车号")
-    private String outCarNum;
 	/**铸机*/
 	@Excel(name = "铸机", width = 15)
     @ApiModelProperty(value = "铸机")
     @Dict(dicCode = "lg_zj")
     private String ccmNo;
 	/**车号*/
-	@Excel(name = "车号", width = 15)
-    @ApiModelProperty(value = "车号")
+	@Excel(name = "车号", width = 15)
+    @ApiModelProperty(value = "车号")
     @Dict(dicCode = "lg_car")
     private String carNm;
 	/**目的地*/
@@ -110,7 +106,7 @@ public class StorageCarLog implements Serializable {
 	/**支数*/
 	@Excel(name = "支数", width = 15)
     @ApiModelProperty(value = "支数")
-    private String amount;
+    private Integer amount;
 
     @Excel(name = "钢坯配置类型ID", width = 15)
     @ApiModelProperty(value = "钢坯配置类型ID")