|
|
|
@ -452,31 +452,68 @@ public class SubController {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GCG.setLtInfoGPreOrder(new ArrayList<>());
|
|
|
|
|
//GCG.setLtInfoGPreOrder(new ArrayList<>());
|
|
|
|
|
GCG.getLtInfoGPreOrder().add(f);//添加订单信息
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//存在订单,添加可计算分组
|
|
|
|
|
if (GCG.getLtInfoGPreOrder().size() > 0) {
|
|
|
|
|
|
|
|
|
|
// GCG.getLtInfoGPreOrder().stream().filter(e->e.)
|
|
|
|
|
//GCG.getLtInfoGPreOrder().stream().filter(e->e.)
|
|
|
|
|
//最大宽度
|
|
|
|
|
OptionalInt maxWidth = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
OptionalInt maxWidth = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
.mapToInt(GPreOrder::getWid)
|
|
|
|
|
.max();
|
|
|
|
|
//最大宽度余量
|
|
|
|
|
OptionalInt maxAddWidth = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
.mapToInt(GPreOrder::getWid)
|
|
|
|
|
OptionalInt maxAddWidth = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
.mapToInt(GPreOrder::getWidthAddv)
|
|
|
|
|
.max();
|
|
|
|
|
|
|
|
|
|
//宽展比 保留2位小数
|
|
|
|
|
BigDecimal decWidRate = BigDecimal.valueOf(maxWidth.orElse(0)).divide(SInfo.getSlabActWid(), 2, RoundingMode.HALF_UP);
|
|
|
|
|
|
|
|
|
|
//最大厚度公差最小值
|
|
|
|
|
Optional<BigDecimal> maxTolThkMin = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
Optional<BigDecimal> maxTolThkMin = GCG.getLtInfoGPreOrder().stream()
|
|
|
|
|
.map(GPreOrder::getThickTolMin)
|
|
|
|
|
.reduce(BigDecimal::max);
|
|
|
|
|
|
|
|
|
|
int intWid = maxWidth.orElse(0);
|
|
|
|
|
BigDecimal decThk = maxThk.orElse(BigDecimal.ZERO);
|
|
|
|
|
//轧制厚度 厚度+厚度公差下限最大值
|
|
|
|
|
BigDecimal decThk = e.getThk().add(maxTolThkMin.orElse(BigDecimal.ZERO));
|
|
|
|
|
|
|
|
|
|
//轧制宽度 最大宽度+宽度余量
|
|
|
|
|
int intWid = maxWidth.orElse(0) + maxAddWidth.orElse(0);
|
|
|
|
|
|
|
|
|
|
//切边
|
|
|
|
|
int intTrimWid = 0;
|
|
|
|
|
//切边量
|
|
|
|
|
if (plistPmPlateTrimBtDO.stream().anyMatch(p -> p.getMscLineNo().equals("1030")
|
|
|
|
|
&& p.getPlateThickFrom().compareTo(decThk) <= 0
|
|
|
|
|
&& p.getPlateThickTo().compareTo(decThk) >= 0
|
|
|
|
|
&& p.getCombinePlateWidthFrom().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) <= 0
|
|
|
|
|
&& p.getCombinePlateWidthTo().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) >= 0
|
|
|
|
|
&& p.getWidenFrom().compareTo(decWidRate) <= 0
|
|
|
|
|
&& p.getWidenTo().compareTo(decWidRate) >= 0
|
|
|
|
|
)) {
|
|
|
|
|
|
|
|
|
|
intTrimWid = plistPmPlateTrimBtDO.stream().filter(p -> p.getMscLineNo().equals("1030")
|
|
|
|
|
&& p.getPlateThickFrom().compareTo(decThk) <= 0
|
|
|
|
|
&& p.getPlateThickTo().compareTo(decThk) >= 0
|
|
|
|
|
&& p.getCombinePlateWidthFrom().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) <= 0
|
|
|
|
|
&& p.getCombinePlateWidthTo().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) >= 0
|
|
|
|
|
&& p.getWidenFrom().compareTo(decWidRate) <= 0
|
|
|
|
|
&& p.getWidenTo().compareTo(decWidRate) >= 0
|
|
|
|
|
).collect(Collectors.toList()).get(0).getTrimWidth().intValue();
|
|
|
|
|
}
|
|
|
|
|
//轧制宽度= 最大宽度 + 最大宽度余量 + 切边量
|
|
|
|
|
intWid = intWid + intTrimWid;
|
|
|
|
|
//宽度
|
|
|
|
|
GCG.setWid(intWid);
|
|
|
|
|
|
|
|
|
|
//厚度
|
|
|
|
|
GCG.setThk(decThk);
|
|
|
|
|
|
|
|
|
|
//切边
|
|
|
|
|
GCG.setWid_Add(intTrimWid);
|
|
|
|
|
|
|
|
|
|
gltGCalGrp.add(GCG);
|
|
|
|
|
}
|
|
|
|
@ -503,7 +540,7 @@ public class SubController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//订单要求化学成分
|
|
|
|
|
logger.info("化学成分订单号:"+GrpOrd.getOrderNo());
|
|
|
|
|
// logger.info("化学成分订单号:" + GrpOrd.getOrderNo());
|
|
|
|
|
List<QdToLineupResultCheDO> ltLrc = new ArrayList<>();
|
|
|
|
|
if (plistQdToLineupResultCheDO.stream().anyMatch(p -> p.getOrderNo().equals(GrpOrd.getOrderNo()) && p.getCheType().equals("RX"))) {
|
|
|
|
|
ltLrc = plistQdToLineupResultCheDO.stream().filter(p -> p.getOrderNo().equals(SInfo.getOrderNo()) && p.getCheType().equals("RX")).collect(Collectors.toList());
|
|
|
|
@ -968,6 +1005,11 @@ public class SubController {
|
|
|
|
|
for (int i = 0; i < lackNum.intValue(); i++) {
|
|
|
|
|
GPreOrder GPO = new GPreOrder();
|
|
|
|
|
GPO.setIDValue(intOrdNum++);
|
|
|
|
|
GPO.setThk(ppcpa.getOrderThick());//厚度
|
|
|
|
|
GPO.setWid(ppcpa.getOrderWidth().intValue());//宽度
|
|
|
|
|
GPO.setWidthAddv(ppcpa.getWidthAddv().intValue());//宽度余量
|
|
|
|
|
GPO.setLen(ppcpa.getOrderLen());//长度
|
|
|
|
|
GPO.setThickTolMin(ppcpa.getThickTolMin());//厚度公差下限
|
|
|
|
|
GPO.setOrderNo(prPmProContDO.getOrderNo());
|
|
|
|
|
GPO.setInfoPmProContDo(prPmProContDO);//订单信息
|
|
|
|
|
GPO.setInfoPmProContProdAttrDO(ppcpa);//订单要求信息
|
|
|
|
@ -1147,7 +1189,7 @@ public class SubController {
|
|
|
|
|
|
|
|
|
|
//分组计算
|
|
|
|
|
// gltGGrpCalRslt.parallelStream().forEach(p -> {
|
|
|
|
|
gltGGrpCalRslt.forEach(p -> {
|
|
|
|
|
gltGGrpCalRslt.forEach(p -> {
|
|
|
|
|
// 测试数据
|
|
|
|
|
|
|
|
|
|
// 生成 values 和 weights 数组
|
|
|
|
|