|
|
@@ -519,9 +519,11 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
519
|
519
|
/// 创建工单
|
|
520
|
520
|
/// </summary>
|
|
521
|
521
|
/// <returns></returns>
|
|
522
|
|
- public ActionResult AddWorkOrder(string callid, int khid, string source, string file
|
|
|
522
|
+ public ActionResult AddWorkOrder(string callid, string source, string file
|
|
523
|
523
|
, string customer, string custel, string country, string address, string inqtime, string inquser
|
|
524
|
|
- , string detail, string cont, string answer, string remark, int infotypeid = 0, int unitid = 0, int clbm = 0, int clid = 0)
|
|
|
524
|
+ , string detail, string cont, string answer, string remark
|
|
|
525
|
+ , string infotype, string unit, string clbm, string clr, int khid = 0)
|
|
|
526
|
+ //, int infotypeid = 0, int unitid = 0, int clbm = 0, int clid = 0)
|
|
525
|
527
|
{
|
|
526
|
528
|
ActionResult res = NoToken("未知错误,请重新登录");
|
|
527
|
529
|
if (Request.IsAuthenticated)
|
|
|
@@ -558,24 +560,27 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
558
|
560
|
model.Remark = remark;
|
|
559
|
561
|
#endregion
|
|
560
|
562
|
#region 信息分类和交办单位
|
|
561
|
|
- model.InfoTypeID = infotypeid;
|
|
562
|
|
- if (infotypeid != 0)
|
|
563
|
|
- {
|
|
564
|
|
- Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
|
|
565
|
|
- if (dicVModel != null)
|
|
566
|
|
- {
|
|
567
|
|
- model.InfoType = dicVModel.F_Name;
|
|
568
|
|
- }
|
|
569
|
|
- }
|
|
570
|
|
- model.UnitID = unitid;
|
|
571
|
|
- if (unitid != 0)
|
|
572
|
|
- {
|
|
573
|
|
- Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
|
|
574
|
|
- if (dicVModel != null)
|
|
575
|
|
- {
|
|
576
|
|
- model.Unit = dicVModel.F_Name;
|
|
577
|
|
- }
|
|
578
|
|
- }
|
|
|
563
|
+ model.InfoType = infotype;
|
|
|
564
|
+ model.Unit = unit;
|
|
|
565
|
+ //20180518 zhengbingbing 不传ID调整为只有文字
|
|
|
566
|
+ //model.InfoTypeID = infotypeid;
|
|
|
567
|
+ //if (infotypeid != 0)
|
|
|
568
|
+ //{
|
|
|
569
|
+ // Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
|
|
|
570
|
+ // if (dicVModel != null)
|
|
|
571
|
+ // {
|
|
|
572
|
+ // model.InfoType = dicVModel.F_Name;
|
|
|
573
|
+ // }
|
|
|
574
|
+ //}
|
|
|
575
|
+ //model.UnitID = unitid;
|
|
|
576
|
+ //if (unitid != 0)
|
|
|
577
|
+ //{
|
|
|
578
|
+ // Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
|
|
|
579
|
+ // if (dicVModel != null)
|
|
|
580
|
+ // {
|
|
|
581
|
+ // model.Unit = dicVModel.F_Name;
|
|
|
582
|
+ // }
|
|
|
583
|
+ //}
|
|
579
|
584
|
#endregion
|
|
580
|
585
|
if (source.Trim() == "1")
|
|
581
|
586
|
model.Source = "手工制单";
|
|
|
@@ -597,66 +602,66 @@ namespace CallCenterApi.Interface.Controllers.tel
|
|
597
|
602
|
#endregion
|
|
598
|
603
|
|
|
599
|
604
|
#region 工单明细
|
|
600
|
|
- if (clbm != 0 || clid != 0)
|
|
601
|
|
- {
|
|
602
|
|
- Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
|
|
603
|
|
- item.WorkOrderID = model.WorkOrderID;
|
|
604
|
|
- item.ToDept = clbm;
|
|
605
|
|
- item.Type = 1;
|
|
606
|
|
-
|
|
607
|
|
- if (clid != 0)
|
|
608
|
|
- {
|
|
609
|
|
- Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
|
|
610
|
|
- if (clus != null)
|
|
611
|
|
- {
|
|
612
|
|
- item.ToUser = clus.F_UserCode;
|
|
613
|
|
- }
|
|
614
|
|
- }
|
|
615
|
|
- else
|
|
616
|
|
- {
|
|
617
|
|
- string users = string.Empty;
|
|
618
|
|
- var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
|
|
619
|
|
- foreach (var l in list)
|
|
620
|
|
- {
|
|
621
|
|
- if (string.IsNullOrEmpty(users))
|
|
622
|
|
- {
|
|
623
|
|
- users = l.F_UserCode;
|
|
624
|
|
- }
|
|
625
|
|
- else
|
|
626
|
|
- {
|
|
627
|
|
- users = users + "," + l.F_UserCode;
|
|
628
|
|
- }
|
|
629
|
|
- }
|
|
630
|
|
- item.ToUser = users;
|
|
631
|
|
- }
|
|
|
605
|
+ //if (clbm != 0 || clid != 0)
|
|
|
606
|
+ //{
|
|
|
607
|
+ // Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
|
|
|
608
|
+ // item.WorkOrderID = model.WorkOrderID;
|
|
|
609
|
+ // item.ToDept = clbm;
|
|
|
610
|
+ // item.Type = 1;
|
|
|
611
|
+
|
|
|
612
|
+ // if (clid != 0)
|
|
|
613
|
+ // {
|
|
|
614
|
+ // Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
|
|
|
615
|
+ // if (clus != null)
|
|
|
616
|
+ // {
|
|
|
617
|
+ // item.ToUser = clus.F_UserCode;
|
|
|
618
|
+ // }
|
|
|
619
|
+ // }
|
|
|
620
|
+ // else
|
|
|
621
|
+ // {
|
|
|
622
|
+ // string users = string.Empty;
|
|
|
623
|
+ // var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
|
|
|
624
|
+ // foreach (var l in list)
|
|
|
625
|
+ // {
|
|
|
626
|
+ // if (string.IsNullOrEmpty(users))
|
|
|
627
|
+ // {
|
|
|
628
|
+ // users = l.F_UserCode;
|
|
|
629
|
+ // }
|
|
|
630
|
+ // else
|
|
|
631
|
+ // {
|
|
|
632
|
+ // users = users + "," + l.F_UserCode;
|
|
|
633
|
+ // }
|
|
|
634
|
+ // }
|
|
|
635
|
+ // item.ToUser = users;
|
|
|
636
|
+ // }
|
|
632
|
637
|
|
|
633
|
|
- if (item.ToUser != "")
|
|
634
|
|
- {
|
|
635
|
|
- item.SureUser = ua.F_UserCode;
|
|
636
|
|
- item.State = 1;
|
|
637
|
|
- item.SureTime = DateTime.Now;
|
|
638
|
|
- item.IsStart = 1;
|
|
639
|
|
- }
|
|
640
|
|
- else
|
|
641
|
|
- {
|
|
642
|
|
- item.State = 0;
|
|
643
|
|
- item.IsStart = 0;
|
|
644
|
|
- }
|
|
645
|
|
- item.Detail = model.Detail;
|
|
646
|
|
- item.IsLast = 0;
|
|
647
|
|
- item.IsTimeOut = 0;
|
|
648
|
|
- item.IsDel = 0;
|
|
649
|
|
- item.CreateUser = ua.F_UserCode;
|
|
650
|
|
- item.CreateTime = DateTime.Now;
|
|
651
|
|
-
|
|
652
|
|
- long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
|
|
653
|
|
- if (itemid > 0)
|
|
654
|
|
- {
|
|
655
|
|
- model.State = 1;//已指派
|
|
656
|
|
- model.AppointTime = DateTime.Now;
|
|
|
638
|
+ // if (item.ToUser != "")
|
|
|
639
|
+ // {
|
|
|
640
|
+ // item.SureUser = ua.F_UserCode;
|
|
|
641
|
+ // item.State = 1;
|
|
|
642
|
+ // item.SureTime = DateTime.Now;
|
|
|
643
|
+ // item.IsStart = 1;
|
|
|
644
|
+ // }
|
|
|
645
|
+ // else
|
|
|
646
|
+ // {
|
|
|
647
|
+ // item.State = 0;
|
|
|
648
|
+ // item.IsStart = 0;
|
|
|
649
|
+ // }
|
|
|
650
|
+ // item.Detail = model.Detail;
|
|
|
651
|
+ // item.IsLast = 0;
|
|
|
652
|
+ // item.IsTimeOut = 0;
|
|
|
653
|
+ // item.IsDel = 0;
|
|
|
654
|
+ // item.CreateUser = ua.F_UserCode;
|
|
|
655
|
+ // item.CreateTime = DateTime.Now;
|
|
|
656
|
+
|
|
|
657
|
+ // long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
|
|
|
658
|
+ // if (itemid > 0)
|
|
|
659
|
+ // {
|
|
|
660
|
+ // model.State = 1;//已指派
|
|
|
661
|
+ // model.AppointTime = DateTime.Now;
|
|
657
|
662
|
|
|
658
|
|
- }
|
|
659
|
|
- }
|
|
|
663
|
+ // }
|
|
|
664
|
+ //}
|
|
660
|
665
|
#endregion
|
|
661
|
666
|
#region 插入操作记录
|
|
662
|
667
|
Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
|