From c2f1dec21079532e5d814d0f1df7ed33287ee49c Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 13 八月 2024 17:34:50 +0800 Subject: [PATCH] 增加项目号查询后端方法 --- WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 94 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 92 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs index 908f915..9e1745f 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) { @@ -341,5 +392,44 @@ } } #endregion + + #region[鍣ㄥ叿鐐规璁板綍琛紝閫夌偣妫�璁″垝鑾峰彇鐐规璁″垝娓呭崟淇℃伅] + [Route("Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBill_PlanList")] + [HttpGet] + public object Sc_MouldDotCheckPlanBill_PlanList(string HInterID, string HDate) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheck_GetPlanList " + HInterID + ",'" + HDate + "'", "h_p_Sc_MouldDotCheck_GetPlanList"); + + if (ds.Tables[0].Rows.Count != 0 || ds != null) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹俊鎭紒"; + objJsonResult.data = ds.Tables[0]; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙戠敓寮傚父锛屾病鏈夎繑鍥炰换浣曡鍒掞紒" + e.ToString(); + objJsonResult.data = null; + } + return objJsonResult; + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1