From fb4e1fa0c8902a54c5388431bb7da9a20a8b9c21 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 24 十一月 2023 12:22:57 +0800
Subject: [PATCH] 白坯发布汇总报表、染厂汇总报表、生产日记汇总报表、半成品报表:取消根据用户管理客户过滤
---
WebAPI/Controllers/MateOutController.cs | 93 +++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 83 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index bb18344..80f87be 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1341,6 +1341,7 @@
public string HProductName;
public string HProductModel;
public string RandomSearch;
+ public string OtherSearch;
}
#region 鐧藉澂鍙戝竷姹囨�绘姤琛�
@@ -1353,10 +1354,18 @@
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
+ //string sql = "" +
+ // "( (鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
+ // "and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
+ // "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''"+ com.HBillNo + "''='''') " +
+ // "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+ // "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch +
+ // " " + com.OtherSearch;
+
string sql = "" +
"( (鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
"and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
- "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''"+ com.HBillNo + "''='''') " +
+ "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
"and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
"and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
@@ -1474,6 +1483,14 @@
{
//鍙嶅簭鍒楀寲浼犻�掔殑鍊�
MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
+
+ //string sql = "" +
+ // "( (鐢熶骇璁㈠崟鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
+ // "and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
+ // "and (鐢熶骇璁㈠崟鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
+ // "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+ // "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch +
+ // " " + com.OtherSearch;
string sql = "" +
"( (鐢熶骇璁㈠崟鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
@@ -1834,6 +1851,55 @@
}
#endregion
+ #region 棰嗘枡缁熻鎶ヨ〃
+ /// <summary>
+ /// 棰嗘枡缁熻鎶ヨ〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("MateOutController/GetKf_MateOutSumReport_QiaoYi_Json")]
+ [HttpGet]
+ public object GetKf_MateOutSumReport_QiaoYi_Json(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("exec h_p_Kf_MateOutSumReport_QiaoYi " + sWhere, "h_p_Kf_MateOutSumReport_QiaoYi");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ棰嗘枡缁熻鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#endregion
@@ -2002,12 +2068,13 @@
#endregion
#region 鐢熶骇鏃ヨ鎶ヨ〃
- public class DayRkReport {
- public string HBeginDate { get; set; }
- public string HEndDate { get; set; }
- public string HMaterNumber { get; set; }
- public string HCustomerName { get; set; }
- public string HProductName { get; set; }
+ public class DayRkReport {
+ public string HBeginDate { get; set; }
+ public string HEndDate { get; set; }
+ public string HMaterNumber { get; set; }
+ public string HCustomerName { get; set; }
+ public string HProductName { get; set; }
+ public string HOtherSearch { get; set; }
}
[Route("MaterOutEntryReport/SC_DayRkReport")]
[HttpGet]
@@ -2016,9 +2083,12 @@
try
{
DayRkReport DayRkReportList = JsonConvert.DeserializeObject<DayRkReport>(sWhere);
-
+
+ //string sql = $"exec h_p_Gy_DayRkReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
+ // $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}','{DayRkReportList.HOtherSearch}'";
string sql = $"exec h_p_Gy_DayRkReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
$",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'";
+
ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport");
DataTable dt = null;
@@ -2080,6 +2150,7 @@
public string HMaterNumber { get; set; }
public string HCustomerName { get; set; }
public string HProductName { get; set; }
+ public string HOtherSearch { get; set; }
}
[Route("MaterOutEntryReport/SemiFinishedProductsReportList")]
[HttpGet]
@@ -2089,6 +2160,8 @@
{
SemiFinishedProductsReport DayRkReportList = JsonConvert.DeserializeObject<SemiFinishedProductsReport>(sWhere);
+ //string sql = $"exec h_p_sc_SemiFinishedProductsReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
+ // $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}','{DayRkReportList.HOtherSearch}'";
string sql = $"exec h_p_sc_SemiFinishedProductsReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
$",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'";
ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport");
@@ -2147,11 +2220,11 @@
#region 浜х嚎鏌ヨ
[Route("MaterOutEntryReport/Gy_SourceList")]
[HttpGet]
- public object Gy_SourceList(string HOrgid)
+ public object Gy_SourceList(string HOrgid,string sWhere)
{
try
{
- string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " order by hnumber");
+ string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source where HUSEORGID="+ HOrgid + " "+ sWhere + " order by hnumber");
ds = oCN.RunProcReturn(sql1, "Gy_Source");
--
Gitblit v1.9.1