From a09e6870ba5aedd996a8c3f401b715c922f4b780 Mon Sep 17 00:00:00 2001
From: WYB <908761037@qq.com>
Date: 星期三, 14 四月 2021 21:36:50 +0800
Subject: [PATCH] 不良评审原因列表选中逻辑编写
---
WebAPI/Controllers/WebAPIController.cs | 122 ++++++++++++++++++++++++++++++++++++++++
WebAPI/Properties/PublishProfiles/API.pubxml.user | 6 +-
2 files changed, 125 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 28dd8da..43c62a4 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -933,6 +933,128 @@
return objjson; ;
}
}
+
+ /// <summary>
+ /// 鑾峰彇涓嶈壇鍘熷洜鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetBadReasonList_Json")]
+ [HttpGet]
+ public object GetBadReasonList_Json(string BadReason)
+ {
+ //sWhere = " Where HStopFlag=0 and HEndFlag=1";
+ //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
+ if (BadReason != "")
+ {
+ sWhere = sWhere + " and ( HNumber like '%" + BadReason + "%' or HName like '%" + BadReason + "%' ) ";
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName from Gy_BadReason where HStopflag=0 Order by HItemID ", "Gy_BadReason");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HNumber ,HName from Gy_BadReason where HStopflag=0 and HEndFlag=1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_BadReason");
+ }
+
+ //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo);
+
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+
+ /// <summary>
+ /// 鑾峰彇宸ュ簭璁″垝鍗曞垪琛�
+ /// </summary>
+ /// <returns></returns>
+ //[Route("Web/GetPlanList_Json")]
+ //[HttpGet]
+ //public object GetPlanList_Json(string Billno)
+ //{
+ // //sWhere = " Where HStopFlag=0 and HEndFlag=1";
+ // //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
+ // if (Billno != "")
+ // {
+ // sWhere = sWhere + " and ( 鍗曟嵁鍙� like '%" + Billno + "%' ) ";
+ // }
+ // try
+ // {
+ // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ // if (sWhere == null || sWhere.Equals(""))
+
+ // {
+ // ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName from h_v_Sc_ProcessPlanList where HStopflag=0 Order by HItemID ", "Gy_BadReason");
+ // }
+ // else
+ // {
+ // string sql1 = "Select HItemID,HNumber ,HName from Gy_BadReason where HStopflag=0 and HEndFlag=1 ";
+ // string sql = sql1 + sWhere;
+ // ds = oCN.RunProcReturn(sql, "Gy_BadReason");
+ // }
+
+ // //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo);
+
+
+ // if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ // {
+ // objjson.code = "0";
+ // objjson.count = 0;
+ // objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ // objjson.data = null;
+ // return objjson;
+ // }
+ // else
+ // {
+ // objjson.code = "0";
+ // objjson.count = 1;
+ // objjson.Message = "鑾峰彇鎴愬姛!";
+ // objjson.data = ds.Tables[0];
+ // return objjson;
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+
+ // objjson.code = "0";
+ // objjson.count = 0;
+ // objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ // objjson.data = null;
+ // return objjson;
+ // }
+ //}
+
#endregion
}
diff --git a/WebAPI/Properties/PublishProfiles/API.pubxml.user b/WebAPI/Properties/PublishProfiles/API.pubxml.user
index 60e0dcd..540d76c 100644
--- a/WebAPI/Properties/PublishProfiles/API.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/API.pubxml.user
@@ -163,10 +163,10 @@
<publishTime>11/24/2014 11:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>04/13/2021 14:25:25</publishTime>
+ <publishTime>04/14/2021 19:13:54</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>04/13/2021 14:25:25</publishTime>
+ <publishTime>04/14/2021 19:13:54</publishTime>
</File>
<File Include="bin/WebAPI.XmlSerializers.dll">
<publishTime>02/04/2021 21:35:21</publishTime>
@@ -340,7 +340,7 @@
<publishTime>03/26/2021 14:35:48</publishTime>
</File>
<File Include="Web.config">
- <publishTime>04/12/2021 17:47:00</publishTime>
+ <publishTime>04/14/2021 19:15:03</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
--
Gitblit v1.9.1