From dcb8e353947615d5eb05982d1a0acc347c74405f Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 26 十月 2023 16:40:42 +0800 Subject: [PATCH] 客诉单报表(总报表,客户维度,部门维度,责任人维度,编码维度,问题类型维度) --- WebAPI/Controllers/品质管理/客诉处理单/Crm_CustomerAppealBillController.cs | 260 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 260 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 2ae5b4a..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" @@ -832,6 +832,57 @@ } #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> @@ -884,5 +935,214 @@ } } #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