更新数据处理,PmCmdCont,PmCmdSmallPlt

main
BKGY_MYT 2 days ago
parent e48188fc41
commit c51a0099e0

@ -19,8 +19,6 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.concurrent.*;
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;
@ -124,7 +122,7 @@ public class SubController {
private static List<QeTqSlabMacroResultDO> plistQeTqSlabMacroResultDO;
//板坯信息表
private static List<PmPdSlabInfoDO> plistPmPdSlabInfoDO; //TODO 需要添加此表信息的查询
//TODO 需要添加 QD_TO_PO_ORDER 的查询记录
private static Date now;
//endregion
@ -1338,15 +1336,15 @@ if (plistQdToLineupResultCheDO==null)
//设置保存数据
public void SetSaveDate(SlabInfoDO SInfo){
SetPmPdSlab(SInfo);//组板板坯表
SetPmPdSlab(SInfo);//组板板坯表 命令板坯表 命令大板表
SetPmPdPlateCut();//大板粗切位置表
SetPmPdBlockPos();//组合子板位置表
SetPmPdContSum(SInfo);//组板合同总量表
SetPmSmallPltPos();//组板小板位置表
SetPmPdContSum(SInfo);//组板合同总量表 命令参数表
SetPmSmallPltPos();//组板小板位置表 命令小板表
// SetPmCmdSlab();//命令板坯表
// SetPmCmdLargePlt();//命令大板表
// SetPmCmdCont();//命令参数表
SetPmCmdSmallPlt();//命令小板表
// SetPmCmdSmallPlt();//命令小板表
}
//组板板坯表
@ -1599,7 +1597,7 @@ if (plistQdToLineupResultCheDO==null)
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.setOrderLen(BigDecimal.valueOf(gPreOrders.get(0).getIntActLen()));
pmPdContSumDO.setOrderLenMax(BigDecimal.valueOf(gPreOrders.get(0).getInfoPmProContProdAttrDO().getOrderMaxLen()));
pmPdContSumDO.setOrderLenMin(BigDecimal.valueOf(gPreOrders.get(0).getInfoPmProContProdAttrDO().getOrderMinLen()));
@ -1612,7 +1610,7 @@ if (plistQdToLineupResultCheDO==null)
pmPdContSumDO.setLastUpdatedBy(781L);
pmPdContSumDO.setCreationDate(now);
pmPdContSumDO.setLastUpdateDate(now);
SetPmCmdCont(pmPdContSumDO);//命令参数表
SetPmCmdCont(pmPdContSumDO,gPreOrders.get(0));//命令参数表
pmPdContSumDOList.add(pmPdContSumDO);
}
}
@ -1653,6 +1651,8 @@ if (plistQdToLineupResultCheDO==null)
pmSmallPltPosDO.setLastUpdatedBy(781L);
pmSmallPltPosDO.setCreationDate(now);
pmSmallPltPosDO.setLastUpdateDate(now);
SetPmCmdSmallPlt(pmSmallPltPosDO);
pmSmallPltPosDOList.add(pmSmallPltPosDO);
}
}
@ -1823,12 +1823,87 @@ if (plistQdToLineupResultCheDO==null)
}
//命令参数表
public void SetPmCmdCont(PmPdContSumDO pmPdContSumDO){
public void SetPmCmdCont(PmPdContSumDO pmPdContSumDO, GPreOrder gPreOrder){
PmCmdContDO pmCmdContDO = new PmCmdContDO();
// pmCmdContDO.setPonoSlabNo(pmPdContSumDO.);
pmCmdContDO.setPonoSlabNo(pmPdContSumDO.getPdMatNo());
pmCmdContDO.setTmpSlabNo(pmPdContSumDO.getPdMatNo());
pmCmdContDO.setOrderNo(pmPdContSumDO.getOrderNo());
pmCmdContDO.setOrderSeqNo(pmPdContSumDO.getOrderSeqNo().longValue());
String orderNo = pmPdContSumDO.getOrderNo();
String mscLineNo = gPreOrder.getInfoPmContMscTechDO().getMscLineNo();
Optional<PmContMscTechDO> pmContMscTechDOItem = plistPmContMscTechDO.stream()
.filter(item -> orderNo.equals(item.getOrderNo()) && mscLineNo.equals(item.getMscLineNo()))
.findFirst();
pmCmdContDO.setWholeBacklog(pmContMscTechDOItem.get().getWholeBacklog());
pmCmdContDO.setStNo(pmContMscTechDOItem.get().getStNo());
Optional<PmPdSlabDO> pmPdSlabDOItem = pmPdSlabDOList.stream()
.filter(item -> pmPdContSumDO.getPdMatNo().equals(item.getVirtualSlabNo()))
.findFirst();
pmCmdContDO.setMatDesignKind(pmPdSlabDOItem.get().getMatDesignKind());
pmCmdContDO.setSlabNo(pmPdSlabDOItem.get().getSlabNo());
pmCmdContDO.setOrderTypeCode(gPreOrder.getInfoPmProContProdAttrDO().getOrderTypeCode());
pmCmdContDO.setExportFlag(String.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getExportFlag()));
pmCmdContDO.setFinCustCode(gPreOrder.getInfoPmProContProdAttrDO().getFinCustCode());
pmCmdContDO.setPsc(gPreOrder.getInfoPmProContProdAttrDO().getPsc());
pmCmdContDO.setApn(gPreOrder.getInfoPmProContProdAttrDO().getApn());
pmCmdContDO.setMsc(gPreOrder.getInfoPmProContProdAttrDO().getMsc());
pmCmdContDO.setProdCodeHp(gPreOrder.getInfoPmProContProdAttrDO().getProdCodeHp());
pmCmdContDO.setSgStd(gPreOrder.getInfoPmProContProdAttrDO().getSgStd());
pmCmdContDO.setSmallPlateLen(pmPdContSumDO.getOrderPlateNum());
pmCmdContDO.setProdSrMark(gPreOrder.getInfoPmProContProdAttrDO().getProdSrMark());
pmCmdContDO.setProdSideMark(gPreOrder.getInfoPmProContProdAttrDO().getProdSideMark());
pmCmdContDO.setProdShotMark(gPreOrder.getInfoPmProContProdAttrDO().getProdShotMark());
pmCmdContDO.setProdNMark(gPreOrder.getInfoPmProContProdAttrDO().getProdNMark());
pmCmdContDO.setProdQMark(gPreOrder.getInfoPmProContProdAttrDO().getProdQMark());
pmCmdContDO.setProdTMark(gPreOrder.getInfoPmProContProdAttrDO().getProdTMark());
pmCmdContDO.setProdAMark(gPreOrder.getInfoPmProContProdAttrDO().getProdAMark());
pmCmdContDO.setBacklogUtMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogUtMark());
pmCmdContDO.setBacklogQMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogQMark());
pmCmdContDO.setBacklogTMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogTMark());
pmCmdContDO.setBacklogAMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogAMark());
pmCmdContDO.setBacklogNMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogNMark());
pmCmdContDO.setBacklogDemagMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogDemagMark());
pmCmdContDO.setBacklogPtMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogPtMark());
pmCmdContDO.setBacklogMtMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogMtMark());
pmCmdContDO.setBacklogTmcpMark(gPreOrder.getInfoPmProContProdAttrDO().getBacklogTmcpMark());
pmCmdContDO.setUnitWtMax(gPreOrder.getInfoPmProContProdAttrDO().getOrderUnitMaxWt());
pmCmdContDO.setUnitWtMin(gPreOrder.getInfoPmProContProdAttrDO().getOrderUnitMinWt());
pmCmdContDO.setUnitWtAim(gPreOrder.getInfoPmProContProdAttrDO().getOrderUnitAimWt());
pmCmdContDO.setOrderThick(gPreOrder.getInfoPmProContProdAttrDO().getOrderThick());
pmCmdContDO.setOrderLen(BigDecimal.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getOrderLen()));
pmCmdContDO.setOrderWidth(gPreOrder.getInfoPmProContProdAttrDO().getOrderWidth());
pmCmdContDO.setWidthDiv(String.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getWidthDiv()));
pmCmdContDO.setWidthMin(gPreOrder.getInfoPmProContProdAttrDO().getWidthMin());
pmCmdContDO.setWidthMax(gPreOrder.getInfoPmProContProdAttrDO().getWidthMax());
pmCmdContDO.setLenDiv(String.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getLenDiv()));
pmCmdContDO.setOrderLenMin(BigDecimal.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getOrderMinLen()));
pmCmdContDO.setOrderLenMax(BigDecimal.valueOf(gPreOrder.getInfoPmProContProdAttrDO().getOrderMaxLen()));
pmCmdContDO.setSmallPlateThick(pmPdContSumDO.getSmallPlateThick());
pmCmdContDO.setSmallPlateWidth(pmPdContSumDO.getSmallPlateWidth());
pmCmdContDO.setSmallPlateLen(pmPdContSumDO.getSmallPlateLen());
pmCmdContDO.setTrimCode(gPreOrder.getInfoPmProContProdAttrDO().getTrimCode());
pmCmdContDO.setWidenMin(pmContMscTechDOItem.get().getWidenMin());
pmCmdContDO.setCompressMin(pmContMscTechDOItem.get().getCompressMin());
pmCmdContDO.setRollDirectCode(pmContMscTechDOItem.get().getRollDirectCode());
pmCmdContDO.setCtrlRollCode(pmContMscTechDOItem.get().getCtrlRollCode());
pmCmdContDO.setAdTypeCode(pmContMscTechDOItem.get().getAdTypeCode());
pmCmdContDO.setAdModeCode(pmContMscTechDOItem.get().getAdModeCode());
pmCmdContDO.setHotRectifyFlag(String.valueOf(pmContMscTechDOItem.get().getHotRectifyFlag()));
pmCmdContDO.setHeadCut(pmPdSlabDOItem.get().getHeadCut().intValue());
pmCmdContDO.setTailCut(pmPdSlabDOItem.get().getTailCut().intValue());
pmCmdContDO.setCutModeCode(pmContMscTechDOItem.get().getAdModeCode());
pmCmdContDO.setGFlag(String.valueOf(pmContMscTechDOItem.get().getGFlag()));
pmCmdContDO.setCsFlag(String.valueOf(pmContMscTechDOItem.get().getCsFlag()));
pmCmdContDO.setDssFlag(String.valueOf(pmContMscTechDOItem.get().getDssFlag()));
pmCmdContDO.setDsFlag(String.valueOf(pmContMscTechDOItem.get().getDsFlag()));
pmCmdContDO.setSsFlag(String.valueOf(pmContMscTechDOItem.get().getSsFlag()));
pmCmdContDO.setHeatTreatMode(pmContMscTechDOItem.get().getHeatTreatMode());
pmCmdContDO.setUltDetectMethodCode(pmContMscTechDOItem.get().getUltDetectMethodCode());
pmCmdContDO.setUltCode("");//TODO 遍根据合同号从质量模块MES合同主档QD_TO_PO_ORDER读取超声探伤标准1、超声探伤标2、超声探伤标3、超声探伤标4、超声探伤标5去重后所有数据用-’拼接成一条记录
pmCmdContDO.setMscLineNo(mscLineNo);
pmCmdContDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdContDO.setLastUpdatedBy(781L);
pmCmdContDO.setCreationDate(now);
@ -1837,15 +1912,29 @@ if (plistQdToLineupResultCheDO==null)
}
//命令小板表
public void SetPmCmdSmallPlt(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmCmdSmallPltDO pmCmdSmallPltDO = new PmCmdSmallPltDO();
pmCmdSmallPltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSmallPltDO.setLastUpdatedBy(781L);
pmCmdSmallPltDO.setCreationDate(now);
pmCmdSmallPltDO.setLastUpdateDate(now);
pmCmdSmallPltDOList.add(pmCmdSmallPltDO);
}
public void SetPmCmdSmallPlt(PmSmallPltPosDO pmSmallPltPosDO){
PmCmdSmallPltDO pmCmdSmallPltDO = new PmCmdSmallPltDO();
pmCmdSmallPltDO.setPonoSlabNo(pmSmallPltPosDO.getPdMatNo());
pmCmdSmallPltDO.setTmpSlabNo(pmSmallPltPosDO.getPdMatNo());
pmCmdSmallPltDO.setSmallPlateDivNo(pmSmallPltPosDO.getSmallPlateDivNo());
pmCmdSmallPltDO.setOrderNo(pmSmallPltPosDO.getOrderNo());
pmCmdSmallPltDO.setOrderSeqNo(Long.valueOf(pmSmallPltPosDO.getOrderSeqNo()));
pmCmdSmallPltDO.setSlabNo(pmSmallPltPosDO.getSlabNo());
pmCmdSmallPltDO.setPickModeWidDir(pmSmallPltPosDO.getPickModeWidDir());
pmCmdSmallPltDO.setPickModeLenDir(pmSmallPltPosDO.getPickModeLenDir());
pmCmdSmallPltDO.setOrderThick(pmSmallPltPosDO.getOrderThick());
pmCmdSmallPltDO.setOrderWidth(pmSmallPltPosDO.getOrderWidth());
pmCmdSmallPltDO.setOrderLen(BigDecimal.valueOf(pmSmallPltPosDO.getOrderLen()));
pmCmdSmallPltDO.setOrderLenMin(BigDecimal.valueOf(pmSmallPltPosDO.getOrderLenMin()));
pmCmdSmallPltDO.setOrderLenMax(BigDecimal.valueOf(pmSmallPltPosDO.getOrderLenMax()));
pmCmdSmallPltDO.setSmallPlateThick(pmSmallPltPosDO.getSmallPlateThick());
pmCmdSmallPltDO.setSmallPlateWidth(pmSmallPltPosDO.getSmallPlateWidth());
pmCmdSmallPltDO.setSmallPlateLen(BigDecimal.valueOf(pmSmallPltPosDO.getSmallPlateLen()));
pmCmdSmallPltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSmallPltDO.setLastUpdatedBy(781L);
pmCmdSmallPltDO.setCreationDate(now);
pmCmdSmallPltDO.setLastUpdateDate(now);
pmCmdSmallPltDOList.add(pmCmdSmallPltDO);
}
}

Loading…
Cancel
Save