|
@@ -231,6 +231,9 @@ public class ApsServiceImpl implements ApsService {
|
|
// 合金状态
|
|
// 合金状态
|
|
String alloystatus1 = v1.getVolumeMetalstate();
|
|
String alloystatus1 = v1.getVolumeMetalstate();
|
|
String alloystatus2 = v2.getVolumeMetalstate();
|
|
String alloystatus2 = v2.getVolumeMetalstate();
|
|
|
|
+ // 宽度
|
|
|
|
+ BigDecimal prowidth1 = v1.getVolumeWidth();
|
|
|
|
+ BigDecimal prowidth2 = v2.getVolumeWidth();
|
|
// 合金
|
|
// 合金
|
|
if(alloy1.compareTo(alloy2) == 0){
|
|
if(alloy1.compareTo(alloy2) == 0){
|
|
// 合金状态
|
|
// 合金状态
|
|
@@ -1963,6 +1966,72 @@ public class ApsServiceImpl implements ApsService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ // 铸轧排序
|
|
|
|
+ Collections.sort(apsSolutionZz.getProcessesList(),(v1,v2)->{
|
|
|
|
+ // 合金
|
|
|
|
+ String alloy1 = v1.getVolumeMetal();
|
|
|
|
+ String alloy2 = v2.getVolumeMetal();
|
|
|
|
+ // 合金状态
|
|
|
|
+ String alloystatus1 = v1.getVolumeMetalstate();
|
|
|
|
+ String alloystatus2 = v2.getVolumeMetalstate();
|
|
|
|
+ // 产品类型
|
|
|
|
+ String producttype1 = v1.getProducttype();
|
|
|
|
+ String producttype2 = v2.getProducttype();
|
|
|
|
+ // 宽度
|
|
|
|
+ BigDecimal prowidth1 = v1.getVolumeWidth();
|
|
|
|
+ BigDecimal prowidth2 = v2.getVolumeWidth();
|
|
|
|
+ // 厚度
|
|
|
|
+ BigDecimal thickness1 = v1.getVolumeThickness();
|
|
|
|
+ BigDecimal thickness2 = v2.getVolumeThickness();
|
|
|
|
+ // 重量
|
|
|
|
+ BigDecimal singlerollweight1 = v1.getSinglerollweight();
|
|
|
|
+ BigDecimal singlerollweight2 = v2.getSinglerollweight();
|
|
|
|
+
|
|
|
|
+ int a = 0;
|
|
|
|
+ // 合金
|
|
|
|
+ if(alloy1.compareTo(alloy2) == 0){
|
|
|
|
+ // 产品类型
|
|
|
|
+ if(producttype1 == null || producttype2 == null || producttype1.compareTo(producttype2) == 0){
|
|
|
|
+ // 宽度
|
|
|
|
+ if(prowidth1.compareTo(prowidth2) == 0){
|
|
|
|
+ // 厚度
|
|
|
|
+ if(thickness1.compareTo(thickness2) == 0){
|
|
|
|
+ // 合金状态
|
|
|
|
+ if(alloystatus1 == null || alloystatus2 == null || alloystatus1.compareTo(alloystatus2) == 0){
|
|
|
|
+ // 重量
|
|
|
|
+ if(singlerollweight1.compareTo(singlerollweight2) == 0){
|
|
|
|
+ a = 0;
|
|
|
|
+ }else if(singlerollweight1.compareTo(singlerollweight2) > 0){
|
|
|
|
+ a = -1;
|
|
|
|
+ }else{
|
|
|
|
+ a = 1;
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ a = alloystatus1.compareTo(alloystatus2);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(thickness1.compareTo(thickness2) > 0){
|
|
|
|
+ a = -1;
|
|
|
|
+ }else{
|
|
|
|
+ a = 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(prowidth1.compareTo(prowidth2) > 0){
|
|
|
|
+ a = -1;
|
|
|
|
+ }else{
|
|
|
|
+ a = 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ a = producttype1.compareTo(producttype2);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ a = alloy1.compareTo(alloy2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return a;
|
|
|
|
+ });
|
|
|
|
|
|
ApsSolution solvedBalance1 = solver1.solve(apsSolutionZz);
|
|
ApsSolution solvedBalance1 = solver1.solve(apsSolutionZz);
|
|
log.info("**************铸轧排程评分分析***************");
|
|
log.info("**************铸轧排程评分分析***************");
|