Просмотр исходного кода

大区表,售后APP进度表

duhongyu лет назад: 5
Родитель
Сommit
81b5ad3270

Разница между файлами не показана из-за своего большого размера
+ 57 - 13
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 0 - 7
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/AddressBookController.cs

@@ -121,13 +121,6 @@ namespace CallCenterApi.Interface.Controllers
121 121
                 model.F_Telephone = it.F_Telephone;
122 122
                 model.F_Mobile = it.F_Mobile;
123 123
                 model.F_ElseMobile = it.F_ElseMobile;
124
-                if (it.F_PositionId  > 0)
125
-                {
126
-                    Model.T_Sys_RoleInfo t_Sys_RoleInfo   = new BLL.T_Sys_RoleInfo().GetModel(it.F_PositionId);
127
-                    if (t_Sys_RoleInfo != null)
128
-                        model.F_Position = t_Sys_RoleInfo.F_RoleName ;
129
-                }
130
-                else
131 124
                 model.F_Position = it.F_Position;
132 125
                 model.F_Note = it.F_Note;
133 126
                 if (it.F_DepartmentId >0 )

+ 373 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -72,6 +72,379 @@ namespace CallCenterApi.Interface.Controllers.report
72 72
 
73 73
             }
74 74
         }
75
+
76
+        public ActionResult AreaComplaint(string stime="", string endtime = "", int isdc=0)
77
+        {
78
+          List <Complaint>   complaintlist = new List<Complaint>();
79
+            DateTime strattime,enddatetime ;
80
+            string where = "F_IsDelete = 0 and F_Area is not null and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
81
+            if (stime=="")
82
+            {
83
+                strattime = DateTime.Now.AddDays(-6);
84
+                where += " and datediff(day,F_CreateTime,'" + strattime.ToString("yyyy-MM-dd") + "')<=0 ";
85
+            }
86
+            else
87
+            {
88
+                strattime = DateTime.Parse(stime);
89
+                where += " and datediff(day,F_CreateTime,'" + stime + "')<=0 ";
90
+            }
91
+            if (endtime=="")
92
+            {
93
+                enddatetime = DateTime.Now;
94
+                where += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0 ";
95
+            }
96
+            else
97
+            {
98
+                enddatetime = DateTime.Parse(endtime);
99
+                where += " and datediff(day,F_CreateTime,'" + endtime + "')>=0 ";
100
+            }
101
+            var workoeder = new BLL.T_Bus_WorkOrder().GetModelList(where);
102
+            var Area = new BLL.T_Sys_Department().GetModelList("isnull(F_ParentId, 1) = 1 and F_State = 1 and F_Layer = 1");
103
+            float max = 0; float min = 0;
104
+            string maxarea = "", minarea="";
105
+            Complaint complaints = new Complaint();
106
+            complaints.serialnumbe = 20;
107
+            complaints.area = "合计";
108
+            float Distributionrate = 0;
109
+            float  documentary = 0;
110
+            if (workoeder!=null )
111
+            {
112
+                for (int i=0;i < Area.Count;i ++ )
113
+                {
114
+                    Complaint complaint = new Complaint();
115
+                    complaint.serialnumbe = i + 1;//序号
116
+                    complaint.area = Area[i].F_DeptName;//大区
117
+                    var group = workoeder.Where(p => p.F_Area == Area[i].F_DeptId.ToString()) ;//投诉总量
118
+                    complaint.complaintnumber = group.Count();
119
+                 
120
+
121
+                    complaint.assignmentnumber= group.Where(p => p.F_State  ==1 || p.F_State == 5).Count ();//待分派
122
+                    complaints.assignmentnumber += complaint.assignmentnumber;
123
+                    float a = 0;int c = 0;
124
+                    for (DateTime dt = strattime; dt <= enddatetime; dt = dt.AddDays (1))
125
+                      {
126
+                        c++;
127
+
128
+                      var daycount= group.Where(p => (p.F_TobeallocatedTime< dt.AddDays (1)&&( p .F_AssignmenttIime>= dt || p.F_AssignmenttIime==null) )
129
+                            ).Count();
130
+
131
+                        var today= group.Where(p => p.F_AssignmenttIime >= dt && p.F_AssignmenttIime < dt.AddDays(1)
132
+                            ).Count();
133
+
134
+                        if (daycount > 0)
135
+                            a += today / daycount;//当日分派率
136
+                        else
137
+                            a += 1;
138
+                      }
139
+                    complaint.assignmentrate = string.Format("{0:f2}%", a / c * 100);
140
+                    Distributionrate += a / c;
141
+                    complaint.pendingnumber = group.Where(p => p.F_State == 3).Count();//待处理
142
+                    complaints.pendingnumber += complaint.pendingnumber;
143
+                    complaint.processingnumber = group.Where(p => p.F_State == 4).Count();//处理中
144
+                    if (complaint.complaintnumber > 0)
145
+                        complaint.processingnumberrate = string.Format("{0:f2}%", complaint.processingnumber /(float ) complaint.complaintnumber * 100);//
146
+                    else
147
+                        complaint.processingnumberrate = "100%";
148
+
149
+                    complaints.processingnumber += complaint.processingnumber;
150
+                    complaint.processednumber = group.Where(p => p.F_State == 10).Count();//已处理
151
+                 
152
+                    complaints.processednumber += complaint.processednumber;
153
+                    float d = 0;
154
+                    if (complaint.complaintnumber > 0)
155
+                    {
156
+                        d = complaint.processednumber / (float)complaint.complaintnumber;
157
+                        complaint.processedrate = string.Format("{0:f2}%", complaint.processednumber / (float)complaint.complaintnumber * 100);//处理率
158
+                    }
159
+                    else
160
+                    {
161
+                        d = 1;
162
+                        complaint.processedrate = "100%";
163
+                    }
164
+                    if (i == 0)
165
+                    {
166
+                        min = d;
167
+                        max = d;
168
+                        maxarea = Area[i].F_DeptName;
169
+                        minarea = Area[i].F_DeptName;
170
+                    }
171
+                    else
172
+                    {
173
+                        if (d > max)
174
+                        {
175
+                            max = d;
176
+                            maxarea = Area[i].F_DeptName ;
177
+                        }
178
+                        if (d < min)
179
+                        {
180
+                            min = d;
181
+                            minarea = Area[i].F_DeptName;
182
+                        }
183
+                    }
184
+
185
+                    int reminder= group.Where(p => p.F_DealType == 1 ).Count();//催单数量
186
+                    documentary += reminder;
187
+                    int perfect= group.Where(p => p.F_DealState == 1).Count();//完善数量
188
+                    documentary += perfect;
189
+                    int total = reminder + perfect;
190
+                    if (group.Count()>0)
191
+                        complaint.documentaryrate = string.Format("{0:f2}%", total / (float)group.Count() * 100);//跟单率
192
+                    else
193
+                        complaint.documentaryrate = "100%";
194
+                    complaintlist.Add(complaint);
195
+                }
196
+                complaints.complaintnumber = workoeder.Count();
197
+                if (Area.Count>0)
198
+                complaints.assignmentrate = string.Format("{0:f2}%", Distributionrate / Area.Count  * 100); //当日分派率
199
+                else
200
+                    complaints.assignmentrate = "100%";
201
+                if (complaints.complaintnumber > 0)
202
+                    complaints.processedrate = string.Format("{0:f2}%", complaints.processednumber/(float )complaints.complaintnumber * 100);//处理率
203
+                else
204
+                    complaints.processedrate = "100%";
205
+                if (complaints.complaintnumber > 0)
206
+                    complaints.documentaryrate = string.Format("{0:f2}%", documentary / complaints.complaintnumber * 100);//跟单率
207
+                else
208
+                    complaints.documentaryrate = "100%";
209
+                if (complaints.complaintnumber > 0)
210
+                    complaints.processingnumberrate = string.Format("{0:f2}%", complaints.processingnumber / (float)complaints.complaintnumber * 100);//
211
+                else
212
+                    complaints.processingnumberrate = "100%";
213
+                complaintlist.Add(complaints);
214
+               
215
+                if (isdc>0)
216
+                {
217
+                    NPOIHelper npoi = new NPOIHelper();
218
+                    if (npoi.Complainthandling(strattime, enddatetime, complaintlist, maxarea,minarea ) == "")
219
+                    {
220
+                        return Success("导出成功");
221
+                    }
222
+                    else
223
+                    {
224
+                        return Error("导出失败");
225
+                    }
226
+                }
227
+                else
228
+                {
229
+                    var obj = new
230
+                    {
231
+                        complaintlist,
232
+                        maxarea,
233
+                        minarea,
234
+                    };
235
+                    return Success("获取成功", obj.ToJson ());
236
+                }
237
+                
238
+            }
239
+            else
240
+            {
241
+                return Success("暂无数据");
242
+            }
243
+
244
+        }
245
+        public ActionResult Afterprogress(string stime = "", string endtime = "", int isdc = 0)
246
+        {
247
+            List<Aftersale> aftersalelist = new List<Aftersale>();
248
+            DateTime strattime, enddatetime;
249
+            string where = "F_IsDelete = 0 and F_Area is not null and (F_Type=2 or (F_Duplicate in(2,0)and F_Type=3))";
250
+            if (stime == "")
251
+            {
252
+                strattime =DateTime .Parse ( DateTime.Now.AddMonths (-1).ToString ("yyyy-MM-28"));
253
+                where += " and datediff(day,F_CreateTime,'" + strattime.ToString("yyyy-MM-dd") + "')<=0 ";
254
+            }
255
+            else
256
+            {
257
+                strattime = DateTime.Parse(stime);
258
+                where += " and datediff(day,F_CreateTime,'" + stime + "')<=0 ";
259
+            }
260
+            if (endtime == "")
261
+            {
262
+                enddatetime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-27"));
263
+                where += " and datediff(day,F_CreateTime,'" + DateTime.Now.ToString("yyyy-MM-dd") + "')>=0 ";
264
+            }
265
+            else
266
+            {
267
+                enddatetime = DateTime.Parse(endtime);
268
+                where += " and datediff(day,F_CreateTime,'" + endtime + "')>=0 ";
269
+            }
270
+            var workoeder = new BLL.T_Bus_WorkOrder().GetModelList(where);
271
+            var Area = new BLL.T_Sys_Department().GetModelList("isnull(F_ParentId, 1) = 1 and F_State = 1 and F_Layer = 1");
272
+            float max = 0; float min = 0;
273
+            string maxarea = "", minarea = "";
274
+            Aftersale complaints = new Aftersale();
275
+            complaints.serialnumbe = "合计";
276
+            complaints.area = "";
277
+            if (workoeder != null)
278
+            {
279
+                for (int i = 0; i < Area.Count; i++)
280
+                {
281
+                    Aftersale aftersale = new Aftersale();
282
+                    aftersale.serialnumbe = i + 1+"";//序号
283
+                    aftersale.area = Area[i].F_DeptName;//大区
284
+                    var group = workoeder.Where(p => p.F_Area == Area[i].F_DeptId.ToString());//投诉总量
285
+                    aftersale.total = group.Count();
286
+
287
+                    aftersale.assignmentnumber = group.Where(p => p.F_State == 3 || p.F_State == 4 || p.F_State == 10).Count();//分派投诉
288
+                    if (aftersale.total > 0)
289
+                        aftersale.assignmentrate = string.Format("{0:f2}%",(float )aftersale.assignmentnumber / aftersale.total * 100);//分派率
290
+                    else
291
+                        aftersale.assignmentrate = "100%";
292
+
293
+                    aftersale.receiving = group.Where(p => p.F_State == 4 || p.F_State == 10 ).Count();//接单条数
294
+                    if (aftersale.total > 0)
295
+                        aftersale.receivingrate = string.Format("{0:f2}%", (float)aftersale.receiving / aftersale.total * 100);//接单率
296
+                    else
297
+                        aftersale.receivingrate = "100%";
298
+                    aftersale.processingnumber = group.Where( p => p.F_State == 4).Count();//处理中投诉
299
+                    aftersale.processednumber = group.Where( p => p.F_State == 10).Count();//已处理投诉
300
+                    float d = 0;
301
+                    if (aftersale.total > 0)
302
+                    {
303
+                        d = (float)aftersale.processednumber / aftersale.total;
304
+                        aftersale.processed = d;
305
+                        aftersale.processedrate = string.Format("{0:f2}%", (float)aftersale.processednumber / aftersale.total * 100);//完结率
306
+                    }
307
+                       
308
+                    else
309
+                    {
310
+                        d = 1;
311
+                        aftersale.processed = 1;
312
+                        aftersale.processedrate = "100%";
313
+                    }
314
+                    if (i == 0)
315
+                    {
316
+                        min = d;
317
+                        max = d;
318
+                        maxarea = Area[i].F_DeptName;
319
+                        minarea = Area[i].F_DeptName;
320
+                    }
321
+                    else
322
+                    {
323
+                        if (d > max)
324
+                        {
325
+                            max = d;
326
+                            maxarea = Area[i].F_DeptName;
327
+                        }
328
+                        if (d < min)
329
+                        {
330
+                            min = d;
331
+                            minarea = Area[i].F_DeptName;
332
+                        }
333
+                    }
334
+                    int reminder = group.Where(p => p.F_DealType == 1).Count();//催单数量
335
+                    if (aftersale.total > 0)
336
+                        aftersale.reminderrate = string.Format("{0:f2}%", (float)reminder / aftersale.total * 100);//
337
+                    else
338
+                        aftersale.reminderrate = "100%";
339
+                    aftersale.name = User(Area[i].F_DeptName);
340
+                    aftersalelist.Add(aftersale);
341
+                }
342
+                complaints.total = workoeder.Count();
343
+                complaints.assignmentnumber = workoeder.Where(p => p.F_State == 3 || p.F_State == 4 || p.F_State == 10).Count();//分派投诉
344
+                if (complaints.total > 0)
345
+                    complaints.assignmentrate = string.Format("{0:f2}%", (float)complaints.assignmentnumber / complaints.total * 100);//分派率
346
+                else
347
+                    complaints.assignmentrate = "100%";
348
+
349
+                complaints.receiving = workoeder.Where(p => p.F_State == 4 || p.F_State == 10).Count();//接单条数
350
+                if (complaints.total > 0)
351
+                    complaints.receivingrate = string.Format("{0:f2}%", (float)complaints.receiving / complaints.total * 100);//接单率
352
+                else
353
+                    complaints.receivingrate = "100%";
354
+                complaints.processingnumber = workoeder.Where(p => p.F_State == 4).Count();//处理中投诉
355
+                complaints.processednumber = workoeder.Where(p => p.F_State == 10).Count();//已处理投诉
356
+                if (complaints.total > 0)
357
+                    complaints.processedrate = string.Format("{0:f2}%", (float)complaints.processednumber / complaints.total * 100);//完结率
358
+                else
359
+                    complaints.processedrate = "100%";
360
+                int remind= workoeder.Where(p => p.F_DealType == 1).Count();//催单数量
361
+                if (complaints.total > 0)
362
+                    complaints.reminderrate = string.Format("{0:f2}%", (float)remind / complaints.total * 100);//
363
+                else
364
+                    complaints.reminderrate = "100%";
365
+                complaints.name = "";
366
+                int pendingnumber = workoeder.Where(p => p.F_State == 3).Count();//
367
+                aftersalelist = aftersalelist.OrderByDescending(x => x.processed).ToList ();
368
+                aftersalelist.Add(complaints);
369
+                for (int i=0;i < aftersalelist.Count-1;i++)
370
+                {
371
+                    aftersalelist[i].serialnumbe = i+1+"";
372
+                }
373
+                if (isdc > 0)
374
+                {
375
+                    NPOIHelper npoi = new NPOIHelper();
376
+                    if (npoi.AftersaleToExcel(strattime, enddatetime, aftersalelist, maxarea, minarea, pendingnumber) == "")
377
+                    {
378
+                        return Success("导出成功");
379
+                    }
380
+                    else
381
+                    {
382
+                        return Error("导出失败");
383
+                    }
384
+                }
385
+                else
386
+                {
387
+                    var obj = new
388
+                    {
389
+                        aftersalelist,
390
+                        maxarea,
391
+                        minarea,
392
+                        pendingnumber
393
+                    };
394
+                    return Success("获取成功", obj.ToJson ()
395
+                        );
396
+                }
397
+                   
398
+            }
399
+            else
400
+            {
401
+                return Success("暂无数据");
402
+            }
403
+
404
+        }
405
+
406
+        /// <summary>
407
+        /// 
408
+        /// </summary>
409
+        /// <returns></returns>
410
+        private string User(string DeptName )
411
+        {
412
+            string user="";
413
+             if (DeptName== "京津"|| DeptName == "豫南" || DeptName == "豫北")
414
+            {
415
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("8009");
416
+                if (usermodel != null)
417
+                    user = usermodel.F_UserName;
418
+
419
+            }
420
+            else if (DeptName == "山东" || DeptName == "华东"  )
421
+            {
422
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("8010");
423
+                if (usermodel != null)
424
+                    user = usermodel.F_UserName;
425
+            }
426
+            else if ( DeptName == "川渝" || DeptName == "湘赣" || DeptName == "西北" || DeptName == "华南")
427
+            {
428
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("8011");
429
+                if (usermodel != null)
430
+                    user = usermodel.F_UserName;
431
+            }
432
+            else if (DeptName == "安徽" || DeptName == "湖北" || DeptName == "晋蒙"  || DeptName == "云贵" || DeptName == "陕宁")
433
+            {
434
+                
435
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("8012");
436
+                if (usermodel != null)
437
+                    user = usermodel.F_UserName;
438
+            }
439
+            else if (DeptName == "吉林" || DeptName == "辽宁" || DeptName == "黑龙江" || DeptName == "河北" || DeptName == "江苏" )
440
+            {
441
+                var usermodel = new BLL.T_Sys_UserAccount().GetModel("822249");
442
+                if (usermodel != null)
443
+                    user = usermodel.F_UserName;
444
+            }
445
+            return user;
446
+
447
+        }
75 448
         /// <summary>
