From fae7220cb567ba0db21eb482ef8da767e8f63792 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期二, 17 八月 2021 18:32:34 +0800 Subject: [PATCH] 报工平台产量汇报加审核,web端产量汇报列表(编辑、审核、反审核、删除) --- WebAPI/Controllers/PublicPageMethodController.cs | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs index e5308b8..c0609af 100644 --- a/WebAPI/Controllers/PublicPageMethodController.cs +++ b/WebAPI/Controllers/PublicPageMethodController.cs @@ -2007,7 +2007,110 @@ #endregion + #region 閫夋嫨淇濆吇椤圭洰鍩虹璧勬枡 + #region 鏉′欢鏌ヨ淇濆吇椤圭洰鍒楄〃 + [Route("PublicPageMethod/MaintainList")] + [HttpGet] + public object MaintainList(string sWhere) + { + try + { + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Maintain " + sWhere + " Order by HItemID ", "Gy_Maintain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒"; + 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/MaintainCX")] + [HttpGet] + public object MaintainCX(long HInterID) + { + try + { + + ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_Maintain WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_Maintain AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_Maintain"); + 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/MaintainLoadTree")] + [HttpGet] + public object MaintainLoadTree(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_Maintain " + sWhere + "", "Gy_Maintain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒"; + 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