From 56fcaa1904a933c5f27c5fce65994e8b041e2a6e Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期二, 25 一月 2022 21:36:39 +0800
Subject: [PATCH] 委外加工入库 完善
---
WebAPI/Controllers/WebAPIController.cs | 61 +++++++++++++++++++++++++++++-
1 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index eec471f..e4d5592 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -122,12 +122,12 @@
return objjson;
}
- catch (Exception)
+ catch (Exception e)
{
objjson.code = "0";
objjson.count = 0;
- objjson.Message = "鐧诲綍寮傚父锛�";
+ objjson.Message = "鐧诲綍寮傚父锛�"+e.Message;
objjson.data = null;
return objjson; ;
}
@@ -1142,6 +1142,61 @@
}
}
+ #region 浜х嚎涓績鍒楄〃鏌ヨ
+ [Route("Web/Gy_LineCenter_Json")]
+ [HttpGet]
+ public object Gy_LineCenter_Json(string BadReason)
+ {
+ 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_LineCenter where HStopflag=0 Order by HItemID ", "Gy_LineCenter");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HNumber ,HName from Gy_LineCenter where HStopflag=0 and HEndFlag=1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_LineCenter");
+ sWhere = "";
+ }
+
+ 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
+
#region 涓嶈壇鍘熷洜璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
/// <summary>
/// 鑾峰彇涓嶈壇鍘熷洜鍒楄〃
@@ -1421,7 +1476,7 @@
try
{
//鍒犻櫎鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+ //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
//{
// objJsonResult.code = "0";
// objJsonResult.count = 0;
--
Gitblit v1.9.1