瀏覽代碼

接口完善

qiangxuan 6 月之前
父節點
當前提交
d6172bb1e2

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

@@ -16,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;
@@ -61,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
@@ -321,7 +323,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		if (oConvertUtils.isNotEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
 			return;
 		}
-		if (oConvertUtils.isEmpty(check) && oConvertUtils.listIsEmpty(rollClubCommonList)){
+		if (oConvertUtils.isEmpty(check)){
 			billetHotsend.setRollclubtwoNum(0);
 			billetHotsend.setRollcluboneNum(0);
 			billetHotsend.setRolloutshippNum(0);
@@ -330,6 +332,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			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())){
@@ -349,6 +353,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.eq(BilletHotsend::getShift, billetHotsend.getShift())
 					.eq(BilletHotsend::getShiftGroup, billetHotsend.getShiftGroup());;
 			baseMapper.update(billetHotsend,  updateWrapper);
+			billetHotsend.setId(check.getId());
+			operateLogService.add(billetHotsend,null,BilletHotsend.class);
 		}
 		List<String> billetNos = new ArrayList<>();
 		StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
@@ -416,6 +422,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollClubTwoDetails.setShift(billetHotsend.getShift());
 				rollClubTwoDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubTwoDetails.setStorageBillId(storageBill.getId());
+				rollClubTwoDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubTwoDetailsList.add(rollClubTwoDetails);
 			});
@@ -453,6 +460,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollClubThreeDetails.setShift(billetHotsend.getShift());
 				rollClubThreeDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubThreeDetails.setStorageBillId(storageBill.getId());
+				rollClubThreeDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubThreeDetailsList.add(rollClubThreeDetails);
 			});
@@ -527,6 +535,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollOutShippDetails.setShift(billetHotsend.getShift());
 				rollOutShippDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollOutShippDetails.setStorageBillId(storageBill.getId());
+				rollOutShippDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollOutShippDetailsList.add(rollOutShippDetails);
 			});
@@ -633,6 +642,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 			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());
@@ -651,6 +662,8 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 					.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<>();
@@ -718,6 +731,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollClubTwoDetails.setShift(billetHotsend.getShift());
 				rollClubTwoDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubTwoDetails.setStorageBillId(storageBill.getId());
+				rollClubTwoDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubTwoDetailsList.add(rollClubTwoDetails);
 			});
@@ -754,6 +768,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollClubThreeDetails.setShift(billetHotsend.getShift());
 				rollClubThreeDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollClubThreeDetails.setStorageBillId(storageBill.getId());
+				rollClubThreeDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollClubThreeDetailsList.add(rollClubThreeDetails);
 			});
@@ -826,6 +841,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				rollOutShippDetails.setShift(billetHotsend.getShift());
 				rollOutShippDetails.setShiftGroup(billetHotsend.getShiftGroup());
 				rollOutShippDetails.setStorageBillId(storageBill.getId());
+				rollOutShippDetails.setLicensePlate(storageBill.getLicensePlate());
 				billetNos.add(x.getBilletNo());
 				rollOutShippDetailsList.add(rollOutShippDetails);
 			});
@@ -863,7 +879,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		List<StorageBill> storageBillList = storageBillService.list(queryWrapperSB);
 		storageBill.setCarNum(oConvertUtils.listIsEmpty(storageBillList) ? 0 : storageBillList.size() + 1);// 本车车次
 		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
-		storageBill.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
+		storageBill.setDestination(billetHotsendDetailsVo.getStorageBill().getDestination());// 目的地
 		storageBill.setAmountTotal(rollClubCommonList.size());
 		storageBill.setOutTime(new Date());
 		storageBillService.updateById(storageBill);

+ 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;
 }

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

