Compare commits

...

5 Commits

Author SHA1 Message Date
sunhao 340d629fe0 1 7 months ago
sunhao 4fc445812e 1 7 months ago
sunhao 6e3c2e164c 1 7 months ago
sunhao f779db187d 取样费用方法更改 7 months ago
sunhao 278f3c1663 1 7 months ago

@ -339,7 +339,6 @@ namespace SlabHandle
try
{
glLtPlateFilter = new List<string>();
glFbSlabDes_T = new List<FP_SLAB_DES>();
@ -767,12 +766,19 @@ namespace SlabHandle
//////根据宽度做分组多线程
SetPlateGroupTask(gltTbPlateGrp, iSlab);
//if (iSlab.SLAB_NO.Contains("2420317") && iSlab.STEEL_GRD_DETAIL.Contains("S355J-2"))
//{
// iSlab.ORD_NO = "OMK24040059";
// iSlab.ORD_ITEM = "015";
//}
//var lt = gltTbPlateUseGrp.Where(p => p.CRU_PIEs.Where(e => e.Order.STDSPEC.Contains("-SANY")).Count() > 0);
//if (gltTbPlateUseGrp.Where(p => p.CRU_PIEs.Where(e => e.Order.STDSPEC.Contains("-SANY")).Count() > 0).Count()>0)
//{
//}
if (iSlab.SLAB_NO.Contains("2420317") && iSlab.STEEL_GRD_DETAIL.Contains("S355J-2"))
{
iSlab.ORD_NO = "OMK24040059";
iSlab.ORD_ITEM = "015";
}
//分析数据
if (glStrAnalyse == "1")
{
@ -1466,7 +1472,7 @@ namespace SlabHandle
try
{
//OM423070031 004 005
if (iPlateGrp.CRU_PIEs.Where(p => p.ORD_NO == "OMC24050001" && p.ORD_ITEM == "017").Count() > 0)
if (iPlateGrp.CRU_PIEs.Where(p => p.ORD_NO == "OMK24050015" && p.ORD_ITEM == "009").Count() > 0)
{
}
//GB / T713 - Q245R
@ -1712,7 +1718,7 @@ namespace SlabHandle
continue;
}
if (iPlateFic.ORD_NO == "OMK23110028" && iPlateFic.ORD_ITEM == "004")
if (iPlateFic.ORD_NO == "OMK24050015" && iPlateFic.ORD_ITEM == "009")
{
}
@ -15564,7 +15570,7 @@ namespace SlabHandle
}
//修改一下程序管控,轧制标准号后缀-SANY 次头尾坯不能替代现在头尾坯是管控的因为有G1次头尾坯也要管控住 2024-05-06 武振
if (BOI.STDSPEC == "-SANY" )
if (BOI.STDSPEC.Contains("-SANY") )
{
logger.InfoFormat(" ####次头尾坯不能轧制 -SANY :{0}-{1}", BOI.ORD_NO, BOI.ORD_ITEM);
return true;

@ -96,13 +96,13 @@ namespace SlabHandle
/// strSql.AppendLine(" AND A.SLAB_NO = '2331114206'");
//strSql.AppendLine(" AND A.SLAB_NO IN ('2410328131'");
//strSql.AppendLine(",'2420364440'");
////strSql.AppendLine(",'2331085505'");
////strSql.AppendLine(",'2331085504'");
////strSql.AppendLine(",'2331085503'");
//strSql.AppendLine(" AND A.SLAB_NO IN ('2430408333'");
//strSql.AppendLine(",'2430408334'");
//strSql.AppendLine(",'2430408335'");
//strSql.AppendLine(",'2420426231'");
//strSql.AppendLine(",'2420426232'");
////strSql.AppendLine(",'2331085601'");
//strSql.AppendLine(",'2430306439')");
//strSql.AppendLine(",'2430408336')");
//strSql.AppendLine(" AND A.SLAB_NO IN ( ");

@ -90,7 +90,7 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 ");
////TODO:测试数据
strSql.AppendLine(" AND A.SLAB_NO = '2310768931'");
strSql.AppendLine(" AND A.SLAB_NO = '2430408334'");
//if (strWHere != string.Empty)
//{
@ -194,38 +194,39 @@ namespace SlabHandle
strSql.AppendLine(" SELECT* FROM(SELECT QQM.*,");
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(" where(QQM.ORD_NO || '-' || QQM.ORD_ITEM) IN( ");
strSql.AppendLine(" 'OMK24040013-005' ");
//strSql.AppendLine(" where(QQM.ORD_NO || '-' || QQM.ORD_ITEM) IN( ");
strSql.AppendLine(" where(QQM.ORD_NO, QQM.ORD_ITEM) IN( ");
//strSql.AppendLine(" 'OMK24050015-009' ");
//OMK24010042-002
//strSql.AppendLine(" SELECT ");
//strSql.AppendLine(" TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM) ");
//strSql.AppendLine("FROM NISCO.cp_prc CPP ");
//strSql.AppendLine("INNER JOIN ");
//strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
//strSql.AppendLine("ON BOI.ORD_NO = CPP.ORD_NO ");
//strSql.AppendLine("AND BOI.ORD_ITEM = CPP.ORD_ITEM ");
//strSql.AppendLine("AND BOI.ORD_WID<> 0 ");
//strSql.AppendLine("AND BOI.ORD_LEN<> 0 ");
//strSql.AppendLine("AND BOI.ORD_THK<> 0 ");
//strSql.AppendLine("WHERE 1=1 ");// ROUND(CPP.ORD_REM_WGT / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 1");
//strSql.AppendLine(" AND ");
//strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
//strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
//strSql.AppendLine(" WHERE ");
//strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
//strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
//strSql.AppendLine(" AND A.SEQ >= '01' ");
//strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
//strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85) )>= 0.95");
//strSql.AppendLine(" AND boi.PROD_CD = 'PP' ");
//strSql.AppendLine(" AND boi.REC_STS = '2' ");
//strSql.AppendLine(" and boi.ORD_STS IN('E') ");
//strSql.AppendLine(" AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
//strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
//strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
//strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
strSql.AppendLine(" SELECT ");
strSql.AppendLine(" TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM) ");
strSql.AppendLine("FROM NISCO.cp_prc CPP ");
strSql.AppendLine("INNER JOIN ");
strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
strSql.AppendLine("ON BOI.ORD_NO = CPP.ORD_NO ");
strSql.AppendLine("AND BOI.ORD_ITEM = CPP.ORD_ITEM ");
strSql.AppendLine("AND BOI.ORD_WID<> 0 ");
strSql.AppendLine("AND BOI.ORD_LEN<> 0 ");
strSql.AppendLine("AND BOI.ORD_THK<> 0 ");
strSql.AppendLine("WHERE 1=1 ");// ROUND(CPP.ORD_REM_WGT / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 1");
strSql.AppendLine(" AND ");
strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
strSql.AppendLine(" WHERE ");
strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
strSql.AppendLine(" AND A.SEQ >= '01' ");
strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85) )>= 0.95");
strSql.AppendLine(" AND boi.PROD_CD = 'PP' ");
strSql.AppendLine(" AND boi.REC_STS = '2' ");
strSql.AppendLine(" and boi.ORD_STS IN('E') ");
strSql.AppendLine(" AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
strSql.AppendLine(" )");
strSql.AppendLine(") T WHERE T.RK = 1");
try
@ -355,24 +356,25 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 ");
strSql.AppendLine(" AND BOI.ORD_NO || '-' || BOI.ORD_ITEM IN ('OMK24040013-005')");
//strSql.AppendLine(" AND ");
//strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
//strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
//strSql.AppendLine(" WHERE ");
//strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
//strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
//strSql.AppendLine(" AND A.SEQ >= '01' ");
//strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
//strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 0.95");
//strSql.AppendLine(" AND boi.PROD_CD = 'PP' ");
//strSql.AppendLine("AND boi.REC_STS = '2' ");
//strSql.AppendLine("and boi.ORD_STS IN('E') ");
//strSql.AppendLine("AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
//strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
//strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
//strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
//strSql.AppendLine(" AND BOI.ORD_NO || '-' || BOI.ORD_ITEM IN ('OMK24050015-009')"); //OMK24050015 009
strSql.AppendLine(" AND ");
strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
strSql.AppendLine(" WHERE ");
strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
strSql.AppendLine(" AND A.SEQ >= '01' ");
strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 0.95");
strSql.AppendLine(" AND boi.PROD_CD = 'PP' ");
strSql.AppendLine("AND boi.REC_STS = '2' ");
strSql.AppendLine("and boi.ORD_STS IN('E') ");
strSql.AppendLine("AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
try
{
@ -406,34 +408,34 @@ namespace SlabHandle
IList<QP_QLTY_CHEM> orderChemistrys = new List<QP_QLTY_CHEM>();
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(" 'OMK24040013-005'");
//strSql.AppendLine("SELECT");
//strSql.AppendLine("TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM)");
//strSql.AppendLine("FROM NISCO.cp_prc CPP ");
//strSql.AppendLine("INNER JOIN ");
//strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
//strSql.AppendLine("ON BOI.ORD_NO = CPP.ORD_NO ");
//strSql.AppendLine("AND BOI.ORD_ITEM = CPP.ORD_ITEM ");
//strSql.AppendLine("AND BOI.ORD_WID <> 0 ");
//strSql.AppendLine("AND BOI.ORD_LEN <> 0 ");
//strSql.AppendLine("AND BOI.ORD_THK <> 0 ");
//strSql.AppendLine(" WHERE 1=1 AND ");
//strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
//strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
//strSql.AppendLine(" WHERE ");
//strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
//strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
//strSql.AppendLine(" AND A.SEQ >= '01' ");
//strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
//strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 0.95");
//strSql.AppendLine("AND boi.PROD_CD = 'PP'");
//strSql.AppendLine("AND boi.REC_STS = '2' ");
//strSql.AppendLine("and boi.ORD_STS IN('E') ");
//strSql.AppendLine("AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
//strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
//strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
//strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
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(" 'OMK24050015-009'");
strSql.AppendLine("SELECT");
strSql.AppendLine("TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM)");
strSql.AppendLine("FROM NISCO.cp_prc CPP ");
strSql.AppendLine("INNER JOIN ");
strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
strSql.AppendLine("ON BOI.ORD_NO = CPP.ORD_NO ");
strSql.AppendLine("AND BOI.ORD_ITEM = CPP.ORD_ITEM ");
strSql.AppendLine("AND BOI.ORD_WID <> 0 ");
strSql.AppendLine("AND BOI.ORD_LEN <> 0 ");
strSql.AppendLine("AND BOI.ORD_THK <> 0 ");
strSql.AppendLine(" WHERE 1=1 AND ");
strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) ");
strSql.AppendLine(" FROM NISCO.EP_REQ_SLAB_D A, NISCO.EP_REQ_SLAB B");
strSql.AppendLine(" WHERE ");
strSql.AppendLine(" 1 = 1 AND A.ORD_NO = BOI.ORD_NO AND A.ORD_ITEM = BOI.ORD_ITEM");
strSql.AppendLine(" AND A.BLOCK_SEQ >= '01' ");
strSql.AppendLine(" AND A.SEQ >= '01' ");
strSql.AppendLine(" And B.REQ_SEQ_NO = A.REQ_SEQ_NO ");
strSql.AppendLine(" AND B.REC_STS = '1') + GREATEST(0, (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / (((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85)) >= 0.95");
strSql.AppendLine("AND boi.PROD_CD = 'PP'");
strSql.AppendLine("AND boi.REC_STS = '2' ");
strSql.AppendLine("and boi.ORD_STS IN('E') ");
strSql.AppendLine("AND (boi.ord_knd ='A' OR (boi.ord_knd ='T' AND (SELECT COUNT(*) FROM NISCO.BP_ODER_XY BOXY WHERE BOXY.ORDER_NO=BOI.ORD_NO AND BOXY.ORDER_ITEM=BOI.ORD_ITEM )>0)) ");
strSql.AppendLine("AND boi.CFM_MILL_PLT='C3' ");
strSql.AppendLine("AND (boi.ORD_NO NOT LIKE 'OMZ%' OR (boi.ORD_NO LIKE 'OMZ%' AND boi.STDSPEC LIKE '%KRZN-A%'))");
strSql.AppendLine("AND((BOI.CUST_DEL_TO_DATE > TO_CHAR(SYSDATE - 183, 'YYYYMMdd')) OR(boi.ORD_NO LIKE 'OMA%'))");
strSql.AppendLine(") ");
strSql.AppendLine(" AND QQC.KND IN ('1','2') ) T WHERE T.rk = 1 ");
@ -1285,7 +1287,7 @@ namespace SlabHandle
strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = A.STLGRD");
strSql.AppendLine("WHERE 1 = 1 ");
strSql.AppendLine(" AND A.SLAB_NO = '2310768931 '");
strSql.AppendLine(" AND A.SLAB_NO = '2430408334 '");
//strSql.AppendLine(" AND (A.CUR_INV IN('ZB','ZZ','HB','B1','52','C7','HC') " +
@ -1360,7 +1362,7 @@ namespace SlabHandle
strSql.AppendLine(" FROM NISCO.FP_SLAB fs ");
strSql.AppendLine(" START WITH fs.SLAB_NO ");
strSql.AppendLine(" IN ");
strSql.AppendLine(" ( '2310768931 ' ");
strSql.AppendLine(" ( '2430408334 ' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");
@ -1485,7 +1487,7 @@ namespace SlabHandle
strSql.AppendLine(" FROM NISCO.FP_SLAB fs ");
strSql.AppendLine(" START WITH fs.SLAB_NO ");
strSql.AppendLine(" IN ");
strSql.AppendLine(" ( '2310768931 ' ");
strSql.AppendLine(" ( '2430408334 ' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");

@ -950,6 +950,12 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("ROUNDSTD"), DisplayName("修约标准")]
public string ROUNDSTD { get; set; }
[Persistent("STDSPEC_STLGRD"), DisplayName("打印钢种")]
public string STDSPEC_STLGRD { get; set; }
[Persistent("STEEL_GRD_DETAIL"), DisplayName("钢种说明")]
public string STEEL_GRD_DETAIL { get; set; }
////替代钢材号
//[Persistent("SUB_SLAB_NO"), DisplayName("替代钢材号")]
//public string SUB_SLAB_NO { get; set; }

@ -899,6 +899,9 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("GP_WGT"), DisplayName("钢板重")]
public string GP_WGT { get; set; }
//STEEL_GRD_DETAIL
////钢种说明
[Persistent("STEEL_GRD_DETAIL"), DisplayName("钢种说明")]
public string STEEL_GRD_DETAIL { get; set; }
}
}