76 449
         /// 坐席话务量
77 450
         /// </summary>

+ 31 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -167,8 +167,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
167 167
                 {
168 168
                     sql += $" and (F_IsReduction !='1'  or  F_IsReduction is null ) ";
169 169
                 }
170
+             
170 171
 
171
-              
172 172
                 if (incomplete== 0)
173 173
                 {
174 174
                     
@@ -2263,7 +2263,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2263 2263
             return NoToken("未知错误,请重新登录");
2264 2264
         }
2265 2265
         /// <summary>
2266
-        /// 接单 - 确认工单
2266
+        /// li - 确认工单
2267 2267
         /// </summary>
2268 2268
         /// <returns></returns>
2269 2269
         [Authority]
@@ -2430,6 +2430,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
2430 2430
                             creatuser = it.F_CreateUser;
2431 2431
                             wostate = 6;
2432 2432
                         }
2433
+                       
2434
+
2433 2435
                     }
2434 2436
                     else
2435 2437
                     {
@@ -2476,6 +2478,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2476 2478
                 model.F_Largeareaid = F_Largeareaid;
2477 2479
                 model.F_Notifications = creatuser;//通知人
2478 2480
                 model.F_State = wostate;
2481
+                if (wostate==5)
2482
+                {
2483
+                    model.F_TobeallocatedTime = DateTime.Now;
2484
+                }
2479 2485
                 if (!string.IsNullOrEmpty(model.F_Returnnote))
2480 2486
                     model.F_Returnnote += "," + cont;
2481 2487
                 else
@@ -2542,6 +2548,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2542 2548
                 {
2543 2549
                     model.F_Receiving  = DateTime.Now;
2544 2550
                 }
2551
+                if (wostate==4)
2552
+                {
2553
+                    model.F_ProcessingTime = DateTime.Now;
2554
+                }
2545 2555
                 //处理内容
2546 2556
                 if (!string.IsNullOrEmpty(model.F_DealResult))
2547 2557
                     model.F_DealResult +=";" +cont ;
@@ -2928,8 +2938,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
2928 2938
                 model.F_Office = F_Officeid.ToString();//转派办事处id
2929 2939
                 model.F_Distribution = F_Distribution; //转派分销组id
2930 2940
                 model.F_DealUser = touser;//已接单待处理;//已接单待处理
2931
-                model.F_TransferTime = DateTime .Now ;//
2932
-                
2941
+                if (wostate==1)
2942
+                {
2943
+                    if (model.F_TobeallocatedTime == null)
2944
+                    {
2945
+                        model.F_TobeallocatedTime = DateTime.Now; //待分派时间
2946
+                    }
2947
+                }
2948
+                else
2949
+                {
2950
+                    if (model.F_AssignmenttIime == null)
2951
+                    {
2952
+                        model.F_AssignmenttIime = DateTime.Now; //待分派时间
2953
+                    }
2954
+                    if (model.F_TransferTime == null)
2955
+                    {
2956
+                        model.F_TransferTime = DateTime.Now;
2957
+                    }
2958
+                }
2959
+               
2933 2960
                 workorderBLL.Update(model);
2934 2961
                 string optnext = "指派";
2935 2962
                 if (opt == "指派")

+ 22 - 11
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs

@@ -1314,12 +1314,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
1314 1314
                     }
