瀏覽代碼

钢坯装运单维护钢种和规格

qiangxuan 5 月之前
父節點
當前提交
8417aae6c6

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

@@ -69,10 +69,6 @@ public class RollClubCommon {
     @ApiModelProperty(value = "定尺")
     @Dict(dicCode = "lg_dcgg")
     private String size;
-    /**钢种*/
-    @Excel(name = "钢种", width = 15)
-    @ApiModelProperty(value = "钢种")
-    private String steel;
     /**规格*/
     @Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")

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

@@ -188,6 +188,10 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		}else {
 			storageBill.setAmountTotal(storageBillInfo.getAmountTotal() + rollClubCommonList.size());
 		}
+		// 取最新的第一条钢坯信息
+		RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
+		storageBill.setSteel(rollClubCommon.getGrade());//钢种
+		storageBill.setSpec(rollClubCommon.getSpec());//规格
 		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
 		storageBill.setDestination(billetHotsendDetailsVo.getBelongTypeName());// 目的地
 		storageBillService.updateById(storageBill);
@@ -301,6 +305,10 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		}else {
 			storageBill.setAmountTotal(storageBillInfo.getAmountTotal() + rollClubCommonList.size());
 		}
+		// 取最新的第一条钢坯信息
+		RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
+		storageBill.setSteel(rollClubCommon.getGrade());//钢种
+		storageBill.setSpec(rollClubCommon.getSpec());//规格
 		storageBill.setTypeConfigId(billetHotsendDetailsVo.getBilletHotsendTypeConfigId()); // 钢坯配置类型ID
 		storageBill.setDestination(billetHotsendDetailsVo.getBelongTypeName());// 目的地
 		storageBill.setSize(String.join(",", sizeList));

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

@@ -551,6 +551,10 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
             x.setUpdateTime(new Date());
         });
         billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
+        // 取最新的第一条钢坯信息
+        RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
+        storageBill.setSteel(rollClubCommon.getGrade());//钢种
+        storageBill.setSpec(rollClubCommon.getSpec());//规格
         storageBill.setAmountTotal((oConvertUtils.isNotEmpty(storageBill.getAmountTotal()) ? storageBill.getAmountTotal() : 0) + stackingAndLoadingVehiclesList.size() * 4);
         storageBill.setDestination(loadingParams.getDestination());
         storageBill.setTypeConfigId(loadingParams.getDestinationId());
@@ -785,7 +789,11 @@ public class StackingAndLoadingVehiclesServiceImpl extends ServiceImpl<StackingA
                 count = rollOutShippDetailsList.stream().count();
             }
         }
-        // 6 更新装运单 storage_bill 新增储运信息
+        // 6 更新装运单 storage_bill
+        // 取最新的第一条钢坯信息更新钢种和规格
+        RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
+        storageBill.setSteel(rollClubCommon.getGrade());//钢种
+        storageBill.setSpec(rollClubCommon.getSpec());//规格
         storageBill.setSize(String.join(",", sizeList));
         storageBill.setTypeConfigId(loadingParams.getDestinationId()); // 钢坯配置类型ID
         storageBill.setDestination(loadingParams.getDestination());// 目的地