2025-03-19

Line
main
sunhao 2 weeks ago
parent e293896930
commit c93747a81b

@ -195,8 +195,9 @@ public class SubController {
//记录已被使用的订单号
private static List<GPreOrder> plistOrdHis = new ArrayList<>();
private static List<ChkChmResult> plistChkRsult= new ArrayList<>();
private static List<ChkChmResult> plistChmChkRsult= new ArrayList<>();
private static List<ChkLowResult> plistLowChkRsult= new ArrayList<>();
//endregion
@ApiOperation("求解处理")
@ -250,22 +251,25 @@ public class SubController {
phyFurnaceChemicalMatchDTO.setOrderNo(gpo.getOrderNo());
phyFurnaceChemicalMatchDTO.setPono(p.getPono());
dtoListChm.add(phyFurnaceChemicalMatchDTO);
if (dtoListChm.size()==100)
{
break;
}
}
logger.info("数量:" + dtoListChm.size());
logger.info("数量:" + dtoListChm.size());
logger.info("数量:" + dtoListChm.size());
logger.info("数量:" + dtoListChm.size());
List<QdMatchParamDTO> reslutChm = qdOrderClient.phyFurnaceChemicalMatchApi(organizationId,
dtoListChm);
if (reslutChm != null && !reslutChm.isEmpty()) {
if (reslutChm != null && !reslutChm.isEmpty()) {
for (QdMatchParamDTO qdMatchParamDTO : reslutChm) {
if (!plistChkRsult.stream().anyMatch(m -> m.getPono().equals(p.getPono()) && m.getOrderNo().equals(qdMatchParamDTO.getOrderNo()))) {
if (!plistChmChkRsult.stream().anyMatch(m -> m.getPono().equals(p.getPono()) && m.getOrderNo().equals(qdMatchParamDTO.getOrderNo()))) {
ChkChmResult CR = new ChkChmResult();
CR.setPono(p.getPono());
CR.setOrderNo(qdMatchParamDTO.getOrderNo());
CR.setOrderNo(qdMatchParamDTO.getResult());
plistChkRsult.add(CR);
CR.setChmresult(qdMatchParamDTO.getResult());
plistChmChkRsult.add(CR);
}
}
}
@ -285,10 +289,7 @@ public class SubController {
phyFurnaceChemicalMatchDTO.setOrderNo(gpo.getOrderNo());
phyFurnaceChemicalMatchDTO.setPono(p.getPono());
dtoListLow.add(phyFurnaceChemicalMatchDTO);
if (dtoListLow.size()==100)
{
break;
}
}
List<QdSurplusLowMagnificationDTO> reslutLow = qdOrderClient.surplusLowMagnificationMatchApi(organizationId,
dtoListLow);
@ -296,12 +297,12 @@ public class SubController {
if (reslutLow != null && !reslutLow.isEmpty()) {
if (reslutLow != null && !reslutLow.isEmpty()) {
for (QdSurplusLowMagnificationDTO qdSurplusLowMagnificationDTO : reslutLow) {
if (!plistChkRsult.stream().anyMatch(m -> m.getPono().equals(p.getPono()) && m.getOrderNo().equals(qdSurplusLowMagnificationDTO.getOrderNo()))) {
ChkChmResult CR = new ChkChmResult();
if (!plistLowChkRsult.stream().anyMatch(m -> m.getPono().equals(p.getPono()) && m.getOrderNo().equals(qdSurplusLowMagnificationDTO.getOrderNo()))) {
ChkLowResult CR = new ChkLowResult();
CR.setPono(p.getPono());
CR.setOrderNo(qdSurplusLowMagnificationDTO.getOrderNo());
CR.setOrderNo(qdSurplusLowMagnificationDTO.getResult());
plistChkRsult.add(CR);
CR.setLowresult(qdSurplusLowMagnificationDTO.getResult());
plistLowChkRsult.add(CR);
}
}
}
@ -332,10 +333,10 @@ public class SubController {
SubParams subParams = new SubParams();
subParams.setSlabNo(strSlab);
//测试阶段需要指定板坯号
if (strSlab==null || strSlab=="")
{
return null;
}
// if (strSlab==null || strSlab=="")
// {
// return null;
// }
//获取所有数据
GetDataInfo(subParams);
@ -396,7 +397,6 @@ public class SubController {
gltGCalGrp.addAll(gltGCal2Grp);
//分组设置ID
for (int i = 0; i < gltGCalGrp.size(); i++) {
@ -447,24 +447,24 @@ public class SubController {
logger.info("所有结果数据板坯号:{};数量:{}", p.getSlabNo(), gltGGrpCalRslt.size());
logger.info("选择结果数据板坯号:{};数量:{}", p.getSlabNo(), gltSelGGrpCalRslt.size());
}
if (gltSelGGrpCalRslt.size() > 0) {
now = new Date();
//存储数据,组板结果
SaveHisData(p);
//数据整理
SetSaveDate(p,organizationId);
//开启事务
//TransactionStatus transactionStatus = transactionService.begin();
try {
//保存数据
SaveData(p,organizationId);
//transactionService.commit(transactionStatus);
} catch (Exception e) {
logger.error("保存事务回滚:" + p.getSlabNo(), e);
//回滚事务
//transactionService.rollback(transactionStatus);
}
}
// if (gltSelGGrpCalRslt.size() > 0) {
// now = new Date();
// //存储数据,组板结果
// SaveHisData(p);
// //数据整理
// SetSaveDate(p,organizationId);
// //开启事务
// //TransactionStatus transactionStatus = transactionService.begin();
// try {
// //保存数据
// SaveData(p,organizationId);
// //transactionService.commit(transactionStatus);
// } catch (Exception e) {
// logger.error("保存事务回滚:" + p.getSlabNo(), e);
// //回滚事务
// //transactionService.rollback(transactionStatus);
// }
// }
} catch (Exception e) {
logger.error("板坯报错:" + p.getSlabNo(), e);
@ -883,29 +883,33 @@ public class SubController {
//压缩比 Compression ratio
//宽展比 Wide ratio
//GCG.getLtInfoGPreOrder().stream().filter(e->e.)
//最大宽度
//钢种标准对比
//产线相同的
if (!SInfo.getMscLineNo().equals(e.getLine()))
{
return;
}
GCalGrp GCG = new GCalGrp();
GCG.setLtInfoGPreOrder(new CopyOnWriteArrayList<>());
e.getLtInfoGPreOrder().forEach(f -> {
try {
if (f.getOrderNo().equals("52500095215") ) {
// if (f.getOrderNo().equals("52500095215") ) {
////
//// logger.info("52500095215");
//// }
logger.info("52500095215");
}
// if (f.getOrderNo().equals("52500096023") ) {
//
// logger.info("52500096023");
// }
if (f.getOrderNo().equals("52500096023") ) {
logger.info("52500096023");
}
//同钢种判断
if (!SInfo.getStNo().equals(f.getInfoPmContMscTechDO().getStNo()))
@ -1971,6 +1975,8 @@ public class SubController {
GPO.setThickTolMax(ppcpa.getThickTolMax());
// 设置订单号
GPO.setOrderNo(prPmProContDO.getOrderNo());
// 设置产线号
GPO.setLine(pcmt.getMscLineNo());
// 关联订单信息对象
GPO.setInfoPmProContDo(prPmProContDO);
// 关联订单产品属性对象
@ -2071,7 +2077,8 @@ public class SubController {
// 检查当前订单是否与已有的分组匹配
if (gltGrpOrderFir.stream().anyMatch(e -> e.getWid().equals(p.getInfoPmProContProdAttrDO().getOrderWidth()) &&
e.getThk().equals(p.getInfoPmProContProdAttrDO().getOrderThick()) &&
e.getSG_STD().equals(p.getInfoPmProContProdAttrDO().getSgStd()))) {
e.getSG_STD().equals(p.getInfoPmProContProdAttrDO().getSgStd()) &&
e.getLine().equals(p.getLine()) )) {
// 如果匹配成功,将订单添加到相应的分组中
GGrpOrderFir GGOF = gltGrpOrderFir.stream().filter(e -> e.getWid().equals(p.getInfoPmProContProdAttrDO().getOrderWidth())
@ -2092,7 +2099,7 @@ public class SubController {
GGOF.setThk(p.getInfoPmProContProdAttrDO().getOrderThick());
//GGOF.setLen(p.getInfoPmProContProdAttrDO().getOrderLen());
GGOF.setSG_STD(p.getInfoPmProContProdAttrDO().getSgStd());
GGOF.setLine(p.getLine());
GGOF.setLtInfoGPreOrder(new ArrayList<>()); // 初始化列表
GGOF.getLtInfoGPreOrder().add(p);
gltGrpOrderFir.add(GGOF);
@ -2405,7 +2412,24 @@ public class SubController {
&& e.getCombinePlateWidthFrom().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) <= 0
&& e.getCombinePlateWidthTo().compareTo(BigDecimal.valueOf(maxWidth.orElse(0) + maxAddWidth.orElse(0))) >= 0
)) {
if (p.getLtInfoGPreOrder().get(0).getInfoPmContMscTechDO().getWholeHeatTreatmentType().contains("Q")) {
if (p.getLtInfoGPreOrder().get(0)==null)
{
}
if (p.getLtInfoGPreOrder().get(0).getInfoPmContMscTechDO()==null)
{
}
if (p.getLtInfoGPreOrder().get(0).getInfoPmContMscTechDO().getWholeHeatTreatmentType()==null)
{
}
if (p.getLtInfoGPreOrder().get(0).getInfoPmContMscTechDO().getWholeHeatTreatmentType()!=null &&
p.getLtInfoGPreOrder().get(0).getInfoPmContMscTechDO().getWholeHeatTreatmentType().contains("Q")) {
decThkAdd = plistPmThickAddvBtDO.stream().filter(e -> e.getMscLineNo().equals(SInfo.getMscLineNo())
&& e.getTolTypeCode().equals(strThkTolType)
// && e.getTolTypeCode().equals(p.getLtInfoGPreOrder().get(0).getInfoQdToPoOrderDO().getThkTolType())

@ -20,7 +20,8 @@ public class GGrpOrderFir {
private Integer Len;
//标准
private String SG_STD;
//合同产线
private String Line ;
//合同信息
private List<GPreOrder> LtInfoGPreOrder;

@ -83,7 +83,7 @@
WHERE 1=1
-- AND pcmt.MSC_LINE_NO = '1030' --5米轧线
-- AND ppc.ORDER_NO IN ('J2502001208')
AND ppc.ORDER_NO IN ('52500095215','52500096023')
-- AND ppc.ORDER_NO IN ('52500095215','52500096023')
AND PCMT.FUR_TYPE ='C' --加热炉类型 C 没有注解C和S 都代表什么
AND ppcpa.ORDER_TYPE_CODE != 'QFH'
AND PPC.ON_PD_FLAG != 1 --不用验证操作者

Loading…
Cancel
Save