diff --git a/余坯替代——中板/SlabHandle/.vs/SlabHandle/v17/.suo b/余坯替代——中板/SlabHandle/.vs/SlabHandle/v17/.suo index f19fdf3..7b8f926 100644 Binary files a/余坯替代——中板/SlabHandle/.vs/SlabHandle/v17/.suo and b/余坯替代——中板/SlabHandle/.vs/SlabHandle/v17/.suo differ diff --git a/余坯替代——中板/SlabHandle/SlabHandle/SlabControler.cs b/余坯替代——中板/SlabHandle/SlabHandle/SlabControler.cs index e34952e..6242b7c 100644 --- a/余坯替代——中板/SlabHandle/SlabHandle/SlabControler.cs +++ b/余坯替代——中板/SlabHandle/SlabHandle/SlabControler.cs @@ -5740,6 +5740,16 @@ namespace SlabHandle tBPlateGrpMany.USE_FLG = "0"; } } + + foreach (TB_PLATE_GRP tBPlateGrpMany in gltTbPlateManyGrp) + { + //轧制长度大于计算的轧制长度 + if ((Math.Round(tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.MAX_LEN / 1000 * Convert.ToDecimal(7.85), 3)) > tBPlateGrpMany.MAX_WGT) + { + logger.Info("******** Use_Flg2 = 0 ***********"); + tBPlateGrpMany.USE_FLG = "0"; + } + } } catch (Exception) { @@ -7358,6 +7368,33 @@ namespace SlabHandle } + try + { + foreach (TB_PLATE_GRP tBPlateGrpMany in gltTbPlateManyGrp) + { + //轧制长度大于计算的轧制长度 + if ((tBPlateGrpMany.SLAB_LEN * tBPlateGrpMany.SLAB_WID * tBPlateGrpMany.THK) / (tBPlateGrpMany.CAL_THK * tBPlateGrpMany.CAL_THK) < tBPlateGrpMany.CAL_LEN) + { + logger.Info("******** Use_Flg = 0 ***********"); + tBPlateGrpMany.USE_FLG = "0"; + } + } + + foreach (TB_PLATE_GRP tBPlateGrpMany in gltTbPlateManyGrp) + { + //轧制长度大于计算的轧制长度 + if ((Math.Round(tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.MAX_LEN / 1000 * Convert.ToDecimal(7.85), 3)) > tBPlateGrpMany.MAX_WGT) + { + logger.Info("******** Use_Flg2 = 0 ***********"); + tBPlateGrpMany.USE_FLG = "0"; + } + } + } + catch (Exception) + { + logger.Info("********Use_Flg 报错***********"); + } + ChkSetSeq(tSlab); } @@ -7725,9 +7762,14 @@ namespace SlabHandle continue; } + //一坯多标准 + if (!ChkDiffCpNiscoChmcSl(TSCopy, iTbPlateGrp_S.STDSPEC, iTbPlateGrp_T.STDSPEC, tBPlateGrpMany.CAL_THK)) + { + continue; + } - //G1,G2,G3 的 高表订单不做一坯多标准替代 - if ( + //G1,G2,G3 的 高表订单不做一坯多标准替代 + if ( iTbPlateGrp_T.STDSPEC != iTbPlateGrp_S.STDSPEC && (iTbPlateGrp_T.CRU_PIEs.Where(p => ConvertToString(p.Order.STD_DET_CLASS_LVL).Contains("G1")).Count() > 0 || iTbPlateGrp_T.CRU_PIEs.Where(p => ConvertToString(p.Order.STD_DET_CLASS_LVL).Contains("G2")).Count() > 0 @@ -9003,6 +9045,33 @@ namespace SlabHandle } } + try + { + foreach (TB_PLATE_GRP tBPlateGrpMany in gltTbPlateManyGrp) + { + //轧制长度大于计算的轧制长度 + if ((tBPlateGrpMany.SLAB_LEN * tBPlateGrpMany.SLAB_WID * tBPlateGrpMany.THK) / (tBPlateGrpMany.CAL_THK * tBPlateGrpMany.CAL_THK) < tBPlateGrpMany.CAL_LEN) + { + logger.Info("******** Use_Flg = 0 ***********"); + tBPlateGrpMany.USE_FLG = "0"; + } + } + + foreach (TB_PLATE_GRP tBPlateGrpMany in gltTbPlateManyGrp) + { + //轧制长度大于计算的轧制长度 + if ((Math.Round(tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.CAL_THK / 1000 * tBPlateGrpMany.MAX_LEN / 1000 * Convert.ToDecimal(7.85), 3)) > tBPlateGrpMany.MAX_WGT) + { + logger.Info("******** Use_Flg2 = 0 ***********"); + tBPlateGrpMany.USE_FLG = "0"; + } + } + } + catch (Exception) + { + logger.Info("********Use_Flg 报错***********"); + } + ChkSetSeq(tSlab); } @@ -16871,7 +16940,6 @@ namespace SlabHandle } - ////剩余量大的剔除掉 //if (iSlab.REM_LEN >= 1000 && glFbSlabDes_T.Where(x => x.SLAB_NO == iSlab.SLAB_NO && x.BLOCK_SEQ == "00" && x.SEQ == "00").Count() == 2 // && (iSlab.ORG_LEN < 2700 && iSlab.ORG_WID < 2700)) diff --git a/余坯替代——中板/SlabHandle/SlabHandle/SlabServiceTest.cs b/余坯替代——中板/SlabHandle/SlabHandle/SlabServiceTest.cs index 84f56b0..5c53174 100644 --- a/余坯替代——中板/SlabHandle/SlabHandle/SlabServiceTest.cs +++ b/余坯替代——中板/SlabHandle/SlabHandle/SlabServiceTest.cs @@ -90,7 +90,7 @@ namespace SlabHandle strSql.AppendLine("WHERE 1 = 1 "); ////TODO:测试数据 - strSql.AppendLine(" AND A.SLAB_NO = '2410724811'"); + strSql.AppendLine(" AND A.SLAB_NO = '2520745003'"); //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(" from NISCO.QP_QLTY_MATR QQM "); strSql.AppendLine(" where(QQM.ORD_NO || '-' || QQM.ORD_ITEM) IN( "); - strSql.AppendLine(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012' "); + strSql.AppendLine(" 'OM725090040-171','OM725090041-040','OM725090043-160','OMG25080052-011' "); //OMK24010042-002 @@ -355,7 +355,7 @@ namespace SlabHandle 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 ( 'OM725090040-171','OM725090041-040','OM725090043-160','OMG25080052-011')"); //strSql.AppendLine(" AND "); //strSql.AppendLine(" (SELECT COUNT(A.REQ_SEQ_NO) "); @@ -407,9 +407,9 @@ namespace SlabHandle 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(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012'"); + //strSql.AppendLine(" 'OM725090040-171','OM725090041-040','OM725090043-160','OMG25080052-011'"); - strSql.AppendLine(" 'OM824080128-011','OMD24090008-085','OMD24090008-099','OMD24090008-300','OMD24090024-012'"); + strSql.AppendLine(" 'OM725090040-171','OM725090041-040','OM725090043-160','OMG25080052-011'"); //strSql.AppendLine("SELECT"); //strSql.AppendLine("TO_CHAR(BOI.ORD_NO), TO_CHAR(BOI.ORD_ITEM)"); //strSql.AppendLine("FROM NISCO.cp_prc CPP "); @@ -1287,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 = '2410724811 '"); + strSql.AppendLine(" AND A.SLAB_NO = '2520745003 '"); //strSql.AppendLine(" AND (A.CUR_INV IN('ZB','ZZ','HB','B1','52','C7','HC') " + @@ -1362,7 +1362,7 @@ namespace SlabHandle strSql.AppendLine(" FROM NISCO.FP_SLAB fs "); strSql.AppendLine(" START WITH fs.SLAB_NO "); strSql.AppendLine(" IN "); - strSql.AppendLine(" ( '2410724811' "); + strSql.AppendLine(" ( '2520745003' "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); @@ -1487,7 +1487,7 @@ namespace SlabHandle strSql.AppendLine(" FROM NISCO.FP_SLAB fs "); strSql.AppendLine(" START WITH fs.SLAB_NO "); strSql.AppendLine(" IN "); - strSql.AppendLine(" ( '2410724811' "); + strSql.AppendLine(" ( '2520745003' "); //strSql.AppendLine(" SELECT DISTINCT A.SLAB_NO "); diff --git a/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.exe b/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.exe index 9235ee2..1983e1f 100644 Binary files a/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.exe and b/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.exe differ diff --git a/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.pdb b/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.pdb index 64407b0..81eb870 100644 Binary files a/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.pdb and b/余坯替代——中板/SlabHandle/SlabHandle/bin/Debug/SlabHandle.pdb differ diff --git a/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.exe b/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.exe index 9235ee2..1983e1f 100644 Binary files a/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.exe and b/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.exe differ diff --git a/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.pdb b/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.pdb index 64407b0..81eb870 100644 Binary files a/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.pdb and b/余坯替代——中板/SlabHandle/SlabHandle/obj/Debug/SlabHandle.pdb differ