|
|
|
@ -4330,18 +4330,24 @@ namespace SlabHandle
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).Count() > 0)
|
|
|
|
|
//获取分类
|
|
|
|
|
string strCLASS_FL = string.Empty;
|
|
|
|
|
if (cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
strCLASS_FL = cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).FirstOrDefault().CLASS_FL;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL ).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL== strCLASS_FL).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
foreach (TB_PLATE_FIC tpf in tpg.CRU_PIEs)
|
|
|
|
|
{
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
}
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
@ -4528,6 +4534,13 @@ namespace SlabHandle
|
|
|
|
|
&& glt.THK + ConverDataToDecimal(0.6) >= lt.THK
|
|
|
|
|
&& tpf2.ORD_LEN >= tpf1.ORD_LEN - 2000&& tpf2.ORD_LEN<=tpf1.ORD_LEN)
|
|
|
|
|
{
|
|
|
|
|
//获取分类
|
|
|
|
|
//获取分类
|
|
|
|
|
string strCLASS_FL = string.Empty;
|
|
|
|
|
if (cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
strCLASS_FL = cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).FirstOrDefault().CLASS_FL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool flag = false;
|
|
|
|
|
if (
|
|
|
|
@ -4536,20 +4549,20 @@ namespace SlabHandle
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).Count() > 0)
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
foreach (TB_PLATE_FIC tpf in tpg.CRU_PIEs)
|
|
|
|
|
{
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
@ -4682,6 +4695,13 @@ namespace SlabHandle
|
|
|
|
|
glt.THK - ConverDataToDecimal(0.6) <= lt.THK
|
|
|
|
|
&& glt.THK + ConverDataToDecimal(0.6) >= lt.THK)
|
|
|
|
|
{
|
|
|
|
|
//获取分类
|
|
|
|
|
//获取分类
|
|
|
|
|
string strCLASS_FL = string.Empty;
|
|
|
|
|
if (cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
strCLASS_FL = cP_NISCOs.Where(q => q.STDSPEC == glt.STDSPEC).FirstOrDefault().CLASS_FL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool flag = false;
|
|
|
|
|
if ((tpg.CRU_PIEs.Where(p => p.STLGRD != tSlab.STLGRD).Count() == 0 && lt.STLGRD == tSlab.STLGRD) ||
|
|
|
|
@ -4689,18 +4709,18 @@ namespace SlabHandle
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).Count() > 0)
|
|
|
|
|
if (tpg.CRU_PIEs.All(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL).Count() > 0) && cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
int ints = cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
foreach (TB_PLATE_FIC tpf in tpg.CRU_PIEs)
|
|
|
|
|
{
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
ints = cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ > ints ? ints : cP_NISCOs.Where(p => p.STDSPEC == tpf.Order.STDSPEC && p.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ;
|
|
|
|
|
}
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
if (ints == cP_NISCOs.Where(q => q.STDSPEC == lt.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ && lt.ChkDiffStdl == "1")
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
if (tpg.CRU_PIEs.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC && q.CLASS_FL == strCLASS_FL).FirstOrDefault().STL_SEQ == ints && ChkDiffStdl(tSlab, p.Order)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
@ -6234,48 +6254,44 @@ namespace SlabHandle
|
|
|
|
|
//if (tpg.GRP_ID >= 10000)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// if (tpg.CRU_PIEs_ACT.GroupBy(p => p.Order.STLGRD).Count() == 1 && tpg.CRU_PIEs_ACT.FirstOrDefault().STLGRD == iSlab.STLGRD)
|
|
|
|
|
//{
|
|
|
|
|
// tpg.ChkDiffStdl = "1";
|
|
|
|
|
// }
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// if (tpg.CRU_PIEs_ACT.GroupBy(p => p.Order.STLGRD).Count() == 1 && tpg.CRU_PIEs_ACT.FirstOrDefault().STLGRD == iSlab.STLGRD)
|
|
|
|
|
//{
|
|
|
|
|
// tpg.ChkDiffStdl = "1";
|
|
|
|
|
// }
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.GroupBy(p => p.Order.STDSPEC).Count() == 1 && ChkDiffStdl(iSlab, tpg.CRU_PIEs_ACT[0].Order))
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.GroupBy(p => p.Order.STDSPEC).Count() == 1 && ChkDiffStdl(iSlab, tpg.CRU_PIEs_ACT[0].Order))
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "1";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
IList<CP_NISCO_CHMC_SL> cP_NISCOs = glCpNiscoChmcSl.Where(p => p.ZZ_PLT == "C2"
|
|
|
|
|
&& p.STLGRD == iSlab.STLGRD
|
|
|
|
|
&& p.THK_MIN < tpg.THK
|
|
|
|
|
&& p.THK_MAX >= tpg.THK).ToList();
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).Count() == 0).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "0";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TB_PLATE_FIC tpf = tpg.CRU_PIEs_ACT.OrderBy(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ).FirstOrDefault();
|
|
|
|
|
int STL_SEQ = cP_NISCOs.Where(q => q.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ == STL_SEQ && ChkDiffStdl(iSlab, p.Order)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "1";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
IList<CP_NISCO_CHMC_SL> cP_NISCOs = glCpNiscoChmcSl.Where(p => p.ZZ_PLT == "C2"
|
|
|
|
|
&& p.STLGRD == iSlab.STLGRD
|
|
|
|
|
&& p.THK_MIN < tpg.THK
|
|
|
|
|
&& p.THK_MAX >= tpg.THK).ToList();
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).Count() == 0).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "0";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TB_PLATE_FIC tpf = tpg.CRU_PIEs_ACT.OrderBy(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ).FirstOrDefault();
|
|
|
|
|
int STL_SEQ = cP_NISCOs.Where(q => q.STDSPEC == tpf.Order.STDSPEC).FirstOrDefault().STL_SEQ;
|
|
|
|
|
if (tpg.CRU_PIEs_ACT.Where(p => cP_NISCOs.Where(q => q.STDSPEC == p.Order.STDSPEC).FirstOrDefault().STL_SEQ == STL_SEQ && ChkDiffStdl(iSlab, p.Order)).Count() > 0)
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "1";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
tpg.ChkDiffStdl = "0";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tpg.ChkDiffStdl = "0";
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
decimal YIELD_WGT = 0;
|
|
|
|
|
if (glYIElD_CONTROL.Where(p => p.STLGRD == tpg.STLGRD && p.PLT == "C2").Count() > 0)
|
|
|
|
|
{
|
|
|
|
|