From e7be4d72351ffaa2de19c89082f07641872fdebc Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 31 七月 2024 13:43:40 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 254 insertions(+), 0 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 9f7174a..44079e2 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"
@@ -516,5 +516,259 @@
}
#endregion
+ #region 璐ㄩ噺妯″潡 鐢熶骇璐ㄩ噺缁熻鏃ユ姤
+ /// <summary>
+ /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_CustomerAppealReport/QC_QualityStatisticsDailyReport")]
+ [HttpGet]
+ public object QC_QualityStatisticsDailyReport(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 HYear = dic["HYear"].ToString();
+ string HMonth = dic["HMonth"].ToString();
+ int HDeptName = int.Parse(dic["HDeptName"].ToString());
+ int HOrgID = int.Parse(dic["HOrgID"].ToString());
+
+ ds = oCN.RunProcReturn("exec h_p_QC_QualityStatisticsDailyReport '" + HYear + "','" + HMonth + "'," + HDeptName + "," + HOrgID, "h_p_QC_QualityStatisticsDailyReport");
+
+ //娣诲姞鍒楀悕
+ 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_MoistureContentDataLedger")]
+ [HttpGet]
+ public object QC_MoistureContentDataLedger(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 HResult = dic["HResult"].ToString();
+ int HSourceID = int.Parse(dic["HSourceID"].ToString());
+
+ ds = oCN.RunProcReturn("exec h_p_QC_MoistureContentDataLedger '" + HBeginDate + "','" + HEndDate + "','" + HResult + "'," + HSourceID, "h_p_QC_MoistureContentDataLedger");
+
+ //娣诲姞鍒楀悕
+ 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("QC_CustomerAppealReport/getSc_StationOutBill_HProc")]
+ [HttpGet]
+ public object getSc_HMaterYieldStatistics(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sc_StationOutBillQuery_HProc order by 鏃ユ湡 desc", "h_v_Sc_StationOutBillQuery_HProc");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Sc_StationOutBillQuery_HProc where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鏃ユ湡 ";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_StationOutBillQuery_HProc");
+ }
+
+ //娣诲姞鍒楀悕
+ 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("QC_CustomerAppealReport/Get_EquipList")]
+ [HttpGet]
+ public object Get_EquipList(string HProcExchBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("select distinct b.HInterID HItemID,b.HName HName from SB_EquipICMOTechParamBillMain a left join Gy_EquipFileBillMain b on a.HEquipID=b.HInterID where HProcExchBillNo='" + HProcExchBillNo + "'", "SB_EquipICMOTechParamBillMain");
+
+ //娣诲姞鍒楀悕
+ 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("QC_CustomerAppealReport/SB_EquipICMOTechParamList")]
+ [HttpGet]
+ public object SB_EquipICMOTechParamList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+ string HProcExchBillNo = dic["HProcExchBillNo"].ToString();
+ string HProcName = dic["HProcName"].ToString();
+ string HTechParamName = dic["HTechParamName"].ToString();
+ string HEquipName = dic["HEquipName"].ToString();
+
+ if ((HProcExchBillNo == null || HProcExchBillNo == "")&&(HProcName == null || HProcName == "") && (HTechParamName == null || HTechParamName == "") && (HEquipName == null || HEquipName == ""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("exec h_p_SB_EquipICMOTechParamBillList '" + HProcExchBillNo + "','" + HProcName + "','" + HTechParamName + "',"+HEquipName, "h_p_SB_EquipICMOTechParamBillList");
+
+ //娣诲姞鍒楀悕
+ 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
+
}
}
--
Gitblit v1.9.1