|
|
@@ -2281,7 +2281,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2281
|
2281
|
sql += " and F_WorkState = '" + strstate.Trim() + "' ";
|
|
2282
|
2282
|
//sql += " and F_WorkState = '" + strstate.Trim() + "' ";
|
|
2283
|
2283
|
}
|
|
2284
|
|
- sql += " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_IsAudit>0 ";
|
|
|
2284
|
+ sql += " and F_WorkOrderID in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 and F_IsAudit>0 ";
|
|
2285
|
2285
|
if (User.F_RoleCode != "GLY" && User.F_RoleCode != "ZXLDGLY" && User.F_RoleCode != "ZXLDGLYGLY" && User.F_RoleCode != "DDZG")
|
|
2286
|
2286
|
{
|
|
2287
|
2287
|
sql += " and F_AuditUser='" + User.F_UserCode + "')";
|
|
|
@@ -2958,11 +2958,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2958
|
2958
|
{
|
|
2959
|
2959
|
if (isys == 0)
|
|
2960
|
2960
|
{
|
|
2961
|
|
- sql += "and F_WorkOrderId not in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0)";
|
|
|
2961
|
+ sql += "and F_WorkOrderId not in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0)";
|
|
2962
|
2962
|
}
|
|
2963
|
2963
|
else if (isys == 1)
|
|
2964
|
2964
|
{
|
|
2965
|
|
- sql += "and F_WorkOrderId in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0)";
|
|
|
2965
|
+ sql += "and F_WorkOrderId in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0)";
|
|
2966
|
2966
|
}
|
|
2967
|
2967
|
}
|
|
2968
|
2968
|
|
|
|
@@ -3049,7 +3049,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3049
|
3049
|
}
|
|
3050
|
3050
|
}
|
|
3051
|
3051
|
|
|
3052
|
|
- sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 ";
|
|
|
3052
|
+ sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 ";
|
|
3053
|
3053
|
if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "ZXHWY" && User.F_RoleCode != "ZXLD" && User.F_RoleCode != "DDZG" && User.F_RoleCode != "MTDD")
|
|
3054
|
3054
|
{
|
|
3055
|
3055
|
sql += " and F_CreateUser='" + User.F_UserCode + "')";
|
|
|
@@ -4583,7 +4583,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4583
|
4583
|
if (isys == 0) //未延时
|
|
4584
|
4584
|
{
|
|
4585
|
4585
|
sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
|
|
4586
|
|
- + " ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and F_WorkOrderId not in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_IsAudit=1) ) " +
|
|
|
4586
|
+ + " ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and F_WorkOrderId not in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 and F_IsAudit=1) ) " +
|
|
4587
|
4587
|
"and F_MainDeptID3='" + User.F_DeptId + "'";
|
|
4588
|
4588
|
}
|
|
4589
|
4589
|
else
|
|
|
@@ -4639,7 +4639,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4639
|
4639
|
sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo_Next WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (1))";
|
|
4640
|
4640
|
break;
|
|
4641
|
4641
|
case "5"://
|
|
4642
|
|
- sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0)" +
|
|
|
4642
|
+ sql += " and F_WorkOrderID in(select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0)" +
|
|
4643
|
4643
|
"and F_MainDeptID3 ='" + User.F_DeptId + "'";
|
|
4644
|
4644
|
break;
|
|
4645
|
4645
|
case "6"://已完结
|
|
|
@@ -4808,7 +4808,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4808
|
4808
|
+ " dbo.GetDeptNames(F_MainDeptId ) 主办单位, "
|
|
4809
|
4809
|
+ " (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) 办理结果, "
|
|
4810
|
4810
|
+ " (select top 1 (case F_IsSatisfie when 1 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) 是否满意 ,"
|
|
4811
|
|
- + "(case when F_WorkOrderId in (select F_WorkOrderID from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_IsAudit=1) then '1'else '0' end) 延时状态"
|
|
|
4811
|
+ + "(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) 延时状态"
|
|
4812
|
4812
|
+ " from T_Bus_WorkOrder a WITH(NOLOCK) where 1=1 " + sql).Tables[0];
|
|
4813
|
4813
|
|
|
4814
|
4814
|
var msg = new NPOIHelper().ExportToExcel("工单列表", dtdc);
|
|
|
@@ -8080,7 +8080,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8080
|
8080
|
string thsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName "
|
|
8081
|
8081
|
+ "from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type=3 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
8082
|
8082
|
string yssql = "select *,dbo.GetUserName(F_CreateUser) as UserName "
|
|
8083
|
|
- + "from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
|
8083
|
+ + "from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
8084
|
8084
|
string blsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName "
|
|
8085
|
8085
|
+ "from T_Bus_Feedback WITH(NOLOCK) where F_State=1 and F_Type!=3 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
8086
|
8086
|
string ejblsql = "select *,dbo.GetUserName(F_CreateUser) as UserName,dbo.GetDeptName(F_CreateDeptId) as DeptName "
|
|
|
@@ -8656,7 +8656,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8656
|
8656
|
#endregion
|
|
8657
|
8657
|
case 5:
|
|
8658
|
8658
|
#region 延时信息
|
|
8659
|
|
- string yssql = "select *,dbo.GetUserName(F_CreateUser) as UserName from T_Bus_DelayTime WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
|
8659
|
+ string yssql = "select *,dbo.GetUserName(F_CreateUser) as UserName from T_Bus_DelayTime WITH(NOLOCK) where F_IsDelete=0 and F_WorkOrderId ='" + strworkorderid + "' order by F_CreateTime";
|
|
8660
|
8660
|
var ysdt = DbHelperSQL.Query(yssql).Tables[0];
|
|
8661
|
8661
|
if (configfj != null)
|
|
8662
|
8662
|
{
|
|
|
@@ -8835,7 +8835,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
8835
|
8835
|
case 2: sql = "select top 1 * from T_Bus_DelayTime WITH(NOLOCK) where "; break;
|
|
8836
|
8836
|
case 3: sql = "select top 1 * from T_Bus_PerformDuties WITH(NOLOCK) where "; break;
|
|
8837
|
8837
|
}
|
|
8838
|
|
- sql += " F_WorkOrderId='" + strworkorderid + "' and F_State=1 and F_IsDelete=0 and F_IsAudit=0 order by F_CreateTime desc";
|
|
|
8838
|
+ if (type != 2)
|
|
|
8839
|
+ {
|
|
|
8840
|
+ sql += " and F_State=1";
|
|
|
8841
|
+ }
|
|
|
8842
|
+ sql += " F_WorkOrderId='" + strworkorderid + "' and F_IsDelete=0 and F_IsAudit=0 order by F_CreateTime desc";
|
|
8839
|
8843
|
var dt = DbHelperSQL.Query(sql).Tables[0];
|
|
8840
|
8844
|
if (dt.Rows.Count > 0)
|
|
8841
|
8845
|
{
|
|
|
@@ -14061,7 +14065,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
14061
|
14065
|
using (TransactionScope trans = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 10, 0)))
|
|
14062
|
14066
|
{
|
|
14063
|
14067
|
Model.T_Bus_WorkOrder modelT_Bus_WorkOrder = workorderBLL.GetModel(str);
|
|
14064
|
|
- Model.T_Bus_DelayTime modelT_Bus_DelayTime = new BLL.T_Bus_DelayTime().GetModelList(" F_WorkOrderId = '" + str + "' and F_State = 1 and F_IsDelete = 0 and F_IsAudit = 0 order by F_CreateTime desc").FirstOrDefault();
|
|
|
14068
|
+ Model.T_Bus_DelayTime modelT_Bus_DelayTime = new BLL.T_Bus_DelayTime().GetModelList(" F_WorkOrderId = '" + str + "' and F_IsDelete = 0 and F_IsAudit = 0 order by F_CreateTime desc").FirstOrDefault();
|
|
14065
|
14069
|
Model.T_Bus_AssignedInfo modelT_Bus_AssignedInfo = assignBLL.GetNewModelByWorkOrderID(str);
|
|
14066
|
14070
|
var modelT_Bus_AssignedInfo_Next = new BLL.T_Bus_AssignedInfo_Next().GetModelList("F_State=1 and F_IsDelete=0 and F_WorkOrderId='" + str + "' order by F_CreateTime desc");
|
|
14067
|
14071
|
if (modelT_Bus_WorkOrder != null && modelT_Bus_DelayTime != null && modelT_Bus_AssignedInfo != null)
|