@ -34,7 +34,29 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("INS_DATE"), DisplayName("录入日期")]
public string INS_DATE { get; set; }
[Persistent("UPD_DATE"), DisplayName("修改日期")]
public string UPD_DATE { get; set; }
public string UPD_DATE { get; set; }
[Persistent("STEEL_GRD_DETAIL"), DisplayName("板坯钢种")]
public string STEEL_GRD_DETAIL { get; set; }
[Persistent("STDSPEC_STLGRD"), DisplayName("订单牌号")]
public string STDSPEC_STLGRD { get; set; }
[Persistent("STD_FLG"), DisplayName("是否异钢种")]
public string STD_FLG { get; set; }
[Persistent("RATE"), DisplayName("成材率")]
public string RATE { get; set; }
[Persistent("ORD_NO"), DisplayName("订单号")]
public string ORD_NO { get; set; }
[Persistent("ORD_ITEM"), DisplayName("订单项次号")]
public string ORD_ITEM { get; set; }
[Persistent("PLATE_NO"), DisplayName("钢板号")]
public string PLATE_NO { get; set; }
[Persistent("STLGRD"), DisplayName("订单钢种")]
public string STLGRD { get; set; }
}
}

@ -36,5 +36,29 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("UPD_DATE"), DisplayName("修改日期")]
public string UPD_DATE { get; set; }
[Persistent("STEEL_GRD_DETAIL"), DisplayName("板坯钢种")]
public string STEEL_GRD_DETAIL { get; set; }
[Persistent("STDSPEC_STLGRD"), DisplayName("订单牌号")]
public string STDSPEC_STLGRD { get; set; }
[Persistent("STD_FLG"), DisplayName("是否异钢种")]
public string STD_FLG { get; set; }
[Persistent("RATE"), DisplayName("成材率")]
public string RATE { get; set; }
[Persistent("ORD_NO"), DisplayName("订单号")]
public string ORD_NO { get; set; }
[Persistent("ORD_ITEM"), DisplayName("订单项次号")]
public string ORD_ITEM { get; set; }
[Persistent("PLATE_NO"), DisplayName("钢板号")]
public string PLATE_NO { get; set; }
[Persistent("STLGRD"), DisplayName("订单钢种")]
public string STLGRD { get; set; }
}
}

