|
|
@@ -137,7 +137,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
137
|
137
|
}
|
|
138
|
138
|
if (issatisfie != -1)
|
|
139
|
139
|
{
|
|
140
|
|
- sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult b WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_IsSatisfie = " + issatisfie + " and F_Id in (select MAX(F_Id) from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId in (select F_WorkOrderId from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId = b.F_WorkOrderId group by F_WorkOrderId ) ) )";
|
|
|
140
|
+ sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult b WITH(NOLOCK) where F_IsDelete = 0 and F_IsSatisfie = " + issatisfie + " and F_Id in (select MAX(F_Id) from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId in (select F_WorkOrderId from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId = b.F_WorkOrderId group by F_WorkOrderId ) ) )";
|
|
141
|
141
|
}
|
|
142
|
142
|
if (workordertype > -1)
|
|
143
|
143
|
{
|
|
|
@@ -499,7 +499,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
499
|
499
|
var dtdc = DbHelperSQL.Query(" select F_CreateTime 日期, F_CusName 姓名, dbo.GetUserName(F_CreateUser ) 受话员姓名,F_CusPhone 手机号,F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetKeyName(F_Key,0) 反映类别一, dbo.GetKeyName(F_Key,1) 反映类别二,dbo.GetKeyName(F_Key,2) 反映类别三,dbo.GetKeyName(F_Key,3) 反映类别四,"
|
|
500
|
500
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
501
|
501
|
+ " F_Result 办理结果, "
|
|
502
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
|
502
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
503
|
503
|
+ " from T_Bus_WorkOrder a WITH(NOLOCK)" + value + value1 + " where 1=1 " + sql + orderby).Tables[0];
|
|
504
|
504
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
505
|
505
|
if (msg == "")
|
|
|
@@ -1606,7 +1606,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1606
|
1606
|
//sql += " and F_WorkState = '" + strstate.Trim() + "' ";
|
|
1607
|
1607
|
}
|
|
1608
|
1608
|
sql += "and F_SpotCheck=1";
|
|
1609
|
|
- sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult WITH(NOLOCK) where F_State=1 and F_IsDelete=0 ";
|
|
|
1609
|
+ sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete=0 ";
|
|
1610
|
1610
|
if (visitstarttime.Trim() != "" && visitstarttime != "undefined")
|
|
1611
|
1611
|
{
|
|
1612
|
1612
|
sql += " and F_CreateTime>='" + visitstarttime + "' ";
|
|
|
@@ -1838,7 +1838,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1838
|
1838
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
1839
|
1839
|
|
|
1840
|
1840
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
1841
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
|
1841
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
1842
|
1842
|
+ " from T_Bus_WorkOrder wo WITH(NOLOCK)" + value + " where 1=1 " + sql + orderby).Tables[0];
|
|
1843
|
1843
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
1844
|
1844
|
if (msg == "")
|
|
|
@@ -2336,7 +2336,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2336
|
2336
|
|
|
2337
|
2337
|
if (issatisfie != -1)
|
|
2338
|
2338
|
{
|
|
2339
|
|
- sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult b WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_IsSatisfie = " + issatisfie + " and F_Id in (select MAX(F_Id) from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId in (select F_WorkOrderId from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId = b.F_WorkOrderId group by F_WorkOrderId ) ) )";
|
|
|
2339
|
+ sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_VisitResult b WITH(NOLOCK) where F_IsDelete = 0 and F_IsSatisfie = " + issatisfie + " and F_Id in (select MAX(F_Id) from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId in (select F_WorkOrderId from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId = b.F_WorkOrderId group by F_WorkOrderId ) ) )";
|
|
2340
|
2340
|
}
|
|
2341
|
2341
|
if (dealtype > -1)
|
|
2342
|
2342
|
{
|
|
|
@@ -2654,7 +2654,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2654
|
2654
|
var dtdc = DbHelperSQL.Query(" select " + top + " F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
|
|
2655
|
2655
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
2656
|
2656
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
2657
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
|
2657
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
2658
|
2658
|
+ " from T_Bus_WorkOrder wo WITH(NOLOCK)" + value + " where 1=1 " + sql + orderby).Tables[0];
|
|
2659
|
2659
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
2660
|
2660
|
if (msg == "")
|
|
|
@@ -3161,7 +3161,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3161
|
3161
|
case "9"://需履职界定表
|
|
3162
|
3162
|
sql += " and F_WorkState in ('" + (int)EnumWorkState.visit + "','" + (int)EnumWorkState.resubmit + "','" + (int)EnumWorkState.reload + "','" + (int)EnumWorkState.rejload + "','" + (int)EnumWorkState.finish + "' )";
|
|
3163
|
3163
|
sql += " and F_WorkOrderID not in(select F_WorkOrderID from T_Bus_PerformDuties WITH(NOLOCK) where F_IsDelete=0 and F_State=1 )";
|
|
3164
|
|
- sql += " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_VisitResult WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_IsSatisfie=0 and F_AssignedId in(select F_ID from T_Bus_AssignedInfo WITH(NOLOCK) where F_State=1 and F_IsDelete=0 ";
|
|
|
3164
|
+ sql += " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete=0 and F_IsSatisfie=0 and F_AssignedId in(select F_ID from T_Bus_AssignedInfo WITH(NOLOCK) where F_State=1 and F_IsDelete=0 ";
|
|
3165
|
3165
|
if (User.F_RoleCode != "GLY" && User.F_RoleCode != "SPZ" && User.F_RoleCode != "SPZJZ" && User.F_RoleCode != "DDZG")
|
|
3166
|
3166
|
{
|
|
3167
|
3167
|
sql += " and F_MainDeptId='" + User.F_DeptId + "' ";
|
|
|
@@ -4826,7 +4826,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4826
|
4826
|
var dtdc = DbHelperSQL.Query(" select F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
|
|
4827
|
4827
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
4828
|
4828
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =a.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
4829
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 ,"
|
|
|
4829
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = a.F_WorkOrderId order by F_Id desc) 是否满意 ,"
|
|
4830
|
4830
|
+ "(case when F_WorkOrderId in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 and F_IsAudit=1) then '1'else '0' end) 延时状态"
|
|
4831
|
4831
|
+ " from T_Bus_WorkOrder a WITH(NOLOCK) where 1=1 " + sql).Tables[0];
|
|
4832
|
4832
|
|
|
|
@@ -5598,7 +5598,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5598
|
5598
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
5599
|
5599
|
|
|
5600
|
5600
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
5601
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
|
5601
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
5602
|
5602
|
+ " from T_Bus_WorkOrder wo WITH(NOLOCK) where 1=1 " + sql + orderby).Tables[0];
|
|
5603
|
5603
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
5604
|
5604
|
if (msg == "")
|
|
|
@@ -6028,7 +6028,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
6028
|
6028
|
var dtdc = DbHelperSQL.Query(" select F_CreateTime 日期, F_WorkOrderId 工单号,F_ComTitle 诉求标题,F_ComContent 工单内容,dbo.GetDictionaryName(F_Key) 主题词, "
|
|
6029
|
6029
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
6030
|
6030
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
6031
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
|
6031
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意 "
|
|
6032
|
6032
|
+ " from T_Bus_WorkOrder wo WITH(NOLOCK)" + value + " where 1=1 " + sql + orderby).Tables[0];
|
|
6033
|
6033
|
|
|
6034
|
6034
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
|
@@ -7518,7 +7518,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
7518
|
7518
|
+ " dbo.GetDeptNames((select top 1 F_MainDeptId from T_Bus_AssignedInfo where F_WorkOrderId=wo.F_WorkOrderId order by F_Id desc )) 主办单位, "
|
|
7519
|
7519
|
|
|
7520
|
7520
|
+ " (select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId =wo.F_WorkOrderId order by F_Id desc) 办理结果, "
|
|
7521
|
|
- + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_State = 1 and F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_Type=3 and F_State=1 and F_IsDelete=0" +
|
|
|
7521
|
+ + " (select top 1 (case F_IsSatisfie when 1 then'满意' when 2 then'基本满意' when 0 then '不满意' else '未评价' end) F_Satisfie from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete = 0 and F_WorkOrderId = wo.F_WorkOrderId order by F_Id desc) 是否满意,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_Type=3 and F_State=1 and F_IsDelete=0" +
|
|
7522
|
7522
|
"and F_WorkOrderId=wo.F_WorkOrderId order by F_CreateTime desc ) as 退回原因 "
|
|
7523
|
7523
|
+ " from T_Bus_WorkOrder wo WITH(NOLOCK)" + value + " where 1=1 " + sql + orderby).Tables[0];
|
|
7524
|
7524
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
|
@@ -8111,7 +8111,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8111
|
8111
|
string ejblsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName "
|
|
8112
|
8112
|
+ "from T_Bus_Feedback_Next WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
8113
|
8113
|
string hfsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
|
|
8114
|
|
- + "from T_Bus_VisitResult WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime ";
|
|
|
8114
|
+ + "from T_Bus_VisitResult WITH(NOLOCK) where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime ";
|
|
8115
|
8115
|
string gcsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
|
|
8116
|
8116
|
+ "from T_Bus_Operation WITH(NOLOCK) where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime ";
|
|
8117
|
8117
|
string cbsql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
|
|
|
@@ -9167,7 +9167,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
9167
|
9167
|
|
|
9168
|
9168
|
if (!string.IsNullOrEmpty(strworkorderid))
|
|
9169
|
9169
|
{
|
|
9170
|
|
- string sqlvisit = "select * from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId='" + strworkorderid + "' and F_State=1 and F_IsDelete=0 and F_IsSatisfie=0 order by F_CreateTime";
|
|
|
9170
|
+ string sqlvisit = "select * from T_Bus_VisitResult WITH(NOLOCK) where F_WorkOrderId='" + strworkorderid + "' and F_IsDelete=0 and F_IsSatisfie=0 order by F_CreateTime";
|
|
9171
|
9171
|
string sqlassgin = "select * from T_Bus_AssignedInfo WITH(NOLOCK) where F_WorkOrderId ='" + strworkorderid + "' and F_State=1 and F_IsDelete=0 order by F_CreateTime";
|
|
9172
|
9172
|
|
|
9173
|
9173
|
var dtvisit = DbHelperSQL.Query(sqlvisit).Tables[0];
|