Browse Source

大屏修改,增加筛选项,回访退单,增加注解

duhongyu 6 years ago
parent
commit
a8bd960d32

File diff suppressed because it is too large
+ 14 - 5
codegit/CallCenterApi/CallCenterApi.DAL/T_Wo_WorkOrder.cs


+ 16 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -2104,6 +2104,7 @@ question, int page = 1, int limit = 10)
2104 2104
             public string averageTime = "0h";//平均用时
2105 2105
             public string median = "0h";//中位数
2106 2106
             public string Overdue="0";//超期数量
2107
+            public string EndOverdue = "0";//超期数量
2107 2108
             public string efficiency = "0%";//效率提升率
2108 2109
             public List<worker> worker;
2109 2110
         }
@@ -2920,12 +2921,15 @@ question, int page = 1, int limit = 10)
2920 2921
         ///月份投诉处理周期表
2921 2922
         /// </summary>
2922 2923
         /// <returns></returns>
2923
-        public ActionResult GetComplainthandlList(string salesBase,string stime ="", string endtime="", string questionName = "" )
2924
+        public ActionResult GetComplainthandlList(string salesBase,string stime ="", string endtime="", string questionName = "" ,int isEnd=0)
2924 2925
         {
2925 2926
             string sql = $"  F_IsDelete=0";
2926 2927
             if (!string.IsNullOrWhiteSpace(salesBase))//销售基地
2927 2928
                 sql += $" and F_SalesBase like '%" + salesBase.Trim() + "%'";
2928
-         
2929
+         if (isEnd ==1)
2930
+                sql += $" and F_State !=11";
2931
+         else if (isEnd == 2)
2932
+                sql += $" and F_State =11 ";
2929 2933
             string Queststr = "";
2930 2934
             if (questionName!="")
2931 2935
             {
@@ -2995,6 +2999,7 @@ question, int page = 1, int limit = 10)
2995 2999
                     model.name = categorylist[i].F_QuestionName;
2996 3000
                     model.number = 0;
2997 3001
                     int Overdue = 0;
3002
+                    int EndOverdue = 0;
2998 3003
                     int efficiency = 0;
2999 3004
                     model.worker = new List<worker>();
3000 3005
                     int lastnumber = 0;
@@ -3012,7 +3017,7 @@ question, int page = 1, int limit = 10)
3012 3017
                                     double t = id.TotalHours;
3013 3018
                                     timehource.Add((float)t);
3014 3019
                                 }
3015
-                                if (it .F_IsOver ==1&& it.F_State !=11)
3020
+                                if (it .F_IsOver ==1)
3016 3021
                                 {
3017 3022
                                     worker worker = new worker();
3018 3023
                                     worker.F_WorkOrderCode = it.F_WorkOrderCode;
@@ -3026,7 +3031,9 @@ question, int page = 1, int limit = 10)
3026 3031
                                         worker.F_State = "异常退回";
3027 3032
                                     else if (it.F_State == 4)
3028 3033
                                         worker.F_State = "异常退回";
3029
-                                   else 
3034
+                                    else if (it.F_State == 11)
3035
+                                        worker.F_State = "已回访";
3036
+                                    else 
3030 3037
                                         worker.F_State = "已处理";
3031 3038
                                     if (it .F_Type == "1")
3032 3039
                                     {
@@ -3139,10 +3146,14 @@ question, int page = 1, int limit = 10)
3139 3146
                                             }
3140 3147
                                         }
3141 3148
                                         }
3142
-                                    Overdue++;
3149
+                                    if (it.F_State != 11)
3150
+                                        Overdue++;
3151
+                                    else
3152
+                                        EndOverdue++;
3143 3153
                                     model.worker.Add(worker);
3144 3154
                                 }
3145 3155
                                 model.Overdue = Overdue + "";
3156
+                                model.EndOverdue = EndOverdue + "";
3146 3157
                                 if (lastmodellist != null)
