|
|
@@ -1842,7 +1842,9 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1842
|
1842
|
/// 市场投诉处理时效明细表
|
|
1843
|
1843
|
/// </summary>
|
|
1844
|
1844
|
/// <returns></returns>
|
|
1845
|
|
- public ActionResult GetPrescriptionList(string stime, string endtime, string salesBase, string channel, int page = 1, int limit = 10)
|
|
|
1845
|
+ public ActionResult GetPrescriptionList(string stime, string endtime, string salesBase, string channel, string
|
|
|
1846
|
+
|
|
|
1847
|
+question, int page = 1, int limit = 10)
|
|
1846
|
1848
|
{
|
|
1847
|
1849
|
string sql = $" and F_IsDelete=0";
|
|
1848
|
1850
|
DataTable dt = new DataTable();
|
|
|
@@ -1856,6 +1858,10 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
1856
|
1858
|
{
|
|
1857
|
1859
|
sql += " and CONVERT(varchar , F_CreateOn, 120)<=CONVERT(varchar , '" + endtime.Trim() + " 23:59:59', 120) ";
|
|
1858
|
1860
|
}
|
|
|
1861
|
+ if (!string.IsNullOrEmpty(question))
|
|
|
1862
|
+ {
|
|
|
1863
|
+ sql += $" and T_Wo_WorkOrder.F_QuestionType in ( '" + GetComplaint("'" + question + "'") + "') "; ;
|
|
|
1864
|
+ }
|
|
1859
|
1865
|
if (!string.IsNullOrWhiteSpace(salesBase))//销售基地
|
|
1860
|
1866
|
sql += $" and F_SalesBase like '%" + salesBase.Trim() + "%'";
|
|
1861
|
1867
|
if (!string.IsNullOrWhiteSpace(channel))
|
|
|
@@ -2423,6 +2429,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
2423
|
2429
|
foreach (var it in modlelist)
|
|
2424
|
2430
|
{
|
|
2425
|
2431
|
var itemList = itembll.GetModelList(" F_WoID=" + it.F_ID + "and F_WoState=1" + " order by F_ID desc");
|
|
|
2432
|
+
|
|
2426
|
2433
|
if (itemList.Count > 0)
|
|
2427
|
2434
|
{
|
|
2428
|
2435
|
if (itemList[0].F_NextDept > 0)
|
|
|
@@ -2978,7 +2985,7 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
2978
|
2985
|
DataTable QuestionManage = DbHelperSQL.Query(Queststr).Tables[0];
|
|
2979
|
2986
|
List<Model.T_Wo_QuestionManage> categorylist = quesBLL.DataTableToList(QuestionManage);
|
|
2980
|
2987
|
List<Complainthandling> modeNamelList = new List<Complainthandling>(categorylist.Count);
|
|
2981
|
|
- var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal+ "order by F_ID desc ");
|
|
|
2988
|
+ //var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal+ "order by F_ID desc ");
|
|
2982
|
2989
|
if (modellist !=null )
|
|
2983
|
2990
|
{
|
|
2984
|
2991
|
for (int i=0;i < categorylist.Count; i++)
|
|
|
@@ -3041,26 +3048,36 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
3041
|
3048
|
worker.F_SalesBase = it.F_SalesBase;
|
|
3042
|
3049
|
worker.F_Description = it.F_Description;
|
|
3043
|
3050
|
string timeover = "", timeover2 = ""; int x = 0, y = 0;
|
|
|
3051
|
+ var itemList = itembll.GetModelList(" F_WoID=" + it.F_ID + "and F_WoState=1" + " order by F_ID desc");
|
|
|
3052
|
+
|
|
|
3053
|
+
|
|
|
3054
|
+ if (itemList[0].F_NextDept > 0)
|
|
|
3055
|
+ {
|
|
|
3056
|
+ var deptmodel = departmentBLL.GetModel(int.Parse(itemList[0].F_NextDept.ToString()));
|
|
|
3057
|
+ if (deptmodel != null)
|
|
|
3058
|
+ {
|
|
|
3059
|
+ worker.F_Responsibility = deptmodel.F_DeptName;
|
|
|
3060
|
+ }
|
|
|
3061
|
+
|
|
|
3062
|
+ }
|
|
3044
|
3063
|
int limit =0;
|
|
3045
|
|
- if (itemlasts != null )
|
|
|
3064
|
+ if (itemList != null )
|
|
3046
|
3065
|
{
|
|
3047
|
|
- for (int z = 0; z < itemlasts.Count; z++)
|
|
3048
|
|
- {
|
|
3049
|
|
- if (it.F_ID == itemlasts[z].F_WoID)
|
|
3050
|
|
- {
|
|
3051
|
|
- if (itemlasts[z].F_WoState >= 1)
|
|
|
3066
|
+ for (int z = 0; z < itemList.Count; z++)
|
|
|
3067
|
+ {
|
|
|
3068
|
+ if (itemList[z].F_WoState >= 1)
|
|
3052
|
3069
|
{
|
|
3053
|
|
- if (itemlasts[z].F_WoState == 1)
|
|
|
3070
|
+ if (itemList[z].F_WoState == 1)
|
|
3054
|
3071
|
{
|
|
3055
|
3072
|
x = z;
|
|
3056
|
|
- timeover = itemlasts[z].F_CreateTime.ToString();
|
|
3057
|
|
- limit =int .Parse ( itemlasts[z].F_LimitTime);
|
|
|
3073
|
+ timeover = itemList[z].F_CreateTime.ToString();
|
|
|
3074
|
+ limit =int .Parse (itemList[z].F_LimitTime);
|
|
3058
|
3075
|
}
|
|
3059
|
|
- if (itemlasts[z].F_WoState == 10)
|
|
|
3076
|
+ if (itemList[z].F_WoState == 10)
|
|
3060
|
3077
|
{
|
|
3061
|
3078
|
y = z;
|
|
3062
|
|
- timeover2 = itemlasts[z].F_CreateTime.ToString();
|
|
3063
|
|
- limit = int.Parse(itemlasts[z].F_LimitTime);
|
|
|
3079
|
+ timeover2 = itemList[z].F_CreateTime.ToString();
|
|
|
3080
|
+ limit = int.Parse(itemList[z].F_LimitTime);
|
|
3064
|
3081
|
}
|
|
3065
|
3082
|
}
|
|
3066
|
3083
|
if (timeover2 != "")
|
|
|
@@ -3073,14 +3090,14 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
3073
|
3090
|
double a = id.TotalHours;
|
|
3074
|
3091
|
worker.overtime = string .Format ("{0:f2}h", a - limit);
|
|
3075
|
3092
|
worker.time = a - limit;
|
|
3076
|
|
- if (itemlasts[x].F_NextDept > 0)
|
|
3077
|
|
- {
|
|
3078
|
|
- var deptment = departmentBLL.GetModel(int.Parse(itemlasts[x].F_NextDept.ToString()));
|
|
3079
|
|
- if (deptment != null)
|
|
3080
|
|
- {
|
|
3081
|
|
- worker.F_Responsibility = deptment.F_DeptName;
|
|
3082
|
|
- }
|
|
3083
|
|
- }
|
|
|
3093
|
+ //if (itemList[x].F_NextDept > 0)
|
|
|
3094
|
+ //{
|
|
|
3095
|
+ // var deptment = departmentBLL.GetModel(int.Parse(itemList[x].F_NextDept.ToString()));
|
|
|
3096
|
+ // if (deptment != null)
|
|
|
3097
|
+ // {
|
|
|
3098
|
+ // worker.F_Responsibility = deptment.F_DeptName;
|
|
|
3099
|
+ // }
|
|
|
3100
|
+ //}
|
|
3084
|
3101
|
|
|
3085
|
3102
|
}
|
|
3086
|
3103
|
else
|
|
|
@@ -3089,15 +3106,15 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
3089
|
3106
|
double a = id.TotalHours;
|
|
3090
|
3107
|
worker.overtime = string.Format("{0:f2}h", a - limit);
|
|
3091
|
3108
|
worker.time = a - limit;
|
|
3092
|
|
- if (itemlasts[y].F_NextDept > 0)
|
|
3093
|
|
- {
|
|
3094
|
|
- var deptment = departmentBLL.GetModel(int.Parse(itemlasts[y].F_NextDept.ToString()));
|
|
3095
|
|
- if (deptment != null)
|
|
3096
|
|
- {
|
|
3097
|
|
- worker.F_Responsibility = deptment.F_DeptName;
|
|
3098
|
|
- }
|
|
|
3109
|
+ //if (itemList[y].F_NextDept > 0)
|
|
|
3110
|
+ //{
|
|
|
3111
|
+ // var deptment = departmentBLL.GetModel(int.Parse(itemList[y].F_NextDept.ToString()));
|
|
|
3112
|
+ // if (deptment != null)
|
|
|
3113
|
+ // {
|
|
|
3114
|
+ // worker.F_Responsibility = deptment.F_DeptName;
|
|
|
3115
|
+ // }
|
|
3099
|
3116
|
|
|
3100
|
|
- }
|
|
|
3117
|
+ //}
|
|
3101
|
3118
|
|
|
3102
|
3119
|
}
|
|
3103
|
3120
|
}
|
|
|
@@ -3109,18 +3126,18 @@ namespace CallCenterApi.Interface.Controllers.report
|
|
3109
|
3126
|
double a = id.TotalHours;
|
|
3110
|
3127
|
worker.overtime = string.Format("{0:f2}h", a - limit);
|
|
3111
|
3128
|
worker.time = a - limit;
|
|
3112
|
|
- if (itemlasts[x].F_NextDept > 0)
|
|
3113
|
|
- {
|
|
3114
|
|
- var deptment = departmentBLL.GetModel(int.Parse(itemlasts[x].F_NextDept.ToString()));
|
|
3115
|
|
- if (deptment != null)
|
|
3116
|
|
- {
|
|
3117
|
|
- worker.F_Responsibility = deptment.F_DeptName;
|
|
3118
|
|
- }
|
|
3119
|
|
- }
|
|
|
3129
|
+ //if (itemList[x].F_NextDept > 0)
|
|
|
3130
|
+ //{
|
|
|
3131
|
+ // var deptment = departmentBLL.GetModel(int.Parse(itemList[x].F_NextDept.ToString()));
|
|
|
3132
|
+ // if (deptment != null)
|
|
|
3133
|
+ // {
|
|
|
3134
|
+ // worker.F_Responsibility = deptment.F_DeptName;
|
|
|
3135
|
+ // }
|
|
|
3136
|
+ //}
|
|
3120
|
3137
|
}
|
|
3121
|
3138
|
|
|
3122
|
3139
|
|
|
3123
|
|
- }
|
|
|
3140
|
+
|
|
3124
|
3141
|
|
|
3125
|
3142
|
}
|
|
3126
|
3143
|
}
|