diff --git a/余材异标准维护/PlateAnalysisStandard/.vs/PlateAnalysisStandard/v17/.suo b/余材异标准维护/PlateAnalysisStandard/.vs/PlateAnalysisStandard/v17/.suo index 19caaff..7a594a0 100644 Binary files a/余材异标准维护/PlateAnalysisStandard/.vs/PlateAnalysisStandard/v17/.suo and b/余材异标准维护/PlateAnalysisStandard/.vs/PlateAnalysisStandard/v17/.suo differ diff --git a/余材替代程序/SinglePlateHandle/.vs/SinglePlateHandle/v17/.suo b/余材替代程序/SinglePlateHandle/.vs/SinglePlateHandle/v17/.suo index ac08161..9f24ff8 100644 Binary files a/余材替代程序/SinglePlateHandle/.vs/SinglePlateHandle/v17/.suo and b/余材替代程序/SinglePlateHandle/.vs/SinglePlateHandle/v17/.suo differ diff --git a/余材替代程序/SinglePlateHandle/SinglePlateHandle/SurMatSubService.cs b/余材替代程序/SinglePlateHandle/SinglePlateHandle/SurMatSubService.cs index b50191f..2bdca3b 100644 --- a/余材替代程序/SinglePlateHandle/SinglePlateHandle/SurMatSubService.cs +++ b/余材替代程序/SinglePlateHandle/SinglePlateHandle/SurMatSubService.cs @@ -22,8 +22,6 @@ namespace ibk.IPD.Service.IPD_PS #region 获取存储数据 - - /// /// 获取所有未确认数据 /// diff --git a/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.exe b/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.exe index 1a48501..b97a5c6 100644 Binary files a/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.exe and b/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.exe differ diff --git a/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.pdb b/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.pdb index b4abf16..c386dbc 100644 Binary files a/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.pdb and b/余材替代程序/SinglePlateHandle/SinglePlateHandle/bin/Debug/SinglePlateHandle.pdb differ diff --git a/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.exe b/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.exe index 1a48501..b97a5c6 100644 Binary files a/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.exe and b/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.exe differ diff --git a/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.pdb b/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.pdb index b4abf16..c386dbc 100644 Binary files a/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.pdb and b/余材替代程序/SinglePlateHandle/SinglePlateHandle/obj/Debug/SinglePlateHandle.pdb differ diff --git a/前端程序/ipd-frontend/src/pages/materialsSubstitution/mainPlate.tsx b/前端程序/ipd-frontend/src/pages/materialsSubstitution/mainPlate.tsx index a75cd6e..7ee3d4e 100644 --- a/前端程序/ipd-frontend/src/pages/materialsSubstitution/mainPlate.tsx +++ b/前端程序/ipd-frontend/src/pages/materialsSubstitution/mainPlate.tsx @@ -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 = () => { /> - - - - {/* */} - - + {/* @@ -960,6 +936,43 @@ const Main = () => { /> */} + + + + + + + + + {/* */} + + diff --git a/前端程序/ipd-frontend/src/pages/slabSubstitution/history.tsx b/前端程序/ipd-frontend/src/pages/slabSubstitution/history.tsx index df26479..44781a5 100644 --- a/前端程序/ipd-frontend/src/pages/slabSubstitution/history.tsx +++ b/前端程序/ipd-frontend/src/pages/slabSubstitution/history.tsx @@ -703,7 +703,8 @@ const Main = () => { labelName="PLT" /> - + {/* , marginLeft: -60 */} + 0) - // { - // gQP_TEST_HEAD_SMP = ModelConvertHelper1.ConvertToModel(gQP_TEST_HEAD_SMP1); - // } + // if (gQP_TEST_HEAD_SMP1.Rows.Count > 0) + // { + // gQP_TEST_HEAD_SMP = ModelConvertHelper1.ConvertToModel(gQP_TEST_HEAD_SMP1); + // } logger.Info("【2_00试样号】:" + gQP_TEST_HEAD_SMP.Count); }); @@ -580,12 +581,43 @@ 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("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) { @@ -3638,6 +3670,42 @@ namespace ibk.IPD return Math.Round(g_price + p_price, 2); } + /// + /// 获取检验费 + /// + /// + /// + /// + private static double getExperPriceStr(string strSMPNo) + { + double g_price = 0;//默认78元检验费,部分取样没有检验费用 + double p_price = 0; + + //取样价格 + if (!string.IsNullOrEmpty(strSMPNo)) + { + List 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); + } + /// /// 获取检验费 /// @@ -3646,13 +3714,17 @@ namespace ibk.IPD /// private static double getExperPrice(GP_PLATE plate, BP_ORDER_ITEM ORD_save) { - double g_price = 78;//默认78元检验费,部分取样没有检验费用 + double g_price = 0;//默认78元检验费,部分取样没有检验费用 double p_price = 0; //取样价格 if (!string.IsNullOrEmpty(plate.SMP_NO)) { List data = doHttpPost(plate.SMP_NO); + + ////接口数据 + //logger.InfoFormat("式样号:{0};订单号:{1}-{2}") ; + if (data.Count > 0) { foreach (var ds in data) @@ -3661,7 +3733,11 @@ namespace ibk.IPD } } } - + if (p_price == 0) + { + g_price = 78; + logger.InfoFormat("接口缺少价格=>式样号{0}", plate.SMP_NO); + } //最终价格 return Math.Round(g_price + p_price, 2); } diff --git a/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.exe b/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.exe index 27b7aeb..9316b28 100644 Binary files a/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.exe and b/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.exe differ diff --git a/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.pdb b/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.pdb index fe62bf4..7a44830 100644 Binary files a/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.pdb and b/取样并样程序/SubResult/SubResult/bin/Debug/SubResult.pdb differ diff --git a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.csproj.AssemblyReference.cache b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.csproj.AssemblyReference.cache index 931b790..72bcbe4 100644 Binary files a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.csproj.AssemblyReference.cache and b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.csproj.AssemblyReference.cache differ diff --git a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.exe b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.exe index 27b7aeb..9316b28 100644 Binary files a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.exe and b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.exe differ diff --git a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.pdb b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.pdb index fe62bf4..7a44830 100644 Binary files a/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.pdb and b/取样并样程序/SubResult/SubResult/obj/Debug/SubResult.pdb differ diff --git a/后端接口/ipd-server/.vs/iBkLinker-IPD/v17/.suo b/后端接口/ipd-server/.vs/iBkLinker-IPD/v17/.suo index 3ff7dec..491d48f 100644 Binary files a/后端接口/ipd-server/.vs/iBkLinker-IPD/v17/.suo and b/后端接口/ipd-server/.vs/iBkLinker-IPD/v17/.suo differ diff --git a/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.dll b/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.dll index 8b9e13d..98a0bb6 100644 Binary files a/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.dll and b/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.dll differ diff --git a/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.pdb b/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.pdb index 829e3bf..779d26c 100644 Binary files a/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.pdb and b/后端接口/ipd-server/Debug/iBKLinker.IPD.Service.pdb differ diff --git a/后端接口/ipd-server/Service/Controller/IPD-PS/SurMatSubController.cs b/后端接口/ipd-server/Service/Controller/IPD-PS/SurMatSubController.cs index 6c9fc55..eac2e46 100644 --- a/后端接口/ipd-server/Service/Controller/IPD-PS/SurMatSubController.cs +++ b/后端接口/ipd-server/Service/Controller/IPD-PS/SurMatSubController.cs @@ -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("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("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 = "操作成功!"; diff --git a/后端接口/ipd-server/Service/Entity/IPD-PS/QueryArgs/SupersedeQueryArgs.cs b/后端接口/ipd-server/Service/Entity/IPD-PS/QueryArgs/SupersedeQueryArgs.cs index 9b307bc..25d214b 100644 --- a/后端接口/ipd-server/Service/Entity/IPD-PS/QueryArgs/SupersedeQueryArgs.cs +++ b/后端接口/ipd-server/Service/Entity/IPD-PS/QueryArgs/SupersedeQueryArgs.cs @@ -55,5 +55,8 @@ namespace ibk.IPD.Entity.IPD_PS.QueryArgs //板坯号 public string SLAB_NO { get; set; } + //轧制工厂 + public string PLT { get; set; } + } } diff --git a/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.dll b/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.dll index 8b9e13d..98a0bb6 100644 Binary files a/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.dll and b/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.dll differ diff --git a/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.pdb b/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.pdb index 829e3bf..779d26c 100644 Binary files a/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.pdb and b/后端接口/ipd-server/Service/obj/Debug/iBKLinker.IPD.Service.pdb differ