@ -341,7 +341,8 @@ namespace ibk.IPD.Service.IPD_PS
IList < BP_ORDER_ITEM > gpPlates = null ;
//查询可用订单以及常用字段
//strSql.AppendLine(" SELECT * from(");
//测试Test
strSql . AppendLine ( " SELECT * from(" ) ;
strSql . AppendLine ( " SELECT DISTINCT" ) ;
strSql . AppendLine ( " ORD_REMARK.REMARK ," ) ;
strSql . AppendLine ( " BOI.ORD_NO, BOI.ORD_ITEM, QQD.THK_TOL_MIN ,QQD.THK_TOL_MAX ,BOI.REC_STS, BOI.PLN_ORD, BOI.PLN_ORD_ITEM, BOI.ORD_STS, BOI.HOLD_FL, BOI.HOLD_DATE, BOI.HOLD_TIME, BOI.HOLD_EMP_ID " ) ;
@ -420,19 +421,20 @@ namespace ibk.IPD.Service.IPD_PS
//TODO:TEST_DATA
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( "AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
//20231130注 库存分析只分析A订单
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -467,7 +469,11 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( ", QQT.HTM_METH3 " ) ;
strSql . AppendLine ( ", MATR.ROUNDSTD " ) ;
strSql . AppendLine ( ", ORD_REMARK.REMARK " ) ;
//测试Test
//strSql.AppendLine(") where ORD_NO ='OM723070013' AND ORD_ITEM ='561' ");
//strSql.AppendLine(") T where T.ORD_NO || '-' || T.ORD_ITEM IN ('OM724020021-011','OM724020022-139','OM724020072-352','OM724030118-149','OM724030118-164','OM824030111-058') ");
strSql . AppendLine ( ") T where T.ORD_NO || '-' || T.ORD_ITEM IN ('OM724020021-011') " ) ;
try
{
//开启数据库连接查询数据
@ -599,7 +605,8 @@ namespace ibk.IPD.Service.IPD_PS
IList < GP_PLATE > gpPlates = new List < GP_PLATE > ( ) ;
//查询语句日期时间拼接起来格式化成yyyy-mm-dd hh24:mi:ss PROD_WGT
//strSql.AppendLine("SELECT * from(");
//测试Test
strSql . AppendLine ( "SELECT * from(" ) ;
strSql . AppendLine ( "SELECT" ) ;
strSql . AppendLine ( " DISTINCT GP.PLATE_NO " ) ;
strSql . AppendLine ( ",GI.INSP_B_DEP_FLAW2 " ) ;
@ -749,7 +756,8 @@ namespace ibk.IPD.Service.IPD_PS
//strSql.AppendLine(" OR GP.PLATE_NO = '23305886020202'");
strSql . AppendLine ( "ORDER BY GP.PLATE_NO" ) ;
//strSql.AppendLine(") where PLATE_NO = '23305886020202'");
//测试Test
strSql . AppendLine ( ") T where T.PLATE_NO = '24203388040204'" ) ;
try
{
//开启数据库连接查询数据
@ -774,7 +782,7 @@ namespace ibk.IPD.Service.IPD_PS
IList < GP_PLATE > gpPlates = new List < GP_PLATE > ( ) ;
//查询语句日期时间拼接起来格式化成yyyy-mm-dd hh24:mi:ss PROD_WGT
//strSql.AppendLine("SELECT * from(") ;
strSql . AppendLine ( "SELECT * from(" ) ;
strSql . AppendLine ( "SELECT" ) ;
strSql . AppendLine ( " DISTINCT GP.PLATE_NO " ) ;
strSql . AppendLine ( ",GI.INSP_B_DEP_FLAW2 " ) ;
@ -919,7 +927,7 @@ namespace ibk.IPD.Service.IPD_PS
//strSql.AppendLine(" OR GP.PLATE_NO = '23305886020202'");
strSql . AppendLine ( "ORDER BY GP.PLATE_NO" ) ;
//strSql.AppendLine(") where PLATE_NO = '23305886020202'") ;
strSql . AppendLine ( ") T where T.PLATE_NO = '24203388040204'" ) ;
try
{
//开启数据库连接查询数据
@ -1028,20 +1036,21 @@ namespace ibk.IPD.Service.IPD_PS
//TODO:TEST_DATA
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( "AND boi.ord_knd IN('A') " ) ;
//strSql.AppendLine("AND boi.ORD_NO NOT LIKE 'OMZ%'");
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
//strSql.AppendLine(" or boi.ORD_NO ='OM723020004'");
//strSql.AppendLine(" AND boi.ORD_ITEM ='092'");
@ -1333,19 +1342,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN <> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK <> 0 " ) ;
strSql . AppendLine ( "WHERE 1 = 1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( "AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -1390,18 +1400,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( " where BOI.ORD_WID > 0 " ) ;
strSql . AppendLine ( " AND BOI.ORD_LEN > 0 " ) ;
strSql . AppendLine ( " AND BOI.ORD_THK > 0 " ) ;
strSql . AppendLine ( " and boi.PROD_CD = 'PP' " ) ;
strSql . AppendLine ( " AND boi.REC_STS = '2' " ) ;
strSql . AppendLine ( " and boi.ORD_STS IN('E', 'D') " ) ;
//strSql.AppendLine(" and boi.PROD_CD = 'PP' ") ;
//strSql.AppendLine(" AND boi.REC_STS = '2' ") ;
//strSql.AppendLine( " and boi.ORD_STS IN('E', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND ((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') + 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 TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
//strSql.AppendLine(" AND ((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') + 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 ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3629,19 +3641,20 @@ namespace ibk.IPD.Service.IPD_PS
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 ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3689,19 +3702,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
strSql . AppendLine ( " )" ) ;
@ -3749,19 +3763,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3810,19 +3825,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3870,19 +3886,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3930,19 +3947,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -3990,19 +4008,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4050,19 +4069,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4111,19 +4131,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4171,19 +4192,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4232,19 +4254,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4292,19 +4315,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;
@ -4353,19 +4377,20 @@ namespace ibk.IPD.Service.IPD_PS
strSql . AppendLine ( "AND BOI.ORD_LEN<> 0 " ) ;
strSql . AppendLine ( "AND BOI.ORD_THK<> 0 " ) ;
strSql . AppendLine ( "WHERE 1=1 " ) ;
strSql . AppendLine ( " AND ((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') + 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', 'D') " ) ;
//strSql.AppendLine( " AND ((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') + 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', 'D') ");
strSql . AppendLine ( " AND boi.ord_knd IN('A') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(SYSDATE - 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( " AND TO_CHAR(TO_DATE(boi.DEL_TO_DATE, 'YYYYMMDD'), 'YYYY-MM-DD HH24:MI:SS') <= TO_CHAR(SYSDATE + 180, 'YYYY-MM-DD HH24:MI:SS') " ) ;
strSql . AppendLine ( strWHereOrd ) ;
strSql . AppendLine ( strSpecialOrd ) ;