|
|
@@ -371,9 +371,23 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
371
|
371
|
model.F_CJ_BagNo = model1[i].F_CJ_BagNo;//抽检-抽检袋数
|
|
372
|
372
|
model.F_CJ_Outlay = model1[i].F_CJ_Outlay;//抽检-公关费用金额:单位元
|
|
373
|
373
|
model.F_State = model1[i].F_State;//工单状态
|
|
|
374
|
+ model.F_DealBy = model1[i].F_DealBy;//处理人
|
|
|
375
|
+ model.F_DealTime = model1[i].F_DealTime;//处理时间
|
|
|
376
|
+ model.F_DealContent = model1[i].F_DealContent;//处理内容
|
|
|
377
|
+ model.F_DealResult = model1[i].F_DealResult;//处理结果
|
|
|
378
|
+ model.F_DealReasons = model1[i].F_DealReasons;//未处理原因
|
|
|
379
|
+ model.F_CreateBy = model1[i].F_CreateBy;//添加人工号
|
|
|
380
|
+ if (TimeforOver(model1[i].F_ID ))
|
|
|
381
|
+ {
|
|
|
382
|
+ model.F_IsOver = 0;
|
|
|
383
|
+ }
|
|
|
384
|
+ else
|
|
|
385
|
+ {
|
|
|
386
|
+ model.F_IsOver = 1;
|
|
|
387
|
+ }
|
|
374
|
388
|
#endregion
|
|
375
|
389
|
Input.Add(model);
|
|
376
|
|
-
|
|
|
390
|
+
|
|
377
|
391
|
}
|
|
378
|
392
|
|
|
379
|
393
|
return Input;
|
|
|
@@ -385,6 +399,60 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
385
|
399
|
|
|
386
|
400
|
}
|
|
387
|
401
|
/// <summary>
|
|
|
402
|
+ /// 是否超时
|
|
|
403
|
+ /// </summary>
|
|
|
404
|
+ /// <param name="id"></param>
|
|
|
405
|
+ /// <returns></returns>
|
|
|
406
|
+ private bool TimeforOver(int id)
|
|
|
407
|
+ {
|
|
|
408
|
+ var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + id + " ");
|
|
|
409
|
+ string time1="", time2="" ;
|
|
|
410
|
+ int time = 0;
|
|
|
411
|
+ if (itemlasts.Count > 0)
|
|
|
412
|
+ {
|
|
|
413
|
+ foreach (var it in itemlasts)
|
|
|
414
|
+ {
|
|
|
415
|
+ if (it.F_WoState >= 2)
|
|
|
416
|
+ {
|
|
|
417
|
+ if (it.F_WoState == 2)
|
|
|
418
|
+ {
|
|
|
419
|
+ time1 = it.F_CreateTime.ToString();
|
|
|
420
|
+ time =int .Parse ( it.F_LimitTime);
|
|
|
421
|
+ }
|
|
|
422
|
+ if (it.F_WoState==10)
|
|
|
423
|
+ {
|
|
|
424
|
+ time2 = it.F_CreateTime.ToString();
|
|
|
425
|
+ }
|
|
|
426
|
+ if (time2!="")
|
|
|
427
|
+ {
|
|
|
428
|
+ int a= (DateTime.Parse(time2) - DateTime.Parse(time1)).Hours ;
|
|
|
429
|
+ if (a > time)
|
|
|
430
|
+ {
|
|
|
431
|
+ return false;
|
|
|
432
|
+ }
|
|
|
433
|
+ }
|
|
|
434
|
+ else
|
|
|
435
|
+ {
|
|
|
436
|
+ int a = (DateTime.Now - DateTime.Parse(time1)).Hours;
|
|
|
437
|
+ if (a > time)
|
|
|
438
|
+ {
|
|
|
439
|
+ return false;
|
|
|
440
|
+ }
|
|
|
441
|
+ }
|
|
|
442
|
+ }
|
|
|
443
|
+ else
|
|
|
444
|
+ {
|
|
|
445
|
+ return true ;
|
|
|
446
|
+ }
|
|
|
447
|
+ }
|
|
|
448
|
+ }
|
|
|
449
|
+ else
|
|
|
450
|
+ {
|
|
|
451
|
+ return true;
|
|
|
452
|
+ }
|
|
|
453
|
+ return true;
|
|
|
454
|
+ }
|
|
|
455
|
+ /// <summary>
|
|
388
|
456
|
/// 根据传入的对象和input的内容返回对象(添加修改使用)
|
|
389
|
457
|
/// </summary>
|
|
390
|
458
|
private Model.T_Wo_WorkOrder inputtoobj(Model.T_Wo_WorkOrder model, WorkOrderNewInput input)
|
|
|
@@ -446,7 +514,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
446
|
514
|
{
|
|
447
|
515
|
model.F_State = (int)EnumWorkOrderState.neworder;
|
|
448
|
516
|
}
|
|
449
|
|
-
|
|
|
517
|
+
|
|
450
|
518
|
#endregion
|
|
451
|
519
|
return model;
|
|
452
|
520
|
}
|
|
|
@@ -464,6 +532,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
464
|
532
|
foreach (var it in itemlast)
|
|
465
|
533
|
{
|
|
466
|
534
|
it.F_IsUsed = 1;
|
|
|
535
|
+ it.F_LimitTime = overtime.ToString();
|
|
467
|
536
|
itembll.Update(it);
|
|
468
|
537
|
}
|
|
469
|
538
|
}
|
|
|
@@ -496,19 +565,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
496
|
565
|
blllogs.Add(model);
|
|
497
|
566
|
}
|
|
498
|
567
|
/// <summary>
|
|
499
|
|
- /// 获取待接单的工单编号
|
|
500
|
|
- /// </summary>
|
|
501
|
|
- /// <returns></returns>
|
|
502
|
|
- public string GetDJDWorkOrderID(string user)
|
|
503
|
|
- {
|
|
504
|
|
- string str = string.Empty;
|
|
505
|
|
- str = "select F_WoID from T_Wo_WorkOrder where F_ItemType=" + (int)EnumItemType.deal
|
|
506
|
|
- + " and F_WoState=" + (int)EnumWorkOrderState.assign
|
|
507
|
|
- + " and isnull(F_IsUsed,'0')='0' and F_NextUser='" + user + "' ";
|
|
508
|
|
-
|
|
509
|
|
- return str;
|
|
510
|
|
- }
|
|
511
|
|
- /// <summary>
|
|
512
|
568
|
/// 指派/转派工单
|
|
513
|
569
|
/// <param name="orderid">工单编号</param>
|
|
514
|
570
|
/// <param name="cont">指派说明</param>
|
|
|
@@ -572,12 +628,314 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
572
|
628
|
return Error("无操作权限");
|
|
573
|
629
|
}
|
|
574
|
630
|
/// <summary>
|
|
|
631
|
+ /// 处理工单信息
|
|
|
632
|
+ /// </summary>
|
|
|
633
|
+ /// <returns></returns>
|
|
|
634
|
+ [Authority]
|
|
|
635
|
+ public ActionResult DealWorkOrder(long orderid, string cont,string uncont="", int isover = 0)
|
|
|
636
|
+ {
|
|
|
637
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
638
|
+ if (userId != 0)
|
|
|
639
|
+ {
|
|
|
640
|
+ Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
|
641
|
+ if (ua != null)
|
|
|
642
|
+ {
|
|
|
643
|
+ Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
|
|
|
644
|
+ if (model != null)
|
|
|
645
|
+ {
|
|
|
646
|
+ var res = DealWO(ua, model, cont, isover, uncont);
|
|
|
647
|
+ if (res)
|
|
|
648
|
+ return Success("处理成功");
|
|
|
649
|
+ else
|
|
|
650
|
+ return Error("处理失败!");
|
|
|
651
|
+ }
|
|
|
652
|
+ else
|
|
|
653
|
+ return Error("工单不存在!");
|
|
|
654
|
+ }
|
|
|
655
|
+ }
|
|
|
656
|
+ return Error("无操作权限!");
|
|
|
657
|
+ }
|
|
|
658
|
+ /// <summary>
|
|
|
659
|
+ /// 退回工单
|
|
|
660
|
+ /// </summary>
|
|
|
661
|
+ /// <param name="input"></param>
|
|
|
662
|
+ /// <returns></returns>
|
|
|
663
|
+ [Authority]
|
|
|
664
|
+ public ActionResult BackWorkOrder(long orderid, string cont, int type = 0)
|
|
|
665
|
+ {//办理人员和监管可以退回工单
|
|
|
666
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
667
|
+ if (userId != 0)
|
|
|
668
|
+ {
|
|
|
669
|
+ Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
|
670
|
+ if (ua != null)
|
|
|
671
|
+ {
|
|
|
672
|
+ Model.T_Wo_WorkOrder model = workOrder .GetModel(orderid);
|
|
|
673
|
+ //验证信息
|
|
|
674
|
+ if (model != null)
|
|
|
675
|
+ {
|
|
|
676
|
+ var res = BackWO(ua, model, cont, type);
|
|
|
677
|
+ if (res)
|
|
|
678
|
+ return Success("退回成功");
|
|
|
679
|
+ else
|
|
|
680
|
+ return Error("退回失败!");
|
|
|
681
|
+ }
|
|
|
682
|
+ return Error("工单不存在");
|
|
|
683
|
+ }
|
|
|
684
|
+ }
|
|
|
685
|
+ return Error("无操作权限");
|
|
|
686
|
+ }
|
|
|
687
|
+ /// <summary>
|
|
|
688
|
+ ///延期工单
|
|
|
689
|
+ /// </summary>
|
|
|
690
|
+ /// <returns></returns>
|
|
|
691
|
+ [Authority]
|
|
|
692
|
+ public ActionResult DelayWorkOrder(long orderid, string cont, int limit = 0)
|
|
|
693
|
+ {
|
|
|
694
|
+ //办理人员和监管可以延期工单
|
|
|
695
|
+ int userId = CurrentUser.UserData.F_UserId;
|
|
|
696
|
+ if (userId != 0)
|
|
|
697
|
+ {
|
|
|
698
|
+ Model.T_Sys_UserAccount ua = sysUserAccountBll.GetModel(userId);
|
|
|
699
|
+ if (ua != null)
|
|
|
700
|
+ {
|
|
|
701
|
+ Model.T_Wo_WorkOrder model = workOrder.GetModel(orderid);
|
|
|
702
|
+ //验证信息
|
|
|
703
|
+ if (model != null)
|
|
|
704
|
+ {
|
|
|
705
|
+ var res = DeWO(ua, model, cont, limit);
|
|
|
706
|
+ if (res)
|
|
|
707
|
+ return Success("延期成功");
|
|
|
708
|
+ else
|
|
|
709
|
+ return Error("延期失败!");
|
|
|
710
|
+ }
|
|
|
711
|
+ return Error("工单不存在");
|
|
|
712
|
+ }
|
|
|
713
|
+ }
|
|
|
714
|
+ return Error("无操作权限");
|
|
|
715
|
+
|
|
|
716
|
+ }
|
|
|
717
|
+ /// <summary>
|
|
|
718
|
+ /// 延期工单
|
|
|
719
|
+ /// </summary>
|
|
|
720
|
+ public bool DeWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int limit)
|
|
|
721
|
+ {
|
|
|
722
|
+ #region 工单处理
|
|
|
723
|
+ int sms = 0; int wostate = 0; int optbut = 0;int time = 0;
|
|
|
724
|
+ var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + model.F_ID + " ");
|
|
|
725
|
+ if (itemlasts.Count > 0)
|
|
|
726
|
+ {
|
|
|
727
|
+ foreach (var it in itemlasts)
|
|
|
728
|
+ {
|
|
|
729
|
+ if (it.F_WoState == 1)
|
|
|
730
|
+ {
|
|
|
731
|
+ sms = int.Parse(it.F_IsSMS.ToString());
|
|
|
732
|
+ time = int.Parse(it.F_LimitTime);
|
|
|
733
|
+ }
|
|
|
734
|
+ itembll.Update(it);
|
|
|
735
|
+ wostate = int.Parse(it.F_WoState.ToString());
|
|
|
736
|
+ optbut = int.Parse(it.F_OptType.ToString());
|
|
|
737
|
+ }
|
|
|
738
|
+ }
|
|
|
739
|
+ #region 读取当前登录人部门
|
|
|
740
|
+ string deptname = "";
|
|
|
741
|
+ var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
|
|
|
742
|
+ if (deptmodel != null)
|
|
|
743
|
+ {
|
|
|
744
|
+ deptname = deptmodel.F_DeptName + "-";
|
|
|
745
|
+ }
|
|
|
746
|
+ #endregion
|
|
|
747
|
+ var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + "延期工单,延期说明:" + cont;
|
|
|
748
|
+ //获取上一级处理人员
|
|
|
749
|
+ var touser = "";
|
|
|
750
|
+ var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
|
|
|
751
|
+ if (itemlast != null)
|
|
|
752
|
+ touser = itemlast.F_CreateUser;
|
|
|
753
|
+ var itemid = AddLog((int)model.F_ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, limit+time , sms);
|
|
|
754
|
+
|
|
|
755
|
+ #endregion
|
|
|
756
|
+
|
|
|
757
|
+ return true;
|
|
|
758
|
+ }
|
|
|
759
|
+
|
|
|
760
|
+
|
|
|
761
|
+
|
|
|
762
|
+ /// <summary>
|
|
|
763
|
+ /// 退回工单
|
|
|
764
|
+ /// </summary>
|
|
|
765
|
+ public bool BackWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont, int type)
|
|
|
766
|
+ {
|
|
|
767
|
+ #region 工单处理
|
|
|
768
|
+ int overtime = 0, sms = 0;
|
|
|
769
|
+ var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + model.F_ID + " ");
|
|
|
770
|
+ if (itemlasts.Count > 0)
|
|
|
771
|
+ {
|
|
|
772
|
+ foreach (var it in itemlasts)
|
|
|
773
|
+ {
|
|
|
774
|
+ if (it.F_WoState == 1)
|
|
|
775
|
+ {
|
|
|
776
|
+ overtime = int.Parse(it.F_LimitTime);
|
|
|
777
|
+ sms = int.Parse(it.F_IsSMS.ToString());
|
|
|
778
|
+ }
|
|
|
779
|
+ }
|
|
|
780
|
+ }
|
|
|
781
|
+ var opt = "退回";
|
|
|
782
|
+ int optbut = (int)EnumItemOpt.reback;
|
|
|
783
|
+ int wostate = (int)EnumWorkOrderState.reback;
|
|
|
784
|
+ if (type == 1)
|
|
|
785
|
+ {
|
|
|
786
|
+ opt = "异常退回";
|
|
|
787
|
+ optbut = (int)EnumItemOpt.abreback;
|
|
|
788
|
+ wostate = (int)EnumWorkOrderState.abreback;
|
|
|
789
|
+ }
|
|
|
790
|
+ #region 读取当前登录人部门
|
|
|
791
|
+ string deptname = "";
|
|
|
792
|
+ var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
|
|
|
793
|
+ if (deptmodel != null)
|
|
|
794
|
+ {
|
|
|
795
|
+ deptname = deptmodel.F_DeptName + "-";
|
|
|
796
|
+ }
|
|
|
797
|
+ #endregion
|
|
|
798
|
+ var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单,退回说明:" + cont;
|
|
|
799
|
+ //获取上一级处理人员
|
|
|
800
|
+ var touser = "";
|
|
|
801
|
+ var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
|
|
|
802
|
+ if (itemlast != null)
|
|
|
803
|
+ touser = itemlast.F_CreateUser;
|
|
|
804
|
+ var itemid = AddLog((int)model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser, overtime,sms );
|
|
|
805
|
+ if (itemid > 0)
|
|
|
806
|
+ {
|
|
|
807
|
+ #region 处理工单
|
|
|
808
|
+ model.F_State = wostate;
|
|
|
809
|
+ workOrder .Update(model);
|
|
|
810
|
+ #endregion
|
|
|
811
|
+ #region 推送消息
|
|
|
812
|
+ #region 向上一级操作人员推送消息
|
|
|
813
|
+ if (!string.IsNullOrWhiteSpace(touser) && touser != nowUser.F_UserCode)
|
|
|
814
|
+ {//排除上一级指派人是自己
|
|
|
815
|
+ sendsysmsg(model, nowUser, touser, (int)itemid, opt);
|
|
|
816
|
+ // var lastUser = sysUserAccountBll.GetModel(touser);
|
|
|
817
|
+ // if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
|
|
|
818
|
+ // sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
|
|
|
819
|
+ }
|
|
|
820
|
+ #endregion
|
|
|
821
|
+ #endregion
|
|
|
822
|
+ return true;
|
|
|
823
|
+ }
|
|
|
824
|
+ else
|
|
|
825
|
+ return false;
|
|
|
826
|
+ #endregion
|
|
|
827
|
+ }
|
|
|
828
|
+ /// <summary>
|
|
|
829
|
+ /// 处理工单
|
|
|
830
|
+ /// </summary>
|
|
|
831
|
+ public bool DealWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,int isover = 0,string uncont="")
|
|
|
832
|
+ {
|
|
|
833
|
+ #region 工单处理
|
|
|
834
|
+ int overtime = 0, sms = 0;
|
|
|
835
|
+ var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + model.F_ID + " ");
|
|
|
836
|
+ if (itemlasts.Count > 0)
|
|
|
837
|
+ {
|
|
|
838
|
+ foreach (var it in itemlasts)
|
|
|
839
|
+ {
|
|
|
840
|
+ if (it.F_WoState == 1)
|
|
|
841
|
+ {
|
|
|
842
|
+ overtime = int.Parse(it.F_LimitTime);
|
|
|
843
|
+ sms = int.Parse(it.F_IsSMS.ToString());
|
|
|
844
|
+ }
|
|
|
845
|
+ }
|
|
|
846
|
+ }
|
|
|
847
|
+ var opt = "处理";
|
|
|
848
|
+ int optbut = (int)EnumItemOpt.deal;
|
|
|
849
|
+ int wostate = (int)EnumWorkOrderState.dealing;
|
|
|
850
|
+
|
|
|
851
|
+ if (isover == 1)
|
|
|
852
|
+ {
|
|
|
853
|
+ model.F_DealResult = "已处理";//处理结果
|
|
|
854
|
+ opt = "处理完结";
|
|
|
855
|
+ optbut = (int)EnumItemOpt.end;
|
|
|
856
|
+ wostate = (int)EnumWorkOrderState.finish;
|
|
|
857
|
+ model.F_DealBy = nowUser.F_UserCode;
|
|
|
858
|
+ model.F_DealTime = DateTime.Now;
|
|
|
859
|
+ }
|
|
|
860
|
+ else
|
|
|
861
|
+ {
|
|
|
862
|
+ model.F_DealResult = "未处理";//处理结果
|
|
|
863
|
+ model.F_DealReasons = uncont;//未处理原因
|
|
|
864
|
+ }
|
|
|
865
|
+ #region 读取当前登录人部门
|
|
|
866
|
+ string deptname = "";
|
|
|
867
|
+ var deptmodel = departmentBLL.GetModel(nowUser.F_DeptId);
|
|
|
868
|
+ if (deptmodel != null)
|
|
|
869
|
+ {
|
|
|
870
|
+ deptname = deptmodel.F_DeptName + "-";
|
|
|
871
|
+ }
|
|
|
872
|
+ #endregion
|
|
|
873
|
+ var optcont = "";
|
|
|
874
|
+ if (!string.IsNullOrEmpty(cont))
|
|
|
875
|
+ optcont = ",处理内容:" + cont;
|
|
|
876
|
+ var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单" + optcont;
|
|
|
877
|
+ var itemid = AddLog(model.F_ID , wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser, overtime,sms );
|
|
|
878
|
+ if (itemid > 0)
|
|
|
879
|
+ {
|
|
|
880
|
+ #region 处理工单
|
|
|
881
|
+ model.F_State = wostate;
|
|
|
882
|
+ //处理内容
|
|
|
883
|
+ if (!string.IsNullOrEmpty(cont))
|
|
|
884
|
+ model.F_DealContent += cont + ";";
|
|
|
885
|
+
|
|
|
886
|
+ workOrder.Update(model);
|
|
|
887
|
+ #endregion
|
|
|
888
|
+ #region 推送消息
|
|
|
889
|
+ #region 推送消息给添加的坐席 -处理情况
|
|
|
890
|
+ if (nowUser.F_UserCode != model.F_CreateBy)
|
|
|
891
|
+ {
|
|
|
892
|
+ sendsysmsg(model, nowUser, model.F_CreateBy, (int)model.F_ID , opt);//推送系统消息
|
|
|
893
|
+ var createmodel = sysUserAccountBll.GetModel(model.F_CreateBy); //被指派人
|
|
|
894
|
+ if (createmodel != null)
|
|
|
895
|
+ {
|
|
|
896
|
+ // if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
|
|
|
897
|
+ // {
|
|
|
898
|
+ // sendwxmsg(model, createmodel.F_WxOpenId, nowUser, opt);
|
|
|
899
|
+ // }
|
|
|
900
|
+ }
|
|
|
901
|
+ }
|
|
|
902
|
+ #endregion
|
|
|
903
|
+ #region 向上一级操作人员推送消息
|
|
|
904
|
+ var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID='" + model.F_ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
|
|
|
905
|
+ if (itemlast.F_CreateUser != model.F_CreateBy)
|
|
|
906
|
+ {
|
|
|
907
|
+ sendsysmsg(model, nowUser, itemlast.F_CreateUser, (int)itemid, opt);
|
|
|
908
|
+ var lastUser = sysUserAccountBll.GetModel(itemlast.F_CreateUser);
|
|
|
909
|
+ // if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
|
|
|
910
|
+ // sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
|
|
|
911
|
+ }
|
|
|
912
|
+ #endregion
|
|
|
913
|
+ #region 办理完结向客户发送消息
|
|
|
914
|
+ //if (model.F_State == (int)EnumWorkOrderState.finish)
|
|
|
915
|
+ //{
|
|
|
916
|
+ // if (model.CustomerID != null)
|
|
|
917
|
+ // {
|
|
|
918
|
+ // var cusmodel = cusBll.GetModel(model.CustomerID.Value);
|
|
|
919
|
+ // if (cusmodel != null && !string.IsNullOrEmpty(cusmodel.F_WxOpenId))
|
|
|
920
|
+ // {
|
|
|
921
|
+ // sendwxmsg(model, cusmodel.F_WxOpenId, nowUser, opt);
|
|
|
922
|
+ // }
|
|
|
923
|
+ // }
|
|
|
924
|
+ //}
|
|
|
925
|
+ #endregion
|
|
|
926
|
+ #endregion
|
|
|
927
|
+ return true;
|
|
|
928
|
+ }
|
|
|
929
|
+ else
|
|
|
930
|
+ return false;
|
|
|
931
|
+ #endregion
|
|
|
932
|
+ }
|
|
|
933
|
+ /// <summary>
|
|
575
|
934
|
/// 接单
|
|
576
|
935
|
/// </summary>
|
|
577
|
936
|
public bool SureWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model)
|
|
578
|
937
|
{
|
|
579
|
938
|
int overtime=0, sms=0;
|
|
580
|
|
- //处理当前工单的记录之前的记录过期
|
|
581
|
939
|
var itemlasts = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and F_WoID=" + model.F_ID + " ");
|
|
582
|
940
|
if (itemlasts.Count > 0)
|
|
583
|
941
|
{
|