Browse Source

确认凉坯下垛和起始终止位置02

qiangxuan 1 day ago
parent
commit
5bbcd4840b

+ 2 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetOriginalProductRecord/controller/BilletOriginalProductRecordController.java

@@ -642,7 +642,8 @@ public class BilletOriginalProductRecordController extends JeecgController<Bille
 						continue;
 					}
 					int demandStackingSum = stackingCount / 4;
-					if (demandStackingSum > 0){
+					// 确保下垛数量大于0并且是步进冷床类型,才进行容器释放(下垛)
+					if (demandStackingSum > 0 && "9".equals(bhtcId)){
 						// 下垛数量大于0时,执行指定数量的下垛操作
 						clearColdStackByHeatNo(bopr.getCcmNo(), bopr.getHeatNo(), String.valueOf(stackingLength), bhtcId, demandStackingSum);
 					}

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

@@ -388,7 +388,7 @@ public class BilletOriginalProductRecordServiceImpl extends ServiceImpl<BilletOr
             for (BilletHotsendChangeShift shift : shiftList) {
                 QualityInspectionStatistics existing = qualityInspectionStatisticsMapper.selectOne(
                         new LambdaQueryWrapper<QualityInspectionStatistics>()
-                                .eq(QualityInspectionStatistics::getChangeShiftId, shift.getId())
+                                .eq(QualityInspectionStatistics::getChangeShiftId, shift.getId()).orderByAsc(QualityInspectionStatistics::getCreateTime).last("limit 1")
                 );
 
                 // 如果交班时间存在,且从交班时间到当前时间超过45分钟,才跳过;否则仍然重新统计、更新

+ 8 - 8
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/service/impl/RollHeightServiceImpl.java

@@ -501,13 +501,14 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
                             if (config != null && config.getSpec() != null) {
                                 spec = config.getSpec();
                             }
+                            String lengthKey = String.valueOf(stackingLength); // 统一使用字符串键
 
-                            int count = stackingCount;
-                            // 计算起始根数与终止根数
-                            int lastEndAmount = coldLengthCumulativeCountMap.getOrDefault(stackingLength, 0);
+                            // 计算起始根数与终止根数 - 使用一致的字符串键
+                            int lastEndAmount = coldLengthCumulativeCountMap.getOrDefault(lengthKey, 0);
                             int startAmount = lastEndAmount + 1;
-                            int endAmount = lastEndAmount + count;
-                            coldLengthCumulativeCountMap.put(String.valueOf(stackingLength), endAmount); // 更新累计值
+                            int endAmount = lastEndAmount + stackingCount;
+                            coldLengthCumulativeCountMap.put(lengthKey, endAmount); // 更新累计值
+
 
                             // sizeDetail
                             RollHeightHeatVO.SizeDetail sizeDetail = new RollHeightHeatVO.SizeDetail();
@@ -516,6 +517,7 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
                             sizeDetail.setSizeWeight(stackingWeight);
                             sizeDetail.setStartAmount(startAmount);
                             sizeDetail.setEndAmount(endAmount);
+                            sizeDetail.setHotOrColdStaus(1);
                             sizeDetailsList.add(sizeDetail);
 
                             // rollSendDetail
@@ -536,10 +538,7 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
                 }
             }
         }
-
         return resultMap;
-
-
     }
 
     @Override
@@ -690,6 +689,7 @@ public class RollHeightServiceImpl extends ServiceImpl<RollHeightMapper, RollHei
                         sizeDetail.setSizeWeight(totalWeight);
                         sizeDetail.setStartAmount(startAmount);
                         sizeDetail.setEndAmount(endAmount);
+                        sizeDetail.setHotOrColdStaus(0);
                         sizeDetailsList.add(sizeDetail);
 
                         // rollSendDetail

+ 3 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/vo/RollHeightHeatVO.java

@@ -80,5 +80,8 @@ public class RollHeightHeatVO {
         @ApiModelProperty(value = "当前定尺结束根")
         private Integer endAmount;
 
+        @ApiModelProperty(value = "凉热单状态")
+        private Integer hotOrColdStaus;
+
     }
 }