瀏覽代碼

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

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

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

37
         /// 获取工单列表
37
         /// 获取工单列表
38
         /// </summary>
38
         /// </summary>
39
         /// <returns></returns>
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
             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)
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
                     sql += $"  and ( F_CusName like '%" + keywords.Trim() + "%'or F_CusPhone like '%" + keywords.Trim() + "%' ) ";
65
                     sql += $"  and ( F_CusName like '%" + keywords.Trim() + "%'or F_CusPhone like '%" + keywords.Trim() + "%' ) ";
66
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
66
                 if (!string.IsNullOrWhiteSpace(code))//工单编号
67
                     sql += $" and F_WorkOrderCode like '%" + code.Trim() + "%'";
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
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
73
                 if (!string.IsNullOrWhiteSpace(createby))//创建人
69
                 {
74
                 {
70
                     string F_WorkNumber = "";
75
                     string F_WorkNumber = "";
4390
                     model.F_IsAudit = model1[i].F_IsAudit;//是否审核
4395
                     model.F_IsAudit = model1[i].F_IsAudit;//是否审核
4391
                     model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
4396
                     model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
4392
                     model.F_CreateOn = model1[i].F_CreateOn; ;//添加时间
4397
                     model.F_CreateOn = model1[i].F_CreateOn; ;//添加时间
4393
-                 
4398
+                    model.F_Annotation = model1[i].F_Annotation; ;//注解
4394
                     if (!string .IsNullOrEmpty (model1[i].F_CreateBy))
4399
                     if (!string .IsNullOrEmpty (model1[i].F_CreateBy))
4395
                     {
4400
                     {
4396
                         Model.T_Sys_UserAccount creatname = sysUserAccountBll.GetModel(model1[i].F_CreateBy);
4401
                         Model.T_Sys_UserAccount creatname = sysUserAccountBll.GetModel(model1[i].F_CreateBy);
5100
                 return Error("无操作权限!");
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
         public ActionResult ReturnVisit(int orderid, string cont)
5145
         public ActionResult ReturnVisit(int orderid, string cont)
5104
         {
5146
         {
5105
             int userId = CurrentUser.UserData.F_UserId;
5147
             int userId = CurrentUser.UserData.F_UserId;

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

719
         {
719
         {
720
             get; set;
720
             get; set;
721
         }
721
         }
722
+        public string F_Annotation
723
+        {
724
+            get; set;
725
+        }
722
         /// <summary>
726
         /// <summary>
723
         /// 添加时间
727
         /// 添加时间
724
         /// </summary>
728
         /// </summary>

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

102
         private string  _f_sid;
102
         private string  _f_sid;
103
         private string _f_visitremarks;
103
         private string _f_visitremarks;
104
         private string _f_brand;
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
         public string F_Brand
111
         public string F_Brand
106
         {
112
         {
107
             set { _f_brand = value; }
113
             set { _f_brand = value; }
763
             set { _f_createby = value; }
769
             set { _f_createby = value; }
764
             get { return _f_createby; }
770
             get { return _f_createby; }
765
         }
771
         }
766
-    
772
+      
767
         /// <summary>
773
         /// <summary>
768
         /// 添加时间
774
         /// 添加时间
769
         /// </summary>
775
         /// </summary>