|
|
|
@ -289,10 +289,15 @@ public class SubController {
|
|
|
|
|
|
|
|
|
|
logger.info("***二次分组2数量*** " + gltGCal2Grp.size());
|
|
|
|
|
|
|
|
|
|
gltGCalGrp = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
gltGCalGrp.addAll(gltGCal2Grp);
|
|
|
|
|
|
|
|
|
|
//分组设置ID
|
|
|
|
|
for (int i = 0; i < gltGCalGrp.size(); i++) {
|
|
|
|
|
|
|
|
|
|
gltGCalGrp.get(i).setIDValue(i + 1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gltGGrpCalRslt = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
gltSelGGrpCalRslt = new ArrayList<>();
|
|
|
|
@ -1002,6 +1007,8 @@ public class SubController {
|
|
|
|
|
|
|
|
|
|
gltGCalGrp.parallelStream().forEach(f -> {
|
|
|
|
|
|
|
|
|
|
List<String> ltInfoOrder = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
//宽度满足要求和厚度相同
|
|
|
|
|
if (f.getWid()+e.getWid()<4980 && e.getThk().equals(f.getThk())){
|
|
|
|
|
|
|
|
|
@ -1019,6 +1026,12 @@ public class SubController {
|
|
|
|
|
|
|
|
|
|
GPreOrder GPO2=j;
|
|
|
|
|
|
|
|
|
|
//组合数据的数量,提升效率,大于二十
|
|
|
|
|
if(ltInfoOrder.stream().filter(m->m.equals(GPO1.getOrderNo()+"_"+GPO2.getOrderNo())).count()>20)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//产生新的订单数据组合板
|
|
|
|
|
GPreOrder GPO=new GPreOrder();
|
|
|
|
|
//主键等于两个订单主键之和
|
|
|
|
@ -1073,6 +1086,8 @@ public class SubController {
|
|
|
|
|
GPO.setInfoQdToPoOrderDO(GPO1.getInfoQdToPoOrderDO());
|
|
|
|
|
//组合标识
|
|
|
|
|
GPO.setCombinationFlag(1);
|
|
|
|
|
//记录组合数据的数量,提升效率
|
|
|
|
|
ltInfoOrder.add(GPO1.getOrderNo() + "_" + GPO2.getOrderNo());
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//
|
|
|
|
@ -2002,7 +2017,7 @@ public class SubController {
|
|
|
|
|
//初始化分组数据
|
|
|
|
|
gltGGrpCalRslt = new CopyOnWriteArrayList<>();
|
|
|
|
|
|
|
|
|
|
//gltGCalGrp.parallelStream().forEach(e->{
|
|
|
|
|
//原始分组
|
|
|
|
|
gltGCalGrp.parallelStream().forEach(e -> {
|
|
|
|
|
try {
|
|
|
|
|
//实例化计算结果数组
|
|
|
|
@ -2043,6 +2058,83 @@ public class SubController {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// //临时交叉分组集合
|
|
|
|
|
// List<GCalGrp> ltTempGrp = new CopyOnWriteArrayList<>();
|
|
|
|
|
|
|
|
|
|
//临时分组数据
|
|
|
|
|
List<GGrpCalRslt> ltTempGrp = new CopyOnWriteArrayList<>();
|
|
|
|
|
|
|
|
|
|
//交叉分组 .parallelStream() .parallelStream()
|
|
|
|
|
gltGCalGrp.forEach(e -> {
|
|
|
|
|
|
|
|
|
|
gltGCalGrp.forEach(f -> {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//排己
|
|
|
|
|
if(e.getIDValue()==f.getIDValue())
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//e和f的宽度差绝对值小于500,宽度合小于4980,厚度相同
|
|
|
|
|
if (Math.abs(e.getWid() - f.getWid()) <500 && e.getWid() + f.getWid() < 4980 && e.getThk().compareTo(f.getThk()) == 0) {
|
|
|
|
|
|
|
|
|
|
//实例化计算结果数组
|
|
|
|
|
GCalGrp GCP1=e;
|
|
|
|
|
|
|
|
|
|
//实例化计算结果数组
|
|
|
|
|
GCalGrp GCP2=f;
|
|
|
|
|
|
|
|
|
|
//实例化计算结果数组
|
|
|
|
|
GGrpCalRslt GGCR = new GGrpCalRslt();
|
|
|
|
|
//可轧制最大长度
|
|
|
|
|
int intMaxLen = 0;
|
|
|
|
|
//轧制最大宽度
|
|
|
|
|
int intWid = e.getWid()+f.getWid();
|
|
|
|
|
//轧制最大厚度
|
|
|
|
|
BigDecimal intThk = e.getThk();
|
|
|
|
|
//板坯长度
|
|
|
|
|
int intSlabLen = SInfo.getRemLen().intValue();
|
|
|
|
|
|
|
|
|
|
//判断可轧制最大长度 TODO:厚度计算Decimal取整计算,会有误差,后续判断误差值修正计算
|
|
|
|
|
if ((SInfo.getRemLen().multiply(SInfo.getSlabActThk()).multiply(SInfo.getRemWid()).divide(intThk.multiply(BigDecimal.valueOf(intWid)), RoundingMode.HALF_UP)).compareTo(BigDecimal.valueOf(intRollMaxLen)) > 0) {
|
|
|
|
|
intMaxLen = intRollMaxLen;
|
|
|
|
|
} else {
|
|
|
|
|
//① 氧化铁皮损失率取固定值:0.01;
|
|
|
|
|
intMaxLen = (SInfo.getRemLen().multiply(BigDecimal.valueOf(0.99)).multiply(SInfo.getSlabActThk()).multiply(SInfo.getRemWid()).divide(intThk.multiply(BigDecimal.valueOf(intWid)), RoundingMode.HALF_UP)).intValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//不能小于可轧制的最小长度
|
|
|
|
|
if (intMaxLen < intRollMinLen) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//轧制宽度
|
|
|
|
|
GGCR.setCal_Wid(intWid);
|
|
|
|
|
//轧制厚度
|
|
|
|
|
GGCR.setCal_Thk(intThk);
|
|
|
|
|
//订单厚度
|
|
|
|
|
GGCR.setThk(e.getLtInfoGPreOrder().get(0).getThk());
|
|
|
|
|
//最大长度
|
|
|
|
|
GGCR.setCal_Len(intMaxLen);
|
|
|
|
|
//订单信息
|
|
|
|
|
GGCR.setLtInfoGPreOrder(e.getLtInfoGPreOrder());
|
|
|
|
|
//合并订单信息
|
|
|
|
|
GGCR.getLtInfoGPreOrder().addAll(f.getLtInfoGPreOrder());
|
|
|
|
|
|
|
|
|
|
ltTempGrp.add(GGCR);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
logger.info("***计算结果异常:" + ex.getMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
gltGGrpCalRslt.addAll(ltTempGrp);
|
|
|
|
|
|
|
|
|
|
if (gltGGrpCalRslt.size() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|