From 80d8f2b14624d78565733335dbb383a4af9724d3 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期六, 12 十月 2024 16:22:30 +0800
Subject: [PATCH] 工艺路线控制完善添加
---
WebAPI/Controllers/品质管理/客诉处理单/Crm_CustomerAppealBillController.cs | 313 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 313 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\256\242\350\257\211\345\244\204\347\220\206\345\215\225/Crm_CustomerAppealBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\256\242\350\257\211\345\244\204\347\220\206\345\215\225/Crm_CustomerAppealBillController.cs"
index c800119..77184da 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\256\242\350\257\211\345\244\204\347\220\206\345\215\225/Crm_CustomerAppealBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\256\242\350\257\211\345\244\204\347\220\206\345\215\225/Crm_CustomerAppealBillController.cs"
@@ -831,5 +831,318 @@
}
}
#endregion
+
+ #region 瀹㈣瘔澶勭悊鍗� 姹囨�绘姤琛ㄦ煡璇�
+ /// <summary>
+ /// 杩斿洖瀹㈣瘔澶勭悊鍗曟眹鎬绘姤琛ㄥ垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_CustomerAppealReport/Sum")]
+ [HttpGet]
+ public object Sum(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_Sum '" + sWhere + "'", "h_p_QC_CustomerAppealReport_Sum");
+ }
+
+ //娣诲姞鍒楀悕
+ 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/Customer")]
+ [HttpGet]
+ public object Customer(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_Customer '" + sWhere + "'", "h_p_QC_CustomerAppealReport_Customer");
+ }
+
+ //娣诲姞鍒楀悕
+ 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/Dept")]
+ [HttpGet]
+ public object Dept(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_Dept '" + sWhere + "'", "h_p_QC_CustomerAppealReport_Dept");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 瀹㈣瘔澶勭悊鍗� 璐d换浜虹淮搴︽姤琛ㄦ煡璇�
+ /// <summary>
+ /// 杩斿洖瀹㈣瘔澶勭悊鍗曡矗浠讳汉缁村害鎶ヨ〃鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("QC_CustomerAppealReport/Emp")]
+ [HttpGet]
+ public object Emp(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_Emp '" + sWhere + "'", "h_p_QC_CustomerAppealReport_Emp");
+ }
+
+ //娣诲姞鍒楀悕
+ 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/Material")]
+ [HttpGet]
+ public object Material(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_Material '" + sWhere + "'", "h_p_QC_CustomerAppealReport_Material");
+ }
+
+ //娣诲姞鍒楀悕
+ 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/ProblemType")]
+ [HttpGet]
+ public object ProblemType(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_QC_CustomerAppealReport_BadClass '" + sWhere + "'", "h_p_QC_CustomerAppealReport_BadClass");
+ }
+
+ //娣诲姞鍒楀悕
+ 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
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1