ソースを参照

Merge branch 'mode-min-unit' into mode-min-unit-连续调度5天

sucheng 2 ヶ月 前
コミット
1022413a98

+ 16 - 2
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ApsServiceImpl.java

@@ -9,6 +9,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONConfig;
+import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -794,8 +795,11 @@ public class ApsServiceImpl implements ApsService {
             if (apsType.getConstraintMode() != null && apsType.getConstraintMode().equals("lz") && "dd".equals(apsType.getScheduleType())) {
                 productionScheduleRetVo = rwApsServer.productionLzDdSchedule(apsProductionSchedule);
             }else if("dd".equals(apsType.getScheduleType()) && "thMergeBf".equals(apsType.getThMergeMode())){
-//                productionScheduleRetVo = rwApsServer.productionThDdSchedule(apsProductionSchedule);
-                productionScheduleRetVo = rwApsServer.productionSchedule(apsProductionSchedule);
+                if(StrUtil.isNotBlank(apsProductionSchedule.getThDdType()) && "newMode".equals(apsProductionSchedule.getThDdType())){
+                    productionScheduleRetVo = rwApsServer.productionThDdSchedule(apsProductionSchedule);
+                }else{
+                    productionScheduleRetVo = rwApsServer.productionSchedule(apsProductionSchedule);
+                }
             }else {
                 productionScheduleRetVo = rwApsServer.productionSchedule(apsProductionSchedule);
             }
@@ -1110,6 +1114,16 @@ public class ApsServiceImpl implements ApsService {
             // 默认卷重差配置
             productionScheduleVo.setWeightdifference(apsScheduleConfig.getWeightdifference());
             productionScheduleVo.setMidweightdifference(apsScheduleConfig.getMidweightdifference());
+            // 自定义扩展配置
+            if(StrUtil.isNotBlank(apsScheduleConfig.getRoption())){
+                try{
+                    JSONObject jsonObject = JSONUtil.parseObj(apsScheduleConfig.getRoption());
+                    String thDdType = jsonObject.getStr("thDdType");
+                    productionScheduleVo.setThDdType(thDdType);
+                }catch (Exception ex){
+                    logger.error("排程全局配置自定义扩展字段roption,格式化错误",ex);
+                }
+            }
         } else {
             throw new CustomException("排程参数缺失");
         }

+ 1 - 1
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsBlankOrderDao.xml

@@ -608,7 +608,7 @@
         and b.IFBLANKPROCESS = '否'
         and (IF(a.PREPAREMATERIALBATCHNO = '' || a.PREPAREMATERIALBATCHNO is null,0,(LENGTH( a.PREPAREMATERIALBATCHNO ) - LENGTH( REPLACE ( a.PREPAREMATERIALBATCHNO, ',', '' ) ) + 1)) < (b.PLANPROCESSRALL-b.CANCELROLLSUM) )
         ,'是','否') AS 'ISWAITGETMATERIAL'
-        from aps_blank_order a LEFT JOIN (select * from aps_process_operation where DELETED = 0 AND PREVIOUSPROCESSID is null) b ON a.ID = b.BLANKID
+        from aps_blank_order a LEFT JOIN (select * from aps_process_operation where DELETED = 0 AND (PREVIOUSPROCESSID is null OR PREVIOUSPROCESSID = '')) b ON a.ID = b.BLANKID
         where a.DELETED = 0
         AND a.ID = #{id}
     </select>

+ 5 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProcessOutputProductDo.java

@@ -399,6 +399,11 @@ public class ApsProcessOutputProductDo extends BaseDo {
      */
     private String blankproducttypeid;
 
+    /**
+     * 是否清洗
+     */
+    private String isclean;
+
     /**
      * 输出物料类型
      */

+ 5 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProcessOutputProductHistoryDo.java

@@ -396,6 +396,11 @@ public class ApsProcessOutputProductHistoryDo extends BaseDo {
      */
     private String blankproducttypeid;
 
+    /**
+     * 是否清洗
+     */
+    private String isclean;
+
     /**
      * 订单号
      */

+ 5 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductionTechnicalRequirementDo.java

@@ -240,5 +240,10 @@ public class ApsProductionTechnicalRequirementDo extends BaseDo implements Seria
      */
     private String blankappearance;
 
+    /**
+     * 是否清洗
+     */
+    private String isclean;
+
     private static final long serialVersionUID = 1L;
 }

+ 5 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/domain/ApsProductionTechnicalRequirementHistoryDo.java

@@ -241,5 +241,10 @@ public class ApsProductionTechnicalRequirementHistoryDo extends BaseDo implement
     @TableField("BLANKAPPEARANCE")
     private String blankappearance;
 
+    /**
+     * 是否清洗
+     */
+    private String isclean;
+
     private static final long serialVersionUID = 1L;
 }

+ 7 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/vo/ProductionScheduleVo.java

@@ -40,6 +40,13 @@ public class ProductionScheduleVo {
      */
     private ApsTypeVo scheduleType;
 
+    /**
+     * 退火调度模型(为空时默认老模型):
+     * oldMode:老模型
+     * newMode:新模型
+     */
+    private String thDdType;
+
     /**
      * 生产工序集合
      */