sunhao 4 days ago
parent 0945876953
commit b719f3c309

@ -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 数组

@ -23,6 +23,9 @@ public class GPreOrder {
//宽度
private int Wid;
//宽度余量
private int widthAddv;
//厚度
private BigDecimal Thk;

@ -5,10 +5,11 @@ server.port=8081
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xd_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.username =root
#spring.datasource.password =xdclass.net
#spring.datasource.url=jdbc:oracle:thin:@172.18.15.38:1521/MOMTEST
#spring.datasource.username=xisc_pm
#spring.datasource.password=HZERO1234
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@172.18.15.38:1521/MOMTEST
spring.datasource.username=xisc_pm
spring.datasource.password=HZERO1234
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#外网环境
#spring.datasource.url=jdbc:oracle:thin:@118.195.204.252:1521/PYMES
@ -16,11 +17,11 @@ server.port=8081
#spring.datasource.password=dyprod123
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#测试环境
spring.datasource.url=jdbc:oracle:thin:@172.18.15.50:1521/momdev
spring.datasource.username=xisc_pm
spring.datasource.password=HZERO1234
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
##测试环境
#spring.datasource.url=jdbc:oracle:thin:@172.18.15.50:1521/momdev
#spring.datasource.username=xisc_pm
#spring.datasource.password=HZERO1234
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#配置mybatis plus打印sql日志

@ -28,6 +28,7 @@
LEFT JOIN PM_PD_CONST_BT PPCB ON PPCB.ROLL_LINE_NO = SUBSTR(MS.MSC_LINE_NO,3,2)
WHERE 1=1
AND MS.MSC_LINE_NO='1030' --5米轧线
AND MS.SLAB_NO = 'C50000230200'
-- AND ((SELECT SUM(NVL(P1.NEED_SLAB_WT,0)) FROM PM_PD_SLAB P1 WHERE P1.SLAB_NO = MS.SLAB_NO)= MS.SLAB_ACT_WGT
-- OR (SELECT SUM(NVl(P1.NEED_SLAB_WT,0)) FROM PM_PD_SLAB P1 WHERE P1.SLAB_NO = MS.SLAB_NO) = 0)--重量相同
-- AND SUBSTR(MS.NEXT_WHOLE_BACKLOG_CODE,2,1) !='B' --全程工序代码第二位不能是B不嫩是火切工序

Loading…
Cancel
Save