|
|
@@ -26,8 +26,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
26
|
26
|
/// 获取工单列表
|
|
27
|
27
|
/// </summary>
|
|
28
|
28
|
/// <returns></returns>
|
|
29
|
|
- public ActionResult GetList(string code,int type, string cusname, string cusphone, string companyname, string province, string city,
|
|
30
|
|
- string country, string township, string touser, int state=-1, int pageindex = 1,int pagesize = 10)
|
|
|
29
|
+ public ActionResult GetList(string code, string cusname, string cusphone, string companyname, string province, string city,
|
|
|
30
|
+ string country, string township, string touser, int type = 0, int state=-1, int pageindex = 1,int pagesize = 10)
|
|
31
|
31
|
{
|
|
32
|
32
|
|
|
33
|
33
|
string sql = $" and F_IsDelete=0";
|
|
|
@@ -241,7 +241,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
241
|
241
|
deptname = deptmodel.F_DeptName + "-";
|
|
242
|
242
|
}
|
|
243
|
243
|
#endregion
|
|
244
|
|
- AddLog(input.F_ID, model.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua);
|
|
|
244
|
+ AddLog(input.F_ID, model.F_State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua,0,0);
|
|
245
|
245
|
return Success("保存成功!");
|
|
246
|
246
|
}
|
|
247
|
247
|
else
|
|
|
@@ -437,10 +437,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
437
|
437
|
/// <summary>
|
|
438
|
438
|
/// 添加工单记录
|
|
439
|
439
|
/// </summary>
|
|
440
|
|
- public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser)
|
|
|
440
|
+ public long AddLog(long woid, int wostate, string content, int itemtype, int opttype, string nextuser, int nextdept, Model.T_Sys_UserAccount nowUser ,int overtime,int sms )
|
|
441
|
441
|
{
|
|
442
|
442
|
Model.T_Wo_WorkOrderItem_New itemModel = new Model.T_Wo_WorkOrderItem_New();
|
|
443
|
|
- string starttime = "";string endtime = "";
|
|
444
|
443
|
#region
|
|
445
|
444
|
//处理当前工单的记录之前的记录过期
|
|
446
|
445
|
var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='0' and F_ItemType=" + itemtype + " and F_WoID=" + woid + " ");
|
|
|
@@ -450,18 +449,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
450
|
449
|
{
|
|
451
|
450
|
it.F_IsUsed = 1;
|
|
452
|
451
|
itembll.Update(it);
|
|
453
|
|
- if ( it.F_WoState == 2)
|
|
454
|
|
- {
|
|
455
|
|
- starttime = it.F_CreateTime.ToString ();
|
|
456
|
|
- }
|
|
457
|
|
- if (it.F_WoState == 10)
|
|
458
|
|
- {
|
|
459
|
|
- endtime = it.F_CreateTime.ToString();
|
|
460
|
|
- }
|
|
461
|
452
|
}
|
|
462
|
453
|
}
|
|
463
|
454
|
#endregion
|
|
464
|
455
|
itemModel.F_WoID = woid;
|
|
|
456
|
+ itemModel.F_IsSMS = sms;
|
|
465
|
457
|
itemModel.F_WoState = wostate;
|
|
466
|
458
|
itemModel.F_ItemType = itemtype;
|
|
467
|
459
|
itemModel.F_OptType = opttype;
|
|
|
@@ -469,14 +461,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
469
|
461
|
itemModel.F_NextUser = nextuser;
|
|
470
|
462
|
itemModel.F_NextDept = nextdept;
|
|
471
|
463
|
itemModel.F_IsUsed = 0;
|
|
472
|
|
- if (starttime!=""&& endtime!="")
|
|
473
|
|
- {
|
|
474
|
|
- itemModel.F_LimitTime = (DateTime.Parse(endtime) - DateTime.Parse(starttime)).ToString();
|
|
475
|
|
- }
|
|
476
|
|
- else
|
|
477
|
|
- {
|
|
478
|
|
- itemModel.F_LimitTime = "0";
|
|
479
|
|
- }
|
|
|
464
|
+ itemModel.F_LimitTime = overtime.ToString ();
|
|
480
|
465
|
itemModel.F_CreateUser = nowUser.F_UserCode;
|
|
481
|
466
|
itemModel.F_CreateTime = DateTime.Now;
|
|
482
|
467
|
var res = itembll.Add(itemModel);
|
|
|
@@ -516,7 +501,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
516
|
501
|
/// </summary>
|
|
517
|
502
|
/// <returns></returns>
|
|
518
|
503
|
[Authority]
|
|
519
|
|
- public ActionResult AssignWorkOrder(long orderid, string cont, int clbm = 0, int clid = 0)
|
|
|
504
|
+ public ActionResult AssignWorkOrder(long orderid, string cont,int overtime=0,int sms=0,int clbm = 0, int clid = 0)
|
|
520
|
505
|
{
|
|
521
|
506
|
int userId = CurrentUser.UserData.F_UserId;
|
|
522
|
507
|
string usercode = CurrentUser.UserData.F_UserCode;
|
|
|
@@ -530,7 +515,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
530
|
515
|
Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
|
|
531
|
516
|
if (model != null)
|
|
532
|
517
|
{
|
|
533
|
|
- var res = AssignWO(ua, model, cont, clbm, clid);
|
|
|
518
|
+ var res = AssignWO(ua, model, cont, clbm, clid, overtime, sms);
|
|
534
|
519
|
if (res)
|
|
535
|
520
|
return Success("转派成功");
|
|
536
|
521
|
else
|
|
|
@@ -544,9 +529,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
544
|
529
|
}
|
|
545
|
530
|
/// <summary>
|
|
546
|
531
|
/// 转派工单
|
|
547
|
|
- ///
|
|
548
|
532
|
/// </summary>
|
|
549
|
|
- public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int clbm = 0, int clid = 0)
|
|
|
533
|
+ public bool AssignWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int clbm = 0, int clid = 0,int overtime = 0, int sms = 0)
|
|
550
|
534
|
{
|
|
551
|
535
|
string touser = ""; string tousername = "";
|
|
552
|
536
|
#region 获取接收人
|
|
|
@@ -595,7 +579,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
595
|
579
|
if (!string.IsNullOrEmpty(cont))
|
|
596
|
580
|
optcont = ",说明:" + cont;
|
|
597
|
581
|
var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单给 " + tousername + optcont;
|
|
598
|
|
- var itemid = AddLog(model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, touser, clbm, nowUser);
|
|
|
582
|
+ var itemid = AddLog(model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, touser, clbm, nowUser , overtime,sms);
|
|
599
|
583
|
if (itemid > 0)
|
|
600
|
584
|
{
|
|
601
|
585
|
#region 处理工单
|