@ -35,6 +35,32 @@ namespace ibk.IPD.Entity.IpdPs
public string INS_DATE { get; set; }
[Persistent("UPD_DATE"), DisplayName("修改日期")]
public string UPD_DATE { get; set; }
//&& p.ORESTLGRD == prP_PLATE.STEEL_GRD_DETAIL
// && p.TGT_STLGRD == prorde.STDSPEC_STLGRD
[Persistent("STEEL_GRD_DETAIL"), DisplayName("板坯钢种")]
public string STEEL_GRD_DETAIL { get; set; }
[Persistent("STDSPEC_STLGRD"), DisplayName("订单牌号")]
public string STDSPEC_STLGRD { get; set; }
[Persistent("STD_FLG"), DisplayName("是否异钢种")]
public string STD_FLG { get; set; }
[Persistent("RATE"), DisplayName("成材率")]
public string RATE { get; set; }
[Persistent("ORD_NO"), DisplayName("订单号")]
public string ORD_NO { get; set; }
[Persistent("ORD_ITEM"), DisplayName("订单项次号")]
public string ORD_ITEM { get; set; }
[Persistent("PLATE_NO"), DisplayName("钢板号")]
public string PLATE_NO { get; set; }
[Persistent("STLGRD"), DisplayName("订单钢种")]
public string STLGRD { get; set; }
}
}

@ -165,6 +165,7 @@
<Compile Include="Enity\Product.cs" />
<Compile Include="Enity\QP_CHEM_RSLT_FP.cs" />
<Compile Include="Enity\QP_QLTY_CHEM_FP.cs" />
<Compile Include="Enity\QP_QLTY_TECH_REPLACE.cs" />
<Compile Include="Enity\QP_STD_HEAD.cs" />
<Compile Include="Enity\RACTLAYOUT.cs" />
<Compile Include="Enity\REMA_LOC_WG.cs" />

