sunhao 4 months ago
parent 4ed99c415c
commit b856678bd1

@ -928,7 +928,7 @@ namespace ibk.IPD.Controller.IPD_PS
{ {
strWHerePlate += " AND (GP.PROD_DATE > TO_CHAR(SYSdate + '" + intPLATE_DAYS_DIFF.ToString() + "' ,'yyyyMMdd') or GP.STLGRD in ( SELECT STLGRD FROM NISCO.QP_NISCO_CHMC WHERE STLGRD_FL='N' AND STLGRD IN('A20050NIQQT', 'A20051NIQQT', 'A20090NIQQT', 'A20092NIQQT', 'A20093NIQQT')))"; strWHerePlate += " AND (GP.PROD_DATE > TO_CHAR(SYSdate + '" + intPLATE_DAYS_DIFF.ToString() + "' ,'yyyyMMdd') or GP.STLGRD in ( SELECT STLGRD FROM NISCO.QP_NISCO_CHMC WHERE STLGRD_FL='N' AND STLGRD IN('A20050NIQQT', 'A20051NIQQT', 'A20090NIQQT', 'A20092NIQQT', 'A20093NIQQT')))";
//测试test指定 //测试test指定
//strWHerePlate += " AND GP.PLATE_NO in ('23211884040101')"; //strWHerePlate += " AND GP.PLATE_NO in ('24205447320101')";
} }
//余材自动替代周期 //余材自动替代周期
if (intORD_DAYS_DIFF != 0) if (intORD_DAYS_DIFF != 0)
@ -936,7 +936,7 @@ namespace ibk.IPD.Controller.IPD_PS
//strWHereOrd += " AND boi.CUST_DEL_TO_DATE > TO_CHAR(SYSdate + '" + intORD_DAYS_DIFF.ToString() + "' ,'yyyyMMdd')"; //strWHereOrd += " AND boi.CUST_DEL_TO_DATE > TO_CHAR(SYSdate + '" + intORD_DAYS_DIFF.ToString() + "' ,'yyyyMMdd')";
//测试test指定 //测试test指定
//strWHereOrd += " AND boi.ORD_NO='OMM24050019' AND boi.ORD_ITEM='085'"; //strWHereOrd += " AND boi.ORD_NO='OMD24070005' AND boi.ORD_ITEM='096'";
strWHereOrd += " AND (boi.CUST_DEL_TO_DATE > TO_CHAR(SYSdate + '" + intORD_DAYS_DIFF.ToString() + "' ,'yyyyMMdd') or boi.STLGRD in ( SELECT STLGRD FROM NISCO.QP_NISCO_CHMC WHERE STLGRD_FL='N' AND STLGRD IN('A20050NIQQT','A20051NIQQT','A20090NIQQT','A20092NIQQT','A20093NIQQT'))) "; strWHereOrd += " AND (boi.CUST_DEL_TO_DATE > TO_CHAR(SYSdate + '" + intORD_DAYS_DIFF.ToString() + "' ,'yyyyMMdd') or boi.STLGRD in ( SELECT STLGRD FROM NISCO.QP_NISCO_CHMC WHERE STLGRD_FL='N' AND STLGRD IN('A20050NIQQT','A20051NIQQT','A20090NIQQT','A20092NIQQT','A20093NIQQT'))) ";
} }
@ -7929,20 +7929,23 @@ namespace ibk.IPD.Controller.IPD_PS
// && Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT) // && Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT)
// && itemQP_QLTY_CHEM.CHEM_COMP_CD + itemQP_QLTY_CHEM.FOMULA_CD == p.CHEM_COMP_CD).ToList(); // && itemQP_QLTY_CHEM.CHEM_COMP_CD + itemQP_QLTY_CHEM.FOMULA_CD == p.CHEM_COMP_CD).ToList();
//2024/1/4 改 //CEQ 特殊处理
List<QP_CHEM_RSLT> ltCheck = ltQPChemRslt.Where if (itemQP_QLTY_CHEM.CHEM_COMP_CD.ToUpper() == "CEQ")
(p => Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MIN) <= Convert.ToDecimal(p.CHEM_RSLT)
&& Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT)
&& (itemQP_QLTY_CHEM.CHEM_COMP_CD + itemQP_QLTY_CHEM.FOMULA_CD == p.CHEM_COMP_CD || itemQP_QLTY_CHEM.CHEM_COMP_CD == p.CHEM_COMP_CD)).ToList();
if (ltCheck.Count == 0)
{ {
if (itemQP_QLTY_CHEM.CHEM_COMP_CD == "N" && ltQPChemRslt.Where(p => p.CHEM_COMP_CD == "N").ToList().Count == 0) //CEQ 字符串
{ string strCEQ = (itemQP_QLTY_CHEM.CHEM_COMP_CD + ConverDataToString(itemQP_QLTY_CHEM.FOMULA_CD)).Trim();
prP_PLATE.SUB_FULL = "P"; //CEQ 字符串长度
prP_PLATE.SUB_LACK_CON = prP_PLATE.SUB_LACK_CON + "/化学成分N"; int intSub = strCEQ.Length;
}
else //2024/1/4 改
List<QP_CHEM_RSLT> ltCheck = ltQPChemRslt.Where
(p => Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MIN) <= Convert.ToDecimal(p.CHEM_RSLT)
&& Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT)
&& (strCEQ == (p.CHEM_COMP_CD + ConverDataToString(p.FOMULA_CD)).Trim())).ToList();
if (ltCheck.Count == 0)
{ {
COM_DATA CD = new COM_DATA(); COM_DATA CD = new COM_DATA();
CD.PLATE_NO = prP_PLATE.PLATE_NO; CD.PLATE_NO = prP_PLATE.PLATE_NO;
CD.ORD_NO = prorde.ORD_NO; CD.ORD_NO = prorde.ORD_NO;
@ -7953,9 +7956,68 @@ namespace ibk.IPD.Controller.IPD_PS
//不满足返回false //不满足返回false
//logger.InfoFormat("钢板:{0},订单号:{1}-{2},钢板炉号化学成分不满足订单", prP_PLATE.PLATE_NO, prorde.ORD_NO, prorde.ORD_ITEM); //logger.InfoFormat("钢板:{0},订单号:{1}-{2},钢板炉号化学成分不满足订单", prP_PLATE.PLATE_NO, prorde.ORD_NO, prorde.ORD_ITEM);
return false; return false;
} }
}
else
{
//2024/1/4 改
List<QP_CHEM_RSLT> ltCheck = ltQPChemRslt.Where
(p => Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MIN) <= Convert.ToDecimal(p.CHEM_RSLT)
&& Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT)
&& (itemQP_QLTY_CHEM.CHEM_COMP_CD + itemQP_QLTY_CHEM.FOMULA_CD == p.CHEM_COMP_CD || itemQP_QLTY_CHEM.CHEM_COMP_CD == p.CHEM_COMP_CD)).ToList();
if (ltCheck.Count == 0)
{
if (itemQP_QLTY_CHEM.CHEM_COMP_CD == "N" && ltQPChemRslt.Where(p => p.CHEM_COMP_CD == "N").ToList().Count == 0)
{
prP_PLATE.SUB_FULL = "P";
prP_PLATE.SUB_LACK_CON = prP_PLATE.SUB_LACK_CON + "/化学成分N";
}
else
{
COM_DATA CD = new COM_DATA();
CD.PLATE_NO = prP_PLATE.PLATE_NO;
CD.ORD_NO = prorde.ORD_NO;
CD.ORD_ITEM = prorde.ORD_ITEM;
CD.Chem = "1"; //化学特性
//gCOM_DATA.Add(CD);//全局变量添加对不结果数据
//不满足返回false
//logger.InfoFormat("钢板:{0},订单号:{1}-{2},钢板炉号化学成分不满足订单", prP_PLATE.PLATE_NO, prorde.ORD_NO, prorde.ORD_ITEM);
return false;
}
}
} }
////2024/1/4 改
//List<QP_CHEM_RSLT> ltCheck = ltQPChemRslt.Where
// (p => Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MIN) <= Convert.ToDecimal(p.CHEM_RSLT)
// && Convert.ToDecimal(itemQP_QLTY_CHEM.CHEM_COMP_MAX) >= Convert.ToDecimal(p.CHEM_RSLT)
// && (itemQP_QLTY_CHEM.CHEM_COMP_CD + itemQP_QLTY_CHEM.FOMULA_CD == p.CHEM_COMP_CD || itemQP_QLTY_CHEM.CHEM_COMP_CD == p.CHEM_COMP_CD)).ToList();
//if (ltCheck.Count == 0)
//{
// if (itemQP_QLTY_CHEM.CHEM_COMP_CD == "N" && ltQPChemRslt.Where(p => p.CHEM_COMP_CD == "N").ToList().Count == 0)
// {
// prP_PLATE.SUB_FULL = "P";
// prP_PLATE.SUB_LACK_CON = prP_PLATE.SUB_LACK_CON + "/化学成分N";
// }
// else
// {
// COM_DATA CD = new COM_DATA();
// CD.PLATE_NO = prP_PLATE.PLATE_NO;
// CD.ORD_NO = prorde.ORD_NO;
// CD.ORD_ITEM = prorde.ORD_ITEM;
// CD.Chem = "1"; //化学特性
// //gCOM_DATA.Add(CD);//全局变量添加对不结果数据
// //不满足返回false
// //logger.InfoFormat("钢板:{0},订单号:{1}-{2},钢板炉号化学成分不满足订单", prP_PLATE.PLATE_NO, prorde.ORD_NO, prorde.ORD_ITEM);
// return false;
// }
//}
} }
catch (Exception) catch (Exception)
{ {

Loading…
Cancel
Save