From 476aea0586d6d80794e37b5b20eb1ad0a25bc468 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期一, 19 十二月 2022 15:56:04 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/WebAPIController.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 6aa23c6..d5525cd 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -955,7 +955,7 @@
//sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
if (Supplier != "")
{
- sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) ";
+ sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + HOrgID + "%' ) ";
}
try
{
@@ -1422,6 +1422,60 @@
string sql1 = "Select HItemID,HNumber ,HName from Gy_SettleStyle where HStopflag=0 and HEndFlag=1 ";
string sql = sql1 + sWhere;
ds = oCN.RunProcReturn(sql, "Gy_SettleStyle");
+ }
+
+ 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/GetPoStockStyleList_Json")]
+ [HttpGet]
+ public object GetPoStockStyleList_Json(string PoStockStyle)
+ {
+ if (PoStockStyle != "")
+ {
+ sWhere = sWhere + " and ( HNumber like '%" + PoStockStyle + "%' or HName like '%" + PoStockStyle + "%' ) ";
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName from Gy_PoStockStyle where HStopflag=0 Order by HItemID ", "Gy_PoStockStyle");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HNumber ,HName from Gy_PoStockStyle where HStopflag=0 and HEndFlag=1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_PoStockStyle");
}
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -3287,9 +3341,9 @@
/// <returns></returns>
[Route("Web/GetMaintainItemtemByEquipProjectID")]
[HttpGet]
- public object GetMaintainItemtemByEquipProjectID(int EquipProjectID)
+ public object GetMaintainItemtemByEquipProjectID(string EquipProjectID)
{
- if (EquipProjectID <= 0)
+ if (EquipProjectID == null)
{
objjson.code = "0";
objjson.count = 0;
--
Gitblit v1.9.1