|
|
@@ -1810,7 +1810,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1810
|
1810
|
//string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
|
|
1811
|
1811
|
string cols = "";
|
|
1812
|
1812
|
cols = "F_WorkOrderId,F_InfoSource,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,(select top 1 F_Result from T_Bus_Feedback WITH(NOLOCK) where F_Type=3 and F_State=1 and F_IsDelete=0" +
|
|
1813
|
|
- "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease,F_InfoSource,F_Note";
|
|
|
1813
|
+ "and F_WorkOrderId=a.F_WorkOrderId order by F_CreateTime desc ) as Backreason ,F_CloseTime,F_Identification,F_IsRelease,F_InfoSource,F_Note" +
|
|
|
1814
|
+ ",(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0 then 0 when PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
|
|
1814
|
1815
|
if (smspy > -1)
|
|
1815
|
1816
|
{
|
|
1816
|
1817
|
order = " order by F_Id desc";
|
|
|
@@ -2577,21 +2578,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2577
|
2578
|
{
|
|
2578
|
2579
|
sql += " and F_CreateTime<='" + strendtime + "' ";
|
|
2579
|
2580
|
}
|
|
2580
|
|
- if (deptid != 0 && strtab != "1")
|
|
2581
|
|
- {
|
|
2582
|
|
- if (deptlevel == 0)
|
|
2583
|
|
- {
|
|
2584
|
|
- string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
2585
|
|
- //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
2586
|
|
- sql += " and F_WorkOrderID in(" + sqlwhere + ")";
|
|
2587
|
|
- }
|
|
2588
|
|
- else
|
|
2589
|
|
- {
|
|
2590
|
|
- //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
2591
|
|
- string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
2592
|
|
- sql += " and F_WorkOrderID in(" + sqlwhere + ")";
|
|
2593
|
|
- }
|
|
2594
|
|
- }
|
|
|
2581
|
+ //if (deptid != 0 && strtab != "1")
|
|
|
2582
|
+ //{
|
|
|
2583
|
+ // if (deptlevel == 0)
|
|
|
2584
|
+ // {
|
|
|
2585
|
+ // string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo WITH(NOLOCK) where F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
|
2586
|
+ // //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
|
2587
|
+ // sql += " and F_WorkOrderID in(" + sqlwhere + ")";
|
|
|
2588
|
+ // }
|
|
|
2589
|
+ // else
|
|
|
2590
|
+ // {
|
|
|
2591
|
+ // //string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next where ',' + F_MainDeptID + ',' like '%," + deptid.ToString() + ",%' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
|
2592
|
+ // string sqlwhere = "select F_WorkOrderID from T_Bus_AssignedInfo_Next WITH(NOLOCK) where" +
|
|
|
2593
|
+ // " F_MainDeptId = '" + deptid + "' and F_IsSure in (0,1) and F_State=1 and F_IsDelete=0 ";
|
|
|
2594
|
+ // sql += " and F_WorkOrderID in(" + sqlwhere + ")";
|
|
|
2595
|
+ // }
|
|
|
2596
|
+ //}
|
|
2595
|
2597
|
if (deptid != 0)
|
|
2596
|
2598
|
{
|
|
2597
|
2599
|
sql += " and (F_MainDeptId in (select F_DeptId from GetDeptId ('" + deptid + "')) or F_MainDeptID3='" + deptid + "')";
|
|
|
@@ -2626,7 +2628,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2626
|
2628
|
|
|
2627
|
2629
|
else
|
|
2628
|
2630
|
{
|
|
2629
|
|
- cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName, dbo.GetDeptNames(F_MainDeptId)as DeptNames,dbo.GetDictionaryName(F_InfoSource) as SourceName,F_CloseTime,F_ComContent,F_Identification,F_IsRelease,F_InfoSource";
|
|
|
2631
|
+ cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName, dbo.GetDeptNames(F_MainDeptId)as DeptNames,dbo.GetDictionaryName(F_InfoSource) as SourceName,F_CloseTime,F_ComContent,F_Identification,F_IsRelease,F_InfoSource" +
|
|
|
2632
|
+ ",(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0 then 0 when PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
|
|
2630
|
2633
|
}
|
|
2631
|
2634
|
if (isdc > 0)
|
|
2632
|
2635
|
{
|
|
|
@@ -3405,7 +3408,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3405
|
3408
|
//string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetOverState(F_WorkOrderId) as OverState,"
|
|
3406
|
3409
|
// + "dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetWorkOrderAssign(F_WorkOrderId) as DeptName ,dbo.GetLimitTime(F_WorkOrderId) as LimitTime";
|
|
3407
|
3410
|
//string cols = "*,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName";
|
|
3408
|
|
- string cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetDeptNames(F_MainDeptID3) AS EJDeptName,F_CloseTime,F_IsRelease,F_Identification,F_IsRelease,F_InfoSource";
|
|
|
3411
|
+ string cols = "F_WorkOrderId,F_CusName,F_ComTitle,F_WorkState,F_MainDeptId,F_OtherDeptIds,F_DealTime,F_LeaveRecordId,F_CallRecordId,F_IsResult,F_IsProtect,F_IsReturn,F_CreateTime,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDictionaryName(F_InfoType) as TypeName,dbo.GetDictionaryName(F_InfoSource) as SourceName,dbo.GetDeptNames(F_MainDeptID3) AS EJDeptName,F_CloseTime,F_IsRelease,F_Identification,F_IsRelease,F_InfoSource " +
|
|
|
3412
|
+ " ,(case when PATINDEX('%" + User.F_UserCode + "%',a.F_See)= 0 then 0 when PATINDEX('%" + User.F_UserCode + "%',a.F_See) IS NULL then 0 else 1 end) as See";
|
|
3409
|
3413
|
if (isdc > 0)
|
|
3410
|
3414
|
{
|
|
3411
|
3415
|
var top = " "; var orderby = " order by F_CreateTime";
|
|
|
@@ -8465,8 +8469,21 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8465
|
8469
|
dt.Rows[0]["F_ConPhone"] = "";
|
|
8466
|
8470
|
}
|
|
8467
|
8471
|
}
|
|
8468
|
|
-
|
|
8469
|
|
-
|
|
|
8472
|
+ if(dt.Rows[0]["F_See"] != null)
|
|
|
8473
|
+ {
|
|
|
8474
|
+ if (!dt.Rows[0]["F_See"].ToString ().Contains(User .F_UserCode ))
|
|
|
8475
|
+ {
|
|
|
8476
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
8477
|
+ keyValuePairs.Add("F_See", dt.Rows[0]["F_See"].ToString()+","+ User.F_UserCode);
|
|
|
8478
|
+ workorderBLL.UpdateWorkOrder(int .Parse (dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
|
|
|
8479
|
+ }
|
|
|
8480
|
+ }
|
|
|
8481
|
+ else
|
|
|
8482
|
+ {
|
|
|
8483
|
+ Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
|
|
|
8484
|
+ keyValuePairs.Add("F_See", User.F_UserCode);
|
|
|
8485
|
+ workorderBLL.UpdateWorkOrder(int.Parse(dt.Rows[0]["F_Id"].ToString()), keyValuePairs);
|
|
|
8486
|
+ }
|
|
8470
|
8487
|
#region 声音文件
|
|
8471
|
8488
|
dt.Columns.Add("FilePath", typeof(string));
|
|
8472
|
8489
|
|
|
|
@@ -18553,9 +18570,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
18553
|
18570
|
oper.F_State = modelT_Bus_WorkOrder.F_WorkState;
|
|
18554
|
18571
|
|
|
18555
|
18572
|
string userinfo = User.depname + "(" + User.F_UserCode + ")";
|
|
18556
|
|
- if (!string.IsNullOrEmpty(assignedopinion))
|
|
|
18573
|
+ if (!string.IsNullOrEmpty(reason))
|
|
18557
|
18574
|
{
|
|
18558
|
|
- oper.F_Message = userinfo + " 提交了驳回重办工单,意见:" + assignedopinion;
|
|
|
18575
|
+ oper.F_Message = userinfo + " 提交了驳回重办工单,原因:" + reason;
|
|
18559
|
18576
|
}
|
|
18560
|
18577
|
else
|
|
18561
|
18578
|
{
|