From 06f139a2d46f9a58c7d64c51bcab037606b61491 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 09 六月 2021 18:56:02 +0800 Subject: [PATCH] 增加 模治具退库单、 检验项目 编辑模块(新增,修改,删除功能), 及列表。 --- WebAPI/Controllers/PublicPageMethodController.cs | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 114 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs index 1904c5b..6e5fb36 100644 --- a/WebAPI/Controllers/PublicPageMethodController.cs +++ b/WebAPI/Controllers/PublicPageMethodController.cs @@ -929,7 +929,6 @@ #endregion - #region 閫夋嫨璁惧鍩虹璧勬枡 #region 鏉′欢鏌ヨ璁惧鍒楄〃 @@ -1044,5 +1043,119 @@ #endregion + #region 閫夋嫨妫�楠岄」鐩被鍒熀纭�璧勬枡 + + #region 鏉′欢鏌ヨ璁惧鍒楄〃 + [Route("PublicPageMethod/CheckItemTypeList")] + [HttpGet] + public object CheckItemTypeList(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_QCCheckClass where HStopflag=0 Order by HItemID", "Gy_QCCheckClass"); + } + else + { + string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_QCCheckClass where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "Gy_QCCheckClass"); + } + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏍规嵁鏍戝瀷id鏌ユ壘璁惧鍒楄〃 + [Route("Gy_MaintenanceMode/CheckItemTypeCX")] + [HttpGet] + public object CheckItemTypeCX(long HInterID) + { + try + { + + ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_QCCheckClass WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_QCCheckClass AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_QCCheckClass"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏍戝瀷鍒楄〃璁惧鍒楄〃鏁版嵁 + [Route("Gy_MaintenanceMode/CheckItemTypeLoadTree")] + [HttpGet] + public object CheckItemTypeLoadTree(string sWhere) + { + SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); + //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); + + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_QCCheckClass", "Gy_QCCheckClass"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + #endregion + + #endregion + } } -- Gitblit v1.9.1