From 89873b7d156f21e7aa71b3f004a11ced2e7a7d4e Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期五, 29 十一月 2024 09:28:55 +0800 Subject: [PATCH] 日计划导入限制 --- Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 8 ++++++++ WebAPI/Controllers/条码管理/WEBSController.cs | 13 ++++++++++--- WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormImportController.cs | 26 ++++++++++++++++++++++++-- Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 2 +- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index b0a9f09..227bf4b 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -1739,6 +1739,10 @@ } //=======JIT + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "JIT_DayPlan_TimeFrame") + { + omodel.JIT_DayPlan_TimeFrame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //==========开班单 //自动审核 @@ -3775,6 +3779,10 @@ //=======JIT系统参数 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "JIT_DayPlan_TimeFrame") + { + omodel.JIT_DayPlan_TimeFrame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //==========开班单 //自动审核 diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs index e460fcc..a5cf9cf 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs @@ -554,7 +554,7 @@ //JIT - + public string JIT_DayPlan_TimeFrame; //设置导入计划日期范围 //开班单 public string Sc_MESBeginWorkBill_AutoCheck; //保存后是否自动审核 diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" index 394d0cd..8df30d4 100644 --- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" +++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormImportController.cs" @@ -20,6 +20,8 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); public static string BillType = "4610"; Sc_WorkBillSortBillMain omdelMian = new Sc_WorkBillSortBillMain(); + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + #region 鐢熶骇鏃ヨ鍒� 鏂囦欢涓婁紶 [Route("JIT_DayPlanPlatFormImport/JIT_DayPlanPlatFormImport_DR")] @@ -61,11 +63,16 @@ tb2.Columns.Add("ICMOBillHInterID", typeof(Int32));//鐢熶骇璁㈠崟涓籭d tb2.Columns.Add("ICMOBillHEntryID", typeof(Int32));//鐢熶骇璁㈠崟瀛恑d tb2.Columns.Add("HProdORGID", typeof(Int32));//缁勭粐id - tb2.Columns.Add("HSeOrderBillNo", typeof(string));//閿�鍞鍗曞彿 + tb2.Columns.Add("HSeOrderBillNo", typeof(string));//閿�鍞鍗曞彿 + //鑾峰彇绯荤粺鍙傛暟 + string Ret = ""; + oSystemParameter.ShowBill(ref Ret); + + LogService.Write("excel鍊硷細" + ExcelDs.Tables[0].Rows[1][15].ToString());//2024-11-26 //娣诲姞鏁版嵁 for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) - { + { DataRow row = tb2.NewRow(); for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) { @@ -75,6 +82,21 @@ if (ExcelDs.Tables[0].Rows[i][0].ToString() == "" && ExcelDs.Tables[0].Rows[i][1].ToString() == "") { continue; + } + else if (oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "0" && oSystemParameter.omodel.JIT_DayPlan_TimeFrame != "") + { + Int32 HDays = Convert.ToInt32(oSystemParameter.omodel.JIT_DayPlan_TimeFrame) * 7; + + + + + for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) + { + if (Convert.ToInt32(ExcelDs.Tables[0].Rows[i][j].ToString()) > 0 ) + { + continue; + } + } } else { diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 82909c1..fca57c4 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -4395,14 +4395,14 @@ FentityModel.Add("FQty", item["鍑�閲�"].ToString()); //鍑�閲� FentityModel.Add("FBASEUNITID", new JObject() { ["FNumber"] = item["鍩烘湰璁¢噺鍗曚綅浠g爜"].ToString() }); // 鍩烘湰鍗曚綅浠g爜 FentityModel.Add("FBASEQTY", item["瀹炴敹鏁伴噺"].ToString()); //瀹炴敹鏁伴噺 - FentityModel.Add("FSecUNITID", new JObject() { ["FNumber"] = item["搴撳瓨杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 搴撳瓨杈呰閲忓崟浣嶄唬鐮� + FentityModel.Add("FSecUNITID", new JObject() { ["FNumber"] = item["搴撳瓨杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 搴撳瓨杈呭崟浣� FentityModel.Add("FSecQTY", item["搴撳瓨杈呭崟浣嶅疄鏀舵暟閲�"].ToString()); //瀹炴敹鏁伴噺锛堝簱瀛樿緟鍗曚綅锛� FentityModel.Add("FOWNERTYPEID", item["璐т富绫诲瀷"].ToString()); //璐т富绫诲瀷 ???鏁板�� FentityModel.Add("FOWNERID", new JObject() { ["FNumber"] = item["璐т富浠g爜"].ToString() }); // 璐т富浠g爜 FentityModel.Add("FKEEPERTYPEID", item["淇濈鑰呯被鍨�"].ToString()); //淇濈鑰呯被鍨� ???鏁板�� FentityModel.Add("FKEEPERID", new JObject() { ["FNumber"] = item["淇濈鑰呬唬鐮�"].ToString() }); // 淇濈鑰呬唬鐮� FentityModel.Add("FAuxPropId", new JObject() { ["FAUXPROPID__FF100003"] = new JObject() { ["FNumber"] = item["杈呭姪灞炴�т唬鐮�"].ToString() } }); // 杈呭姪灞炴�� - FentityModel.Add("FExtAuxUnitId", new JObject() { ["FNumber"] = item["杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 杈呰閲忓崟浣嶄唬鐮� + FentityModel.Add("FExtAuxUnitId", new JObject() { ["FNumber"] = item["杈呰閲忓崟浣嶄唬鐮�"].ToString() }); // 杈呭崟浣� FentityModel.Add("FExtAuxUnitQty", item["绠辨暟"].ToString()); //绠辨暟 FentityModel.Add("F_TFKO_Assistant", new JObject() { ["FNumber"] = item["缃戝埆浠g爜"].ToString() }); // 缃戝埆 ???蹇呭~ FentityModel.Add("F_TFKO_Assistant1", new JObject() { ["FNumber"] = item["瀛斿瀷浠g爜"].ToString() }); // 瀛斿瀷 @@ -4495,7 +4495,7 @@ objJsonResult.data = null; return objJsonResult; } - + LogService.Write("鍏ュ簱鐢宠鍗曞悓姝ラ噾铦朵簯鎴愬姛锛�" + JsonConvert.SerializeObject(jsonRoot)); //鎻愪氦瀹℃牳 string result1 = string.Empty; string result2 = string.Empty; @@ -4534,6 +4534,13 @@ } } } + + sJXCode = sBarCode; + + //鏇存柊鏉$爜婧愬崟id淇℃伅 + sql = string.Format($@"update a set HSourceInterID = b.FID,HSourceEntryID = c.FEntryID from Gy_BarCodeBill a left join AIS20220609121235..TFKO_t_Cust100009 b on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); + //鎵ц鏇存柊璇彞 + oCn.RunProc(sql); } else { -- Gitblit v1.9.1