Browse Source

手动定尺

guoqiang 2 days ago
parent
commit
8546756ec0

+ 1 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/dto/StrandNoSizeDTO.java

@@ -9,6 +9,7 @@ public class StrandNoSizeDTO {
 
     private String ccmNo;
 
+    private String cutToLength;
 
     private List<StrandNoSize> strandNoSizeList;
 

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

@@ -818,12 +818,17 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		// 构造 Redis key
 		String redisKey = String.format("ccmno:length:stream:%s", ccmNo);
 
+		// 定尺模式
+		String cuttolengthKey = String.format("cut:to:length:%s", ccmNo);
+
 		// 序列化成 JSON 字符串
 		String jsonValue = JSON.toJSONString(dto.getStrandNoSizeList());
 
 		// 存入 Redis
 		redisTemplate.opsForValue().set(redisKey, jsonValue);
 
+		redisTemplate.opsForValue().set(cuttolengthKey, String.valueOf(dto.getCutToLength()));
+
 
 //		// 变更的定尺集合
 //		for (StrandNoSizeDTO.StrandNoSize strandNoSize : dto.getStrandNoSizeList()) {

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

@@ -17,4 +17,6 @@ public class OnDutyInfo {
     private String brandNum;
     //流号定尺
     private String standNoSize;
+    // 自动手动定尺
+    private String cutToLength;
 }

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

@@ -1408,9 +1408,21 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
 
         String redisKey = String.format("ccmno:length:stream:%s", ccmNo);
 
+        // 定尺模式
+        String cuttolengthKey = String.format("cut:to:length:%s", ccmNo);
+
         // 获取 Redis 中的值
         String value = (String) redisTemplate.opsForValue().get(redisKey);
 
+        // 定尺模式值
+        String cuttolengthValue = (String) redisTemplate.opsForValue().get(cuttolengthKey);
+        // 判空处理
+        if (cuttolengthValue != null && !cuttolengthValue.isEmpty()) {
+            onDutyInfo.setCutToLength(cuttolengthValue);
+        } else {
+            onDutyInfo.setCutToLength("2");
+        }
+
         // 判空处理
         if (value != null && !value.isEmpty()) {
             onDutyInfo.setStandNoSize(String.valueOf(JSON.parseArray(value)));