|
|
@@ -2,6 +2,7 @@
|
|
2
|
2
|
using CallCenterApi.Common;
|
|
3
|
3
|
using CallCenterApi.Interface.Controllers.Base;
|
|
4
|
4
|
using CallCenterApi.Interface.Controllers.workorder;
|
|
|
5
|
+using CallCenterApi.Interface.Models.Enum;
|
|
5
|
6
|
using System;
|
|
6
|
7
|
using System.Collections.Generic;
|
|
7
|
8
|
using System.Data;
|
|
|
@@ -249,10 +250,15 @@ namespace CallCenterApi.Interface.Controllers
|
|
249
|
250
|
}
|
|
250
|
251
|
|
|
251
|
252
|
BLL.T_Wo_WorkOrder bll = new BLL.T_Wo_WorkOrder();
|
|
252
|
|
- var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];
|
|
253
|
|
- var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
254
|
|
- var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =2 and IsDel=0 ").Tables[0];
|
|
255
|
|
- var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
|
253
|
+ var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
|
254
|
+ var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State <" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
|
255
|
+ var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
|
256
|
+ var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State <" + (int)EnumWorkOrderState.finish + " and IsDel=0 ").Tables[0];
|
|
|
257
|
+ #region
|
|
|
258
|
+ //var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =2 and IsDel=0 ").Tables[0];
|
|
|
259
|
+ //var list2 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
|
260
|
+ //var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =2 and IsDel=0 ").Tables[0];
|
|
|
261
|
+ //var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State in (0,1) and IsDel=0 ").Tables[0];
|
|
256
|
262
|
|
|
257
|
263
|
////日已完成
|
|
258
|
264
|
//var list1 = bll.GetList(uwhere + " and CONVERT(varchar(10),CreateTime, 23)='" + strDate + "' and State =1 and IsDel=0 ").Tables[0];
|
|
|
@@ -262,7 +268,7 @@ namespace CallCenterApi.Interface.Controllers
|
|
262
|
268
|
//var list3 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State =1 and IsDel=0 ").Tables[0];
|
|
263
|
269
|
////月未完成
|
|
264
|
270
|
//var list4 = bll.GetList(uwhere + " and CONVERT(char(7),CreateTime,20)='" + strMonth + "' and State=0 and IsDel=0 ").Tables[0];
|
|
265
|
|
-
|
|
|
271
|
+ #endregion
|
|
266
|
272
|
var obj = new
|
|
267
|
273
|
{
|
|
268
|
274
|
daywc = list1.Rows.Count,
|
|
|
@@ -517,29 +523,37 @@ namespace CallCenterApi.Interface.Controllers
|
|
517
|
523
|
if (ua.F_RoleId != 17)
|
|
518
|
524
|
{
|
|
519
|
525
|
uwhere += " and CreateUser='" + ua.F_UserCode + "' ";
|
|
520
|
|
- uwhere += " and State =0 ";
|
|
|
526
|
+ uwhere += " and State =" + (int)EnumWorkOrderState.neworder + " ";
|
|
|
527
|
+ //uwhere += " and State =0 ";
|
|
521
|
528
|
}
|
|
522
|
529
|
//2、待接单的
|
|
523
|
|
- string djdwhere = " 1=1 and State =1 and WorkOrderID in ( " + woController.GetDJDWorkOrderID(ua.F_UserCode) + ") ";
|
|
|
530
|
+ string djdwhere = $" 1=1 and State =" + (int)EnumWorkOrderState.assign + " and T_Wo_WorkOrder.ID in ( " + woController.GetDJDWorkOrderID(ua.F_UserCode) + ") ";//" 1=1 and State =1 and WorkOrderID in ( " + woController.GetDJDWorkOrderID(ua.F_UserCode) + ") ";
|
|
524
|
531
|
//3、待完成(处理)的
|
|
525
|
|
- string dclwhere = " 1=1 and State =1 and WorkOrderID in ( " + woController.GetDWCWorkOrderID(ua.F_UserCode) + ") ";
|
|
|
532
|
+ string dclwhere = $" 1=1 and State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback + ") and T_Wo_WorkOrder.ID in ( " + woController.GetDWCWorkOrderID(ua.F_UserCode) + ") ";//" 1=1 and State =1 and WorkOrderID in ( " + woController.GetDWCWorkOrderID(ua.F_UserCode) + ") ";
|
|
526
|
533
|
//4、已处理的
|
|
527
|
|
- string yclwhere = " 1=1 and State =2 and LastDealUser = '" + ua.F_UserCode + "' ";
|
|
|
534
|
+ string yclwhere = $" 1=1 and State =" + (int)EnumWorkOrderState.finish + " and LastDealUser = '" + ua.F_UserCode + "' ";//" 1=1 and State =2 and LastDealUser = '" + ua.F_UserCode + "' ";
|
|
528
|
535
|
//5、我参与的
|
|
529
|
|
- string wcywhere = " 1=1 and (CreateUser= '" + ua.F_UserCode + "' or WorkOrderID in ( " + woController.GetCYWorkOrderID(ua.F_UserCode) + ")) ";
|
|
|
536
|
+ string wcywhere = $" 1=1 and (CreateUser= '" + ua.F_UserCode + "' or T_Wo_WorkOrder.ID in ( " + woController.GetCYWorkOrderID(ua.F_UserCode) + ")) ";//" 1=1 and (CreateUser= '" + ua.F_UserCode + "' or WorkOrderID in ( " + woController.GetCYWorkOrderID(ua.F_UserCode) + ")) ";
|
|
530
|
537
|
//5、超期工单
|
|
531
|
|
- string cqwhere = $" 1=1 and DATEADD(DAY,{days},CreateTime) < GETDATE() AND State < 2 ";
|
|
|
538
|
+ string cqwhere = $" 1=1 and DATEADD(DAY,{days},CreateTime) < GETDATE() AND State < " + (int)EnumWorkOrderState.finish + " ";//$" 1=1 and DATEADD(DAY,{days},CreateTime) < GETDATE() AND State < 2 ";
|
|
532
|
539
|
//5、未审核微信工单
|
|
533
|
540
|
string wxwhere = $" 1=1 "; // ANd Type = (SELECT F_DictionaryValueId FROM dbo.T_Sys_DictionaryValue (NOLOCK) WHERE F_DictionaryFlag = 'GDLY' AND F_Name = '微信')
|
|
534
|
541
|
var obj = new
|
|
535
|
542
|
{
|
|
536
|
|
- dpd = bll.GetList(uwhere + sql+ " and State=0 and IsAudit = 1 ").Tables[0].Rows.Count, //待指派的统计
|
|
537
|
|
- djd = bll.GetList(djdwhere + sql + " and State =1 and IsAudit = 1 ").Tables[0].Rows.Count, //待接单的统计
|
|
538
|
|
- dcl = bll.GetList(dclwhere + sql + " and State =1 and IsAudit = 1 ").Tables[0].Rows.Count, //待处理的统计
|
|
539
|
|
- ycl = bll.GetList(yclwhere + sql + " and State =2 and IsAudit = 1 ").Tables[0].Rows.Count, //已处理的统计
|
|
|
543
|
+ dpd = bll.GetList(uwhere + sql + " and State=" + (int)EnumWorkOrderState.neworder + " and IsAudit = 1 ").Tables[0].Rows.Count, //待指派的统计
|
|
|
544
|
+ djd = bll.GetList(djdwhere + sql + " and State =" + (int)EnumWorkOrderState.assign + " and IsAudit = 1 ").Tables[0].Rows.Count, //待接单的统计
|
|
|
545
|
+ dcl = bll.GetList(dclwhere + sql + " and State in(" + (int)EnumWorkOrderState.dealing + "," + (int)EnumWorkOrderState.receive + "," + (int)EnumWorkOrderState.reback + ") and IsAudit = 1 ").Tables[0].Rows.Count, //待处理的统计
|
|
|
546
|
+ ycl = bll.GetList(yclwhere + sql + " and State =" + (int)EnumWorkOrderState.finish + " and IsAudit = 1 ").Tables[0].Rows.Count, //已处理的统计
|
|
540
|
547
|
wyc = bll.GetList(wcywhere + sql + " and IsAudit = 1 ").Tables[0].Rows.Count, //我参与的的统计
|
|
541
|
|
- cq = bll.GetList(cqwhere + sql + " AND State < 2 and IsAudit = 1 ").Tables[0].Rows.Count, //超期工单的统计
|
|
|
548
|
+ cq = bll.GetList(cqwhere + sql + " AND State < " + (int)EnumWorkOrderState.finish + " and IsAudit = 1 ").Tables[0].Rows.Count, //超期工单的统计
|
|
542
|
549
|
wx = bll.GetList(wxwhere + sql + " and IsAudit = 0 ").Tables[0].Rows.Count, //微信工单的统计
|
|
|
550
|
+ //dpd = bll.GetList(uwhere + sql+ " and State=0 and IsAudit = 1 ").Tables[0].Rows.Count, //待指派的统计
|
|
|
551
|
+ //djd = bll.GetList(djdwhere + sql + " and State =1 and IsAudit = 1 ").Tables[0].Rows.Count, //待接单的统计
|
|
|
552
|
+ //dcl = bll.GetList(dclwhere + sql + " and State =1 and IsAudit = 1 ").Tables[0].Rows.Count, //待处理的统计
|
|
|
553
|
+ //ycl = bll.GetList(yclwhere + sql + " and State =2 and IsAudit = 1 ").Tables[0].Rows.Count, //已处理的统计
|
|
|
554
|
+ //wyc = bll.GetList(wcywhere + sql + " and IsAudit = 1 ").Tables[0].Rows.Count, //我参与的的统计
|
|
|
555
|
+ //cq = bll.GetList(cqwhere + sql + " AND State < 2 and IsAudit = 1 ").Tables[0].Rows.Count, //超期工单的统计
|
|
|
556
|
+ //wx = bll.GetList(wxwhere + sql + " and IsAudit = 0 ").Tables[0].Rows.Count, //微信工单的统计
|
|
543
|
557
|
//djd = new BLL.T_Wo_WorkOrderItem().GetModelList(" IsDel=0 and Type=1 and (state='0' and ','+ToUser+',' like '%," + ua.F_UserCode + ",%') ").Select(p => p.WorkOrderID).Distinct().Count(),
|
|
544
|
558
|
//dcl = new BLL.T_Wo_WorkOrderItem().GetModelList(" IsDel=0 and Type=1 and (state='1' and SureUser='" + ua.F_UserCode + "') ").Select(p => p.WorkOrderID).Distinct().Count()
|
|
545
|
559
|
};
|