@ -3559,7 +3559,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -3671,7 +3671,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -3933,18 +3933,28 @@ namespace SlabHandle
}
else
{
if ( Math . Max( tSlab . WID , tSlab . REM_LEN ) < = 268 0)
if ( Math . Round( ( tSlab . THK / 1000 ) * ( tSlab . REM_LEN / 1000 ) * ( tSlab . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 100 0)
{
//按照剩余或者整个坯料的大小计算重量和板坯长度
tBPlateGrpMany . MAX_WGT = ( tSlab . THK / 1000 ) * ( tSlab . REM_LEN / 1000 ) * ( tSlab . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = tSlab . REM_LEN ;
if ( Math . Max ( tSlab . WID , tSlab . REM_LEN ) < = 2680 )
{
//按照剩余或者整个坯料的大小计算重量和板坯长度
tBPlateGrpMany . MAX_WGT = ( tSlab . THK / 1000 ) * ( tSlab . REM_LEN / 1000 ) * ( tSlab . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = tSlab . REM_LEN ;
}
else
{
//按照剩余或者整个坯料的大小计算重量和板坯长度
tBPlateGrpMany . MAX_WGT = ( tSlab . THK / 1000 ) * ( tSlab . ORG_LEN / 1000 ) * ( tSlab . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = tSlab . REM_LEN ;
}
}
else
{
//按照剩余或者整个坯料的大小计算重量和板坯长度
tBPlateGrpMany . MAX_WGT = ( tSlab . THK / 1000 ) * ( tSlab . ORG_LEN / 1000 ) * ( tSlab . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = tSlab . REM_LEN ;
//按照 计算出来的长宽计算重量与 长度
tBPlateGrpMany . MAX_WGT = ( t BPlateGrpMany. CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( tSlab . THK / 1000 ) * ( tSlab . WID / 1000 ) ) ) * 1000 ;
}
}
}
else
@ -4098,7 +4108,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -4364,7 +4374,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -4680,8 +4690,18 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
else
@ -4693,8 +4713,17 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
}
@ -5898,7 +5927,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -6075,7 +6104,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -6188,7 +6217,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -6453,8 +6482,17 @@ namespace SlabHandle
}
else
{
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
else
@ -6466,8 +6504,17 @@ namespace SlabHandle
}
else
{
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
}
@ -7359,7 +7406,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -7500,7 +7547,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -7665,7 +7712,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_T . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen3 ! = 0 )
{
//最大长度取相对比较小的值
@ -7760,7 +7807,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -8048,8 +8095,17 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
else
@ -8061,8 +8117,17 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
}
@ -8947,7 +9012,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -9047,7 +9112,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_S . CAL_THK
& & p . THK_MAX > iTbPlateGrp_S . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -9149,7 +9214,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_T . CAL_THK
& & p . THK_MAX > iTbPlateGrp_T . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_T . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen3 ! = 0 )
{
//最大长度取相对比较小的值
@ -9245,7 +9310,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_D . CAL_THK
& & p . THK_MAX > iTbPlateGrp_D . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_D . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen4 ! = 0 )
{
//最大长度取相对比较小的值
@ -9341,7 +9406,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -10044,7 +10109,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -10141,7 +10206,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_S . CAL_THK
& & p . THK_MAX > iTbPlateGrp_S . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -10241,7 +10306,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_T . CAL_THK
& & p . THK_MAX > iTbPlateGrp_T . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_T . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen3 ! = 0 )
{
//最大长度取相对比较小的值
@ -10323,7 +10388,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_D . CAL_THK
& & p . THK_MAX > iTbPlateGrp_D . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_D . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen4 ! = 0 )
{
//最大长度取相对比较小的值
@ -10418,7 +10483,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_E . CAL_THK
& & p . THK_MAX > iTbPlateGrp_E . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_E . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_E . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_E . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen5 ! = 0 )
{
//最大长度取相对比较小的值
@ -10519,7 +10584,7 @@ namespace SlabHandle
& & p . THK_MIN < = tBPlateGrpMany . CAL_THK
& & p . THK_MAX > tBPlateGrpMany . CAL_THK
& & p . ASROLL_WID_MIN < = tBPlateGrpMany . CAL_WID
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tBPlateGrpMany . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
decimal intMaxLen = tBPlateGrpMany . CUT_MAXLEN ;
@ -11005,8 +11070,17 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
else
@ -11018,8 +11092,17 @@ namespace SlabHandle
}
else
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
if ( Math . Round ( ( TSCopy . THK / 1000 ) * ( TSCopy . REM_LEN / 1000 ) * ( TSCopy . WID / 1000 ) / ( ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) ) , 3 ) < = tBPlateGrpMany . CUT_MAXLEN / 1000 )
{
tBPlateGrpMany . MAX_WGT = ( TSCopy . THK / 1000 ) * ( TSCopy . ORG_LEN / 1000 ) * ( TSCopy . ORG_WID / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = TSCopy . REM_LEN ;
}
else
{
tBPlateGrpMany . MAX_WGT = ( tBPlateGrpMany . CAL_THK / 1000 ) * ( tBPlateGrpMany . CAL_WID / 1000 ) * ( tBPlateGrpMany . MAX_LEN / 1000 ) * Convert . ToDecimal ( 7.85 ) ;
tBPlateGrpMany . SLAB_LEN = ( tBPlateGrpMany . MAX_WGT / ( Convert . ToDecimal ( 7.85 ) * ( TSCopy . THK / 1000 ) * ( TSCopy . WID / 1000 ) ) ) * 1000 ;
}
}
}
}
@ -17940,7 +18023,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -18157,7 +18240,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_S . CAL_THK
& & p . THK_MAX > iTbPlateGrp_S . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -20009,7 +20092,7 @@ namespace SlabHandle
& & p . THK_MIN < = tpg . CAL_THK
& & p . THK_MAX > tpg . CAL_THK
& & p . ASROLL_WID_MIN < = tpg . CAL_WID
& & p . ASROLL_WID_MAX > tpg . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tpg . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
//组内最大长度
GetMaxGrp ( tSlab , ref tpg , intMaxLen ) ;
@ -21561,7 +21644,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_F . CAL_THK
& & p . THK_MAX > iTbPlateGrp_F . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_F . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_F . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal intVal = Convert . ToDecimal ( LatestDate ) ;
if ( iTbPlateGrp_F . CAL_THK = = Convert . ToDecimal ( 11.60 ) & & iTbPlateGrp_F . CAL_WID = = 2085 )
{
@ -21773,7 +21856,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_S . CAL_THK
& & p . THK_MAX > iTbPlateGrp_S . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_S . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_S . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen2 ! = 0 )
{
//最大长度取相对比较小的值
@ -21988,7 +22071,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_T . CAL_THK
& & p . THK_MAX > iTbPlateGrp_T . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_T . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_T . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen3 ! = 0 )
{
//最大长度取相对比较小的值
@ -22185,7 +22268,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_D . CAL_THK
& & p . THK_MAX > iTbPlateGrp_D . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_D . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_D . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen4 ! = 0 )
{
//最大长度取相对比较小的值
@ -22381,7 +22464,7 @@ namespace SlabHandle
& & p . THK_MIN < = iTbPlateGrp_E . CAL_THK
& & p . THK_MAX > iTbPlateGrp_E . CAL_THK
& & p . ASROLL_WID_MIN < = iTbPlateGrp_E . CAL_WID
& & p . ASROLL_WID_MAX > iTbPlateGrp_E . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > iTbPlateGrp_E . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
if ( decCutMaxLen5 ! = 0 )
{
//最大长度取相对比较小的值
@ -24093,7 +24176,7 @@ namespace SlabHandle
& & p . THK_MIN < = tB_PLATE_GRP_THKGRP . CAL_THK
& & p . THK_MAX > tB_PLATE_GRP_THKGRP . CAL_THK
& & p . ASROLL_WID_MIN < = tB_PLATE_GRP_THKGRP . CAL_WID
& & p . ASROLL_WID_MAX > tB_PLATE_GRP_THKGRP . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tB_PLATE_GRP_THKGRP . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
//计算临时轧件长度
decimal Len = GetLenHeadTailCropTemp ( tB_PLATE_GRP_THKGRP . THK_GRP . OrderByDescending ( p = > p . WID ) . FirstOrDefault ( ) , tSlab , intMaxLen , ref cutLoss ) ; //两个母板去掉 多余的一个 头10 尾30 取样100
@ -24268,7 +24351,7 @@ namespace SlabHandle
& & p . THK_MIN < = tpgt . CAL_THK
& & p . THK_MAX > tpgt . CAL_THK
& & p . ASROLL_WID_MIN < = tpgt . CAL_WID
& & p . ASROLL_WID_MAX > tpgt . CAL_WID ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
& & p . ASROLL_WID_MAX > tpgt . CAL_WID ) . OrderByDescending( e = > e . STLGRD ) . FirstOrDefault( ) . ASROLL_LEN_MAX ;
decimal decHead = gltEpPlatelenM . Where ( p = > p . PLT = = tSlab . PLAN_MILL_PLT
& & p . APLY_ITEM = = "PLATELEN_M007"