@ -426,6 +426,11 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine(" AND A.ORD_FL = '1' ");
strSql.AppendLine(" AND B.REC_STS = '1') + (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100) / TRUNC(((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85, 3)) AS LACK_NUM ");
strSql.AppendLine(",QSH.STDSPEC_STLGRD");//牌号
strSql.AppendLine(",QNC.STEEL_GRD_DETAIL");//钢种说明
strSql.AppendLine("FROM NISCO.cp_prc CPP ");
strSql.AppendLine("INNER JOIN ");
strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
@ -455,6 +460,13 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine("ON MATR.ORD_NO = boi.ORD_NO ");
strSql.AppendLine("AND MATR.ORD_ITEM= boi.ORD_ITEM");
strSql.AppendLine("LEFT JOIN NISCO.QP_STD_HEAD QSH ");
strSql.AppendLine(" ON boi.STDSPEC = QSH.STDSPEC ");
strSql.AppendLine(" AND boi.STDSPEC_YY = QSH.STDSPEC_YY ");
strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = boi.STLGRD");
strSql.AppendLine("LEFT JOIN NISCO.EP_REQ_SLAB_D EP_SLAB_D");
strSql.AppendLine("ON EP_SLAB_D.ORD_NO = QQD.ORD_NO ");
strSql.AppendLine("AND EP_SLAB_D.REQ_SEQ_NO= EP_SLAB_D.REQ_SEQ_NO");
@ -860,7 +872,7 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine(", CASE WHEN gpr.THK > 0 and gp.PROC_CD <> 'XAC' THEN gpr.THK ELSE gp.THK END THK");
strSql.AppendLine(", CASE WHEN gpr.WID > 0 and gp.PROC_CD <> 'XAC' THEN gpr.WID ELSE gp.WID END WID");
strSql.AppendLine(", CASE WHEN gpr.LEN > 0 and gp.PROC_CD <> 'XAC' THEN gpr.LEN ELSE gp.LEN END LEN");
strSql.AppendLine(",QNC.STEEL_GRD_DETAIL ");
//20231129新增
strSql.AppendLine(", GP.THK AS GP_THK ,GP.WID AS GP_WID ,GP.LEN AS GP_LEN,GP.WGT AS GP_WGT ");
@ -923,6 +935,9 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine("LEFT JOIN NISCO.GP_INSPPLATE GI ON GI.MAT_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.GP_USTRESULT UST ON UST.PLATE_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.GP_REMARK RE ON RE.MAT_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = GP.STLGRD");
strSql.AppendLine("LEFT JOIN NISCO.QP_QLTY_MATR MATR ");
strSql.AppendLine("ON MATR.ORD_NO = boo.ORD_NO ");
strSql.AppendLine("AND MATR.ORD_ITEM= boo.ORD_ITEM");
@ -994,7 +1009,7 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine(", CASE WHEN gpr.THK > 0 and gp.PROC_CD <> 'XAC' THEN gpr.THK ELSE gp.THK END THK");
strSql.AppendLine(", CASE WHEN gpr.WID > 0 and gp.PROC_CD <> 'XAC' THEN gpr.WID ELSE gp.WID END WID");
strSql.AppendLine(", CASE WHEN gpr.LEN > 0 and gp.PROC_CD <> 'XAC' THEN gpr.LEN ELSE gp.LEN END LEN");
strSql.AppendLine(",QNC.STEEL_GRD_DETAIL ");
//20231129新增
strSql.AppendLine(", GP.THK AS GP_THK ,GP.WID AS GP_WID ,GP.LEN AS GP_LEN,GP.WGT AS GP_WGT");
@ -1057,6 +1072,7 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine("LEFT JOIN NISCO.GP_INSPPLATE GI ON GI.MAT_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.GP_USTRESULT UST ON UST.PLATE_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.GP_REMARK RE ON RE.MAT_NO = GP.PLATE_NO ");
strSql.AppendLine("LEFT JOIN NISCO.QP_NISCO_CHMC QNC ON QNC.STLGRD = GP.STLGRD");
strSql.AppendLine("LEFT JOIN NISCO.QP_QLTY_MATR MATR ");
strSql.AppendLine("ON MATR.ORD_NO = boo.ORD_NO ");
strSql.AppendLine("AND MATR.ORD_ITEM= boo.ORD_ITEM");
@ -1151,6 +1167,8 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine(",MATR.ROUNDSTD ");
strSql.AppendLine(",count(EP_SLAB_D.REQ_SEQ_NO) SLAB_LACK_NUM , count(EP_SLAB_D.REQ_SEQ_NO) + FLOOR( (NVL(CPP.ORD_REM_WGT, 0) - CPP.ORD_WGT * (CPP.DEL_TOL_MAX + ABS(CPP.DEL_TOL_MIN)) / 100)/ TRUNC(((BOI.ORD_WID / 1000) * (BOI.ORD_LEN / 1000) * (BOI.ORD_THK / 1000)) * 7.85,3)) AS LACK_NUM ");
strSql.AppendLine(",QSH.STDSPEC_STLGRD");
strSql.AppendLine("FROM NISCO.cp_prc CPP ");
strSql.AppendLine("INNER JOIN ");
strSql.AppendLine("NISCO.BP_ORDER_ITEM boi ");
@ -1190,6 +1208,10 @@ namespace ibk.IPD.Service.IPD_PS
strSql.AppendLine("AND EP_SLAB_D.SEQ >= '01'");
strSql.AppendLine("AND EP_SLAB_B.REC_STS = '1'");
strSql.AppendLine("LEFT JOIN NISCO.QP_STD_HEAD QSH ");
strSql.AppendLine(" ON boi.STDSPEC = QSH.STDSPEC ");
strSql.AppendLine(" AND boi.STDSPEC_YY = QSH.STDSPEC_YY ");
//TODO:TEST_DATA
//strSql.AppendLine("WHERE 1=1 ");
//strSql.AppendLine(" AND ((SELECT COUNT( A.REQ_SEQ_NO) ");

