From 877a3643ea89282775a2a5ca25a2d79fbdfad0b7 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 九月 2024 08:14:56 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 3d381bf..5d82ab6 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -22,7 +22,7 @@
//鑾峰彇绯荤粺鍙傛暟
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
-
+ public string sWhere = "";
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
@@ -237,7 +237,7 @@
#region 鑾峰彇椤圭洰鍙�
[Route("Gy_Material/Get_HProject")]
[HttpGet]
- public object Get_HProject(string HOrgID)
+ public object Get_HProject()
{
try
{
@@ -261,6 +261,59 @@
}
#endregion
+ /// <summary>
+ /// 鑾峰彇椤圭洰鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Gy_Material/GetProjectGroupList_Json")]
+ [HttpGet]
+ public object GetProjectGroupList_Json(string Unit)
+ {
+ if (Unit != "" && Unit != null)
+ {
+ sWhere = sWhere + " and ( HBillNo like '%" + Unit + "%' or HProName like '%" + Unit + "%' ) ";
+ }
+
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HInterID,HBillNo 椤圭洰浠g爜,HProName 椤圭洰缁� from PM_ProjectBillMain where HCloseType = 0 Order by HInterID ", "PM_ProjectBillMain");
+ }
+ else
+ {
+ string sql1 = "Select HInterID,HBillNo 椤圭洰浠g爜,HProName 椤圭洰缁� from PM_ProjectBillMain where HCloseType = 0 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "PM_ProjectBillMain");
+ }
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇鎴愬姛!";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#region 鑾峰彇浜嬩笟閮�
[Route("Gy_Material/Get_Gy_Division")]
[HttpGet]
--
Gitblit v1.9.1