|
|
@@ -173,15 +173,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
173
|
173
|
sql += " and F_State =" + (int)EnumWorkOrderState.finish + " and F_DealBy = '" + ua.F_UserCode + "' ";
|
|
174
|
174
|
break;
|
|
175
|
175
|
case 3://我参与的
|
|
176
|
|
- if (GetParticipateID(ua.F_UserCode) != "")
|
|
|
176
|
+ if (ro.F_RoleCode == "XTGLY")
|
|
177
|
177
|
{
|
|
178
|
|
- sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID(ua.F_UserCode) + ") ";
|
|
|
178
|
+ if (GetParticipateID() != "")
|
|
|
179
|
+ {
|
|
|
180
|
+ sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
|
|
|
181
|
+ }
|
|
179
|
182
|
}
|
|
180
|
183
|
else
|
|
181
|
184
|
{
|
|
182
|
|
- return Error("暂无工单");
|
|
|
185
|
+ if (GetParticipateID(ua.F_UserCode) != "")
|
|
|
186
|
+ {
|
|
|
187
|
+ sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID(ua.F_UserCode) + ") ";
|
|
|
188
|
+ }
|
|
|
189
|
+ else
|
|
|
190
|
+ {
|
|
|
191
|
+ return Error("暂无工单");
|
|
|
192
|
+ }
|
|
183
|
193
|
}
|
|
184
|
|
-
|
|
185
|
194
|
break;
|
|
186
|
195
|
case 4://待回访
|
|
187
|
196
|
if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" || ro.F_RoleCode == "XTGLY")
|
|
|
@@ -195,11 +204,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
195
|
204
|
sql += $" and F_State=" + (int)EnumWorkOrderState.finish + " and F_IsVisit = '" +"1" +"' "+ uwhere; ;
|
|
196
|
205
|
break;
|
|
197
|
206
|
case 6://已回访
|
|
198
|
|
- if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" || ro.F_RoleCode == "XTGLY")
|
|
|
207
|
+ if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" )
|
|
199
|
208
|
{
|
|
200
|
209
|
sql += " and (F_CreateBy= '" + ua.F_UserCode + "' or T_Wo_WorkOrder.F_ID in ( " + GetCYWorkOrderID(ua.F_UserCode) + ") or F_State =13)";
|
|
201
|
210
|
sql += $" and F_State=" + (int)EnumWorkOrderState.evaluate; ;
|
|
202
|
211
|
}
|
|
|
212
|
+ else if (ro.F_RoleCode == "XTGLY")
|
|
|
213
|
+ {
|
|
|
214
|
+ uwhere = ""; ;
|
|
|
215
|
+ }
|
|
203
|
216
|
else if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "ZG")
|
|
204
|
217
|
{
|
|
205
|
218
|
string detpid = "";
|
|
|
@@ -561,15 +574,31 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
561
|
574
|
case 3://客服已分配
|
|
562
|
575
|
sql = "";
|
|
563
|
576
|
sql += $" F_IsDelete=0";
|
|
564
|
|
- if (GetParticipateID(ua.F_UserCode) != "")
|
|
|
577
|
+ if (ro.F_RoleCode == "XTGLY")
|
|
565
|
578
|
{
|
|
566
|
|
- sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID(ua.F_UserCode) + ") ";
|
|
|
579
|
+ if (GetParticipateID() != "")
|
|
|
580
|
+ {
|
|
|
581
|
+ sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID() + ") ";
|
|
|
582
|
+ }
|
|
|
583
|
+ else
|
|
|
584
|
+ {
|
|
|
585
|
+ Allocated = 0;
|
|
|
586
|
+ break;
|
|
|
587
|
+ }
|
|
567
|
588
|
}
|
|
568
|
589
|
else
|
|
569
|
590
|
{
|
|
570
|
|
- Allocated = 0;
|
|
571
|
|
- break;
|
|
|
591
|
+ if (GetParticipateID(ua.F_UserCode) != "")
|
|
|
592
|
+ {
|
|
|
593
|
+ sql += " and T_Wo_WorkOrder.F_ID in ( " + GetParticipateID(ua.F_UserCode) + ") ";
|
|
|
594
|
+ }
|
|
|
595
|
+ else
|
|
|
596
|
+ {
|
|
|
597
|
+ Allocated = 0;
|
|
|
598
|
+ break;
|
|
|
599
|
+ }
|
|
572
|
600
|
}
|
|
|
601
|
+
|
|
573
|
602
|
Allocated = new BLL.T_Wo_WorkOrder().GetModelList(sql).Count;//客服已分配
|
|
574
|
603
|
|
|
575
|
604
|
break;
|
|
|
@@ -592,11 +621,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
592
|
621
|
case 6://已回访
|
|
593
|
622
|
sql = "";
|
|
594
|
623
|
sql += $" F_IsDelete=0";
|
|
595
|
|
- if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" || ro.F_RoleCode == "XTGLY")
|
|
|
624
|
+ if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX" )
|
|
596
|
625
|
{
|
|
597
|
626
|
sql += " and (F_CreateBy= '" + ua.F_UserCode + "' or T_Wo_WorkOrder.F_ID in ( " + GetCYWorkOrderID(ua.F_UserCode) + ") or F_State =13)";
|
|
598
|
627
|
sql += $" and F_State=" + (int)EnumWorkOrderState.evaluate; ;
|
|
599
|
628
|
}
|
|
|
629
|
+ else if (ro.F_RoleCode == "XTGLY")
|
|
|
630
|
+ {
|
|
|
631
|
+ uwhere = ""; ;
|
|
|
632
|
+ }
|
|
600
|
633
|
else if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL" || ro.F_RoleCode == "ZG")
|
|
601
|
634
|
{
|
|
602
|
635
|
string detpid = "";
|
|
|
@@ -979,7 +1012,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
979
|
1012
|
{
|
|
980
|
1013
|
opt = "同意上报";
|
|
981
|
1014
|
var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:同意上报" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, "", 0, nowUser, overtime, sms);
|
|
982
|
|
- res = GetDaQucirCulation(nowUser, DateTime.Now.ToString(), model.F_ID, true);
|
|
|
1015
|
+ res = GetDaQucirCulation(AuditCont,nowUser, DateTime.Now.ToString(), model.F_ID, true);
|
|
983
|
1016
|
if (userid <= 0 || !res)
|
|
984
|
1017
|
res = false;
|
|
985
|
1018
|
wostate = 1;
|
|
|
@@ -1092,7 +1125,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1092
|
1125
|
/// <param name="ua"></param>
|
|
1093
|
1126
|
/// <param name="time"></param>
|
|
1094
|
1127
|
/// <param name="id"></param>
|
|
1095
|
|
- public bool GetDaQucirCulation(Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
|
|
|
1128
|
+ public bool GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
|
|
1096
|
1129
|
{
|
|
1097
|
1130
|
DateTime times = DateTime.Parse(time).AddHours(24);
|
|
1098
|
1131
|
Model.T_Wo_WorkOrder model = workOrder .GetModel(id);
|
|
|
@@ -1100,18 +1133,52 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1100
|
1133
|
modeLlist.Add(model);
|
|
1101
|
1134
|
List<WorkOrderNewInput> Input = modeltooip(modeLlist);
|
|
1102
|
1135
|
string cont = "";
|
|
|
1136
|
+ int dapt = 0, nextda = 0; string opt = "";
|
|
|
1137
|
+ var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
1138
|
+ if (deptmodel1 != null)
|
|
|
1139
|
+ {
|
|
|
1140
|
+ dapt = deptmodel1.F_ParentId;
|
|
|
1141
|
+ }
|
|
|
1142
|
+ if (dapt != 0)
|
|
|
1143
|
+ {
|
|
|
1144
|
+ if (dapt == 11)
|
|
|
1145
|
+ {
|
|
|
1146
|
+ nextda = 37;
|
|
|
1147
|
+ opt = "流转市场管理科";
|
|
|
1148
|
+ }
|
|
|
1149
|
+ else if (dapt == 14)
|
|
|
1150
|
+ {
|
|
|
1151
|
+ nextda = 57;
|
|
|
1152
|
+ opt = "流转营销管理处";
|
|
|
1153
|
+ }
|
|
|
1154
|
+ else if (dapt == 15)
|
|
|
1155
|
+ {
|
|
|
1156
|
+ nextda = 74;
|
|
|
1157
|
+ opt = "流转策划推广";
|
|
|
1158
|
+ }
|
|
|
1159
|
+ else if (dapt == 16)
|
|
|
1160
|
+ {
|
|
|
1161
|
+ nextda = 88;
|
|
|
1162
|
+ opt = "流转销售部";
|
|
|
1163
|
+ }
|
|
|
1164
|
+ }
|
|
1103
|
1165
|
if (istrue)
|
|
1104
|
1166
|
{
|
|
1105
|
|
- cont = "大区经理已审批流转市场管理科";
|
|
|
1167
|
+ cont = "大区经理已审批:"+ AuditCont+"," + opt;
|
|
1106
|
1168
|
}
|
|
1107
|
1169
|
else
|
|
1108
|
1170
|
{
|
|
1109
|
|
- cont = "大区经理未审批流转市场管理科";
|
|
|
1171
|
+ cont = "大区经理未审批" + opt;
|
|
|
1172
|
+ }
|
|
|
1173
|
+ if (nextda != 0)
|
|
|
1174
|
+ {
|
|
|
1175
|
+ var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, 0, 0, 0, 0, 0, time.ToString());
|
|
|
1176
|
+ return res;
|
|
|
1177
|
+ }
|
|
|
1178
|
+ else
|
|
|
1179
|
+ {
|
|
|
1180
|
+ return false;
|
|
1110
|
1181
|
}
|
|
1111
|
|
- var res = AssignWO(ua, model, Input[0], cont, 37, 0, 0, 0, 0, 0, 0, time.ToString());
|
|
1112
|
|
-
|
|
1113
|
|
-
|
|
1114
|
|
- return res;
|
|
1115
|
1182
|
}
|
|
1116
|
1183
|
/// <summary>
|
|
1117
|
1184
|
/// 获取待审批的工单
|
|
|
@@ -1134,7 +1201,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1134
|
1201
|
{
|
|
1135
|
1202
|
if (hours >= 24)
|
|
1136
|
1203
|
{
|
|
1137
|
|
- GetDaQucirCulation(ua, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
|
1204
|
+ GetDaQucirCulation("",ua, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
1138
|
1205
|
}
|
|
1139
|
1206
|
else
|
|
1140
|
1207
|
{
|
|
|
@@ -1166,7 +1233,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1166
|
1233
|
}
|
|
1167
|
1234
|
else if (hours >= 48)
|
|
1168
|
1235
|
{
|
|
1169
|
|
- GetDaQucirCulation(user, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
|
1236
|
+ GetDaQucirCulation("",user, it.F_CreateTime.ToString(), it.F_WoID, false);
|
|
1170
|
1237
|
}
|
|
1171
|
1238
|
else
|
|
1172
|
1239
|
{
|
|
|
@@ -1212,7 +1279,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1212
|
1279
|
}
|
|
1213
|
1280
|
else
|
|
1214
|
1281
|
{
|
|
1215
|
|
- GetDaQucirCulation(ua, time.ToString(), it.F_WoID, false);
|
|
|
1282
|
+ GetDaQucirCulation("",ua, time.ToString(), it.F_WoID, false);
|
|
1216
|
1283
|
}
|
|
1217
|
1284
|
}
|
|
1218
|
1285
|
}
|
|
|
@@ -1816,6 +1883,14 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1816
|
1883
|
;
|
|
1817
|
1884
|
return str;
|
|
1818
|
1885
|
}
|
|
|
1886
|
+ public string GetParticipateID()
|
|
|
1887
|
+ {
|
|
|
1888
|
+ string str = string.Empty;
|
|
|
1889
|
+ str = "select F_WoID from T_Wo_WorkOrderItem_New where F_OptType in( 1,7)";
|
|
|
1890
|
+
|
|
|
1891
|
+ ;
|
|
|
1892
|
+ return str;
|
|
|
1893
|
+ }
|
|
1819
|
1894
|
/// <summary>
|
|
1820
|
1895
|
/// 获取我参与的工单编号
|
|
1821
|
1896
|
/// </summary>
|
|
|
@@ -1963,6 +2038,19 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1963
|
2038
|
}
|
|
1964
|
2039
|
return str;
|
|
1965
|
2040
|
}
|
|
|
2041
|
+ public DataTable GetFileData(string ids, string prefix)
|
|
|
2042
|
+ {
|
|
|
2043
|
+ DataTable dt = new DataTable();
|
|
|
2044
|
+ if (!string.IsNullOrEmpty(ids))
|
|
|
2045
|
+ {
|
|
|
2046
|
+ dt = DbHelperSQL.Query("select * from T_Sys_Accessories where F_FileId in (" + ids + ")").Tables[0];
|
|
|
2047
|
+ foreach (DataRow dr in dt.Rows)
|
|
|
2048
|
+ {
|
|
|
2049
|
+ dr["F_FileUrl"] = prefix + dr["F_FileUrl"].ToString();
|
|
|
2050
|
+ }
|
|
|
2051
|
+ }
|
|
|
2052
|
+ return dt;
|
|
|
2053
|
+ }
|
|
1966
|
2054
|
/// <summary>
|
|
1967
|
2055
|
/// 查询工单详情
|
|
1968
|
2056
|
/// </summary>
|
|
|
@@ -1971,22 +2059,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1971
|
2059
|
int userId = CurrentUser.UserData.F_UserId;
|
|
1972
|
2060
|
if (userId != 0)
|
|
1973
|
2061
|
{
|
|
|
2062
|
+ DataTable FileUrl = new DataTable();
|
|
1974
|
2063
|
Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
1975
|
|
- string sql = "";
|
|
1976
|
|
- if (id > 0)
|
|
|
2064
|
+
|
|
|
2065
|
+ if (id <= 0)
|
|
1977
|
2066
|
{
|
|
1978
|
|
- sql += $" ( F_ID like '%" + id + "%' ) ";
|
|
1979
|
|
- }
|
|
1980
|
|
- else
|
|
1981
|
2067
|
return Error("请输入正确的id");
|
|
1982
|
|
- var list = new List<Model.T_Wo_WorkOrder>();
|
|
1983
|
|
- if (!string.IsNullOrWhiteSpace(sql))
|
|
1984
|
|
- {
|
|
1985
|
|
- sql += " and F_IsDelete=0";
|
|
1986
|
|
- list = workOrder.GetModelList(sql);
|
|
1987
|
2068
|
}
|
|
|
2069
|
+ var list = new List<Model.T_Wo_WorkOrder>();
|
|
|
2070
|
+ var model = workOrder.GetModel(id);
|
|
|
2071
|
+ if (model != null)
|
|
|
2072
|
+ list.Add(model);
|
|
1988
|
2073
|
var itemlasts = itembll.GetModelList(" F_WoID=" + +id + " ");
|
|
1989
|
|
-
|
|
|
2074
|
+; var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
|
|
|
2075
|
+ FileUrl = GetFileData(model.F_Files , configfj.F_ParamValue);
|
|
1990
|
2076
|
if (list.Count > 0)
|
|
1991
|
2077
|
{
|
|
1992
|
2078
|
List<WorkOrderNewInput> Input = modeltooip(list);
|
|
|
@@ -1997,7 +2083,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
1997
|
2083
|
state = "success",
|
|
1998
|
2084
|
message = "成功",
|
|
1999
|
2085
|
rows = Input,
|
|
2000
|
|
- total= ItemList( itemlasts),
|
|
|
2086
|
+ FileUrl,
|
|
|
2087
|
+ total = ItemList( itemlasts),
|
|
2001
|
2088
|
};
|
|
2002
|
2089
|
|
|
2003
|
2090
|
return Content(obj.ToJson());
|
|
|
@@ -2110,7 +2197,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2110
|
2197
|
/// <summary>
|
|
2111
|
2198
|
///综合查询列表
|
|
2112
|
2199
|
/// </summary>
|
|
2113
|
|
- public ActionResult GetComprehensive(string code, string cusname,string keywords, string cusphone, string companyname, string province, string city,
|
|
|
2200
|
+ public ActionResult GetComprehensive(string code, string cusname,string createby,string keywords, string cusphone, string companyname, string province, string city,
|
|
2114
|
2201
|
string country, string township,string category,string salebase, string touser, int source = 0,int state=-1, int type = 0, int pageindex = 1, int pagesize = 10)
|
|
2115
|
2202
|
{
|
|
2116
|
2203
|
int userId = CurrentUser.UserData.F_UserId;
|
|
|
@@ -2125,6 +2212,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
2125
|
2212
|
sql += $" and F_State=" + state;
|
|
2126
|
2213
|
if (source > 0)//工单来源
|
|
2127
|
2214
|
sql += $" and F_Source=" + source;
|
|
|
2215
|
+ if (!string.IsNullOrWhiteSpace(createby))//创建人
|
|
|
2216
|
+ sql += $" and F_CreateBy like '%" + createby.Trim() + "%'";
|
|
2128
|
2217
|
if (!string.IsNullOrWhiteSpace(touser))//参与人
|
|
2129
|
2218
|
sql += $" and F_DealBy like '%" + touser.Trim() + "%'";
|
|
2130
|
2219
|
if (!string.IsNullOrWhiteSpace(code))//工单编号
|
|
|
@@ -3212,12 +3301,50 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3212
|
3301
|
}
|
|
3213
|
3302
|
else
|
|
3214
|
3303
|
{
|
|
3215
|
|
- AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
|
|
3216
|
|
- var res = AssignWO(ua, modlelist, input, "流转市场管理科", 37, 0, 0, 0);
|
|
|
3304
|
+
|
|
|
3305
|
+ int dapt = 0, nextda = 0;
|
|
|
3306
|
+ var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
3307
|
+ if (deptmodel1 != null)
|
|
|
3308
|
+ {
|
|
|
3309
|
+ dapt = deptmodel1.F_ParentId;
|
|
|
3310
|
+ }
|
|
|
3311
|
+ AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
|
|
|
3312
|
+ string opt = "";
|
|
|
3313
|
+ if (dapt != 0)
|
|
|
3314
|
+ {
|
|
|
3315
|
+ if (dapt == 11)
|
|
|
3316
|
+ {
|
|
|
3317
|
+ nextda = 37;
|
|
|
3318
|
+ opt = "流转市场管理科";
|
|
|
3319
|
+ }
|
|
|
3320
|
+ else if (dapt == 14)
|
|
|
3321
|
+ {
|
|
|
3322
|
+ nextda = 57;
|
|
|
3323
|
+ opt = "流转营销管理处";
|
|
|
3324
|
+ }
|
|
|
3325
|
+ else if (dapt == 15)
|
|
|
3326
|
+ {
|
|
|
3327
|
+ nextda = 74;
|
|
|
3328
|
+ opt = "流转策划推广";
|
|
|
3329
|
+ }
|
|
|
3330
|
+ else if (dapt == 16)
|
|
|
3331
|
+ {
|
|
|
3332
|
+ nextda = 88;
|
|
|
3333
|
+ opt = "流转销售部";
|
|
|
3334
|
+ }
|
|
|
3335
|
+ }
|
|
|
3336
|
+ if (nextda != 0)
|
|
|
3337
|
+ {
|
|
|
3338
|
+ var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0);
|
|
3217
|
3339
|
if (res)
|
|
3218
|
3340
|
return Success("添加成功");
|
|
3219
|
3341
|
else
|
|
3220
|
|
- return Error("市场管理科接收失败!");
|
|
|
3342
|
+ return Error("流转失败!");
|
|
|
3343
|
+ }
|
|
|
3344
|
+ else
|
|
|
3345
|
+ {
|
|
|
3346
|
+ return Error("流转失败!");
|
|
|
3347
|
+ }
|
|
3221
|
3348
|
}
|
|
3222
|
3349
|
}
|
|
3223
|
3350
|
else
|
|
|
@@ -3279,7 +3406,39 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3279
|
3406
|
#endregion
|
|
3280
|
3407
|
return model;
|
|
3281
|
3408
|
}
|
|
3282
|
|
-
|
|
|
3409
|
+ public ActionResult DeleteWorkOrder(int id)
|
|
|
3410
|
+ {
|
|
|
3411
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
3412
|
+ if (userId != 0)
|
|
|
3413
|
+ {
|
|
|
3414
|
+ if (id <= 0)
|
|
|
3415
|
+ return Error("参数错误!");
|
|
|
3416
|
+ var model = workOrder.GetModel(id);
|
|
|
3417
|
+ if (model == null)
|
|
|
3418
|
+ return Error("查询不到此工单!");
|
|
|
3419
|
+ Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
|
3420
|
+ if (ua ==null )
|
|
|
3421
|
+ {
|
|
|
3422
|
+ return Error("无操作权限!");
|
|
|
3423
|
+ }
|
|
|
3424
|
+ if (model.F_CreateBy != ua.F_UserCode)
|
|
|
3425
|
+ {
|
|
|
3426
|
+ return Error("非创建人不能删除工单!");
|
|
|
3427
|
+ }
|
|
|
3428
|
+ if (workOrder.DeleteList(id.ToString ()))
|
|
|
3429
|
+ {
|
|
|
3430
|
+ return Success("设置成功");
|
|
|
3431
|
+ }
|
|
|
3432
|
+ else
|
|
|
3433
|
+ {
|
|
|
3434
|
+ return Error("设置失败");
|
|
|
3435
|
+ }
|
|
|
3436
|
+ }
|
|
|
3437
|
+ else
|
|
|
3438
|
+ {
|
|
|
3439
|
+ return Error("无操作权限!");
|
|
|
3440
|
+ }
|
|
|
3441
|
+ }
|
|
3283
|
3442
|
/// <summary>
|
|
3284
|
3443
|
/// 删除工单
|
|
3285
|
3444
|
/// </summary>
|
|
|
@@ -3290,6 +3449,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3290
|
3449
|
int userId = CurrentUser.UserData.F_UserId;
|
|
3291
|
3450
|
if (userId != 0)
|
|
3292
|
3451
|
{
|
|
|
3452
|
+
|
|
3293
|
3453
|
if (ids != null && ids.Length > 0)
|
|
3294
|
3454
|
{
|
|
3295
|
3455
|
bool res = true;
|
|
|
@@ -3346,16 +3506,17 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3346
|
3506
|
{
|
|
3347
|
3507
|
string usercode = CurrentUser.UserData.F_UserCode;
|
|
3348
|
3508
|
Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
|
3509
|
+ Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
|
|
3349
|
3510
|
#region 添加验证判断
|
|
3350
|
3511
|
if (input.F_ID <= 0)
|
|
3351
|
3512
|
return Error("参数错误!");
|
|
3352
|
|
- if (!(input.F_Type> 0 && input.F_Type < 5))
|
|
|
3513
|
+ if (!(input.F_Type > 0 && input.F_Type < 5))
|
|
3353
|
3514
|
return Error("工单类型错误!");
|
|
3354
|
3515
|
if (string.IsNullOrEmpty(input.F_CusName))
|
|
3355
|
3516
|
return Error("请输入客户姓名!");
|
|
3356
|
3517
|
if (string.IsNullOrEmpty(input.F_CusPhone))
|
|
3357
|
3518
|
return Error("请输入客户电话!");
|
|
3358
|
|
- if (!string.IsNullOrEmpty(input.F_BatchNumber) && !vaBatchNumber(input.F_BatchNumber.Trim ()))
|
|
|
3519
|
+ if (!string.IsNullOrEmpty(input.F_BatchNumber) && !vaBatchNumber(input.F_BatchNumber.Trim()))
|
|
3359
|
3520
|
{
|
|
3360
|
3521
|
return Error("请输入正确的生产批次号!");
|
|
3361
|
3522
|
}
|
|
|
@@ -3382,26 +3543,32 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3382
|
3543
|
}
|
|
3383
|
3544
|
if (!string.IsNullOrEmpty(input.F_CustomerID) && !valcode(input.F_CustomerID.ToString(), 10))
|
|
3384
|
3545
|
return Error("客户编号为10为纯数字!");
|
|
3385
|
|
- if (!string.IsNullOrEmpty (input.F_MaterialID) && !valcode(input.F_MaterialID, 11))
|
|
|
3546
|
+ if (!string.IsNullOrEmpty(input.F_MaterialID) && !valcode(input.F_MaterialID, 11))
|
|
3386
|
3547
|
return Error("物料编码为11为纯数字!");
|
|
3387
|
3548
|
#endregion
|
|
3388
|
3549
|
var model = workOrder.GetModel(input.F_ID);
|
|
3389
|
3550
|
if (model == null)
|
|
3390
|
3551
|
return Error("查询不到此工单!");
|
|
3391
|
|
- if (model.F_State != 3 && model.F_State != 12)
|
|
|
3552
|
+ if (ro != null)
|
|
3392
|
3553
|
{
|
|
3393
|
|
- var itemlast = itembll.GetModelList(" F_WoID=" + input.F_ID + " ");
|
|
3394
|
|
- if (itemlast.Count > 0)
|
|
|
3554
|
+ if (ro.F_RoleCode == "JDYPTZX" || ro.F_RoleCode == "JDYBZZX")
|
|
3395
|
3555
|
{
|
|
3396
|
|
- foreach (var it in itemlast)
|
|
|
3556
|
+ if (model.F_CreateBy != ua.F_UserCode)
|
|
3397
|
3557
|
{
|
|
3398
|
|
- if (it.F_WoState == 2)
|
|
3399
|
|
- {
|
|
3400
|
|
- return Error("此工单已进入处理流程不能修改!");
|
|
3401
|
|
- }
|
|
|
3558
|
+ return Error("非创建人不能修改工单!");
|
|
3402
|
3559
|
}
|
|
|
3560
|
+
|
|
3403
|
3561
|
}
|
|
3404
|
3562
|
}
|
|
|
3563
|
+ if (model.F_State == 2)
|
|
|
3564
|
+ {
|
|
|
3565
|
+ return Error("此工单已接单不能修改!");
|
|
|
3566
|
+ }
|
|
|
3567
|
+ else if (model.F_State == 11|| model.F_State == 10)
|
|
|
3568
|
+ {
|
|
|
3569
|
+ return Error("此工单已处理不能修改!");
|
|
|
3570
|
+ }
|
|
|
3571
|
+
|
|
3405
|
3572
|
#region 保存客户基本信息
|
|
3406
|
3573
|
model = inputtoobj(model, input,1);
|
|
3407
|
3574
|
#endregion
|
|
|
@@ -3418,7 +3585,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3418
|
3585
|
}
|
|
3419
|
3586
|
#endregion
|
|
3420
|
3587
|
AddLog(input.F_ID, model.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua,0,0);
|
|
3421
|
|
- Model.T_Sys_RoleInfo ro = rolebll.GetModel(ua.F_RoleId);
|
|
3422
|
3588
|
if (ro !=null )
|
|
3423
|
3589
|
{
|
|
3424
|
3590
|
if (ro.F_RoleCode == "DQJL" || ro.F_RoleCode == "FGSJL"|| ro.F_RoleCode == "YWY")
|
|
|
@@ -3439,16 +3605,48 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3439
|
3605
|
else
|
|
3440
|
3606
|
{
|
|
3441
|
3607
|
string deptname1 = "";
|
|
|
3608
|
+ int dapt = 0, nextda = 0; string opt = "";
|
|
3442
|
3609
|
var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
|
|
3443
|
3610
|
if (deptmodel1 != null)
|
|
3444
|
3611
|
{
|
|
3445
|
3612
|
deptname1 = deptmodel1.F_DeptName + "-";
|
|
|
3613
|
+ dapt = deptmodel1.F_ParentId;
|
|
|
3614
|
+ }
|
|
|
3615
|
+ if (dapt != 0)
|
|
|
3616
|
+ {
|
|
|
3617
|
+ if (dapt == 11)
|
|
|
3618
|
+ {
|
|
|
3619
|
+ nextda = 37;
|
|
|
3620
|
+ opt = "流转市场管理科";
|
|
|
3621
|
+ }
|
|
|
3622
|
+ else if (dapt == 14)
|
|
|
3623
|
+ {
|
|
|
3624
|
+ nextda = 57;
|
|
|
3625
|
+ opt = "流转营销管理处";
|
|
|
3626
|
+ }
|
|
|
3627
|
+ else if (dapt == 15)
|
|
|
3628
|
+ {
|
|
|
3629
|
+ nextda = 74;
|
|
|
3630
|
+ opt = "流转策划推广";
|
|
|
3631
|
+ }
|
|
|
3632
|
+ else if (dapt == 16)
|
|
|
3633
|
+ {
|
|
|
3634
|
+ nextda = 88;
|
|
|
3635
|
+ opt = "流转销售部";
|
|
|
3636
|
+ }
|
|
|
3637
|
+ }
|
|
|
3638
|
+ if (nextda != 0)
|
|
|
3639
|
+ {
|
|
|
3640
|
+ var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0);
|
|
|
3641
|
+ if (res)
|
|
|
3642
|
+ return Success("保存成功");
|
|
|
3643
|
+ else
|
|
|
3644
|
+ return Error("流转失败!");
|
|
3446
|
3645
|
}
|
|
3447
|
|
- var res = AssignWO(ua, model, input, "流转市场管理科", 37, 0, model.F_limit, 0);
|
|
3448
|
|
- if (res)
|
|
3449
|
|
- return Success("保存成功");
|
|
3450
|
3646
|
else
|
|
3451
|
|
- return Error("市场管理科接收失败!");
|
|
|
3647
|
+ {
|
|
|
3648
|
+ return Error("流转失败!");
|
|
|
3649
|
+ }
|
|
3452
|
3650
|
}
|
|
3453
|
3651
|
}
|
|
3454
|
3652
|
}
|
|
|
@@ -3696,10 +3894,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3696
|
3894
|
model.F_Description = model1[i].F_Description;//问题描述
|
|
3697
|
3895
|
model.F_Files = "0";//附件上传ids
|
|
3698
|
3896
|
model.F_DealType = model1[i].F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
|
|
|
3897
|
+ model.F_WorkerBrand = model1[i].F_Brand;//工单品牌
|
|
3699
|
3898
|
model.SuperiorOpinion = AssCont(model1[i].F_ID );//上级处理意见
|
|
3700
|
3899
|
#endregion
|
|
3701
|
|
-
|
|
3702
|
|
-
|
|
3703
|
3900
|
if (!string .IsNullOrEmpty (model1[i].F_QuestionType) )
|
|
3704
|
3901
|
{
|
|
3705
|
3902
|
try
|
|
|
@@ -3806,15 +4003,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3806
|
4003
|
model.F_IsAudit = model1[i].F_IsAudit;//是否审核
|
|
3807
|
4004
|
model.F_Highopinions = model1[i].F_Highopinions;//高层处理意见
|
|
3808
|
4005
|
model.F_CreateOn = model1[i].F_CreateOn; ;//添加时间
|
|
3809
|
|
- model.F_CreateBy = model1[i].F_CreateBy; ;//添加人
|
|
|
4006
|
+
|
|
3810
|
4007
|
if (!string .IsNullOrEmpty (model1[i].F_CreateBy))
|
|
3811
|
4008
|
{
|
|
3812
|
4009
|
Model.T_Sys_UserAccount creatname = sysUserAccountBll.GetModel(model1[i].F_CreateBy);
|
|
3813
|
4010
|
if (creatname!=null )
|
|
3814
|
4011
|
{
|
|
|
4012
|
+ model.F_CreateBy = creatname.F_WorkNumber; ;//添加人
|
|
3815
|
4013
|
model.F_CreateName = creatname.F_UserName ; ;//添加人
|
|
3816
|
4014
|
}
|
|
3817
|
|
-
|
|
3818
|
4015
|
}
|
|
3819
|
4016
|
model.F_UpdateBy = model1[i].F_UpdateBy;//修改人工号
|
|
3820
|
4017
|
model.F_UpdateOn = model1[i].F_UpdateOn; ;//修改人工号
|
|
|
@@ -3843,6 +4040,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3843
|
4040
|
model.F_AuditOn = model1[i].F_AuditOn;//审核时间
|
|
3844
|
4041
|
model.F_AuditCont = model1[i].F_AuditCont;//审核内容
|
|
3845
|
4042
|
model.DelayTimelimit = DelayTimelimit(model1[i].F_ID, model1[i].F_limit);//申请时限
|
|
|
4043
|
+ model.DelayTimename = DelayDeptid(model1[i].F_ID);//申请部门
|
|
3846
|
4044
|
model.F_Reasontimeout= model1[i].F_Reasontimeout;//超时原因
|
|
3847
|
4045
|
Model.T_Sys_UserAccount ua = new T_Sys_UserAccount();
|
|
3848
|
4046
|
if (userId>0)
|
|
|
@@ -3906,10 +4104,37 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
3906
|
4104
|
var itemlist = itembll.GetModelList("F_WoID="+ id + "and F_OptType="+ (int)EnumItemOpt.Delay+ "and F_ItemType = " + (int)EnumItemType.Delay);
|
|
3907
|
4105
|
foreach (var it in itemlist )
|
|
3908
|
4106
|
{
|
|
|
4107
|
+
|
|
3909
|
4108
|
time = int.Parse(it.F_LimitTime) - limit;
|
|
3910
|
4109
|
}
|
|
3911
|
4110
|
return time;
|
|
3912
|
4111
|
}
|
|
|
4112
|
+ private string DelayDeptid(int id)
|
|
|
4113
|
+ {
|
|
|
4114
|
+ string str = "";
|
|
|
4115
|
+
|
|
|
4116
|
+ var itemlist = itembll.GetModelList("F_WoID=" + id + "and F_OptType=" + (int)EnumItemOpt.Delay + "and F_ItemType = " + (int)EnumItemType.Delay);
|
|
|
4117
|
+ string usercode="";
|
|
|
4118
|
+ foreach (var it in itemlist)
|
|
|
4119
|
+ {
|
|
|
4120
|
+ usercode = it.F_CreateUser;
|
|
|
4121
|
+ }
|
|
|
4122
|
+
|
|
|
4123
|
+ if (usercode!="")
|
|
|
4124
|
+ {
|
|
|
4125
|
+ Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(usercode);
|
|
|
4126
|
+ if (ua!=null )
|
|
|
4127
|
+ {
|
|
|
4128
|
+ Model.T_Sys_Department dModel = departmentBLL.GetModel(ua.F_DeptId);
|
|
|
4129
|
+ if (dModel!=null )
|
|
|
4130
|
+ {
|
|
|
4131
|
+ str = dModel.F_DeptName;
|
|
|
4132
|
+ }
|
|
|
4133
|
+ }
|
|
|
4134
|
+ }
|
|
|
4135
|
+
|
|
|
4136
|
+ return str;
|
|
|
4137
|
+ }
|
|
3913
|
4138
|
/// <summary>
|
|
3914
|
4139
|
/// 是否超时
|
|
3915
|
4140
|
/// </summary>
|
|
|
@@ -4109,7 +4334,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4109
|
4334
|
else
|
|
4110
|
4335
|
{
|
|
4111
|
4336
|
model.F_WorkOrderCode = model.F_WorkOrderCode;//工单编号
|
|
4112
|
|
- model.F_Source = input .F_Source.ToString();//工单来源
|
|
|
4337
|
+ model.F_Source = model.F_Source.ToString();//工单来源
|
|
4113
|
4338
|
}
|
|
4114
|
4339
|
#region 基本字段
|
|
4115
|
4340
|
if (type == 2)
|
|
|
@@ -4181,8 +4406,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4181
|
4406
|
model.F_Description = input.F_Description;//问题描述
|
|
4182
|
4407
|
model.F_ZX_Area = input.F_ZX_Area;// 大区
|
|
4183
|
4408
|
model.F_ZX_Branch = input.F_ZX_Branch;//分公司
|
|
4184
|
|
- model.F_Files = "0";//附件上传ids
|
|
4185
|
|
- model.F_DealType = input.F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
|
|
|
4409
|
+ model.F_Files = model.F_Files;//附件上传ids
|
|
|
4410
|
+ model.F_Brand = input.F_WorkerBrand;//工单品牌
|
|
|
4411
|
+ model.F_DealType = model.F_DealType;//处理方式:当即办理、电话转接、网络转办(点选)
|
|
4186
|
4412
|
#endregion
|
|
4187
|
4413
|
model.F_QuestionType = input.F_QuestionType;//问题类别(投诉抽捡和咨询类别不一样)
|
|
4188
|
4414
|
model.F_CustomerID = input.F_CustomerID;//客户编号为10为纯数字
|
|
|
@@ -4209,7 +4435,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4209
|
4435
|
model.F_CJ_TestUnit = input.F_CJ_TestUnit;//抽检-化验单位
|
|
4210
|
4436
|
model.F_CJ_Tonnage = input.F_CJ_Tonnage;//抽检-抽检吨数
|
|
4211
|
4437
|
model.F_CJ_BagNo = input.F_CJ_BagNo;//抽检-抽检袋数
|
|
4212
|
|
- model.F_VisitRemarks = input.F_VisitRemarks;//回访备注
|
|
|
4438
|
+ // model.F_VisitRemarks = input.F_VisitRemarks;//回访备注
|
|
4213
|
4439
|
if (!string .IsNullOrEmpty (input.F_BatchNumber))
|
|
4214
|
4440
|
{
|
|
4215
|
4441
|
if (type == 1)
|
|
|
@@ -4314,7 +4540,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4314
|
4540
|
/// 创建工单时指派
|
|
4315
|
4541
|
/// </summary>
|
|
4316
|
4542
|
/// <returns></returns>
|
|
4317
|
|
- public ActionResult Createass(WorkOrderNewInput input, string cont, WorkOrdeDeptment deptment, int isvisit = 1,
|
|
|
4543
|
+ public ActionResult Createass(WorkOrderNewInput input, string cont, WorkOrdeDeptment deptment,string F_Files, int isvisit = 1,
|
|
4318
|
4544
|
int overtime = 0, int sms = 0, int clbm = 0, int clid = 0)
|
|
4319
|
4545
|
{
|
|
4320
|
4546
|
int userId = CurrentUser.UserData.F_UserId;
|
|
|
@@ -4458,7 +4684,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4458
|
4684
|
}
|
|
4459
|
4685
|
|
|
4460
|
4686
|
AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
|
|
4461
|
|
- var res = AssignWO(ua, modlelist, inputs, cont, clbm, clid, overtime, sms);
|
|
|
4687
|
+ var res = AssignWO(ua, modlelist, inputs, cont, F_Files, clbm, clid, overtime, sms);
|
|
4462
|
4688
|
if (res)
|
|
4463
|
4689
|
return Success("转派成功");
|
|
4464
|
4690
|
else
|
|
|
@@ -4564,6 +4790,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4564
|
4790
|
modlelist.F_DealTime =DateTime .Now ;// 处理时间
|
|
4565
|
4791
|
modlelist.F_DealContent = input.F_DealContent;//完结内容
|
|
4566
|
4792
|
modlelist.F_DealType = "当即办理";//处理方式:当即办理、电话转接、网络转办
|
|
|
4793
|
+ model.F_IsVisit = 0;
|
|
4567
|
4794
|
bool f = workOrder .Update(modlelist);
|
|
4568
|
4795
|
if (!f )
|
|
4569
|
4796
|
{
|
|
|
@@ -4577,7 +4804,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4577
|
4804
|
{
|
|
4578
|
4805
|
deptname = deptmodel.F_DeptName + "-";
|
|
4579
|
4806
|
}
|
|
4580
|
|
- AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.end, "", 0, ua, 0, 0);
|
|
|
4807
|
+ AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "添加工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, 0, 0);
|
|
4581
|
4808
|
var res = Overorder(ua, modlelist, 1);
|
|
4582
|
4809
|
if (res)
|
|
4583
|
4810
|
return Success("完结成功");
|
|
|
@@ -4599,7 +4826,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4599
|
4826
|
/// </summary>
|
|
4600
|
4827
|
/// <returns></returns>
|
|
4601
|
4828
|
[Authority]
|
|
4602
|
|
- public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment, int isvisit=1,
|
|
|
4829
|
+ public ActionResult AssignWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,string F_Files, int isvisit=1,
|
|
4603
|
4830
|
int overtime =0,int sms=0,int clbm = 0, int clid = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0)
|
|
4604
|
4831
|
{
|
|
4605
|
4832
|
int userId = CurrentUser.UserData.F_UserId;
|
|
|
@@ -4690,7 +4917,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4690
|
4917
|
|
|
4691
|
4918
|
if (model != null)
|
|
4692
|
4919
|
{
|
|
4693
|
|
- var res = AssignWO(ua, model, input,cont, clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
|
|
|
4920
|
+ var res = AssignWO(ua, model, input,cont, F_Files,clbm, clid, overtime, sms, isApprovalp, hclbm, hclid);
|
|
4694
|
4921
|
if (res)
|
|
4695
|
4922
|
return Success("转派成功");
|
|
4696
|
4923
|
else
|
|
|
@@ -4790,7 +5017,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4790
|
5017
|
/// </summary>
|
|
4791
|
5018
|
/// <returns></returns>
|
|
4792
|
5019
|
[Authority]
|
|
4793
|
|
- public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,string dealType,
|
|
|
5020
|
+ public ActionResult DealWorkOrder(long orderid, string cont, WorkOrdeDeptment deptment,
|
|
4794
|
5021
|
string uncont="",
|
|
4795
|
5022
|
int isvisit=1, int isover = 0)
|
|
4796
|
5023
|
{
|
|
|
@@ -4864,7 +5091,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4864
|
5091
|
}
|
|
4865
|
5092
|
if (model != null)
|
|
4866
|
5093
|
{
|
|
4867
|
|
- var res = DealWO(ua, model, input, cont, isover, dealType, uncont);
|
|
|
5094
|
+ var res = DealWO(ua, model, input, cont, isover, uncont);
|
|
4868
|
5095
|
if (res)
|
|
4869
|
5096
|
return Success("处理成功");
|
|
4870
|
5097
|
else
|
|
|
@@ -4968,7 +5195,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4968
|
5195
|
if (ua != null)
|
|
4969
|
5196
|
{
|
|
4970
|
5197
|
Model.T_Wo_WorkOrder model = workOrder .GetModel(orderid);
|
|
4971
|
|
- //验证信息
|
|
|
5198
|
+ //验证信息
|
|
4972
|
5199
|
if (model != null)
|
|
4973
|
5200
|
{
|
|
4974
|
5201
|
var res = BackWO(ua, model, cont, type);
|
|
|
@@ -4988,7 +5215,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
4988
|
5215
|
/// <param name="input"></param>
|
|
4989
|
5216
|
/// <returns></returns>
|
|
4990
|
5217
|
[Authority]
|
|
4991
|
|
- public ActionResult ReturnvisitOrder(long orderid, string cont, string reason, string call ,int isOver=0)
|
|
|
5218
|
+ public ActionResult ReturnvisitOrder(long orderid, string cont, string reason, string call ,string F_VisitRemarks,int isOver=0)
|
|
4992
|
5219
|
{
|
|
4993
|
5220
|
int userId = CurrentUser.UserData.F_UserId;
|
|
4994
|
5221
|
if (userId != 0)
|
|
|
@@ -5000,7 +5227,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5000
|
5227
|
//验证信息
|
|
5001
|
5228
|
if (model != null)
|
|
5002
|
5229
|
{
|
|
5003
|
|
- var res = Retu(ua, model, cont, reason, call, isOver);
|
|
|
5230
|
+ var res = Retu(ua, model, cont, reason, F_VisitRemarks, call, isOver);
|
|
5004
|
5231
|
if (res)
|
|
5005
|
5232
|
return Success("回访成功");
|
|
5006
|
5233
|
else
|
|
|
@@ -5278,7 +5505,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5278
|
5505
|
/// <summary>
|
|
5279
|
5506
|
/// 回访工单
|
|
5280
|
5507
|
/// </summary>
|
|
5281
|
|
- public bool Retu(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,string reason, string call, int isOver = 0)
|
|
|
5508
|
+ public bool Retu(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,string reason,string F_VisitRemarks, string call, int isOver = 0)
|
|
5282
|
5509
|
{
|
|
5283
|
5510
|
#region 工单处理
|
|
5284
|
5511
|
int sms = 0;
|
|
|
@@ -5338,6 +5565,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5338
|
5565
|
model.F_VisitReason = reason;
|
|
5339
|
5566
|
model.F_Callresults = call ;
|
|
5340
|
5567
|
model.F_Sid = sid;
|
|
|
5568
|
+ model.F_VisitRemarks = F_VisitRemarks;
|
|
5341
|
5569
|
workOrder.Update(model);
|
|
5342
|
5570
|
#endregion
|
|
5343
|
5571
|
#region 推送消息
|
|
|
@@ -5425,7 +5653,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5425
|
5653
|
/// <summary>
|
|
5426
|
5654
|
/// 处理工单
|
|
5427
|
5655
|
/// </summary>
|
|
5428
|
|
- public bool DealWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input,string cont,int isover = 0,string dealType="",string uncont="")
|
|
|
5656
|
+ public bool DealWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input,string cont,int isover = 0,string uncont="")
|
|
5429
|
5657
|
{
|
|
5430
|
5658
|
#region 工单处理
|
|
5431
|
5659
|
int sms = 0;
|
|
|
@@ -5476,7 +5704,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5476
|
5704
|
{
|
|
5477
|
5705
|
#region 处理工单
|
|
5478
|
5706
|
model.F_State = wostate;
|
|
5479
|
|
- model.F_DealType = dealType;
|
|
5480
|
5707
|
//处理内容
|
|
5481
|
5708
|
if (!string.IsNullOrEmpty(cont))
|
|
5482
|
5709
|
model.F_DealContent += cont + ";";
|
|
|
@@ -5665,7 +5892,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5665
|
5892
|
/// <summary>
|
|
5666
|
5893
|
/// 转派工单
|
|
5667
|
5894
|
/// </summary>
|
|
5668
|
|
- public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "")
|
|
|
5895
|
+ public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, WorkOrderNewInput input, string cont, string F_Files, int clbm = 0, int clid = 0, int overtime = 0, int sms = 0, int isApprovalp = 0, int hclbm = 0, int hclid = 0, string creat = "")
|
|
5669
|
5896
|
{
|
|
5670
|
5897
|
string smscont = "";
|
|
5671
|
5898
|
if (model.F_Type == "1")
|
|
|
@@ -5800,6 +6027,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5800
|
6027
|
if (!string.IsNullOrEmpty(cont))
|
|
5801
|
6028
|
model.F_DealContent += cont + ";";
|
|
5802
|
6029
|
InToworkModel(model, input);
|
|
|
6030
|
+ if (!string.IsNullOrEmpty(F_Files))
|
|
|
6031
|
+ model.F_Files = F_Files;
|
|
5803
|
6032
|
workOrder.Update(model);
|
|
5804
|
6033
|
#endregion
|
|
5805
|
6034
|
#region 推送消息
|
|
|
@@ -5845,7 +6074,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
5845
|
6074
|
string strmsg = string.Empty;
|
|
5846
|
6075
|
strmsg = nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + "操作" + opt + "工单";
|
|
5847
|
6076
|
Model.T_Msg_List msg = new Model.T_Msg_List();
|
|
5848
|
|
- msg.Type = (int)Model.MSGType.workorder;//处理
|
|
|
6077
|
+ msg.Type = (int)Model.MSGType.Handle;//处理
|
|
5849
|
6078
|
msg.ToUser = touser;
|
|
5850
|
6079
|
msg.ToID = toid;
|
|
5851
|
6080
|
msg.Detail = strmsg;
|