@ -30,3 +30,19 @@ D:\_NGProject\ipd-file\余材异标准维护\PlateAnalysisStandard\PlateAnalysis
D:\_NGProject\ipd-file\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.csproj.CopyComplete
D:\_NGProject\ipd-file\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.exe
D:\_NGProject\ipd-file\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.pdb
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\PlateAnalysisStandard.exe.config
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\PlateAnalysisStandard.exe
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\PlateAnalysisStandard.pdb
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\Newtonsoft.Json.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\System.Buffers.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\System.Memory.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\System.Net.Http.Formatting.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\System.Numerics.Vectors.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.csproj.AssemblyReference.cache
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.csproj.SuggestedBindingRedirects.cache
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.exe.config
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.csproj.CoreCompileInputs.cache
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.csproj.CopyComplete
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.exe
D:\_NG_1\NG_Project\余材异标准维护\PlateAnalysisStandard\PlateAnalysisStandard\obj\Debug\PlateAnalysisStandard.pdb

@ -237,6 +237,7 @@
<Compile Include="Enity\SUPERSEDE_CONFIRAM.cs" />
<Compile Include="SupersedeRequestArgs.cs" />
<Compile Include="SurMatSubController.cs" />
<Compile Include="SurMatSubServiceTest.cs" />
<Compile Include="SurMatSubService.cs" />
<Compile Include="Enity\TBDIPDO.cs" />
<Compile Include="Enity\TB_PS_CONFIG.cs" />

@ -22,8 +22,6 @@ namespace ibk.IPD.Service.IPD_PS
#region 获取存储数据
/// <summary>
/// 获取所有未确认数据
/// </summary>

@ -1 +1 @@
f2b6a7505f23c440e1d165b68582c10757f1e477
bd3cb3de55817ef298700d9ac2099473ffcd480c

@ -206,10 +206,20 @@ const Main = () => {
width: 50,
fixed: 'left',
},
{ title: '标准号', dataIndex: 'STANDARD_NO', key: 'STANDARD_NO', width: 100, ellipsis: true },
{ title: '可替代标准号', dataIndex: 'TD_STANDARD_NO', key: 'TD_STANDARD_NO', width: 100, ellipsis: true },
{ title: '维护区分', dataIndex: 'TD_FL', key: 'TD_FL', width: 100, ellipsis: true },
{ title: '备注', dataIndex: 'REMARK', key: 'REMARK', width: 100, ellipsis: true },
{ title: '板坯钢种', dataIndex: 'STEEL_GRD_DETAIL', key: 'STEEL_GRD_DETAIL', width: 150, ellipsis: true },
{ title: '订单钢种', dataIndex: 'STLGRD', key: 'STLGRD', width: 150, ellipsis: true },
{ title: '是否异钢种', dataIndex: 'STD_FLG', key: 'STD_FLG', width: 80, ellipsis: true },
{ title: '标准号', dataIndex: 'STANDARD_NO', key: 'STANDARD_NO', width: 150, ellipsis: true },
{ title: '可替代标准号', dataIndex: 'TD_STANDARD_NO', key: 'TD_STANDARD_NO', width: 150, ellipsis: true },
{ title: '钢板号', dataIndex: 'PLATE_NO', key: 'PLATE_NO', width: 150, ellipsis: true },
{ title: '订单号', dataIndex: 'ORD_NO', key: 'ORD_NO', width: 150, ellipsis: true },
{ title: '项次号', dataIndex: 'ORD_ITEM', key: 'ORD_ITEM', width: 80, ellipsis: true },
{ title: '成材率', dataIndex: 'RATE', key: 'RATE', width: 80, ellipsis: true },
{ title: '维护区分', dataIndex: 'TD_FL', key: 'TD_FL', width: 60, ellipsis: true },
{ title: '备注', dataIndex: 'REMARK', key: 'REMARK', width: 600, ellipsis: true },
// { title: '公差下限', dataIndex: 'THK_TOL_MIN', key: 'THK_TOL_MIN', width: 100, ellipsis: true },
// { title: '公差上限', dataIndex: 'THK_TOL_MAX', key: 'THK_TOL_MAX', width: 100, ellipsis: true },
{ title: '录入时间', dataIndex: 'INS_DATE', key: 'INS_DATE', width: 100, ellipsis: true },

