From 849e974e20d9894f3da95ebf504d97ce9f14c9ed Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 十二月 2024 15:03:25 +0800
Subject: [PATCH] 工艺路线撤回,出站汇报单修改时间功能能
---
WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 169 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
index 23437b0..ac7e7cc 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
@@ -8,6 +8,7 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
+using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -83,6 +84,67 @@
}
}
#endregion
+
+ #region 鏀舵鍗曞垪琛� 鏌ヨ-鍒嗛〉
+ /// <summary>
+ /// 杩斿洖椤圭洰闃舵鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("YS_ReceiveBill/list_byPage")]
+ [HttpGet]
+ public object getYS_ReceiveBill_byPage(string sWhere, string user, string Organization, int page, int size)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBillQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ sWhere = sWhere.Replace("'", "''");
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_YS_ReceiveBillList_Query " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_YS_ReceiveBillList_Query");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_YS_ReceiveBillList_Query " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_YS_ReceiveBillList_Query");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ 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("YS_ReceiveBill/SaveYS_ReceiveBill")]
@@ -169,6 +231,8 @@
return objJsonResult;
}
}
+ oItem.HMaker = msg4;
+ oItem.HUpDater = msg4;
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "2003";
oItem.HBillSubType = "2003";
@@ -1651,5 +1715,110 @@
}
}
#endregion
+
+
+ #region 鏀舵鍗曟煡璇㈠垪琛�
+ [Route("YS_ReceiveBill/QueryList")]
+ [HttpGet]
+ public object QueryList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+ if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBillQuery", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql = "select * from h_v_YS_ReceiveBillQuery where 1 = 1 ";
+
+ if (sWhere == "" || sWhere == null)
+ {
+ ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveBillQuery order by hmainid desc", "h_v_YS_ReceiveBillQuery");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_YS_ReceiveBillQuery");
+ }
+
+
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏀舵鍗曟煡璇㈠瓙鍒楄〃
+ [Route("YS_ReceiveBill/QuerySubList")]
+ [HttpGet]
+ public object QuerySubList(string hmainid, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+ if (!DBUtility.ClsPub.Security_Log("YS_ReceiveBillQuery", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql = "select * from h_v_YS_ReceiveBillQuerySub where hmainid = " + hmainid;
+
+ ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_YS_ReceiveBillQuerySub");
+
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1