更新数据处理,PmPdPlateCut,PmPdBlockPos,PmPdContSum,PmSmallPltPos,PmCmdSlab,PmCmdLargePltDO

main
BKGY_MYT 2 days ago
parent a610909797
commit e48188fc41

@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import static net.xdclass.shopmanager.model.PmSmallPltPosDO.SMALL_PLATE_DIV_NO;
import static net.xdclass.shopmanager.tool.Tool.nvl;
import static net.xdclass.shopmanager.util.Knapsack.solve;
@ -124,6 +125,8 @@ public class SubController {
//板坯信息表
private static List<PmPdSlabInfoDO> plistPmPdSlabInfoDO; //TODO 需要添加此表信息的查询
private static Date now;
//endregion
@ApiOperation("求解处理")
@ -174,9 +177,10 @@ public class SubController {
SetGroupCalRslt(p);
logger.info("结果数据板坯号:{};数量:{}",p.getSlabNo(), gltGGrpCalRslt.size());
}
//if (gltGGrpCalRslt.size() > 0) {
// SetSaveDate(p);
//}
if (gltGGrpCalRslt.size() > 0) {
now = new Date();
SetSaveDate(p);
}
} catch (Exception e) {
logger.error("An error occurred", e);
}
@ -1337,11 +1341,11 @@ if (plistQdToLineupResultCheDO==null)
SetPmPdSlab(SInfo);//组板板坯表
SetPmPdPlateCut();//大板粗切位置表
SetPmPdBlockPos();//组合子板位置表
SetPmPdContSum();//组板合同总量表
SetPmPdContSum(SInfo);//组板合同总量表
SetPmSmallPltPos();//组板小板位置表
SetPmCmdSlab();//命令板坯表
SetPmCmdLargePlt();//命令大板表
SetPmCmdCont();//命令参数表
// SetPmCmdSlab();//命令板坯表
// SetPmCmdLargePlt();//命令大板表
// SetPmCmdCont();//命令参数表
SetPmCmdSmallPlt();//命令小板表
}
@ -1360,7 +1364,7 @@ if (plistQdToLineupResultCheDO==null)
pmPdSlabDO.setFormPlateMode("FormPlateMode"); //TODO 组板方式 未赋值
pmPdSlabDO.setPickModeLenDir(BigDecimal.ZERO); //TODO 取板方式_长度方向 未赋值
pmPdSlabDO.setPickModeWidDir(BigDecimal.ZERO); //TODO 取板方式_宽度方向 未赋值
pmPdSlabDO.setFurType("FurType"); //TODO 加热炉类型 未赋值
pmPdSlabDO.setFurType("C");// TODO 加热炉类型 暂时赋值为C
pmPdSlabDO.setAutoManualFlag("M");
pmPdSlabDO.setOrderRemainDiv("1");
pmPdSlabDO.setCanDelFlag("1");
@ -1516,6 +1520,11 @@ if (plistQdToLineupResultCheDO==null)
pmPdSlabDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdSlabDO.setLastUpdatedBy(781L);
pmPdSlabDO.setCreationDate(now);
pmPdSlabDO.setLastUpdateDate(now);
SetPmCmdSlab(pmPdSlabDO);//命令板坯表
SetPmCmdLargePlt(pmPdSlabDO,ggcr);//命令大板表
pmPdSlabDOList.add(pmPdSlabDO);
}
@ -1526,9 +1535,16 @@ if (plistQdToLineupResultCheDO==null)
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
GGrpCalRslt ggcr=gltGGrpCalRslt.get(i);
PmPdPlateCutDO pmPdPlateCutDO = new PmPdPlateCutDO();
pmPdPlateCutDO.setPdMatNo(ggcr.getVirtualSlabNo());
//TODO 粗切类型 粗切位置 位置序号 取值待定
// pmPdPlateCutDO.setCutType();
// pmPdPlateCutDO.setPositionType();
// pmPdPlateCutDO.setPositionSeq();
pmPdPlateCutDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdPlateCutDO.setLastUpdatedBy(781L);
pmPdPlateCutDO.setCreationDate(now);
pmPdPlateCutDO.setLastUpdateDate(now);
pmPdPlateCutDOList.add(pmPdPlateCutDO);
}
}
@ -1536,61 +1552,288 @@ if (plistQdToLineupResultCheDO==null)
//组合子板位置表
public void SetPmPdBlockPos(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmPdBlockPosDO pmPdBlockPosDO = new PmPdBlockPosDO();
pmPdBlockPosDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdBlockPosDO.setLastUpdatedBy(781L);
pmPdBlockPosDOList.add(pmPdBlockPosDO);
GGrpCalRslt ggcr=gltGGrpCalRslt.get(i);
List<String> orderNoList = ggcr.getLtActInfoGPreOrder().stream()
.map(GPreOrder::getOrderNo).distinct().collect(Collectors.toList()); //合同号去重
for(int j = 0; j < orderNoList.size(); j++){
PmPdBlockPosDO pmPdBlockPosDO = new PmPdBlockPosDO();
pmPdBlockPosDO.setPdMatNo(ggcr.getVirtualSlabNo());
pmPdBlockPosDO.setOrderNo(orderNoList.get(j));
pmPdBlockPosDO.setOrderSeqNo(j+1);//TODO 订单序号 暂时以实际订单信息列表顺序
Integer blockPlateNum = ggcr.getLtActInfoGPreOrder().stream() // 当前合同号在实际合同列表中的条数
.filter(item -> item.getOrderNo().equals(pmPdBlockPosDO.getOrderNo()))
.collect(Collectors.toList())
.size();
pmPdBlockPosDO.setBlockPlateNum(blockPlateNum);
pmPdBlockPosDO.setSlabNo(ggcr.getSlabNo());
// pmPdBlockPosDO.setOrderBlockNo(); //TODO 厚板组板块号 暂时不知如何赋值
pmPdBlockPosDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdBlockPosDO.setLastUpdatedBy(781L);
pmPdBlockPosDO.setCreationDate(now);
pmPdBlockPosDO.setLastUpdateDate(now);
pmPdBlockPosDOList.add(pmPdBlockPosDO);
}
}
}
//组板合同总量表
public void SetPmPdContSum(){
public void SetPmPdContSum(SlabInfoDO SInfo){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmPdContSumDO pmPdContSumDO = new PmPdContSumDO();
pmPdContSumDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdContSumDO.setLastUpdatedBy(781L);
pmPdContSumDOList.add(pmPdContSumDO);
GGrpCalRslt ggcr=gltGGrpCalRslt.get(i);
List<String> orderNoList = ggcr.getLtActInfoGPreOrder().stream()
.map(GPreOrder::getOrderNo).distinct().collect(Collectors.toList()); //合同号去重
for(int j = 0; j < orderNoList.size(); j++){
PmPdContSumDO pmPdContSumDO = new PmPdContSumDO();
pmPdContSumDO.setPdMatNo(ggcr.getVirtualSlabNo());
pmPdContSumDO.setOrderNo(orderNoList.get(j));
pmPdContSumDO.setOrderSeqNo(BigDecimal.valueOf(j+1));
List<GPreOrder> gPreOrders = ggcr.getLtActInfoGPreOrder().stream() // 当前合同号在实际合同列表中的条数
.filter(item -> item.getOrderNo().equals(pmPdContSumDO.getOrderNo()))
.collect(Collectors.toList());
Integer orderPlateNum = gPreOrders.size();
pmPdContSumDO.setOrderPlateNum(BigDecimal.valueOf(orderPlateNum));
pmPdContSumDO.setSlabNo(ggcr.getSlabNo());
pmPdContSumDO.setPdMatType("S");
pmPdContSumDO.setPdStatus("12");
pmPdContSumDO.setOrderThick(gPreOrders.get(0).getThk());
pmPdContSumDO.setOrderWidth(BigDecimal.valueOf(gPreOrders.get(0).getWid()));
pmPdContSumDO.setOrderLen(BigDecimal.valueOf(gPreOrders.get(0).getIntActLen()));//TODO 长度不确定用实际长度还是长度
pmPdContSumDO.setOrderLenMax(BigDecimal.valueOf(gPreOrders.get(0).getInfoPmProContProdAttrDO().getOrderMaxLen()));
pmPdContSumDO.setOrderLenMin(BigDecimal.valueOf(gPreOrders.get(0).getInfoPmProContProdAttrDO().getOrderMinLen()));
pmPdContSumDO.setSmallPlateThick(gPreOrders.get(0).getThk());
pmPdContSumDO.setSmallPlateWidth(BigDecimal.valueOf(gPreOrders.get(0).getWid()));
pmPdContSumDO.setSmallPlateLen(BigDecimal.valueOf(gPreOrders.get(0).getIntActLen()));//TODO 长度不确定用实际长度还是长度
pmPdContSumDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdContSumDO.setLastUpdatedBy(781L);
pmPdContSumDO.setCreationDate(now);
pmPdContSumDO.setLastUpdateDate(now);
SetPmCmdCont(pmPdContSumDO);//命令参数表
pmPdContSumDOList.add(pmPdContSumDO);
}
}
}
//组板小板位置表
public void SetPmSmallPltPos(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmSmallPltPosDO pmSmallPltPosDO = new PmSmallPltPosDO();
pmSmallPltPosDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmSmallPltPosDO.setLastUpdatedBy(781L);
pmSmallPltPosDOList.add(pmSmallPltPosDO);
GGrpCalRslt ggcr = gltGGrpCalRslt.get(i);
for(int j = 0 ; j < ggcr.getLtActInfoGPreOrder().size(); j++){
GPreOrder gpo = ggcr.getLtActInfoGPreOrder().get(j);
PmSmallPltPosDO pmSmallPltPosDO = new PmSmallPltPosDO();
pmSmallPltPosDO.setPdMatNo(ggcr.getVirtualSlabNo());
pmSmallPltPosDO.setOrderNo(gpo.getOrderNo());
pmSmallPltPosDO.setOrderSeqNo(j+1);
pmSmallPltPosDO.setSlabNo(ggcr.getSlabNo());
Optional<PmProContProdAttrDO> resultPmProContProdAttrDO = plistPmProContProdAttrDO.stream()
.filter(item -> gpo.getOrderNo().equals(item.getOrderNo())) //根据合同号查询生产合同产品属性表
.findFirst();
if(resultPmProContProdAttrDO.get().getTrimCode().equals("0")){
pmSmallPltPosDO.setSmallPlateDivNo("000");
}else{
pmSmallPltPosDO.setSmallPlateDivNo(SMALL_PLATE_DIV_NO[j]);
}
pmSmallPltPosDO.setPickModeLenDir(0);//TODO 取板方式 长度方向 不知道怎么取暂时默认为0
pmSmallPltPosDO.setPickModeWidDir(0);//TODO 取板方式 宽度方向 不知道怎么取暂时默认为0
pmSmallPltPosDO.setOrderThick(gpo.getThk());
pmSmallPltPosDO.setOrderWidth(BigDecimal.valueOf(gpo.getWid()));
pmSmallPltPosDO.setOrderLen(gpo.getIntActLen()); //TODO 长度不确定用实际长度还是长度
pmSmallPltPosDO.setOrderLenMax(gpo.getInfoPmProContProdAttrDO().getOrderMaxLen());
pmSmallPltPosDO.setOrderLenMin(gpo.getInfoPmProContProdAttrDO().getOrderMinLen());
pmSmallPltPosDO.setSmallPlateThick(gpo.getThk());
pmSmallPltPosDO.setSmallPlateWidth(BigDecimal.valueOf(gpo.getWid()));
pmSmallPltPosDO.setSmallPlateLen(gpo.getIntActLen()); //TODO 长度不确定用实际长度还是长度
pmSmallPltPosDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmSmallPltPosDO.setLastUpdatedBy(781L);
pmSmallPltPosDO.setCreationDate(now);
pmSmallPltPosDO.setLastUpdateDate(now);
pmSmallPltPosDOList.add(pmSmallPltPosDO);
}
}
}
//命令板坯表
public void SetPmCmdSlab(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmCmdSlabDO pmCmdSlabDO = new PmCmdSlabDO();
pmCmdSlabDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSlabDO.setLastUpdatedBy(781L);
pmCmdSlabDOList.add(pmCmdSlabDO);
}
public void SetPmCmdSlab(PmPdSlabDO pmPdSlabDO){
PmCmdSlabDO pmCmdSlabDO = new PmCmdSlabDO();
pmCmdSlabDO.setPonoSlabNo(pmPdSlabDO.getVirtualSlabNo());
pmCmdSlabDO.setTmpSlabNo(pmPdSlabDO.getVirtualSlabNo());
pmCmdSlabDO.setSlabNo(pmPdSlabDO.getSlabNo());
pmCmdSlabDO.setVirtualSlabNo(pmPdSlabDO.getVirtualSlabNo());
pmCmdSlabDO.setPdStatusHp("18");
pmCmdSlabDO.setShortSlabNumInLong(gltGGrpCalRslt.size());
pmCmdSlabDO.setBigPlateNum(gltGGrpCalRslt.size());
pmCmdSlabDO.setSlabDivNo(pmPdSlabDO.getSlabDivNo().intValue());
pmCmdSlabDO.setOrderNumInPlate(pmPdSlabDO.getOrderNumInPlate().intValue());
pmCmdSlabDO.setOrderRemainDiv(pmPdSlabDO.getOrderRemainDiv());
pmCmdSlabDO.setMatDesignKind("S");
pmCmdSlabDO.setProdCodeHp("");//TODO 厚板品种代码 暂时默认为空
pmCmdSlabDO.setSgSign(pmCmdSlabDO.getSgSign());
pmPdSlabDO.setStNo(pmPdSlabDO.getStNo());
pmCmdSlabDO.setPreCleanSlabThick(pmPdSlabDO.getPreCleanSlabThick());
pmCmdSlabDO.setPreCleanSlabWidth(pmPdSlabDO.getPreCleanSlabWidth());
pmCmdSlabDO.setPreCleanSlabLen(pmPdSlabDO.getPreCleanSlabLen());
pmCmdSlabDO.setPreCleanSlabMaxLen(pmPdSlabDO.getPreCleanSlabMaxLen());
pmCmdSlabDO.setPreCleanSlabMinLen(pmPdSlabDO.getPreCleanSlabMinLen());
pmCmdSlabDO.setPreCleanSlabWt(pmPdSlabDO.getPreCleanSlabWt());
pmCmdSlabDO.setPreCleanSlabMaxWt(pmPdSlabDO.getPreCleanSlabMaxWt());
pmCmdSlabDO.setPreCleanSlabMinWt(pmPdSlabDO.getPreCleanSlabMinWt());
Optional<PmPdSlabInfoDO> resultPmPdSlabInfoDO = plistPmPdSlabInfoDO.stream()
.filter(item -> pmPdSlabDO.getSlabNo().equals(item.getSlabNo()))
.findFirst();
pmCmdSlabDO.setMoldThick(resultPmPdSlabInfoDO.get().getMatActThick().intValue());
pmCmdSlabDO.setMoldWid(resultPmPdSlabInfoDO.get().getMatActWidth().intValue());
pmCmdSlabDO.setInfurSlabThick(pmPdSlabDO.getInfurSlabThick());
pmCmdSlabDO.setInfurSlabWid(pmPdSlabDO.getInfurSlabWid());
pmCmdSlabDO.setInfurSlabLen(pmPdSlabDO.getInfurSlabLen());
pmCmdSlabDO.setInfurSlabMaxLen(pmPdSlabDO.getInfurSlabMaxLen());
pmCmdSlabDO.setInfurSlabMinLen(pmPdSlabDO.getInfurSlabMinLen());
pmCmdSlabDO.setInfurSlabWt(pmPdSlabDO.getInfurSlabWt());
pmCmdSlabDO.setInfurSlabMaxWt(pmPdSlabDO.getInfurSlabMaxWt());
pmCmdSlabDO.setInfurSlabMinWt(pmPdSlabDO.getInfurSlabMinWt());
pmCmdSlabDO.setNeedSlabLen(pmPdSlabDO.getNeedSlabLen());
pmCmdSlabDO.setNeedSlabWt(pmPdSlabDO.getNeedSlabWt());
pmCmdSlabDO.setFixSlabLenFlag(String.valueOf(pmPdSlabDO.getFixSlabLenFlag()));
pmCmdSlabDO.setFixSlabLen(pmPdSlabDO.getFixSlabLen().intValue());
pmCmdSlabDO.setSlabPlaceCode(pmPdSlabDO.getSlabPlaceCode());
pmCmdSlabDO.setHpFlameCleanDiv(pmPdSlabDO.getHpFlameCleanDiv());
pmCmdSlabDO.setSlabFinishCode(pmPdSlabDO.getSlabFinishCode());
pmCmdSlabDO.setCoolCode(pmPdSlabDO.getCoolCode());
pmCmdSlabDO.setLastSlabFlag(String.valueOf(pmPdSlabDO.getLastSlabFlag()));
pmCmdSlabDO.setAddSlabFlag(pmPdSlabDO.getAddSlabFlag());
pmCmdSlabDO.setSlabPreProc1(""); //TODO 板坯预定通过工序1 文档中没有 有合同分割取值逻辑 暂时默认为空
pmCmdSlabDO.setHotSendDiv("H");
pmCmdSlabDO.setFurType(pmPdSlabDO.getFurType());
pmCmdSlabDO.setHotChargeFlag("0");
pmCmdSlabDO.setFormPlateTime(now); //TODO 组板时间 创建时间 暂时默认为当前时间
pmCmdSlabDO.setPono(pmPdSlabDO.getPono());
pmCmdSlabDO.setMscLineNo(pmPdSlabDO.getMscLineNo());
pmCmdSlabDO.setIngotType(pmPdSlabDO.getIngotType());
pmCmdSlabDO.setIgMatDesignKind(pmPdSlabDO.getIgMatDesignKind());
pmCmdSlabDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSlabDO.setLastUpdatedBy(781L);
pmCmdSlabDO.setCreationDate(now);
pmCmdSlabDO.setLastUpdateDate(now);
pmCmdSlabDOList.add(pmCmdSlabDO);
}
//命令大板表
public void SetPmCmdLargePlt(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmCmdLargePltDO pmCmdLargePltDO = new PmCmdLargePltDO();
pmCmdLargePltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdLargePltDO.setLastUpdatedBy(781L);
pmCmdLargePltDOList.add(pmCmdLargePltDO);
}
public void SetPmCmdLargePlt(PmPdSlabDO pmPdSlabDO,GGrpCalRslt gGrpCalRslt){
PmCmdLargePltDO pmCmdLargePltDO = new PmCmdLargePltDO();
pmCmdLargePltDO.setPonoSlabNo(pmPdSlabDO.getVirtualSlabNo());
pmCmdLargePltDO.setTmpSlabNo(pmPdSlabDO.getVirtualSlabNo());
pmCmdLargePltDO.setSlabNo(pmPdSlabDO.getSlabNo());
pmCmdLargePltDO.setSlabDivNo(pmPdSlabDO.getSlabDivNo().intValue());
pmCmdLargePltDO.setPdStatusHp("18");
pmCmdLargePltDO.setFormPlateMode(pmPdSlabDO.getFormPlateMode());
pmCmdLargePltDO.setPickModeLenDir(pmPdSlabDO.getPickModeLenDir().intValue());
pmCmdLargePltDO.setPickModeWidDir(pmPdSlabDO.getPickModeWidDir().intValue());
pmCmdLargePltDO.setFurType(pmPdSlabDO.getFurType());
pmCmdLargePltDO.setAutoManualFlag(pmPdSlabDO.getAutoManualFlag());
pmCmdLargePltDO.setOrderRemainDiv(pmPdSlabDO.getOrderRemainDiv());
pmCmdLargePltDO.setMatDesignKind(pmPdSlabDO.getMatDesignKind());
pmCmdLargePltDO.setOrderNumInPlate(pmPdSlabDO.getOrderNumInPlate().intValue());
pmCmdLargePltDO.setTotSmallPlateNum(pmPdSlabDO.getTotSmallPlateNum().intValue());
pmCmdLargePltDO.setProdCodeHp("");//TODO 厚板品种代码 暂时默认为空
pmCmdLargePltDO.setAdTypeCode(pmPdSlabDO.getAdTypeCode());
pmCmdLargePltDO.setAdModeCode(pmPdSlabDO.getAdModeCode());
pmCmdLargePltDO.setUltCode(pmPdSlabDO.getUltCode());
pmCmdLargePltDO.setCoolCode(pmPdSlabDO.getCoolCode());
pmCmdLargePltDO.setCtrlRollCode(pmPdSlabDO.getCtrlRollCode());
//TODO PM_PD_SLAB虚拟板坯号等于virtual_slab_no的PROD_SIDE_MARK若为空或0则为C否则为PROD_SIDE_MARK 无PROD_SIDE_MARK这个字段
// if(pmPdSlabDO.getProdSideMark() == null || pmPdSlabDO.getProdSideMark().equals("") || pmPdSlabDO.getProdSideMark().equals("0")){
// pmCmdLargePltDO.setProdSideMark("C");
// }else{
// pmCmdLargePltDO.setProdSideMark(pmPdSlabDO.getProdSideMark());
// }
//TODO PM_PD_SLAB虚拟板坯号等于virtual_slab_no的PROD_SIDE_MARK若为空或0则为C否则为PROD_SIDE_MARK 无PROD_SIDE_MARK这个字段
pmCmdLargePltDO.setCutModeCode(pmPdSlabDO.getCutModeCode());
pmCmdLargePltDO.setHeadCut(pmPdSlabDO.getHeadCut().intValue());
pmCmdLargePltDO.setTailCut(pmPdSlabDO.getTailCut().intValue());
pmCmdLargePltDO.setSgSign(gGrpCalRslt.getLtActInfoGPreOrder().get(0).getInfoPmProContProdAttrDO().getSgSign());//TODO 轴合同的标准牌号 暂时取第一条合同信息
pmCmdLargePltDO.setSgSign(gGrpCalRslt.getLtActInfoGPreOrder().get(0).getInfoPmProContProdAttrDO().getSgSign());
pmCmdLargePltDO.setStNo(pmPdSlabDO.getStNo());
pmCmdLargePltDO.setTwoRollInterimFlag(String.valueOf(pmPdSlabDO.getTwoRollInterimFlag()));
pmCmdLargePltDO.setRollAimThick(pmPdSlabDO.getRollAimThick());
pmCmdLargePltDO.setRollAimWidth(pmPdSlabDO.getRollAimWidth());
pmCmdLargePltDO.setRollAimLen(pmPdSlabDO.getRollAimLen());
pmCmdLargePltDO.setRollThickTolMax(pmPdSlabDO.getRollThickTolMax());
pmCmdLargePltDO.setRollThickTolMin(pmPdSlabDO.getRollThickTolMin());
BigDecimal minThickTolMax = gGrpCalRslt.getLtActInfoGPreOrder().stream()
.map(order -> order.getThickTolMax().add(order.getThk()))
.min(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO);
pmCmdLargePltDO.setMaxRollThick(minThickTolMax);
BigDecimal maxThickTolMin = gGrpCalRslt.getLtActInfoGPreOrder().stream()
.map(order -> order.getThickTolMin().add(order.getThk()))
.max(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO);
pmCmdLargePltDO.setMinRollThick(maxThickTolMin);
pmCmdLargePltDO.setOrder1Thick(pmPdSlabDO.getOrderThickAxis());
pmCmdLargePltDO.setCombinePlateWidth(pmPdSlabDO.getCombinePlateWidth());
pmCmdLargePltDO.setCombinePlateLen(pmPdSlabDO.getCombinePlateLen());
pmCmdLargePltDO.setRollWtHp(pmPdSlabDO.getRollWtHp());
pmCmdLargePltDO.setNormYield(pmPdSlabDO.getNormYield());
pmCmdLargePltDO.setCommandYield(pmPdSlabDO.getCommandYield());
pmCmdLargePltDO.setRollYield(pmPdSlabDO.getRollYield());
pmCmdLargePltDO.setEdgerUseFlag(pmPdSlabDO.getEdgerUseFlag());
pmCmdLargePltDO.setBroadMasUseFlag(pmPdSlabDO.getBroadMasUseFlag());
pmCmdLargePltDO.setFormMasUseFlag(pmPdSlabDO.getFormMasUseFlag());
pmCmdLargePltDO.setRollDirectCode(pmPdSlabDO.getRollDirectCode());
pmCmdLargePltDO.setSampleLenHead(pmPdSlabDO.getSampleLenHead());
pmCmdLargePltDO.setSampleLenTail(pmPdSlabDO.getSampleLenTail());
pmCmdLargePltDO.setSampleLenMid(pmPdSlabDO.getSampleLenMid());
Optional<PmProContProdAttrDO> resultPmProContProdAttrDO = plistPmProContProdAttrDO.stream()
.filter(item -> gGrpCalRslt.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo())) //TODO 根据轴合同号查询生产合同产品属性表 暂时取第一条合同
.findFirst();
pmCmdLargePltDO.setSampleLenGive(resultPmProContProdAttrDO.get().getSampleLenGive());
pmCmdLargePltDO.setProdDensity(resultPmProContProdAttrDO.get().getProdDensity());
pmCmdLargePltDO.setPlateDtCode(resultPmProContProdAttrDO.get().getProjectCode());
pmCmdLargePltDO.setRsCode(pmPdSlabDO.getRsCode());
pmCmdLargePltDO.setBroadFlag(pmPdSlabDO.getBroadFlag());
pmCmdLargePltDO.setGFlag("");//TODO 气切可否 文档描述不清楚 暂时默认为空
pmCmdLargePltDO.setCsFlag(""); //TODO pmPdSlabDO 无 CsFlag() 暂时默认为空
pmCmdLargePltDO.setDsFlag(""); //TODO 若为G型组板0否则 取PM_PD_SLAB虚拟板坯号等于virtual_slab_no的同字段值 pmPdSlabDO 无 DsFlag() 暂时默认为空
pmCmdLargePltDO.setDssFlag("");//TODO 若为G型组板0否则取PM_PD_SLAB虚拟板坯号等于virtual_slab_no的同字段值 pmPdSlabDO 无 DssFlag() 暂时默认为空
pmCmdLargePltDO.setSsFlag("");//TODO 若为G型或A型组板0否则取PM_PD_SLAB虚拟板坯号等于virtual_slab_no的同字段值 pmPdSlabDO 无 SsFlag() 暂时默认为空
pmCmdLargePltDO.setFormPlateTime(now);
int count = gGrpCalRslt.getLtActInfoGPreOrder().size();
pmCmdLargePltDO.setOtherPlateNo1(SMALL_PLATE_DIV_NO[count]);
pmCmdLargePltDO.setOtherPlateNo2(SMALL_PLATE_DIV_NO[count+1]);
pmCmdLargePltDO.setOtherPlateNo3(SMALL_PLATE_DIV_NO[count+2]);
pmCmdLargePltDO.setOtherPlateNo4(SMALL_PLATE_DIV_NO[count+3]);
pmCmdLargePltDO.setMscLineNo(pmPdSlabDO.getMscLineNo());
pmCmdLargePltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdLargePltDO.setLastUpdatedBy(781L);
pmCmdLargePltDO.setCreationDate(now);
pmCmdLargePltDO.setLastUpdateDate(now);
pmCmdLargePltDOList.add(pmCmdLargePltDO);
}
//命令参数表
public void SetPmCmdCont(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmCmdContDO pmCmdContDO = new PmCmdContDO();
pmCmdContDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdContDO.setLastUpdatedBy(781L);
pmCmdContDOList.add(pmCmdContDO);
}
public void SetPmCmdCont(PmPdContSumDO pmPdContSumDO){
PmCmdContDO pmCmdContDO = new PmCmdContDO();
// pmCmdContDO.setPonoSlabNo(pmPdContSumDO.);
pmCmdContDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdContDO.setLastUpdatedBy(781L);
pmCmdContDO.setCreationDate(now);
pmCmdContDO.setLastUpdateDate(now);
pmCmdContDOList.add(pmCmdContDO);
}
//命令小板表
@ -1599,6 +1842,8 @@ if (plistQdToLineupResultCheDO==null)
PmCmdSmallPltDO pmCmdSmallPltDO = new PmCmdSmallPltDO();
pmCmdSmallPltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSmallPltDO.setLastUpdatedBy(781L);
pmCmdSmallPltDO.setCreationDate(now);
pmCmdSmallPltDO.setLastUpdateDate(now);
pmCmdSmallPltDOList.add(pmCmdSmallPltDO);
}
}

