Quellcode durchsuchen

新模型调整

fangpy vor 6 Monaten
Ursprung
Commit
9593fa9f5a

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

@@ -144,7 +144,7 @@ public class ApsServiceImpl implements ApsService {
                     logger.info("解锁重排订单:"+repcIds);
                 }
                 // 冷轧连续性问题重排
-                if(StrUtil.isNotBlank(apsType) && "lzcp".equals(apsType)){
+                if(StrUtil.isNotBlank(apsType) && "mix".equals(apsType)){
                     lzlxOrderSchedule(apsBlankOrders,currentUser,apsType);
                 }else{
                     apsOrderScheduleNew(apsBlankOrders,currentUser,apsType);
@@ -517,12 +517,12 @@ public class ApsServiceImpl implements ApsService {
             if(prowidth1.compareTo(prowidth2) == 0){
                 // 合金
                 if(alloy1.compareTo(alloy2) == 0){
-                    // 产品类型
-                    if(producttype1 == null || producttype2 == null || producttype1.compareTo(producttype2) == 0){
-                        // 厚度
-                        if(thickness1.compareTo(thickness2) == 0){
-                            // 合金状态
-                            if(alloystatus1 == null || alloystatus2 == null || alloystatus1.compareTo(alloystatus2) == 0){
+                    // 合金状态
+                    if(alloystatus1 == null || alloystatus2 == null || alloystatus1.compareTo(alloystatus2) == 0){
+                        // 产品类型
+                        if(producttype1 == null || producttype2 == null || producttype1.compareTo(producttype2) == 0){
+                            // 厚度
+                            if(thickness1.compareTo(thickness2) == 0){
                                 // 重量
                                 if(singlerollweight1.compareTo(singlerollweight2) == 0){
                                     // 按照订单排序
@@ -538,17 +538,17 @@ public class ApsServiceImpl implements ApsService {
                                     a = 1;
                                 }
                             }else{
-                                a = alloystatus1.compareTo(alloystatus2);
+                                if(thickness1.compareTo(thickness2) > 0){
+                                    a = -1;
+                                }else{
+                                    a = 1;
+                                }
                             }
                         }else{
-                            if(thickness1.compareTo(thickness2) > 0){
-                                a = -1;
-                            }else{
-                                a = 1;
-                            }
+                            a = producttype1.compareTo(producttype2);
                         }
                     }else{
-                        a = producttype1.compareTo(producttype2);
+                        a = alloystatus1.compareTo(alloystatus2);
                     }
                 }else{
                     a = alloy1.compareTo(alloy2);
@@ -579,7 +579,7 @@ public class ApsServiceImpl implements ApsService {
             }
         }
         Date finalApsPlanStartDate = apsPlanStartDate;
-        apsOrderScheduleApsNew(apsBlankOrders,currentUser,allEqs, finalApsPlanStartDate,"mix");
+        apsOrderScheduleApsNew(apsBlankOrders,currentUser,allEqs, finalApsPlanStartDate,apsType);
     }
 
     private void apsOrderScheduleApsNew(List<ApsBlankOrderVo> apsBlankOrders,SysUserVo currentUser,Map<String,Equipment> allEqs,Date apsPlanStartDate,String apsType){

+ 29 - 0
cx-aps/cx-aps-entity/src/main/java/com/rongwei/bsentity/vo/ApsTypeVo.java

@@ -0,0 +1,29 @@
+package com.rongwei.bsentity.vo;
+
+import lombok.Data;
+
+@Data
+public class ApsTypeVo {
+
+    /**
+     * 是否混排:
+     * default:分批排程(默认排程)
+     * mix:混合排程
+     */
+    private String mixIf;
+
+    /**
+     * 是否退火提前合并:
+     * thMergeBf:退火提前合并
+     * notThMergeBf:退火不提前合并
+     */
+    private String thMergeMode;
+
+    /**
+     * 约束优先级:
+     * lz:冷轧优先
+     * th:退火优先
+     */
+    private String constraintMode;
+
+}