1315 1315
 
1316 1316
                     if (!string.IsNullOrEmpty(idd.Trim()))
1317
-                    {
1318
-                        if (itembll.DeleteList(idd.TrimEnd(',')))
1319 1317
                         {
1320 1318
                             if (workorderBLL.DeleteList(idd.TrimEnd(',')))
1321 1319
                             {
1322
-
1323 1320
                                 return Success("设置成功");
1324 1321
 
1325 1322
                             }
@@ -1327,13 +1324,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1327 1324
                             {
1328 1325
                                 return Error("设置失败");
1329 1326
                             }
1330
-                        }
1331
-                        else
1332
-                        {
1333
-                            return Error("设置失败");
1334
-                        }
1335 1327
 
1336
-                    }
1328
+                        }
1337 1329
                     else
1338 1330
                     {
1339 1331
                         return Error("请选择工单");
@@ -1684,7 +1676,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1684 1676
                 {
1685 1677
                     if (itemlast.F_WoState >1)
1686 1678
                     {
1687
-                        if (it .F_WoState ==3)
1679
+                        if (it.F_WoState == 3 )
1688 1680
                         {
1689 1681
                             creatuser = it.F_CreateUser;
1690 1682
                             wostate = 5;
@@ -1740,6 +1732,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
1740 1732
                 model.F_Largeareaid = F_Largeareaid;
1741 1733
                 model.F_Notifications = creatuser;//通知人
1742 1734
                 model.F_State = wostate;
1735
+                if (wostate == 5)
1736
+                {
1737
+                    model.F_TobeallocatedTime = DateTime.Now;
1738
+                }
1743 1739
                 if (!string .IsNullOrEmpty (model .F_Returnnote))
1744 1740
                 model.F_Returnnote +=","+ cont;
1745 1741
                 else
@@ -1806,6 +1802,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
1806 1802
                 {
1807 1803
                     model.F_Receiving = DateTime.Now;
1808 1804
                 }
1805
+                if (wostate == 4)
1806
+                {
1807
+                    model.F_ProcessingTime = DateTime.Now;
1808
+                }
1809 1809
                 //处理内容
1810 1810
                 if (!string.IsNullOrEmpty(model.F_DealResult))
1811 1811
                     model.F_DealResult += ";"+ cont ;
@@ -1887,7 +1887,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
1887 1887
                 model.F_DealUser = touser;//已接单待处理;
1888 1888
                 model.F_Officeid = F_Officeid;//转派办事处id
1889 1889
                 model.F_Distribution = F_Distribution; //转派分销组id
1890
-                model.F_TransferTime = DateTime.Now;//
1890
+                if (wostate == 1)
1891
+                {
1892
+                    model.F_TobeallocatedTime = DateTime.Now; //待分派时间
1893
+                }
1894
+                else
1895
+                {
1896
+                    if (model.F_TransferTime == null)
1897
+                    {
1898
+                        model.F_TransferTime = DateTime.Now;
1899
+                    }
1900
+                    model.F_AssignmenttIime = DateTime.Now; //分派时间/待处理
1901
+                }
1891 1902
                 workorderBLL.Update(model);
1892 1903
                 string optnext = "指派";
1893 1904
                 if (opt == "指派")

+ 15 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Common/ButtonGroup.cs

@@ -37,6 +37,10 @@ namespace CallCenterApi.Interface.Models.Common
37 37
         {
38 38
             return new button(9, "催单");
39 39
         }
40
+        public static button Perfect()
41
+        {
42
+            return new button(10, "完善");
43
+        }
40 44
         /// <summary>
41 45
         /// 按钮类
42 46
         /// </summary>
@@ -84,6 +88,8 @@ namespace CallCenterApi.Interface.Models.Common
84 88
                     else if (code == "CLZY")
85 89
                     {
86 90
                         buttons.Add(Remin());
91
+                      
92
+                        
87 93
                     }
88 94
                     break;
89 95
                 case "3":
@@ -97,6 +103,7 @@ namespace CallCenterApi.Interface.Models.Common
97 103
                     else if (code == "CLZY")
98 104
                     {
99 105
                         buttons.Add(Remin());
106
+                      
100 107
                     }
101 108
                     break;
102 109
                 case "4":
@@ -110,6 +117,7 @@ namespace CallCenterApi.Interface.Models.Common
110 117
                     else if (code == "CLZY")
111 118
                     {
112 119
                         buttons.Add(Remin());
120
+                      
113 121
                     }
114 122
                     break;
115 123
                 case "5":
@@ -123,6 +131,7 @@ namespace CallCenterApi.Interface.Models.Common
123 131
                     else if (code == "CLZY")
124 132
                     {
125 133
                         buttons.Add(Remin());
134
+                       
126 135
                     }
127 136
                     break;
128 137
                 case "6":
@@ -144,6 +153,12 @@ namespace CallCenterApi.Interface.Models.Common
144 153
                     else if (code == "YWY" || code == "XTGLY" || code == "ZG")
145 154
                     {
146 155
                         buttons.Add(handle());
156
+                        buttons.Add(goback());
157
+                        
158
+                    }
159
+                    else if (code == "CLZY")
160
+                    {
161
+                        buttons.Add(Perfect());
147 162
                     }
148 163
                     break;
149 164
             }

+ 42 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

@@ -70,6 +70,43 @@ namespace CallCenterApi.Model
70 70
         private string _f_samplingproducts;
71 71
         private string _f_factories;
72 72
         private string _f_datecheck;
73
+        private int? _f_isassignment;
74
+        private DateTime? _f_tobeallocatedtime;
75
+        private DateTime? _f_assignmentttime;
76
+        private DateTime? _f_pendingtime;
77
+        private DateTime? _f_processingtime;
78
+        /// <summary>
79
+        ///待分派时间
80
+        /// </summary>
81
+        public DateTime? F_TobeallocatedTime
82
+        {
83
+            set { _f_tobeallocatedtime = value; }
84
+            get { return _f_tobeallocatedtime; }
85
+        }
86
+        /// <summary>
87
+        /// 分派时间
88
+        /// </summary>
89
+        public DateTime? F_AssignmenttIime
90
+        {
91
+            set { _f_assignmentttime = value; }
92
+            get { return _f_assignmentttime; }
93
+        }
94
+        /// <summary>
95
+        ///待处理时间
96
+        /// </summary>
97
+        public DateTime? F_PendingTime
98
+        {
99
+            set { _f_pendingtime = value; }
100
+            get { return _f_pendingtime; }
101
+        }
102
+        /// <summary>
103
+        ///处理中时间
104
+        /// </summary>
105
+        public DateTime? F_ProcessingTime
106
+        {
107
+            set { _f_processingtime = value; }
108
+            get { return _f_processingtime; }
109
+        }
73 110
         /// <summary>
74 111
         /// 涉及工厂
75 112
         /// </summary>
@@ -517,6 +554,11 @@ namespace CallCenterApi.Model
517 554
             set { _f_transfertime = value; }
518 555
             get { return _f_transfertime; }
519 556
         }
557
+        public int? F_ISAssignment
558
+        {
559
+            set { _f_isassignment = value; }
560
+            get { return _f_isassignment; }
561
+        }
520 562
         /// <summary>
521 563
         /// 接单时间
522 564
         /// </summary>

+ 37 - 1
codegit/CallCenterCommon/CallCenter.Utility/NPOI/Market.cs

@@ -22,7 +22,7 @@ namespace CallCenter.Utility
22 22
         public List<Factory> problem;
23 23
         public List<Factory> product;
24 24
     }
25
-    
25
+   
26 26
     public class Factory
27 27
     {
28 28
         public string name;
@@ -49,4 +49,40 @@ namespace CallCenter.Utility
49 49
         public string MonthCount5name;
50 50
         public string MonthCountmix5;
51 51
     }
52
+    /// <summary>
53
+    /// 大区投诉处理情况
54
+    /// </summary>
55
+    public class Complaint
56
+    {
57
+        public int  serialnumbe;//序号
58
+        public string  area;//大区
59
+        public int complaintnumber;//投诉起数
60
+        public int assignmentnumber;//待分派投诉
61
+        public string assignmentrate;//当日分派率
62
+        public int pendingnumber;//待处理投诉
63
+        public int processingnumber;//处理中投诉
64
+        public string processingnumberrate;//处理中
65
+        public int processednumber;//已处理投诉
66
+        public string processedrate;//处理率
67
+        public string documentaryrate;//跟单率
68
+    }
69
+    /// <summary>
70
+    ///售后APP工单当月进度统计表
71
+    /// </summary>
72
+    public class  Aftersale
73
+    {
74
+        public string  serialnumbe;//序号
75
+        public string area;//大区
76
+        public int total;//工单总数
77
+        public int assignmentnumber;//分派投诉
78
+        public string assignmentrate;//分派率
79
+        public int receiving;//接单条数
80
+        public string receivingrate;//接单率
81
+        public int processingnumber;//处理中投诉
82
+        public int processednumber;//已处理投诉
83
+        public float processed;
84
+        public string processedrate;//完结率
85
+        public string reminderrate;//催单率
86
+        public string name;//公关经理
87
+    }
52 88
 }

Разница между файлами не показана из-за своего большого размера
+ 459 - 2
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs