|
|
@@ -2099,9 +2099,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2099
|
2099
|
}
|
|
2100
|
2100
|
else
|
|
2101
|
2101
|
{
|
|
2102
|
|
- int[] sts = new int[] { (int)EnumWorkState.receive, (int)EnumWorkState.dealing };
|
|
2103
|
|
- sql += " and F_WorkState in (" + string.Join(",", sts.Select(p => p.ToString())) + ")";
|
|
2104
|
|
- //sql += " and F_WorkState in (2,4,8)";
|
|
|
2102
|
+ if (distribute!=0)
|
|
|
2103
|
+ {
|
|
|
2104
|
+ int[] sts = new int[] { (int)EnumWorkState.receive, (int)EnumWorkState.dealing };
|
|
|
2105
|
+ sql += " and F_WorkState in (" + string.Join(",", sts.Select(p => p.ToString())) + ")";
|
|
|
2106
|
+ }
|
|
|
2107
|
+
|
|
|
2108
|
+
|
|
2105
|
2109
|
}
|
|
2106
|
2110
|
sql += "and F_WorkOrderID not in (select F_WorkOrderID from T_Bus_RemindRecord where F_Type=1 and F_IsDelete=0)";
|
|
2107
|
2111
|
if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
|
|
|
@@ -2110,7 +2114,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2110
|
2114
|
{
|
|
2111
|
2115
|
if (distribute == 0)
|
|
2112
|
2116
|
{
|
|
2113
|
|
- sql += "and F_WorkOrderId in ( select F_WorkOrderId from T_Bus_AssignedInfo as a where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and (F_IsNext =" + distribute + " or F_IsNext='' )and not exists(select 1 from T_Bus_AssignedInfo where F_WorkOrderId = a.F_WorkOrderId and F_Id > a.F_Id )and F_WorkState in (2,4) ";
|
|
|
2117
|
+ sql += "and F_WorkOrderId in ( select F_WorkOrderId from T_Bus_AssignedInfo as a where F_State=1 and F_IsDelete=0 and ISNULL(F_FeedbackTime, '')='' and F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1) and (F_IsNext =" + distribute + " or F_IsNext='' )and not exists(select 1 from T_Bus_AssignedInfo where F_WorkOrderId = a.F_WorkOrderId and F_Id > a.F_Id )and (F_WorkState in (2,4) or (F_WorkState=8 and F_Identification=0) ) ";
|
|
|
2118
|
+
|
|
2114
|
2119
|
if (isys > -1)
|
|
2115
|
2120
|
{
|
|
2116
|
2121
|
if (isys == 0)
|
|
|
@@ -2327,7 +2332,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2327
|
2332
|
// sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
|
|
2328
|
2333
|
// + " F_MainDeptId =" + User.F_DeptId + " and F_IsSure in (0,1))";
|
|
2329
|
2334
|
//}
|
|
2330
|
|
-
|
|
|
2335
|
+ sql += "and (F_Identification!=0 or F_Identification is null) ";
|
|
2331
|
2336
|
if (User.F_RoleCode != "GLY" && User.F_RoleCode != "DDZG")
|
|
2332
|
2337
|
{
|
|
2333
|
2338
|
sql += " and F_WorkOrderId in (select F_WorkOrderId from T_Bus_AssignedInfo a WITH(NOLOCK) where F_State=1 and F_IsDelete=0 and "
|
|
|
@@ -10170,13 +10175,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
10170
|
10175
|
string creattime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 00:00:00";
|
|
10171
|
10176
|
string endtime = ((DateTime)modelT_Bus_WorkOrder1.F_CreateTime).ToString("yyyy-MM-dd") + " 23:59:59";
|
|
10172
|
10177
|
modelT_Bus_WorkOrder1.F_WorkOrderId = workorderBLL.GetNewWorkOrderID((int)modelT_Bus_WorkOrder.F_InfoSource, (int)modelT_Bus_WorkOrder.F_SourceArea, creattime, endtime);
|
|
10173
|
|
- modelT_Bus_WorkOrder1.F_MainWorkorder1 = modelT_Bus_WorkOrder.F_WorkOrderId;
|
|
|
10178
|
+ modelT_Bus_WorkOrder1.F_MainWorkorder1 = workorderid;
|
|
10174
|
10179
|
modelT_Bus_WorkOrder1.F_Id = workorderBLL.Add(modelT_Bus_WorkOrder1);
|
|
10175
|
10180
|
if (modelT_Bus_WorkOrder1.F_Id <= 0)
|
|
10176
|
10181
|
{
|
|
10177
|
10182
|
errdeptid += deptinfo.F_DeptName + ",";
|
|
10178
|
10183
|
continue;
|
|
10179
|
10184
|
}
|
|
|
10185
|
+ modelT_Bus_WorkOrder.F_SubWorkorder1 = modelT_Bus_WorkOrder1.F_WorkOrderId;
|
|
|
10186
|
+ new BLL.T_Bus_WorkOrder().Update(modelT_Bus_WorkOrder);
|
|
10180
|
10187
|
#endregion
|
|
10181
|
10188
|
#region 交办
|
|
10182
|
10189
|
#region 插入交办记录
|
|
|
@@ -14279,7 +14286,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
14279
|
14286
|
string visituser = RequestString.GetFormString("visituser");//回访人
|
|
14280
|
14287
|
int type = RequestString.GetInt("type", 0);//回访方式
|
|
14281
|
14288
|
int issatisfie = RequestString.GetInt("issatisfie", 0);//0不满意 1满意
|
|
14282
|
|
- int state = RequestString.GetInt("state", 0);//0保存 1保存并下一步
|
|
|
14289
|
+ int state = RequestString.GetInt("state", 1);//0保存 1保存并下一步
|
|
14283
|
14290
|
int visitid = RequestString.GetInt("visitid", 0);
|
|
14284
|
14291
|
string result = RequestString.GetFormString("result");//回访情况
|
|
14285
|
14292
|
int nexttype = RequestString.GetInt("nexttype", 0);//1重办 2退回重办
|
|
|
@@ -14596,7 +14603,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
14596
|
14603
|
if (f >= 2)
|
|
14597
|
14604
|
{
|
|
14598
|
14605
|
Model.T_Bus_RemindRecord modelT_Bus_RemindRecord = new Model.T_Bus_RemindRecord();
|
|
14599
|
|
- var modelRemindlist = new BLL.T_Bus_RemindRecord().GetModelList(" F_State=0 and F_IsDelete=0 and F_Type =1 and F_WorkOrderId= '" + modelT_Bus_WorkOrder.F_WorkOrderId + " order by F_CreateTime desc");
|
|
|
14606
|
+ var modelRemindlist = new BLL.T_Bus_RemindRecord().GetModelList(" F_State=0 and F_IsDelete=0 and F_Type =1 and F_WorkOrderId= '" + modelT_Bus_WorkOrder.F_WorkOrderId + "' order by F_CreateTime desc");
|
|
14600
|
14607
|
if (modelRemindlist != null && modelRemindlist.Count > 0)
|
|
14601
|
14608
|
{
|
|
14602
|
14609
|
modelT_Bus_RemindRecord = modelRemindlist.FirstOrDefault();
|
|
|
@@ -15963,10 +15970,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
15963
|
15970
|
//[Authority]
|
|
15964
|
15971
|
public ActionResult FinishWorkOrder()
|
|
15965
|
15972
|
{
|
|
15966
|
|
-
|
|
15967
|
|
-
|
|
15968
|
|
-
|
|
15969
|
|
-
|
|
15970
|
15973
|
//if (User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXLDGLYGLY" || User.F_RoleCode == "GLY")
|
|
15971
|
15974
|
if (User.F_RoleCode == "ZJZY" || User.F_RoleCode == "ZXLD" || User.F_RoleCode == "ZXHWY" || User.F_RoleCode == "GLY" || User.F_RoleCode == "DDZG" || User.F_RoleCode == "MTDD")
|
|
15972
|
15975
|
{
|