From a13f5ebdf7883ca79dd5d91234ff451ff551c6df Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期五, 06 八月 2021 13:46:46 +0800
Subject: [PATCH] 修改了模具生产领料单 模具生产退库单扫码 提交方法
---
WebAPI/Controllers/PublicPageMethodController.cs | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 228 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index b57dcde..c56fc90 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -815,6 +815,120 @@
#endregion
+ #region 閫夋嫨缁翠慨楠屾敹椤圭洰鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ缁翠慨楠屾敹椤圭洰鍒楄〃
+ [Route("PublicPageMethod/RepairCheckItemList")]
+ [HttpGet]
+ public object RepairCheckItemList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_RepairCheck where HStopflag=0 Order by HItemID", "Gy_RepairCheck");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_RepairCheck where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_RepairCheck");
+ }
+ 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/RepairCheckItemCX")]
+ [HttpGet]
+ public object RepairCheckItemCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_RepairCheck WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_RepairCheck AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_RepairCheck");
+ 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/RepairCheckItemLoadTree")]
+ [HttpGet]
+ public object RepairCheckItemLoadTree(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_RepairCheck", "Gy_RepairCheck");
+ 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
+
#region 閫夋嫨渚涘簲鍟嗗熀纭�璧勬枡
#region 鏉′欢鏌ヨ渚涘簲鍟嗗垪琛�
@@ -1043,6 +1157,120 @@
#endregion
+ #region 閫夋嫨鏁呴殰鍘熷洜璁剧疆鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鏁呴殰鍘熷洜璁剧疆鍒楄〃
+ [Route("PublicPageMethod/FaultReasonList")]
+ [HttpGet]
+ public object FaultReasonList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_ConkReason where HStopflag=0 Order by HItemID", "Gy_ConkReason");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_ConkReason where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_ConkReason");
+ }
+ 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/FaultReasonCX")]
+ [HttpGet]
+ public object FaultReasonCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_ConkReason WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_ConkReason AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_ConkReason");
+ 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/FaultReasonLoadTree")]
+ [HttpGet]
+ public object FaultReasonLoadTree(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_ConkReason", "Gy_ConkReason");
+ 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
+
#region 閫夋嫨璁惧鍩虹璧勬枡
#region 鏉′欢鏌ヨ璁惧鍒楄〃
--
Gitblit v1.9.1