From 8401212a32752f485224c8c7aad0ebf7bbeb74a4 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 01 三月 2024 12:57:00 +0800
Subject: [PATCH] 应收单:增加保存、删除、查询、审核、关闭、作废权限控制
---
WebAPI/Controllers/LMESController.cs | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 104 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index a1fe776..a0f8cec 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -572,6 +572,7 @@
//鑾峰彇绯荤粺鍙傛暟
string Ret = "";
+ string Count = "";
if (oSystemParameter.ShowBill(ref Ret))
{
//鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
@@ -582,10 +583,16 @@
sWhere += sql_splice;
}
+ //鍒ゆ柇瀹㈡埛涓虹憺涓庣ズ
+ if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
+ {
+ Count = "top 1000";
+ }
}
+
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery");
+ ds = oCN.RunProcReturn("select " + Count + " * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc,CONVERT(int,娴佹按鍙�) asc", "h_v_Sc_ProcessExchangeIssueBillQuery");
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
@@ -1445,6 +1452,102 @@
}
#endregion
+ #region 閿�鍞粺璁℃姤琛�
+ [Route("LEMS/SeOutReportList")]
+ [HttpGet]
+ public object SeOutReportList(string DateYear, string HType, string user)
+ {
+ try
+ {
+ DataSet ds;
+ List<object> columnNameList = new List<object>();
+
+ if (DateYear == null || DateYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec [h_p_Xe_SeOutReportList] '" + DateYear + "','" + HType + "'", "[h_p_Sc_ProductionAnalysisReportList]");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 閿�鍞彂璐х粺璁℃姤琛�
+ [Route("LEMS/SeOutStockReportList")]
+ [HttpGet]
+ public object SeOutStockReportList(string DateYear, string HType, string user)
+ {
+ try
+ {
+ DataSet ds;
+ List<object> columnNameList = new List<object>();
+
+ if (DateYear == null || DateYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec [h_p_Xs_SeOutStockReportList] '" + DateYear + "','" + HType + "'", "[h_p_Sc_ProductionAnalysisReportList]");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 瀹㈡埛璁㈠崟 鐢熶骇璁㈠崟瀹屽伐
[Route("LEMS/sc_ICOMReportClose")]
[HttpPost]
--
Gitblit v1.9.1