@@ -466,14 +466,16 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             log.info("{}{}", "钢坯热送基础信息不存在,垛位装车失败!", JSON.toJSONString(loadingParams));
             return;
         }else {
-            int result = Integer.compare(idExistBh.getStackNum(), stackingAndLoadingVehiclesList.size());
-            billetHotsend.setStackNum(result > 0 ? idExistBh.getStackNum() - stackingAndLoadingVehiclesList.size() : 0);
+            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);
         }
         // 根据铸机号、位置、层数、类型配置ID更新 初始化容器中的垛位信息
         stackingAndLoadingVehiclesList.forEach(x ->{
@@ -529,6 +531,9 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             x.setBhtcId(loadingParams.getBilletHotsendTypeConfigId());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
+        StorageBill storageBill = loadingParams.getStorageBill();
+        storageBill.setAmountTotal(stackingAndLoadingVehiclesList.size() * 4);
+        storageBillService.updateById(storageBill);
     }
 
     @Override
@@ -549,14 +554,16 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             log.info("{}{}", "钢坯热送基础信息不存在,垛位发车失败!", JSON.toJSONString(loadingParams));
             return;
         } else {
-            int result = Integer.compare(idExistBh.getStackNum(), stackingAndLoadingVehiclesList.size());
-            billetHotsend.setStackNum(result > 0 ? idExistBh.getStackNum() - stackingAndLoadingVehiclesList.size() : 0);// 垛位总数
+            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 发车后,动态更新容器中的垛位信息 初始化
@@ -619,8 +626,8 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
         List<StorageBill> storageBillList = storageBillService.list(queryWrapperSB);
         storageBill.setCarNum(oConvertUtils.listIsEmpty(storageBillList) ? 0 : storageBillList.size() + 1);// 本车车次
         storageBill.setTypeConfigId(loadingParams.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
-        storageBill.setDestination(billetHotsendTypeConfig.getTypeName());// 目的地
-        storageBill.setAmountTotal(stackingAndLoadingVehiclesList.size() * 4);
+        storageBill.setDestination(loadingParams.getStorageBill().getDestination());// 目的地
+        storageBill.setAmountTotal(storageBill.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4);
         storageBill.setOutTime(new Date());
         storageBillService.updateById(storageBill);
         // 7 发车后,新增钢坯堆垛储运信息,生成储运单 storage_car_log
@@ -639,7 +646,7 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                 .eq(StackingUpLog::getShift, billetHotsend.getShift())
                 .eq(StackingUpLog::getShiftGroup, billetHotsend.getShiftGroup());
         List<StackingUpLog> stackingUpLogList = stackingUpLogService.list(queryWrapperSU);
-        storageCarLog.setAmount(oConvertUtils.listIsNotEmpty(stackingUpLogList) ? stackingUpLogList.size() : 0);// 支数
+        storageCarLog.setAmount(storageBill.getAmountTotal());// 支数
         storageCarLogService.save(storageCarLog);
     }
 
@@ -667,8 +674,8 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             billetHotsendBaseService.save(billetHotsend);
             return;
         }else {
-            billetHotsend.setStackNum(idExistBh.getStackNum() + stackingAndLoadingVehiclesList.size()); // 堆垛总支数
-            billetHotsend.setAmountTotal(idExistBh.getAmountTotal() + stackingAndLoadingVehiclesList.size() * 4); //总支数
+            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())

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

@@ -133,7 +133,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             result.setRollOutShippDetailsList(rollOutShippDetailsList);
         }else {
             // 其他所有非车运的查询钢坯基础信息
-            List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(new LambdaQueryWrapper<BilletBasicInfo>().eq(BilletBasicInfo::getBhtcId, storageBill.getTypeConfigId()));
+            List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(new LambdaQueryWrapper<BilletBasicInfo>().eq(BilletBasicInfo::getBhtcId, storageBill.getTypeConfigId()).eq(BilletBasicInfo::getCcmNo, storageBill.getCcmNo()));
             result.setBilletBasicInfoList(billetBasicInfoList);
         }
         return result;