From 11ac02f77d8a5974be31c1f4ba02ded87a12d079 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 05 八月 2024 17:31:28 +0800
Subject: [PATCH] 质量报表(不良品台账,异常管理台账)
---
WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs | 125 +++++++++++++++++++++++++++++++++++++++++
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml | 2
2 files changed, 126 insertions(+), 1 deletions(-)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
index a860d62..0a31ef0 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
@@ -931,5 +931,130 @@
}
}
#endregion
+
+ #region 璐ㄩ噺妯″潡 寮傚父绠$悊鍙拌处
+ /// <summary>
+ /// 杩斿洖寮傚父绠$悊鍙拌处
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport")]
+ [HttpGet]
+ public object QC_ErrManagerLedgerReport(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (sWhere == null || sWhere == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+ string HBeginDate = dic["HBeginDate"].ToString();
+ string HEndDate = dic["HEndDate"].ToString();
+ int HDeptID = int.Parse(dic["HDeptID"].ToString());
+ string HMaterModel = dic["HMaterModel"].ToString();
+ string HSourceName = dic["HSourceName"].ToString();
+ string HProSource = dic["HProSource"].ToString();
+ string HShiftsName = dic["HShiftsName"].ToString();
+ string HCustomize = dic["HCustomize"].ToString();
+
+ ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport '" + HBeginDate + "','" + HEndDate + "'," + HDeptID + ",'" + HMaterModel + "','" + HSourceName + "','" + HProSource + "','" + HShiftsName + "','" + HCustomize + "'", "h_p_QC_ErrManagerLedgerReport");
+
+ //娣诲姞鍒楀悕
+ 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 璐ㄩ噺妯″潡 涓嶈壇鍝佸彴璐�
+ /// <summary>
+ /// 杩斿洖寮傚父绠$悊鍙拌处
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_CustomerAppealReport/QC_BadProductsReport")]
+ [HttpGet]
+ public object QC_BadProductsReport(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (sWhere == null || sWhere == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+ string HBeginDate = dic["HBeginDate"].ToString();
+ string HEndDate = dic["HEndDate"].ToString();
+ string HMaterNumber = dic["HMaterNumber"].ToString();
+ string HMaterModel = dic["HMaterModel"].ToString();
+ string HProcessName = dic["HProcessName"].ToString();
+ string HDealingType = dic["HDealingType"].ToString();
+ string HSendManName = dic["HSendManName"].ToString();
+ string HCustomize = dic["HCustomize"].ToString();
+
+ ds = oCN.RunProcReturn("exec h_p_QC_BadProductsReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterNumber + "','" + HMaterModel + "','" + HProcessName + "','" + HDealingType + "','" + HSendManName + "','" + HCustomize + "'", "h_p_QC_BadProductsReport");
+
+ //娣诲姞鍒楀悕
+ 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
+
}
}
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
index 2403f43..9250916 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,7 +10,7 @@
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>x86</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
- <PublishUrl>G:\issWeb\缃戠珯鍙戝竷\API</PublishUrl>
+ <PublishUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
</PropertyGroup>
--
Gitblit v1.9.1