3147 3158
                                 {
3148 3159
                                     foreach (var iv in lastmodellist)

+ 44 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -37,7 +37,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
37 37
         /// 获取工单列表
38 38
         /// </summary>
39 39
         /// <returns></returns>
40
-        public ActionResult GetList(string code, string cusname, string cusphone, string createby, string starttime, string endtime, string keywords, string companyname, string province, string city,
40
+        public ActionResult GetList(string code,string visitResult, string cusname, string cusphone, string createby, string starttime, string endtime, string keywords, string companyname, string province, string city, string callresults ,
41 41
             string country, string telephone, string township, string touser, string strvisit, string endvisit, int source = 0, int type = 0, int status = 0, int state=-1, int pageindex = 1,int pagesize = 10)
42 42
         {
43 43
            
@@ -65,6 +65,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
65 65
                     sql += $"  and ( F_CusName like '%" + keywords.Trim() + "%'or F_CusPhone like '%" + keywords.Trim() + "%' ) ";
66 66
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
67 67
                     sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
68
+                if (!string.IsNullOrWhiteSpace(visitResult))//
69
+                    sql += $" and F_VisitResult = '" + visitResult.Trim() + "'";
70
+                if (!string.IsNullOrWhiteSpace(callresults))//
71
+                    sql += $" and F_Callresults = '" + callresults.Trim() + "'";
72
+                
68 73
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
69 74
                 {
70 75
                     string F_WorkNumber = "";
@@ -4390,7 +4395,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
4390 4395
                     model.F_IsAudit = model1[i].F_IsAudit;//是否审核
4391 4396
                     model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
4392 4397
                     model.F_CreateOn = model1[i].F_CreateOn; ;//添加时间
4393
-                 
4398
+                    model.F_Annotation = model1[i].F_Annotation; ;//注解
4394 4399
                     if (!string .IsNullOrEmpty (model1[i].F_CreateBy))
4395 4400
                     {
4396 4401
                         Model.T_Sys_UserAccount creatname = sysUserAccountBll.GetModel(model1[i].F_CreateBy);
@@ -5100,6 +5105,43 @@ namespace CallCenterApi.Interface.Controllers.workorder
5100 5105
                 return Error("无操作权限!");
5101 5106
             }
5102 5107
         }
5108
+        /// <summary>
5109
+        /// 注解
5110
+        /// </summary>
5111
+        /// <param name="orderid"></param>
5112
+        /// <param name="cont"></param>
5113
+        /// <returns></returns>
5114
+        public ActionResult Annotation(int orderid, string cont)
5115
+        {
5116
+            int userId = CurrentUser.UserData.F_UserId;
5117
+            if (userId != 0)
5118
+            {
5119
+                Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
5120
+                if (ua != null)
5121
+                {
5122
+                    Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
5123
+                    //验证信息 
5124
+                    if (model != null)
5125
+                    {
5126
+                        if (string .IsNullOrEmpty (model.F_Annotation))
5127
+                        {
5128
+                            model.F_Annotation = cont;
5129
+                        }
5130
+                        else
5131
+                        {
5132
+                            model.F_Annotation = model.F_Annotation + "。" + cont;
5133
+                        }
5134
+                        var res = workOrder.Update(model);
5135
+                        if (res)
5136
+                            return Success("注解成功");
5137
+                        else
5138
+                            return Error("注解失败!");
5139
+                    }
5140
+                    return Error("工单不存在");
5141
+                }
5142
+            }
5143
+            return Error("无操作权限");
5144
+        }
5103 5145
         public ActionResult ReturnVisit(int orderid, string cont)
5104 5146
         {
5105 5147
             int userId = CurrentUser.UserData.F_UserId;

+ 4 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Input/WorkOrderNewInput.cs

@@ -719,6 +719,10 @@ namespace CallCenterApi.Interface.Models.Input
719 719
         {
720 720
             get; set;
721 721
         }
722
+        public string F_Annotation
723
+        {
724
+            get; set;
725
+        }
722 726
         /// <summary>
723 727
         /// 添加时间
724 728
         /// </summary>

+ 7 - 1
codegit/CallCenterApi/CallCenterApi.Model/T_Wo_WorkOrder.cs

@@ -102,6 +102,12 @@ namespace CallCenterApi.Model
102 102
         private string  _f_sid;
103 103
         private string _f_visitremarks;
104 104
         private string _f_brand;
105
+        private string _f_annotation;
106
+        public string F_Annotation
107
+        {
108
+            set { _f_annotation = value; }
109
+            get { return _f_annotation; }
110
+        }
105 111
         public string F_Brand
106 112
         {
107 113
             set { _f_brand = value; }
@@ -763,7 +769,7 @@ namespace CallCenterApi.Model
763 769
             set { _f_createby = value; }
764 770
             get { return _f_createby; }
765 771
         }
766
-    
772
+      
767 773
         /// <summary>
768 774
         /// 添加时间
769 775
         /// </summary>