sunhao 5 months ago
parent 6abb1e5df6
commit dcab12505b

@ -3559,7 +3559,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_F.CAL_THK && p.THK_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -3932,6 +3932,8 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (tSlab.THK / 1000) * (tSlab.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (tSlab.THK / 1000) * (tSlab.WID / 1000))) * 1000;
} }
else else
{
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 / 1000)
{ {
if (Math.Max(tSlab.WID, tSlab.REM_LEN) <= 2680) if (Math.Max(tSlab.WID, tSlab.REM_LEN) <= 2680)
{ {
@ -3946,6 +3948,14 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = tSlab.REM_LEN; tBPlateGrpMany.SLAB_LEN = tSlab.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) * (tSlab.THK / 1000) * (tSlab.WID / 1000))) * 1000;
}
}
} }
else else
{ {
@ -4098,7 +4108,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_F.CAL_THK && p.THK_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -4680,9 +4690,19 @@ namespace SlabHandle
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.REM_LEN / 1000) * (TSCopy.WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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 else
{ {
@ -4692,10 +4712,19 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000;
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.ORG_LEN / 1000) * (TSCopy.ORG_WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -6188,7 +6217,7 @@ namespace SlabHandle
&& p.THK_MIN <= tBPlateGrpMany.CAL_THK && p.THK_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -6453,9 +6482,18 @@ namespace SlabHandle
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.REM_LEN / 1000) * (TSCopy.WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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 else
{ {
@ -6466,9 +6504,18 @@ namespace SlabHandle
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.ORG_LEN / 1000) * (TSCopy.ORG_WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -7665,7 +7712,7 @@ namespace SlabHandle
&& p.THK_MIN <= tBPlateGrpMany.CAL_THK && p.THK_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_T.CAL_WID && 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) if (decCutMaxLen3 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -7760,7 +7807,7 @@ namespace SlabHandle
&& p.THK_MIN <= tBPlateGrpMany.CAL_THK && p.THK_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -8047,10 +8094,19 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000;
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.REM_LEN / 1000) * (TSCopy.WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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 else
{ {
@ -8060,10 +8116,19 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000;
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.ORG_LEN / 1000) * (TSCopy.ORG_WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= iTbPlateGrp_S.CAL_THK
&& p.THK_MAX > iTbPlateGrp_S.CAL_THK && p.THK_MAX > iTbPlateGrp_S.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -9149,7 +9214,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_T.CAL_THK && p.THK_MIN <= iTbPlateGrp_T.CAL_THK
&& p.THK_MAX > iTbPlateGrp_T.CAL_THK && p.THK_MAX > iTbPlateGrp_T.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_T.CAL_WID && 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) if (decCutMaxLen3 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -9245,7 +9310,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_D.CAL_THK && p.THK_MIN <= iTbPlateGrp_D.CAL_THK
&& p.THK_MAX > iTbPlateGrp_D.CAL_THK && p.THK_MAX > iTbPlateGrp_D.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_D.CAL_WID && 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) if (decCutMaxLen4 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -9341,7 +9406,7 @@ namespace SlabHandle
&& p.THK_MIN <= tBPlateGrpMany.CAL_THK && p.THK_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -10044,7 +10109,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_F.CAL_THK && p.THK_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= iTbPlateGrp_S.CAL_THK
&& p.THK_MAX > iTbPlateGrp_S.CAL_THK && p.THK_MAX > iTbPlateGrp_S.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -10241,7 +10306,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_T.CAL_THK && p.THK_MIN <= iTbPlateGrp_T.CAL_THK
&& p.THK_MAX > iTbPlateGrp_T.CAL_THK && p.THK_MAX > iTbPlateGrp_T.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_T.CAL_WID && 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) if (decCutMaxLen3 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -10323,7 +10388,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_D.CAL_THK && p.THK_MIN <= iTbPlateGrp_D.CAL_THK
&& p.THK_MAX > iTbPlateGrp_D.CAL_THK && p.THK_MAX > iTbPlateGrp_D.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_D.CAL_WID && 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) if (decCutMaxLen4 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -10418,7 +10483,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_E.CAL_THK && p.THK_MIN <= iTbPlateGrp_E.CAL_THK
&& p.THK_MAX > iTbPlateGrp_E.CAL_THK && p.THK_MAX > iTbPlateGrp_E.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_E.CAL_WID && 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) if (decCutMaxLen5 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -10519,7 +10584,7 @@ namespace SlabHandle
&& p.THK_MIN <= tBPlateGrpMany.CAL_THK && p.THK_MIN <= tBPlateGrpMany.CAL_THK
&& p.THK_MAX > tBPlateGrpMany.CAL_THK && p.THK_MAX > tBPlateGrpMany.CAL_THK
&& p.ASROLL_WID_MIN <= tBPlateGrpMany.CAL_WID && 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 intVal = Convert.ToDecimal(LatestDate);
decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN; decimal intMaxLen = tBPlateGrpMany.CUT_MAXLEN;
@ -11004,10 +11069,19 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000;
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.REM_LEN / 1000) * (TSCopy.WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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 else
{ {
@ -11017,10 +11091,19 @@ namespace SlabHandle
tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000; tBPlateGrpMany.SLAB_LEN = (tBPlateGrpMany.MAX_WGT / (Convert.ToDecimal(7.85) * (TSCopy.THK / 1000) * (TSCopy.WID / 1000))) * 1000;
} }
else 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.MAX_WGT = (TSCopy.THK / 1000) * (TSCopy.ORG_LEN / 1000) * (TSCopy.ORG_WID / 1000) * Convert.ToDecimal(7.85);
tBPlateGrpMany.SLAB_LEN = TSCopy.REM_LEN; 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_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= iTbPlateGrp_S.CAL_THK
&& p.THK_MAX > iTbPlateGrp_S.CAL_THK && p.THK_MAX > iTbPlateGrp_S.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -20009,7 +20092,7 @@ namespace SlabHandle
&& p.THK_MIN <= tpg.CAL_THK && p.THK_MIN <= tpg.CAL_THK
&& p.THK_MAX > tpg.CAL_THK && p.THK_MAX > tpg.CAL_THK
&& p.ASROLL_WID_MIN <= tpg.CAL_WID && 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); GetMaxGrp(tSlab, ref tpg, intMaxLen);
@ -21561,7 +21644,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_F.CAL_THK && p.THK_MIN <= iTbPlateGrp_F.CAL_THK
&& p.THK_MAX > iTbPlateGrp_F.CAL_THK && p.THK_MAX > iTbPlateGrp_F.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_F.CAL_WID && 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); decimal intVal = Convert.ToDecimal(LatestDate);
if (iTbPlateGrp_F.CAL_THK == Convert.ToDecimal(11.60) && iTbPlateGrp_F.CAL_WID == 2085) 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_MIN <= iTbPlateGrp_S.CAL_THK
&& p.THK_MAX > iTbPlateGrp_S.CAL_THK && p.THK_MAX > iTbPlateGrp_S.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_S.CAL_WID && 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) if (decCutMaxLen2 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -21988,7 +22071,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_T.CAL_THK && p.THK_MIN <= iTbPlateGrp_T.CAL_THK
&& p.THK_MAX > iTbPlateGrp_T.CAL_THK && p.THK_MAX > iTbPlateGrp_T.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_T.CAL_WID && 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) if (decCutMaxLen3 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -22185,7 +22268,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_D.CAL_THK && p.THK_MIN <= iTbPlateGrp_D.CAL_THK
&& p.THK_MAX > iTbPlateGrp_D.CAL_THK && p.THK_MAX > iTbPlateGrp_D.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_D.CAL_WID && 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) if (decCutMaxLen4 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -22381,7 +22464,7 @@ namespace SlabHandle
&& p.THK_MIN <= iTbPlateGrp_E.CAL_THK && p.THK_MIN <= iTbPlateGrp_E.CAL_THK
&& p.THK_MAX > iTbPlateGrp_E.CAL_THK && p.THK_MAX > iTbPlateGrp_E.CAL_THK
&& p.ASROLL_WID_MIN <= iTbPlateGrp_E.CAL_WID && 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) if (decCutMaxLen5 != 0)
{ {
//最大长度取相对比较小的值 //最大长度取相对比较小的值
@ -24093,7 +24176,7 @@ namespace SlabHandle
&& p.THK_MIN <= tB_PLATE_GRP_THKGRP.CAL_THK && p.THK_MIN <= tB_PLATE_GRP_THKGRP.CAL_THK
&& p.THK_MAX > 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_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 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_MIN <= tpgt.CAL_THK
&& p.THK_MAX > tpgt.CAL_THK && p.THK_MAX > tpgt.CAL_THK
&& p.ASROLL_WID_MIN <= tpgt.CAL_WID && 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 decimal decHead = gltEpPlatelenM.Where(p => p.PLT == tSlab.PLAN_MILL_PLT
&& p.APLY_ITEM == "PLATELEN_M007" && p.APLY_ITEM == "PLATELEN_M007"

@ -92,7 +92,7 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 "); strSql.AppendLine("WHERE 1 = 1 ");
//TODO:测试数据 //TODO:测试数据
//strSql.AppendLine(" AND A.SLAB_NO = '2410349608'"); strSql.AppendLine(" AND A.SLAB_NO = '2420642231'");
/// strSql.AppendLine(" AND A.SLAB_NO = '2331114206'"); /// strSql.AppendLine(" AND A.SLAB_NO = '2331114206'");

@ -90,7 +90,7 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 "); strSql.AppendLine("WHERE 1 = 1 ");
////TODO:测试数据 ////TODO:测试数据
strSql.AppendLine(" AND A.SLAB_NO = '2420459444'"); strSql.AppendLine(" AND A.SLAB_NO = '2410566831'");
//if (strWHere != string.Empty) //if (strWHere != string.Empty)
//{ //{
@ -195,7 +195,7 @@ namespace SlabHandle
strSql.AppendLine(" rank() over(partition by QQM.ord_no, QQM.ord_item order by knd desc) rk"); strSql.AppendLine(" rank() over(partition by QQM.ord_no, QQM.ord_item order by knd desc) rk");
strSql.AppendLine(" from NISCO.QP_QLTY_MATR QQM "); strSql.AppendLine(" from NISCO.QP_QLTY_MATR QQM ");
strSql.AppendLine(" where(QQM.ORD_NO || '-' || QQM.ORD_ITEM) IN( "); strSql.AppendLine(" where(QQM.ORD_NO || '-' || QQM.ORD_ITEM) IN( ");
strSql.AppendLine(" 'OM624050010-004','OMG24060013-001' "); strSql.AppendLine(" 'OM824070038-001' ");
//OMK24010042-002 //OMK24010042-002
@ -355,7 +355,7 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 "); strSql.AppendLine("WHERE 1 = 1 ");
strSql.AppendLine(" AND BOI.ORD_NO || '-' || BOI.ORD_ITEM IN ('OM624050010-004','OMG24060013-001')"); strSql.AppendLine(" AND BOI.ORD_NO || '-' || BOI.ORD_ITEM IN ('OM824070038-001')");
//strSql.AppendLine(" AND "); //strSql.AppendLine(" AND ");
//strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) "); //strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
@ -407,7 +407,7 @@ namespace SlabHandle
strSql.AppendLine("SELECT T.*FROM("); strSql.AppendLine("SELECT T.*FROM(");
strSql.AppendLine("SELECT QQC.*, rank() over(partition by QQC.ord_no, QQC.ord_item order by knd desc) rk from NISCO.QP_QLTY_CHEM QQC where (QQC.ORD_NO || '-' || QQC.ORD_ITEM) IN("); strSql.AppendLine("SELECT QQC.*, rank() over(partition by QQC.ord_no, QQC.ord_item order by knd desc) rk from NISCO.QP_QLTY_CHEM QQC where (QQC.ORD_NO || '-' || QQC.ORD_ITEM) IN(");
strSql.AppendLine(" 'OM624050010-004','OMG24060013-001'"); strSql.AppendLine(" 'OM824070038-001'");
//strSql.AppendLine("SELECT"); //strSql.AppendLine("SELECT");
//strSql.AppendLine("TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM)"); //strSql.AppendLine("TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM)");
//strSql.AppendLine("FROM NISCO.cp_prc CPP "); //strSql.AppendLine("FROM NISCO.cp_prc CPP ");
@ -1285,7 +1285,7 @@ namespace SlabHandle
strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = A.STLGRD"); strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = A.STLGRD");
strSql.AppendLine("WHERE 1 = 1 "); strSql.AppendLine("WHERE 1 = 1 ");
strSql.AppendLine(" AND A.SLAB_NO = '2420459444 '"); strSql.AppendLine(" AND A.SLAB_NO = '2410566831 '");
//strSql.AppendLine(" AND (A.CUR_INV IN('ZB','ZZ','HB','B1','52','C7','HC') " + //strSql.AppendLine(" AND (A.CUR_INV IN('ZB','ZZ','HB','B1','52','C7','HC') " +
@ -1360,7 +1360,7 @@ namespace SlabHandle
strSql.AppendLine(" FROM NISCO.FP_SLAB fs "); strSql.AppendLine(" FROM NISCO.FP_SLAB fs ");
strSql.AppendLine(" START WITH fs.SLAB_NO "); strSql.AppendLine(" START WITH fs.SLAB_NO ");
strSql.AppendLine(" IN "); strSql.AppendLine(" IN ");
strSql.AppendLine(" ( '2420459444' "); strSql.AppendLine(" ( '2410566831' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");
@ -1485,7 +1485,7 @@ namespace SlabHandle
strSql.AppendLine(" FROM NISCO.FP_SLAB fs "); strSql.AppendLine(" FROM NISCO.FP_SLAB fs ");
strSql.AppendLine(" START WITH fs.SLAB_NO "); strSql.AppendLine(" START WITH fs.SLAB_NO ");
strSql.AppendLine(" IN "); strSql.AppendLine(" IN ");
strSql.AppendLine(" ( '2420459444' "); strSql.AppendLine(" ( '2410566831' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");

Loading…
Cancel
Save