2025-03-22

main
sunhao 2 weeks ago
parent 1a2a7687bb
commit 6bc02b1d9a

@ -427,14 +427,9 @@ public class SubController {
SetGrpConBinDataBySlab(p);
}
logger.info("***二次分组1数量*** " + gltGCalGrp.size());
//执行日志保存
subService.saveSubLog(p.getSlabNo(), finalSubMode, "成功", "二次分组1数量" + gltGCalGrp.size(), organizationId);
logger.info("***二次分组2数量*** " + gltGCal2Grp.size());
logger.info("***二次分组1数量*** " + gltGCalGrp.size());
//执行日志保存
subService.saveSubLog(p.getSlabNo(), finalSubMode, "成功", "二次分组2数量" + gltGCal2Grp.size(), organizationId);
logger.info("***二次分组2数量*** " + gltGCal2Grp.size());
gltGCalGrp.addAll(gltGCal2Grp);
@ -933,8 +928,6 @@ public class SubController {
//压缩比 Compression ratio
//宽展比 Wide ratio
//GCG.getLtInfoGPreOrder().stream().filter(e->e.)
//最大宽度
@ -945,7 +938,6 @@ public class SubController {
GCG.setLtInfoGPreOrder(new CopyOnWriteArrayList<>());
e.getLtInfoGPreOrder().forEach(f -> {
try {
//同钢种判断
if (!SInfo.getStNo().equals(f.getInfoPmContMscTechDO().getStNo()))
@ -2049,6 +2041,8 @@ public class SubController {
GPO.setInfoQdToPoOrderDO(qtpo);
//内部钢种
GPO.setST_NO(pcmt.getStNo());
//产线
GPO.setLine(pcmt.getMscLineNo());
// 将创建的订单对象添加到全局订单列表中
gltOrder.add(GPO);
@ -2069,7 +2063,7 @@ public class SubController {
plistOrder.parallelStream().forEach(i -> {
PmProContProdTtr ppcpa = new PmProContProdTtr();
PmContMscTech pcmt = new PmContMscTech();
// PmContMscTech pcmt = new PmContMscTech();
QdToPoOrder qtpo = new QdToPoOrder();
try {
@ -2096,14 +2090,18 @@ public class SubController {
return;
}
if (plistPmContMscTechDO.stream().filter(p -> p.getOrderNo().equals(i.getOrderNo())).count() > 0) {
// 可能抛出异常的代码
pcmt = plistPmContMscTechDO.stream().filter(p -> p.getOrderNo().equals(i.getOrderNo())).findFirst().orElseThrow(() -> new NoSuchElementException("No PmContMscTechDO found with name Charlie " + i.getOrderNo()));
if (plistQdToPoOrderDO.stream().anyMatch(e ->e.getOrderNo().equals(i.getOrderNo())))
{
qtpo=plistQdToPoOrderDO.stream().filter(e -> e.getOrderNo().equals(i.getOrderNo())).findFirst().orElseThrow(() -> new NoSuchElementException("No PmContMscTechDO found with name Charlie " + i.getOrderNo()));
if (plistQdToPoOrderDO.stream().anyMatch(e -> e.getOrderNo().equals(i.getOrderNo()))) {
qtpo = plistQdToPoOrderDO.stream().filter(e -> e.getOrderNo().equals(i.getOrderNo())).findFirst().orElseThrow(() -> new NoSuchElementException("No PmContMscTechDO found with name Charlie " + i.getOrderNo()));
QdToPoOrder finalqtpo = qtpo;
if (plistPmContMscTechDO.stream().filter(p -> p.getOrderNo().equals(i.getOrderNo())).count() > 0) {
plistPmContMscTechDO.stream().filter(p -> p.getOrderNo().equals(i.getOrderNo())).collect(Collectors.toList()).forEach( pcmt -> {
SetAllOrder(i, finalPpcpa, pcmt, finalqtpo);
});
SetAllOrder(i, ppcpa, pcmt,qtpo);
}
} else {
@ -2141,12 +2139,14 @@ public class SubController {
// 检查当前订单是否与已有的分组匹配
if (gltGrpOrderFir.stream().anyMatch(e -> e.getWid().equals(p.getInfoPmProContProdAttrDO().getOrderWidth()) &&
e.getThk().equals(p.getInfoPmProContProdAttrDO().getOrderThick()) &&
e.getST_NO().equals(p.getInfoPmContMscTechDO().getStNo()))) {
e.getST_NO().equals(p.getInfoPmContMscTechDO().getStNo()) &&
e.getLine().equals(p.getInfoPmContMscTechDO().getMscLineNo()))) {
// 如果匹配成功,将订单添加到相应的分组中
GGrpOrderFir GGOF = gltGrpOrderFir.stream().filter(e -> e.getWid().equals(p.getInfoPmProContProdAttrDO().getOrderWidth())
&& e.getThk().equals(p.getInfoPmProContProdAttrDO().getOrderThick())
&& e.getST_NO().equals(p.getInfoPmContMscTechDO().getStNo())
&& e.getST_NO().equals(p.getInfoPmContMscTechDO().getStNo())&&
e.getLine().equals(p.getInfoPmContMscTechDO().getMscLineNo())
).findFirst().orElse(null);
if (GGOF.getLtInfoGPreOrder() == null) {
GGOF.setLtInfoGPreOrder(new ArrayList<>()); // 确保列表已初始化
@ -2163,6 +2163,7 @@ public class SubController {
//GGOF.setLen(p.getInfoPmProContProdAttrDO().getOrderLen());
GGOF.setSG_STD(p.getInfoPmProContProdAttrDO().getSgStd());
GGOF.setST_NO(p.getInfoPmContMscTechDO().getStNo());
GGOF.setLine(p.getInfoPmContMscTechDO().getMscLineNo());
GGOF.setLtInfoGPreOrder(new ArrayList<>()); // 初始化列表
GGOF.getLtInfoGPreOrder().add(p);
gltGrpOrderFir.add(GGOF);
@ -3599,6 +3600,7 @@ public class SubController {
public void SetPmSmallPltPos(String mscLineNo, Long organizationId) {
for (int i = 0; i < gltSelGGrpCalRslt.size(); i++) {
GGrpCalRslt ggcr = gltSelGGrpCalRslt.get(i);
Integer smallPlateNum = 0;
for (int j = 0; j < ggcr.getLtActInfoGPreOrder().size(); j++) {
if(ggcr.getLtActInfoGPreOrder().get(j).getCombinationFlag() == 1){
for (int k = 0; k < ggcr.getLtActInfoGPreOrder().get(j).getLtInfoCombGPreOrder().size(); k++) {
@ -3614,8 +3616,8 @@ public class SubController {
.findFirst();
if (resultPmProContProdAttrDO.get().getTrimCode().equals("0")) {
pmSmallPltPosDO.setSmallPlateDivNo("000");
} else {
pmSmallPltPosDO.setSmallPlateDivNo(SMALL_PLATE_DIV_NO[j]);
} else {
pmSmallPltPosDO.setSmallPlateDivNo(SMALL_PLATE_DIV_NO[smallPlateNum]);
}
pmSmallPltPosDO.setPickModeLenDir(Long.valueOf(j+1));
pmSmallPltPosDO.setPickModeWidDir(Long.valueOf(k+1));
@ -3640,6 +3642,7 @@ public class SubController {
SetPmCmdSmallPlt(pmSmallPltPosDO,resultPmProContProdAttrDO.get(),mscLineNo,organizationId);
pmSmallPltPosDOList.add(pmSmallPltPosDO);
smallPlateNum += 1;
}
}else{
GPreOrder gpo = ggcr.getLtActInfoGPreOrder().get(j);
@ -3656,7 +3659,7 @@ public class SubController {
if (resultPmProContProdAttrDO.get().getTrimCode().equals("0")) {
pmSmallPltPosDO.setSmallPlateDivNo("000");
} else {
pmSmallPltPosDO.setSmallPlateDivNo(SMALL_PLATE_DIV_NO[j]);
pmSmallPltPosDO.setSmallPlateDivNo(SMALL_PLATE_DIV_NO[smallPlateNum]);
}
pmSmallPltPosDO.setPickModeLenDir(Long.valueOf(j+1));//TODO 取板方式 长度方向 列数累加
pmSmallPltPosDO.setPickModeWidDir(1L);//TODO 取板方式 宽度方向 第一行
@ -3681,6 +3684,7 @@ public class SubController {
SetPmCmdSmallPlt(pmSmallPltPosDO,resultPmProContProdAttrDO.get(),mscLineNo,organizationId);
pmSmallPltPosDOList.add(pmSmallPltPosDO);
smallPlateNum += 1;
}
}
}
@ -3839,7 +3843,7 @@ public class SubController {
.findFirst();
pmCmdLargePltDO.setSampleLenGive(resultPmProContProdAttrDO.get().getSampleLenGive());
pmCmdLargePltDO.setProdDensity(resultPmProContProdAttrDO.get().getProdDensity());
pmCmdLargePltDO.setPlateDtCode(resultPmProContProdAttrDO.get().getProjectCode());
pmCmdLargePltDO.setPlateDtCode(pmContMscTechDO.getPlateDtCode());
pmCmdLargePltDO.setWithSideFlag(resultPmProContProdAttrDO.get().getProdSideMark());
pmCmdLargePltDO.setRsCode(pmPdSlabDO.getRsCode());

Loading…
Cancel
Save