@ -309,79 +309,7 @@ const Main = () => {
{ title: '钢板利用率', dataIndex: 'SUB_RATE', key: 'SUB_RATE', width: 100, ellipsis: true },
{ title: '替代时间', dataIndex: 'DATA_TIME', key: 'DATA_TIME', width: 102, ellipsis: true },
{ title: '替代类型', dataIndex: 'IS_FULL', key: 'IS_FULL', width: 83, ellipsis: true },
{
title: '替代前物料信息',
ellipsis: true,
className: 'replaceColor',
children: [
{
title: '标准号',
dataIndex: 'GP_APLY_STDSPEC',
key: 'GP_APLY_STDSPEC',
width: 160,
ellipsis: true,
className: 'replaceColor',
},
{
title: '厚度',
dataIndex: 'GP_THK',
key: 'GP_THK',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '宽度',
dataIndex: 'GP_WID',
key: 'GP_WID',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '长度',
dataIndex: 'GP_LEN',
key: 'GP_LEN',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '重量',
dataIndex: 'GP_WGT',
key: 'GP_WGT',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '状态',
dataIndex: 'PROC_STATE',
key: 'PROC_STATE',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '替代时仓库',
dataIndex: 'GP_CUR_INV',
key: 'GP_CUR_INV',
width: 100,
ellipsis: true,
className: 'replaceColor',
},
{
title: '货位',
dataIndex: 'LOC',
key: 'LOC',
width: 100,
ellipsis: true,
className: 'replaceColor',
},
],
},
{
{
title: '替代后订单',
ellipsis: true,
className: 'endColor',
@ -402,14 +330,14 @@ const Main = () => {
ellipsis: true,
className: 'endColor',
},
{
title: '订单交货期',
dataIndex: 'BOI_DEL_TO_DATE',
key: 'BOI_DEL_TO_DATE',
width: 100,
ellipsis: true,
className: 'endColor',
},
// {
// title: '订单交货期',
// dataIndex: 'BOI_DEL_TO_DATE',
// key: 'BOI_DEL_TO_DATE',
// width: 100,
// ellipsis: true,
// className: 'endColor',
// },
{
title: '标准',
dataIndex: 'BOI_STDSPEC',
@ -500,11 +428,84 @@ const Main = () => {
className: 'endColor',
},
],
},
{
title: '替代前物料信息',
ellipsis: true,
className: 'replaceColor',
children: [
{
title: '标准号',
dataIndex: 'GP_APLY_STDSPEC',
key: 'GP_APLY_STDSPEC',
width: 160,
ellipsis: true,
className: 'replaceColor',
},
{
title: '厚度',
dataIndex: 'GP_THK',
key: 'GP_THK',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '宽度',
dataIndex: 'GP_WID',
key: 'GP_WID',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '长度',
dataIndex: 'GP_LEN',
key: 'GP_LEN',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '重量',
dataIndex: 'GP_WGT',
key: 'GP_WGT',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '状态',
dataIndex: 'PROC_STATE',
key: 'PROC_STATE',
width: 60,
ellipsis: true,
className: 'replaceColor',
},
{
title: '替代时仓库',
dataIndex: 'GP_CUR_INV',
key: 'GP_CUR_INV',
width: 100,
ellipsis: true,
className: 'replaceColor',
},
{
title: '货位',
dataIndex: 'LOC',
key: 'LOC',
width: 100,
ellipsis: true,
className: 'replaceColor',
},
],
},
{
title: '用户交货期',
dataIndex: 'BOI_DEL_TO_DATE',
key: 'BOI_DEL_TO_DATE',
dataIndex: 'BOI_DEL_FR_DATE',
key: 'BOI_DEL_FR_DATE',
width: 100,
ellipsis: true,
},
@ -885,32 +886,7 @@ const Main = () => {
/>
</Item>
</Col>
<Col span={3} style={{ marginLeft: '-100px' }}>
<Item label="状态" name="PROC_CD" style={{ width: 211 }}>
<Select
mode="multiple"
showArrow={true}
placeholder="请选择"
value={selectedItems}
allowClear
onChange={setSelectedItems}
style={{ width: '100%' }}
>
{filteredOptions.map((item) => (
<Select.Option key={item} value={item}>
{item}
</Select.Option>
))}
</Select>
{/* <Dictionary
placeholder="请选择"
dict="TDZT"
form={form}
valueName="PROC_CD"
labelName="PROC_CD"
/> */}
</Item>
</Col>
</Row>
<Row gutter={[16, 8]} style={{ marginBottom: '-25px' }}>
{/* <Col span={4}>
@ -960,6 +936,43 @@ const Main = () => {
/> */}
</Item>
</Col>
<Col span={4} style={{ marginLeft: '-40px' }}>
<Item label="工厂" style={{ width: 170 }}>
<Dictionary
placeholder="请选择"
dict="B0033"
form={form}
valueName="PLT"
labelName="PLT"
/>
</Item>
</Col>
<Col span={3} style={{ marginLeft: '-40px' }}>
<Item label="状态" name="PROC_CD" style={{ width: 211 }}>
<Select
mode="multiple"
showArrow={true}
placeholder="请选择"
value={selectedItems}
allowClear
onChange={setSelectedItems}
style={{ width: '100%' }}
>
{filteredOptions.map((item) => (
<Select.Option key={item} value={item}>
{item}
</Select.Option>
))}
</Select>
{/* <Dictionary
placeholder="请选择"
dict="TDZT"
form={form}
valueName="PROC_CD"
labelName="PROC_CD"
/> */}
</Item>
</Col>
<Space style={{ position: 'absolute', right: 25 }} size={8}>
<Item style={{ textAlign: 'center' }}>

@ -703,7 +703,8 @@ const Main = () => {
labelName="PLT"
/>
</Item>
<Item label={`结果`} name="HAN_RSL" style={{ width: 225, marginLeft: -60 }}>
{/* , marginLeft: -60 */}
<Item label={`结果`} name="HAN_RSL" style={{ width: 225}}>
<Dictionary
style={{ width: 100 }}
placeholder="请选择"

@ -20,6 +20,7 @@ using Newtonsoft.Json;
using Google.Protobuf.WellKnownTypes;
using ibk.IPD.Entity.IPD_PS.QueryArgs;
using RestSharp;
using SOA.Objects;
namespace ibk.IPD
{
@ -314,12 +315,12 @@ namespace ibk.IPD
DataTable gQP_TEST_HEAD_SMP1 = new DataTable();
gQP_TEST_HEAD_SMP = surMatSubService.getQP_TEST_HEAD();//SOA获取
//gQP_TEST_HEAD_SMP1 = Dal.GetInstance().getQP_TEST_HEAD();
//gQP_TEST_HEAD_SMP1 = Dal.GetInstance().getQP_TEST_HEAD();
// if (gQP_TEST_HEAD_SMP1.Rows.Count > 0)
// {
// gQP_TEST_HEAD_SMP = ModelConvertHelper1<QP_TEST_HEAD>.ConvertToModel(gQP_TEST_HEAD_SMP1);
// }
// if (gQP_TEST_HEAD_SMP1.Rows.Count > 0)
// {
// gQP_TEST_HEAD_SMP = ModelConvertHelper1<QP_TEST_HEAD>.ConvertToModel(gQP_TEST_HEAD_SMP1);
// }
logger.Info("【2_00试样号】" + gQP_TEST_HEAD_SMP.Count);
});
@ -580,11 +581,42 @@ namespace ibk.IPD
logger.Info("【多线程获取数据结束】");
#region 更新价格
//pdismp = surMatSubService.GetPDI_SMP();
//logger.Info("【2_02并样履历】" + pdismp.Count);
//测试test改SQL数据源不需要修改这里
//gP_PLATEs= gP_PLATEs.Where(p => p.PLATE_NO == "23110460540301").ToList();
//gQP_TEST_HEAD_SMP = gQP_TEST_HEAD_SMP.Where(p => p.SMP_NO == "23111671310301").ToList();
//pdismp = pdismp.Where(p => p.SMP_NO == "24102618020121").ToList();
//using (IDbContext db = ObjectContainer.GetObject<IDbContext>("db"))
//{
// try
// {
// //因为是同时操作两个表, 所以开启事务
// db.BeginTransaction();
// //更新历史履历价格
// foreach (var PSN_Price in pdismp)
// {
// //getExperPriceStr
// double price = getExperPriceStr(PSN_Price.SMP_NO);
// StringBuilder strUpd = new StringBuilder();
// strUpd.AppendFormat(" UPDATE PDI_SMP_NO SET COSTS='{0}' WHERE SMP_NO='{1}' ", price, PSN_Price.SMP_NO);
// db.Execute(strUpd.ToString());//更新数据
// }
// db.Commit();
// }
// catch (Exception)
// {
// db.Rollback();
// }
//}
#endregion
foreach (GP_PLATE plate in gP_PLATEs)
@ -944,7 +976,7 @@ namespace ibk.IPD
{
continue;
}
double price = getPrice(plate, ORD_save);
double price = getExperPrice(plate, ORD_save);
PDI_SMP_NO pdi = new PDI_SMP_NO();
pdi.TIMESTAMP = GetTimeStamp();
pdi.PLATE_NO = plate.PLATE_NO;
@ -3638,6 +3670,78 @@ namespace ibk.IPD
return Math.Round(g_price + p_price, 2);
}
/// <summary>
/// 获取检验费
/// </summary>
/// <param name="plate"></param>
/// <param name="ORD_save"></param>
/// <returns></returns>
private static double getExperPriceStr(string strSMPNo)
{
double g_price = 0;//默认78元检验费部分取样没有检验费用
double p_price = 0;
//取样价格
if (!string.IsNullOrEmpty(strSMPNo))
{
List<data> data = doHttpPost(strSMPNo);
////接口数据
//logger.InfoFormat("式样号:{0};订单号:{1}-{2}") ;
if (data.Count > 0)
{
foreach (var ds in data)
{
p_price += Convert.ToDouble(ds.test_charge);
}
}
}
if (p_price == 0)
{
g_price = 78;
logger.InfoFormat("接口缺少价格=>式样号{0}", strSMPNo);
}
//最终价格
return Math.Round(g_price + p_price, 2);
}
/// <summary>
/// 获取检验费
/// </summary>
/// <param name="plate"></param>
/// <param name="ORD_save"></param>
/// <returns></returns>
private static double getExperPrice(GP_PLATE plate, BP_ORDER_ITEM ORD_save)
{
double g_price = 0;//默认78元检验费部分取样没有检验费用
double p_price = 0;
//取样价格
if (!string.IsNullOrEmpty(plate.SMP_NO))
{
List<data> data = doHttpPost(plate.SMP_NO);
////接口数据
//logger.InfoFormat("式样号:{0};订单号:{1}-{2}") ;
if (data.Count > 0)
{
foreach (var ds in data)
{
p_price += Convert.ToDouble(ds.test_charge);
}
}
}
if (p_price == 0)
{
g_price = 78;
logger.InfoFormat("接口缺少价格=>式样号{0}", plate.SMP_NO);
}
//最终价格
return Math.Round(g_price + p_price, 2);
}
public static List<data> doHttpPost(string postDataStr)
{
//RequestEntity result = new RequestEntity(); //声明返回参数实体类

@ -1 +1 @@
6c28706979d1cb80596039ef40f69d7b2571b4db
6969e6d8c48e39a0daef9103d8ba54f0509f2a29

@ -232,3 +232,29 @@ D:\_NGProject\ipd-file\SubResult\SubResult\bin\Debug\System.Text.Encodings.Web.d
D:\_NGProject\ipd-file\SubResult\SubResult\bin\Debug\System.Text.Json.dll
D:\_NGProject\ipd-file\SubResult\SubResult\bin\Debug\System.Threading.Tasks.Extensions.dll
D:\_NGProject\ipd-file\SubResult\SubResult\bin\Debug\System.ValueTuple.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\log4net.config
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\SubResult.exe.config
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\SubResult.exe
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\SubResult.pdb
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\Google.OrTools.x86.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\Google.OrTools.x86.pdb
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\Google.Protobuf.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\Newtonsoft.Json.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\RestSharp.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Buffers.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Memory.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Numerics.Vectors.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Text.Encodings.Web.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Text.Json.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Threading.Tasks.Extensions.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.ValueTuple.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\bin\Debug\System.Net.Http.Formatting.dll
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.csproj.AssemblyReference.cache
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.csproj.SuggestedBindingRedirects.cache
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.exe.config
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.csproj.CoreCompileInputs.cache
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.csproj.CopyComplete
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.exe
D:\_NG_1\NG_Project\取样并样程序\SubResult\SubResult\obj\Debug\SubResult.pdb

@ -24,6 +24,8 @@ using QP_STD_HEAD = ibk.IPD.Entity.IPD_PS.QP_STD_HEAD;
using System.Diagnostics;
using ibk.IPD.Service.IPD_SS;
using Confluent.Kafka;
using NPOI.SS.Formula.Functions;
using static NPOI.HSSF.Util.HSSFColor;
namespace ibk.IPD.Controller.IPD_PS
{
@ -421,6 +423,14 @@ namespace ibk.IPD.Controller.IPD_PS
if (queryArgs != null)
{
//生产厂
if (!string.IsNullOrWhiteSpace(queryArgs.PLT))
{
strSql.AppendLine(" AND sur.GP_PLT = '" + queryArgs.PLT + "'");
}
//不能有完全替代的钢板,余材替代应该全部替代
strSql.AppendLine(" AND sur.SUB_FULL = '" + "P" + "'");
if (!string.IsNullOrWhiteSpace(queryArgs.IS_FULL))
{
@ -491,6 +501,65 @@ namespace ibk.IPD.Controller.IPD_PS
dtCheck = db.Query(strSql.ToString());
//result.data = db.Query(strSql.ToString());
result.data = dtCheck;
StringBuilder strPlateNo = new StringBuilder();
for (int i = 0; i <= dtCheck.Rows.Count - 1; i++)
{
if (i==0)
{
strPlateNo.AppendLine("'" + dtCheck.Rows[i]["PLATE_NO"] + "'");
}
else
{
strPlateNo.AppendLine(",'" + dtCheck.Rows[i]["PLATE_NO"] + "'");
}
}
//剔除掉非余材的信息
if (strPlateNo.ToString().Length!=0)
{
StringBuilder strPlate = new StringBuilder();
strPlate.AppendLine(" SELECT* FROM NISCO.GP_PLATE gp WHERE 1=1");
strPlate.AppendLine("AND gp.ORD_FL = '1'");
strPlate.AppendLine(" AND gp.PLATE_NO IN( ");
strPlate.AppendLine(strPlateNo.ToString());
strPlate.AppendLine(") ");
using (IDbContext db_sur = ObjectContainer.GetObject<IDbContext>("db_sur"))
{
var dtPlate = db_sur.Query(strPlate.ToString());
foreach (DataRow row in dtCheck.Rows)
{
//24304312010201
if (row["PLATE_NO"].ToString() == "24303644030324")
{
}
var filteredRows = dtPlate.AsEnumerable().Where(p => p.Field<string>("PLATE_NO") == row["PLATE_NO"].ToString());
//var query = from DataRow row2 in dtPlate.Rows
// where row2["PLATE_NO"] == row["PLATE_NO"].ToString()
// select row2;
//if (query.Count()>0)
//{
// row.Delete();
//}
if (filteredRows.Count()>0)
{
row.Delete();
}
}
}
}
dtCheck.AcceptChanges();
if (dtCheck.Rows.Count > 0)
{
result.msg = "操作成功!";

@ -1667,19 +1667,19 @@ namespace ibk.IPD.Controller.IPD_PS
//strSql.AppendLine(" ) WHERE rn = 1 ");
strSql.AppendLine("SELECT * FROM( ");
strSql.AppendLine(" SELECT STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK ");
strSql.AppendLine(" SELECT STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK ,STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD");
strSql.AppendLine("FROM ( ");
strSql.AppendLine(" SELECT ");
strSql.AppendLine(" STANDARD_NO, ");
strSql.AppendLine(" TD_STANDARD_NO, ");
strSql.AppendLine("INS_DATE, ");
strSql.AppendLine("UPD_DATE, ");
strSql.AppendLine("TD_FL, THK_TOL_MIN,THK_TOL_MAX ,REMARK, ");
strSql.AppendLine(" ROW_NUMBER() OVER(PARTITION BY STANDARD_NO, TD_STANDARD_NO ORDER BY INS_DATE DESC) AS rn ");
strSql.AppendLine(" FROM YCTD_WH_NO ");
strSql.AppendLine("TD_FL, THK_TOL_MIN,THK_TOL_MAX ,REMARK, STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG,RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD");
strSql.AppendLine(" ,ROW_NUMBER() OVER(PARTITION BY STANDARD_NO, TD_STANDARD_NO ORDER BY INS_DATE DESC) AS rn ");
strSql.AppendLine(" FROM YCTD_WH_NO WHERE RATE IS NOT NULL ");
strSql.AppendLine(" ) WHERE rn = 1 ");
strSql.AppendLine(" UNION ALL ");
strSql.AppendLine(" SELECT * FROM YCTD_WH_NO_COPY ) ");
strSql.AppendLine(" SELECT * FROM YCTD_WH_NO_COPY WHERE RATE IS NOT NULL ) ");
strSql.AppendLine(" WHERE 1 = 1 ");
@ -1758,15 +1758,26 @@ namespace ibk.IPD.Controller.IPD_PS
//bool b = true;
foreach (var model in delModel)
{
strSql.AppendLine(" INSERT INTO YCTD_WH_NO_COPY (STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK) VALUES ( ");
strSql.AppendLine(" INSERT INTO YCTD_WH_NO_COPY (STANDARD_NO, TD_STANDARD_NO, INS_DATE, UPD_DATE, TD_FL,THK_TOL_MIN,THK_TOL_MAX,REMARK" +
",STEEL_GRD_DETAIL,STDSPEC_STLGRD,STD_FLG" +
",RATE,ORD_NO,ORD_ITEM,PLATE_NO,STLGRD" +
") VALUES ( ");
strSql.AppendLine(string.Format(" '{0}', ", model.STANDARD_NO));
strSql.AppendLine(string.Format(" '{0}', ", model.TD_STANDARD_NO));
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
strSql.AppendLine(string.Format(" '{0}', ", DateTime.Now.ToString("yyyyMMddHHmmss")));
strSql.AppendLine(string.Format(" '{0}', ", "不维护"));
strSql.AppendLine(string.Format(" '{0}', ", model.THK_TOL_MIN));
strSql.AppendLine(string.Format(" '{0}' ", model.THK_TOL_MAX));
strSql.AppendLine(string.Format(" '{0}' ", model.REMARK));
strSql.AppendLine(string.Format(" '{0}', ", model.THK_TOL_MAX));
strSql.AppendLine(string.Format(" '{0}', ", model.REMARK));
strSql.AppendLine(string.Format(" '{0}', ", model.STEEL_GRD_DETAIL));
strSql.AppendLine(string.Format(" '{0}', ", model.STDSPEC_STLGRD));
strSql.AppendLine(string.Format(" '{0}', ", model.STD_FLG));
strSql.AppendLine(string.Format(" '{0}', ", model.RATE));
strSql.AppendLine(string.Format(" '{0}', ", model.ORD_NO));
strSql.AppendLine(string.Format(" '{0}', ", model.ORD_ITEM));
strSql.AppendLine(string.Format(" '{0}', ", model.PLATE_NO));
strSql.AppendLine(string.Format(" '{0}'", model.STLGRD));
strSql.AppendLine(string.Format(" ) "));
db.Execute(strSql.ToString());

@ -55,5 +55,8 @@ namespace ibk.IPD.Entity.IPD_PS.QueryArgs
//板坯号
public string SLAB_NO { get; set; }
//轧制工厂
public string PLT { get; set; }
}
}

@ -38,5 +38,29 @@ namespace ibk.IPD.Entity.IpdPs
[Persistent("UPD_DATE"), DisplayName("修改日期")]
public string UPD_DATE { get; set; }
[Persistent("STEEL_GRD_DETAIL"), DisplayName("板坯钢种")]
public string STEEL_GRD_DETAIL { get; set; }
[Persistent("STDSPEC_STLGRD"), DisplayName("订单牌号")]
public string STDSPEC_STLGRD { get; set; }
[Persistent("STD_FLG"), DisplayName("是否异钢种")]
public string STD_FLG { get; set; }
[Persistent("RATE"), DisplayName("成材率")]
public string RATE { get; set; }
[Persistent("ORD_NO"), DisplayName("订单号")]
public string ORD_NO { get; set; }
[Persistent("ORD_ITEM"), DisplayName("订单项次号")]
public string ORD_ITEM { get; set; }
[Persistent("PLATE_NO"), DisplayName("钢板号")]
public string PLATE_NO { get; set; }
[Persistent("STLGRD"), DisplayName("订单钢种")]
public string STLGRD { get; set; }
}
}

Loading…
Cancel
Save