Compare commits

..

No commits in common. '4f8cd7c3f8d8b20d4565031a57e4f971bb7089af' and 'c15e8a5ccebffd2675927db2549218364f678e43' have entirely different histories.

@ -4738,11 +4738,6 @@ namespace SlabHandle
//成材率 //成材率
//tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 2))); //tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 2)));
//判断实际长度,特别长取消计算
if (Math.Round((TSCopy.THK / 1000) * (tBPlateGrpMany.SLAB_LEN / 1000) * (TSCopy.WID / 1000) / ((tBPlateGrpMany.CAL_THK / 1000) * (tBPlateGrpMany.CAL_WID / 1000)), 3) >= tBPlateGrpMany.CUT_MAXLEN / 1000)
{
tBPlateGrpMany.CRU_PIEs_ACT.Clear();
}
if (tBPlateGrpMany.MAX_LEN == 0) if (tBPlateGrpMany.MAX_LEN == 0)
{ {
@ -6537,11 +6532,7 @@ namespace SlabHandle
{ {
tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 4))); tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 4)));
} }
//判断实际长度,特别长取消计算
if (Math.Round((TSCopy.THK / 1000) * (tBPlateGrpMany.SLAB_LEN / 1000) * (TSCopy.WID / 1000) / ((tBPlateGrpMany.CAL_THK / 1000) * (tBPlateGrpMany.CAL_WID / 1000)), 3) >= tBPlateGrpMany.CUT_MAXLEN / 1000)
{
tBPlateGrpMany.CRU_PIEs_ACT.Clear();
}
if (tBPlateGrpMany.MAX_LEN == 0) if (tBPlateGrpMany.MAX_LEN == 0)
{ {
tBPlateGrpMany.CRU_PIEs_ACT.Clear(); tBPlateGrpMany.CRU_PIEs_ACT.Clear();
@ -8153,12 +8144,6 @@ namespace SlabHandle
{ {
tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 4))); tBPlateGrpMany.RATE = ConverDataToDecimal((Math.Round(tBPlateGrpMany.CRU_PIEs_ACT.Sum(p => p.ORD_THK / 1000 * p.ORD_WID / 1000 * p.ORD_LEN / 1000 * ConverDataToDecimal(7.85)) / tBPlateGrpMany.MAX_WGT, 4)));
} }
//判断实际长度,特别长取消计算
if (Math.Round((TSCopy.THK / 1000) * (tBPlateGrpMany.SLAB_LEN / 1000) * (TSCopy.WID / 1000) / ((tBPlateGrpMany.CAL_THK / 1000) * (tBPlateGrpMany.CAL_WID / 1000)), 3) >= tBPlateGrpMany.CUT_MAXLEN / 1000)
{
tBPlateGrpMany.CRU_PIEs_ACT.Clear();
}
if (tBPlateGrpMany.MAX_LEN == 0) if (tBPlateGrpMany.MAX_LEN == 0)
{ {
tBPlateGrpMany.CRU_PIEs_ACT.Clear(); tBPlateGrpMany.CRU_PIEs_ACT.Clear();
@ -14433,6 +14418,7 @@ namespace SlabHandle
//TODO:欠量测试 //TODO:欠量测试
int intLack = iOrder.SUB_LACK_NUM;//欠量 ServiceTest 测试 int intLack = iOrder.SUB_LACK_NUM;//欠量 ServiceTest 测试
//配置限制 厚、宽、交货期 //配置限制 厚、宽、交货期
if (gltTBCNFC3.Count() > 0) if (gltTBCNFC3.Count() > 0)
{ {

@ -172,7 +172,7 @@ namespace SlabHandle
strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) "); strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) ");
strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 "); strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 ");
strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )"); strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )");
strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=26.4) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <26.4 ))"); strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=30.5) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <30.5 ))");
//P_SLAB_DELI_DET表中字段EST_CD是5或者6开头是协议板。 //P_SLAB_DELI_DET表中字段EST_CD是5或者6开头是协议板。
strSql.AppendLine(" ORDER BY A.LOC DESC, A.SLAB_NO ASC "); strSql.AppendLine(" ORDER BY A.LOC DESC, A.SLAB_NO ASC ");
@ -1349,7 +1349,7 @@ namespace SlabHandle
strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) "); strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) ");
strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 "); strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 ");
strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )"); strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )");
strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=26.4) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <26.4 ))"); strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=30.5) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <30.5 ))");
strSql.AppendLine(") "); strSql.AppendLine(") ");
try try
@ -1424,7 +1424,7 @@ namespace SlabHandle
strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) "); strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) ");
strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 "); strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 ");
strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )"); strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )");
strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=26.4) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <26.4 ))"); strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=30.5) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <30.5 ))");
strSql.AppendLine(") "); strSql.AppendLine(") ");
strSql.AppendLine("CONNECT BY PRIOR fs.MOTHER_SLAB = fs.SLAB_NO -- 父子关系连接条件 "); strSql.AppendLine("CONNECT BY PRIOR fs.MOTHER_SLAB = fs.SLAB_NO -- 父子关系连接条件 ");
@ -1501,7 +1501,7 @@ namespace SlabHandle
strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) "); strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) ");
strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 "); strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 ");
strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )"); strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )");
strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=26.4) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <26.4 ))"); strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=30.5) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <30.5 ))");
strSql.AppendLine(") "); strSql.AppendLine(") ");
strSql.AppendLine("CONNECT BY PRIOR fs.MOTHER_SLAB = fs.SLAB_NO -- 父子关系连接条件 "); strSql.AppendLine("CONNECT BY PRIOR fs.MOTHER_SLAB = fs.SLAB_NO -- 父子关系连接条件 ");
@ -1873,7 +1873,7 @@ namespace SlabHandle
strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) "); strSql.AppendLine(" AND((GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 800 AND A.THK > 50) ");
strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 "); strSql.AppendLine(" OR(GREATEST(A.WID, A.LEN) >= 2050 AND LEAST(A.WID, A.LEN) >= 850 AND A.THK = 50))---短尺 ");
strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )"); strSql.AppendLine(" AND((SELECT COUNT(*) FROM NISCO.FB_SLAB_001 R WHERE R.SLAB_NO = A.SLAB_NO AND R.TYPE1 ='B' ) < 1 )");
strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=26.4) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <26.4 ))"); strSql.AppendLine(" AND ((A.CUR_INV ='ZB' AND A.WGT <=30.5) OR (A.CUR_INV IN('00','ZZ','HB','B1','52','C7','HC') AND A.WGT <30.5 ))");
//P_SLAB_DELI_DET表中字段EST_CD是5或者6开头是协议板。 //P_SLAB_DELI_DET表中字段EST_CD是5或者6开头是协议板。
//strSql.AppendLine(" ORDER BY A.LOC DESC, A.SLAB_NO ASC "); //strSql.AppendLine(" ORDER BY A.LOC DESC, A.SLAB_NO ASC ");

@ -90,7 +90,7 @@ namespace SlabHandle
strSql.AppendLine("WHERE 1 = 1 "); strSql.AppendLine("WHERE 1 = 1 ");
////TODO:测试数据 ////TODO:测试数据
strSql.AppendLine(" AND A.SLAB_NO = '2410724811'"); 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(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012' "); 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 ( 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012')"); 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,9 +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(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012'"); strSql.AppendLine(" 'OM824070038-001'");
strSql.AppendLine(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012'");
//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 ");
@ -1287,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 = '2410724811 '"); 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') " +
@ -1362,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(" ( '2410724811' "); strSql.AppendLine(" ( '2410566831' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");
@ -1487,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(" ( '2410724811' "); strSql.AppendLine(" ( '2410566831' ");
//strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO ");

Loading…
Cancel
Save