@ -411,13 +411,13 @@ public class SubController {
SetGrpConBinDataBySlab ( p ) ;
}
logger . info ( "***二次分组1数量*** " + gltGCalGrp . size ( ) ) ;
//执行日志保存
logger . info ( "***二次分组1数量*** " + gltGCalGrp . size ( ) ) ;
//执行日志保存
subLogStr + = "-----二次分组1数量: " + gltGCalGrp . size ( ) ;
logger . info ( "***二次分组2数量*** " + gltGCal2Grp . size ( ) ) ;
logger . info ( "***二次分组2数量*** " + gltGCal2Grp . size ( ) ) ;
//执行日志保存
//执行日志保存
subLogStr + = "-----二次分组2数量: " + gltGCal2Grp . size ( ) ;
gltGCalGrp . addAll ( gltGCal2Grp ) ;
@ -912,8 +912,6 @@ public class SubController {
//压缩比 Compression ratio
//宽展比 Wide ratio
//GCG.getLtInfoGPreOrder().stream().filter(e->e.)
//最大宽度
@ -924,7 +922,6 @@ public class SubController {
GCG . setLtInfoGPreOrder ( new CopyOnWriteArrayList < > ( ) ) ;
e . getLtInfoGPreOrder ( ) . forEach ( f - > {
try {
//同钢种判断
if ( ! SInfo . getStNo ( ) . equals ( f . getInfoPmContMscTechDO ( ) . getStNo ( ) ) )
@ -2028,6 +2025,8 @@ public class SubController {
GPO . setInfoQdToPoOrderDO ( qtpo ) ;
//内部钢种
GPO . setST_NO ( pcmt . getStNo ( ) ) ;
//产线
GPO . setLine ( pcmt . getMscLineNo ( ) ) ;
// 将创建的订单对象添加到全局订单列表中
gltOrder . add ( GPO ) ;
@ -2048,7 +2047,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 {
@ -2075,14 +2074,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 {
@ -2120,12 +2123,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 < > ( ) ) ; // 确保列表已初始化
@ -2142,6 +2147,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 ) ;
@ -3578,6 +3584,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 + + ) {
@ -3593,8 +3600,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 ) ) ;
@ -3619,6 +3626,7 @@ public class SubController {
SetPmCmdSmallPlt ( pmSmallPltPosDO , resultPmProContProdAttrDO . get ( ) , mscLineNo , organizationId ) ;
pmSmallPltPosDOList . add ( pmSmallPltPosDO ) ;
smallPlateNum + = 1 ;
}
} else {
GPreOrder gpo = ggcr . getLtActInfoGPreOrder ( ) . get ( j ) ;
@ -3635,7 +3643,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 取板方式 宽度方向 第一行
@ -3660,6 +3668,7 @@ public class SubController {
SetPmCmdSmallPlt ( pmSmallPltPosDO , resultPmProContProdAttrDO . get ( ) , mscLineNo , organizationId ) ;
pmSmallPltPosDOList . add ( pmSmallPltPosDO ) ;
smallPlateNum + = 1 ;
}
}
}
@ -3818,7 +3827,7 @@ public class SubController {
. findFirst ( ) ;
pmCmdLargePltDO . setSampleLenGive ( resultPmProContProdAttrDO . get ( ) . getSampleLenGive ( ) ) ;
pmCmdLargePltDO . setProdDensity ( resultPmProContProdAttrDO . get ( ) . getProdDensity ( ) ) ;
pmCmdLargePltDO . setPlateDtCode ( resultPmProContProdAttrDO. get ( ) . getProjec tCode( ) ) ;
pmCmdLargePltDO . setPlateDtCode ( pmContMscTechDO. getPlateD tCode( ) ) ;
pmCmdLargePltDO . setWithSideFlag ( resultPmProContProdAttrDO . get ( ) . getProdSideMark ( ) ) ;
pmCmdLargePltDO . setRsCode ( pmPdSlabDO . getRsCode ( ) ) ;
@ -4026,7 +4035,7 @@ public class SubController {
// subService.batchInsertPmCmdCont(pmCmdContDOList);
// System.out.println("PmCmdCont 命令参数 保存成功");
subService . SaveData ( p , pmPdSlabDOList , pmPdPlateCutDOList , pmPdBlockPosDOList , pmPdContSumDOList , pmSmallPltPosDOList , pmCmdSlabDOList , pmCmdLargePltDOList , pmCmdContDOList , pmCmdSmallPltDOList , plistpmSubHisDO , plistpmSubOrdDO , pmPdRecs , organizationId ,subLog );
subService . SaveData ( p , pmPdSlabDOList , pmPdPlateCutDOList , pmPdBlockPosDOList , pmPdContSumDOList , pmSmallPltPosDOList , pmCmdSlabDOList , pmCmdLargePltDOList , pmCmdContDOList , pmCmdSmallPltDOList , plistpmSubHisDO , plistpmSubOrdDO , pmPdRecs , organizationId );
}