@ -23,6 +23,13 @@ import lombok.EqualsAndHashCode;
public class PmSmallPltPosDO implements Serializable {
private static final long serialVersionUID = 1L;
// 小板分割号取值数组 合同顺序号依次生成小板分割号100200、…、X00Y10Y20、…、YZ0Z10Z20、…、ZZ0
public static final String[] SMALL_PLATE_DIV_NO = {"100","200", "300", "400", "500", "600", "700", "800", "900"
,"A00", "B00", "C00", "D00", "E00", "F00", "G00", "H00", "J00", "K00", "L00", "M00", "N00", "P00", "Q00", "R00", "S00", "T00", "U00", "V00", "W00", "X00"
,"Y10", "Y20", "Y30", "Y40", "Y50", "Y60", "Y70", "Y80", "Y90"
,"YA0", "YB0", "YC0", "YD0", "YE0", "YF0", "YG0", "YH0", "YJ0", "YK0", "YL0", "YM0", "YN0", "YP0", "YQ0", "YR0", "YS0", "YT0", "YU0", "YV0", "YW0", "YX0", "YY0", "YZ0"
,"Z10", "Z20", "Z30", "Z40", "Z50", "Z60","Z70", "Z80", "Z90"
,"ZA0", "ZB0", "ZC0", "ZD0", "ZE0", "ZF0", "ZG0", "ZH0", "ZJ0", "ZK0", "ZL0", "ZM0", "ZN0", "ZP0", "ZQ0", "ZR0", "ZS0", "ZT0", "ZU0", "ZV0", "ZW0", "ZX0", "ZY0", "ZZ0"};
/**
* ID

Loading…
Cancel
Save