From 9b2e97ed6a3ba9ba86b3cd2961e1766c711af907 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期五, 12 七月 2024 16:58:30 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 53 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs index 908f915..d17c116 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs @@ -68,6 +68,56 @@ } #endregion + #region 鍣ㄥ叿鐐规瑙勭▼鍗曞垪琛� + [Route("Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleListPDA")] + [HttpGet] + public object Sc_MouldDotCheckRuleListPDA(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString()); + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckRuleBillList", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "select * from h_v_Sc_MouldDotCheckRuleListByMould where 1 = 1" + sWhere + " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleListByMould"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 鍣ㄥ叿鐐规瑙勭▼ 淇濆瓨/缂栬緫 /// <summary> /// 淇濆瓨妯″叿缁翠慨鍗� @@ -146,7 +196,7 @@ item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� item.HRelationQty = 0; //鍏宠仈鏁伴噺 - oBill.DetailCol.Add(item); + oBill.DetailColl.Add(item); } @@ -254,7 +304,7 @@ } 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 + ""; @@ -266,6 +316,7 @@ objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; objJsonResult.list = list; + objJsonResult.data = ds.Tables[0]; } catch (Exception e) { -- Gitblit v1.9.1