From c48c7746efa89e3cbf38e089d20cd9029c2ce1c8 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 07 六月 2024 09:52:37 +0800 Subject: [PATCH] 模具点检单PDA 扫条码没有返回数据,核对匹配字段 --- WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 58 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs index caba032..6b503b2 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs @@ -83,8 +83,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); - string msg4 = sArray[2].ToString(); - string msg5 = sArray[3].ToString(); + string msg5 = sArray[2].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); @@ -147,35 +146,35 @@ item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� item.HRelationQty = 0; //鍏宠仈鏁伴噺 - oBill.DetailCol.Add(item); + oBill.DetailColl.Add(item); } - //閰嶄欢椤硅〃浣撴暟鎹� - //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� - msg4 = msg4.Substring(1, msg4.Length - 2); - msg4 = msg4.Replace("\\", ""); - msg4 = msg4.Replace("\n", ""); //\n - //msg2 = msg2.Replace("'", "鈥�"); - List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>(); - ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckRuleBillSub_Item(msg4); - int j = 0; - foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oItemSub in ls1) - { + ////閰嶄欢椤硅〃浣撴暟鎹� + ////鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� + //msg4 = msg4.Substring(1, msg4.Length - 2); + //msg4 = msg4.Replace("\\", ""); + //msg4 = msg4.Replace("\n", ""); //\n + // //msg2 = msg2.Replace("'", "鈥�"); + //List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>(); + //ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckRuleBillSub_Item(msg4); + //int j = 0; + //foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oItemSub in ls1) + //{ - j++; - oItemSub.HEntryID = j; - //oItemSub.HCloseMan = ""; //琛屽叧闂� - oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); - oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 + // j++; + // oItemSub.HEntryID = j; + // //oItemSub.HCloseMan = ""; //琛屽叧闂� + // oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); + // oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 - oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� - oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� + // oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� + // oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� - oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺 - oBill.DetailColl.Add(oItemSub); - } + // oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺 + // oBill.DetailColl.Add(oItemSub); + //} //淇濆瓨 @@ -255,18 +254,19 @@ } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁 - string sql = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckItemNumber,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + ""; + string sql = "select * from h_v_Sc_MouldDotCheckRuleBillSub where 1 = 1 " + Swhere + ""; ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillSub"); - //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 - string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark,鏍囧噯鐢ㄩ噺 HQtyMust from h_v_Sc_MouldDotCheckRuleBillSub_Item where 1 = 1 " + Swhere + ""; - ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldDotCheckRuleBillSub_Item"); + ////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 + //string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark,鏍囧噯鐢ㄩ噺 HQtyMust from h_v_Sc_MouldDotCheckRuleBillSub_Item where 1 = 1 " + Swhere + ""; + //ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldDotCheckRuleBillSub_Item"); list.Add(ds.Tables[0]); - list.Add(ds1.Tables[0]); + //list.Add(ds1.Tables[0]); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; objJsonResult.list = list; + objJsonResult.data = ds.Tables[0]; } catch (Exception e) { -- Gitblit v1.9.1