all 更新数据处理,修改各表createby 和 lastupdateby 类型

main
BKGY_MYT 4 days ago
parent 0c06e5e668
commit b95da6eaef

@ -1281,20 +1281,29 @@ public class SubController {
//设置保存数据
public void SetSaveDate(SlabInfoDO SInfo){
SetPmPdSlab(SInfo);
SetPmPdSlab(SInfo);//组板板坯表
SetPmPdPlateCut();//大板粗切位置表
SetPmPdBlockPos();//组合子板位置表
SetPmPdContSum();//组板合同总量表
SetPmSmallPltPos();//组板小板位置表
SetPmCmdSlab();//命令板坯表
SetPmCmdLargePlt();//命令大板表
SetPmCmdCont();//命令参数表
SetPmCmdSmallPlt();//命令小板表
}
//组板板坯表
public void SetPmPdSlab(SlabInfoDO SInfo){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
GGrpCalRslt GGCR=gltGGrpCalRslt.get(i);
GGrpCalRslt ggcr=gltGGrpCalRslt.get(i);
PmPdSlabDO pmPdSlabDO = new PmPdSlabDO();
pmPdSlabDO.setPono(SInfo.getPono());
pmPdSlabDO.setSlabDivNo(BigDecimal.ZERO); //TODO 板坯分割号 未赋值 查询板坯号等于slab_no的组板板坯表的记录数+1
pmPdSlabDO.setVirtualSlabNo(GGCR.getVirtualSlabNo());
pmPdSlabDO.setSlabNo(GGCR.getSlabNo());
pmPdSlabDO.setVirtualSlabNo(ggcr.getVirtualSlabNo());
pmPdSlabDO.setSlabNo(ggcr.getSlabNo());
pmPdSlabDO.setMatDesignKind("S");
pmPdSlabDO.setPdStatusHp("12");
pmPdSlabDO.setPdResp("12"); // TODO 组板责任者 未赋值 操作人id
pmPdSlabDO.setPdResp("781"); // TODO 组板责任者 未赋值 操作人id
pmPdSlabDO.setFormPlateMode("FormPlateMode"); //TODO 组板方式 未赋值
pmPdSlabDO.setPickModeLenDir(BigDecimal.ZERO); //TODO 取板方式_长度方向 未赋值
pmPdSlabDO.setPickModeWidDir(BigDecimal.ZERO); //TODO 取板方式_宽度方向 未赋值
@ -1302,12 +1311,12 @@ public class SubController {
pmPdSlabDO.setAutoManualFlag("M");
pmPdSlabDO.setOrderRemainDiv("1");
pmPdSlabDO.setCanDelFlag("1");
List<String> orderNoList = GGCR.getLtActInfoGPreOrder().stream().map(GPreOrder::getOrderNo).distinct().collect(Collectors.toList());//根据实际合同信息 的合同号去重 取出板内合同个数
List<String> orderNoList = ggcr.getLtActInfoGPreOrder().stream().map(GPreOrder::getOrderNo).distinct().collect(Collectors.toList());//根据实际合同信息 的合同号去重 取出板内合同个数
pmPdSlabDO.setOrderNumInPlate(BigDecimal.valueOf(orderNoList.size()));
pmPdSlabDO.setTotSmallPlateNum(BigDecimal.valueOf(GGCR.getLtActInfoGPreOrder().size()));
pmPdSlabDO.setTotSmallPlateNum(BigDecimal.valueOf(ggcr.getLtActInfoGPreOrder().size()));
Optional<PmContMscTechDO> resultPmContMscTechDO = plistPmContMscTechDO.stream()
.filter(item -> GGCR.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo())) //TODO 根据轴合同号查询合同工艺表 暂时取第一条合同
.filter(item -> ggcr.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo())) //TODO 根据轴合同号查询合同工艺表 暂时取第一条合同
.findFirst();
pmPdSlabDO.setAdTypeCode(resultPmContMscTechDO.get().getAdTypeCode());
pmPdSlabDO.setAdModeCode(resultPmContMscTechDO.get().getAdModeCode());
@ -1320,7 +1329,7 @@ public class SubController {
String ultDetectMethodCode = "";
String coolCode = "";
// 遍历 组板合同列表
for (GPreOrder gPreOrder : GGCR.getLtActInfoGPreOrder()) {
for (GPreOrder gPreOrder : ggcr.getLtActInfoGPreOrder()) {
String orderNo = gPreOrder.getOrderNo();
String mscLineNo = gPreOrder.getInfoPmContMscTechDO().getMscLineNo();
@ -1345,15 +1354,15 @@ public class SubController {
pmPdSlabDO.setCoolCode(coolCode);
Optional<PmProContProdAttrDO> resultPmProContProdAttrDO = plistPmProContProdAttrDO.stream()
.filter(item -> GGCR.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo())) //TODO 根据轴合同号查询生产合同产品属性表 暂时取第一条合同
.filter(item -> ggcr.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo())) //TODO 根据轴合同号查询生产合同产品属性表 暂时取第一条合同
.findFirst();
pmPdSlabDO.setWithSideFlag(resultPmProContProdAttrDO.get().getProdSideMark());
pmPdSlabDO.setHeadCut(BigDecimal.valueOf(GGCR.getHead_Len()));
pmPdSlabDO.setTailCut(BigDecimal.valueOf(GGCR.getTail_Len()));
pmPdSlabDO.setHeadCut(BigDecimal.valueOf(ggcr.getHead_Len()));
pmPdSlabDO.setTailCut(BigDecimal.valueOf(ggcr.getTail_Len()));
String urgOrderFlag = "";
for (GPreOrder gPreOrder : GGCR.getLtActInfoGPreOrder()) {
for (GPreOrder gPreOrder : ggcr.getLtActInfoGPreOrder()) {
String orderNo = gPreOrder.getOrderNo();
// 根据 orderNo 和 mscLineNo 在 plistPmContMscTechDO 中查找匹配项
@ -1373,58 +1382,58 @@ public class SubController {
pmPdSlabDO.setPreCleanSlabThick(SInfo.getSlabActThk());
pmPdSlabDO.setPreCleanSlabWidth(SInfo.getSlabActWid());
pmPdSlabDO.setPreCleanSlabLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setPreCleanSlabMaxLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setPreCleanSlabMinLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
BigDecimal weight = SInfo.getSlabActThk().multiply(SInfo.getSlabActWid()).multiply(BigDecimal.valueOf(GGCR.getVirtualSlab_Len())).multiply(BigDecimal.valueOf(7.85));
pmPdSlabDO.setPreCleanSlabLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
pmPdSlabDO.setPreCleanSlabMaxLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
pmPdSlabDO.setPreCleanSlabMinLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
BigDecimal weight = SInfo.getSlabActThk().multiply(SInfo.getSlabActWid()).multiply(BigDecimal.valueOf(ggcr.getVirtualSlab_Len())).multiply(BigDecimal.valueOf(7.85));
pmPdSlabDO.setPreCleanSlabWt(weight);
pmPdSlabDO.setPreCleanSlabMaxWt(weight);
pmPdSlabDO.setPreCleanSlabMinWt(weight);
pmPdSlabDO.setInfurSlabThick(SInfo.getSlabActThk());
pmPdSlabDO.setInfurSlabWid(SInfo.getSlabActWid());
pmPdSlabDO.setInfurSlabLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabMaxLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabMinLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabMaxLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabMinLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
pmPdSlabDO.setInfurSlabWt(weight);
pmPdSlabDO.setInfurSlabMaxWt(weight);
pmPdSlabDO.setInfurSlabMinWt(weight);
pmPdSlabDO.setFixSlabLenFlag(0);
pmPdSlabDO.setFixSlabLen(BigDecimal.valueOf(GGCR.getVirtualSlab_Len()));
pmPdSlabDO.setFixSlabLen(BigDecimal.valueOf(ggcr.getVirtualSlab_Len()));
Optional<PmContMscTechDO> resultPmContMscTechDO1 = plistPmContMscTechDO.stream()
.filter(item -> GGCR.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo()) && GGCR.getLtActInfoGPreOrder().get(0).getInfoPmContMscTechDO().getMscLineNo().equals(item.getMscLineNo())) //TODO 根据轴合同号和产线号查询合同工艺表 暂时取第一条合同
.filter(item -> ggcr.getLtActInfoGPreOrder().get(0).getOrderNo().equals(item.getOrderNo()) && ggcr.getLtActInfoGPreOrder().get(0).getInfoPmContMscTechDO().getMscLineNo().equals(item.getMscLineNo())) //TODO 根据轴合同号和产线号查询合同工艺表 暂时取第一条合同
.findFirst();
pmPdSlabDO.setHpFlameCleanDiv(resultPmContMscTechDO1.get().getFlameCleanDiv());
pmPdSlabDO.setSlabFinishCode(resultPmContMscTechDO1.get().getSlabFinishCode());
Optional<PmPdSlabInfoDO> resultPmPdSlabInfoDO = plistPmPdSlabInfoDO.stream()
.filter(item -> GGCR.getSlabNo().equals(item.getSlabNo()))
.filter(item -> ggcr.getSlabNo().equals(item.getSlabNo()))
.findFirst();
pmPdSlabDO.setSlabPlaceCode(resultPmPdSlabInfoDO.get().getSlabPlaceCode());
pmPdSlabDO.setRollAimThick(GGCR.getCal_Thk());
pmPdSlabDO.setRollAimWidth(BigDecimal.valueOf(GGCR.getCal_Wid()));
pmPdSlabDO.setRollAimLen(BigDecimal.valueOf(GGCR.getCal_Len()));
pmPdSlabDO.setOrderThickAxis(GGCR.getLtActInfoGPreOrder().get(0).getThk());
pmPdSlabDO.setCombinePlateWidth(BigDecimal.valueOf(GGCR.getLtActInfoGPreOrder().get(0).getWid()));
pmPdSlabDO.setCombinePlateLen(BigDecimal.valueOf(GGCR.getLtActInfoGPreOrder().get(0).getLen()));
pmPdSlabDO.setRollAimThick(ggcr.getCal_Thk());
pmPdSlabDO.setRollAimWidth(BigDecimal.valueOf(ggcr.getCal_Wid()));
pmPdSlabDO.setRollAimLen(BigDecimal.valueOf(ggcr.getCal_Len()));
pmPdSlabDO.setOrderThickAxis(ggcr.getLtActInfoGPreOrder().get(0).getThk());
pmPdSlabDO.setCombinePlateWidth(BigDecimal.valueOf(ggcr.getLtActInfoGPreOrder().get(0).getWid()));
pmPdSlabDO.setCombinePlateLen(BigDecimal.valueOf(ggcr.getLtActInfoGPreOrder().get(0).getLen()));
pmPdSlabDO.setRollWtHp(weight);
BigDecimal minThickTolMax = GGCR.getLtActInfoGPreOrder().stream()
BigDecimal minThickTolMax = ggcr.getLtActInfoGPreOrder().stream()
.map(GPreOrder::getThickTolMax)
.min(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO);
pmPdSlabDO.setRollThickTolMax(minThickTolMax);
BigDecimal maxThickTolMin = GGCR.getLtActInfoGPreOrder().stream()
BigDecimal maxThickTolMin = ggcr.getLtActInfoGPreOrder().stream()
.map(GPreOrder::getThickTolMin)
.max(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO);
pmPdSlabDO.setRollThickTolMin(maxThickTolMin);
BigDecimal yield = (GGCR.getLtActInfoGPreOrder().stream()
BigDecimal yield = (ggcr.getLtActInfoGPreOrder().stream()
.map(gPreOrder -> BigDecimal.valueOf(gPreOrder.getWid()).multiply(gPreOrder.getThk()).multiply(BigDecimal.valueOf(gPreOrder.getLen())))
.reduce(BigDecimal.ZERO, BigDecimal::add))
.multiply(BigDecimal.valueOf(7.85))
@ -1437,23 +1446,108 @@ public class SubController {
pmPdSlabDO.setBroadMasUseFlag("N");
pmPdSlabDO.setFormMasUseFlag("N");
pmPdSlabDO.setRollDirectCode("L"); //TODO 轧制方向代码 横轧C纵轧L 暂时默认L
pmPdSlabDO.setSampleLenHead(GGCR.getSmp_Len());//TODO 头尾中 试样长度 暂时默认试样长度
pmPdSlabDO.setSampleLenTail(GGCR.getSmp_Len());
pmPdSlabDO.setSampleLenMid(GGCR.getSmp_Len());
pmPdSlabDO.setSampleLenHead(ggcr.getSmp_Len());//TODO 头尾中 试样长度 暂时默认试样长度
pmPdSlabDO.setSampleLenTail(ggcr.getSmp_Len());
pmPdSlabDO.setSampleLenMid(ggcr.getSmp_Len());
pmPdSlabDO.setRsCode("0");
if(BigDecimal.valueOf(GGCR.getCal_Wid()).compareTo(SInfo.getSlabActWid()) > 0){
if(BigDecimal.valueOf(ggcr.getCal_Wid()).compareTo(SInfo.getSlabActWid()) > 0){
pmPdSlabDO.setBroadFlag("1"); //需要展宽
}else{
pmPdSlabDO.setBroadFlag("0");
}
pmPdSlabDO.setOrderNoAxis(GGCR.getLtActInfoGPreOrder().get(0).getOrderNo());//TODO 轴合同号 暂时取第一个订单号
pmPdSlabDO.setOrderNoAxis(ggcr.getLtActInfoGPreOrder().get(0).getOrderNo());//TODO 轴合同号 暂时取第一个订单号
pmPdSlabDO.setMscLineNo("1030"); //TODO 产线号暂时默认1030
pmPdSlabDO.setTransFlag(BigDecimal.valueOf(0));
pmPdSlabDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdSlabDO.setLastUpdatedBy(781L);
pmPdSlabDOList.add(pmPdSlabDO);
}
}
//大板粗切位置表
public void SetPmPdPlateCut(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
GGrpCalRslt ggcr=gltGGrpCalRslt.get(i);
PmPdPlateCutDO pmPdPlateCutDO = new PmPdPlateCutDO();
pmPdPlateCutDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdPlateCutDO.setLastUpdatedBy(781L);
pmPdPlateCutDOList.add(pmPdPlateCutDO);
}
}
//组合子板位置表
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);
}
}
//组板合同总量表
public void SetPmPdContSum(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmPdContSumDO pmPdContSumDO = new PmPdContSumDO();
pmPdContSumDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmPdContSumDO.setLastUpdatedBy(781L);
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);
}
}
//命令板坯表
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 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 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 SetPmCmdSmallPlt(){
for(int i = 0; i < gltGGrpCalRslt.size(); i++){
PmCmdSmallPltDO pmCmdSmallPltDO = new PmCmdSmallPltDO();
pmCmdSmallPltDO.setCreatedBy(781L);//TODO 创建人修改人暂时默认781 BKGY
pmCmdSmallPltDO.setLastUpdatedBy(781L);
pmCmdSmallPltDOList.add(pmCmdSmallPltDO);
}
}
}

@ -805,12 +805,12 @@ public class PmCmdContDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -1060,12 +1060,12 @@ public class PmCmdLargePltDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -415,12 +415,12 @@ public class PmCmdSlabDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -170,12 +170,12 @@ public class PmCmdSmallPltDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -88,12 +88,12 @@ public class PmPdBlockPosDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -138,12 +138,12 @@ public class PmPdContSumDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -68,12 +68,12 @@ public class PmPdPlateCutDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -623,12 +623,12 @@ public class PmPdSlabDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

@ -133,12 +133,12 @@ public class PmSmallPltPosDO implements Serializable {
/**
* ID
*/
private BigDecimal createdBy;
private Long createdBy;
/**
* ID
*/
private BigDecimal lastUpdatedBy;
private Long lastUpdatedBy;
/**
*

Loading…
Cancel
Save