Parcourir la Source

工单类型修改,工单完结,工单退回

zhupei il y a 3 ans
Parent
commit
0bfd8ff69f

+ 135 - 79
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -2469,7 +2469,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2469 2469
         [WechatActionFilter]
2470 2470
         public bool Approval(string OpenId, long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = -1, int IsAudit = 0, int AuditState = 0)
2471 2471
         {
2472
-            bool res = true;
2472
+            int res = 1;
2473 2473
             string touser = ""; string tousername = "";
2474 2474
             string opt = "审核";
2475 2475
             #region 获取接收人
@@ -2517,7 +2517,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2517 2517
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:同意上报" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
2518 2518
                         var uaid = AddLog(model.F_ID, model.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
2519 2519
                         if (userid <= 0 || uaid <= 0)
2520
-                            res = false;
2520
+                            res = 0;
2521 2521
                         else
2522 2522
                         {
2523 2523
                             if (sms ==1&& !string .IsNullOrEmpty(user .F_Mobile ))
@@ -2532,7 +2532,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2532 2532
                         opt = "驳回修订";
2533 2533
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
2534 2534
                         if (userid <= 0)
2535
-                            res = false;
2535
+                            res = 0;
2536 2536
                     }
2537 2537
                     else
2538 2538
                     {
@@ -2540,7 +2540,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2540 2540
                         wostate = 11;
2541 2541
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
2542 2542
                         if (userid <= 0)
2543
-                            res = false;
2543
+                            res = 0;
2544 2544
                     }
2545 2545
                 }
2546 2546
                 else
@@ -2571,8 +2571,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
2571 2571
                             opt = "同意上报";
2572 2572
                             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);
2573 2573
                             res = GetDaQucirCulation(AuditCont, nowUser, DateTime.Now.ToString(), model.F_ID, true);
2574
-                            if (userid <= 0 || !res)
2575
-                                res = false;
2574
+                            if (userid <= 0 || res==0)
2575
+                                res = 0;
2576 2576
                             wostate = 1;
2577 2577
                             woflag = 9;
2578 2578
                         }
@@ -2581,7 +2581,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2581 2581
                             opt = "驳回修订";
2582 2582
                             var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
2583 2583
                             if (userid <= 0)
2584
-                                res = false;
2584
+                                res = 0;
2585 2585
                             
2586 2586
                             wostate = 16;
2587 2587
                         }
@@ -2590,32 +2590,42 @@ namespace CallCenterApi.Interface.Controllers.weixin
2590 2590
                             opt = "强制结案";
2591 2591
                             var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
2592 2592
                             if (userid <= 0)
2593
-                                res = false;
2593
+                                res = 0;
2594 2594
                             wostate = 11;
2595 2595
                         }
2596 2596
 
2597 2597
                     }
2598 2598
                     else
2599 2599
                     {
2600
-                        res = false;
2600
+                        res = 0;
2601 2601
                     }
2602 2602
                 }
2603 2603
             }
2604 2604
 
2605 2605
             #endregion
2606 2606
             #endregion
2607
-            if (res)
2607
+            if (res>0)
2608 2608
             {
2609
-                model.F_State = wostate;
2610
-                if (woflag == 9)
2609
+                if (res == 1)
2611 2610
                 {
2612
-                    model.F_State2 = 0;
2611
+                    model.F_State = wostate;
2612
+                    //if (woflag == 9)
2613
+                    //{
2614
+                    //    model.F_State2 = 0;
2615
+                    //}
2616
+                    //else
2617
+                    //{
2618
+                    //    model.F_State2 = wostate;
2619
+                    //}
2620
+                    model.F_State2 = wostate;
2621
+                    model.F_Flag = woflag;
2613 2622
                 }
2614
-                else
2623
+                else if (res == 2)
2615 2624
                 {
2625
+                    model.F_State = wostate;
2616 2626
                     model.F_State2 = wostate;
2627
+                    model.F_Flag = 3;
2617 2628
                 }
2618
-                model.F_Flag = woflag;
2619 2629
                 //处理内容
2620 2630
                 if (!string.IsNullOrEmpty(AuditCont))
2621 2631
                     model.F_AuditCont += AuditCont + ";";
@@ -2676,7 +2686,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
2676 2686
         /// <param name="ua"></param>
2677 2687
         /// <param name="time"></param>
2678 2688
         /// <param name="id"></param>
2679
-        public bool GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
2689
+        public int GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
2680 2690
         {
2681 2691
             DateTime times = DateTime.Parse(time).AddHours(24);
2682 2692
             Model.T_Wo_WorkOrder model = woBLL.GetModel(id);
@@ -2739,8 +2749,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
2739 2749
             {
2740 2750
                 nextda = 422;
2741 2751
                 opt = "流转营销中心市场科";
2742
-                //nextda = 295;
2743
-                //opt = "流转新乡黑科质检";
2752
+                nextda2 = 295;
2753
+                opt2 = "流转新乡黑科质检";
2754
+
2744 2755
             }
2745 2756
             else if (CirculMarket(ua.F_DeptId, 332))
2746 2757
             {
@@ -2761,18 +2772,18 @@ namespace CallCenterApi.Interface.Controllers.weixin
2761 2772
                 if (ro.F_RoleCode == "DQJL")
2762 2773
                 {
2763 2774
                     cont = "大区经理已审批:" + AuditCont + "," + opt;
2764
-                    //if (!string.IsNullOrEmpty(opt2))
2765
-                    //{
2766
-                    //    cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
2767
-                    //}
2775
+                    if (!string.IsNullOrEmpty(opt2))
2776
+                    {
2777
+                        cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
2778
+                    }
2768 2779
                 }
2769 2780
                 else
2770 2781
                 {
2771 2782
                     cont = "分公司经理已审批:" + AuditCont + "," + opt;
2772
-                    //if (!string.IsNullOrEmpty(opt2))
2773
-                    //{
2774
-                    //    cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
2775
-                    //}
2783
+                    if (!string.IsNullOrEmpty(opt2))
2784
+                    {
2785
+                        cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
2786
+                    }
2776 2787
                 }
2777 2788
             }
2778 2789
             else
@@ -2780,27 +2791,40 @@ namespace CallCenterApi.Interface.Controllers.weixin
2780 2791
                 if (ro.F_RoleCode == "DQJL")
2781 2792
                 {
2782 2793
                     cont = "大区经理未审批" + opt;
2783
-                    //if (!string.IsNullOrEmpty(opt2))
2784
-                    //{
2785
-                    //    cont2 = "大区经理未审批" + opt2;
2786
-                    //}
2794
+                    if (!string.IsNullOrEmpty(opt2))
2795
+                    {
2796
+                        cont2 = "大区经理未审批" + opt2;
2797
+                    }
2787 2798
                 }
2788 2799
                 else
2789 2800
                 {
2790 2801
                     cont = "分公司经理未审批" + opt;
2791
-                    //if (!string.IsNullOrEmpty(opt2))
2792
-                    //{
2793
-                    //    cont2 = "分公司经理未审批" + opt2;
2794
-                    //}
2802
+                    if (!string.IsNullOrEmpty(opt2))
2803
+                    {
2804
+                        cont2 = "分公司经理未审批" + opt2;
2805
+                    }
2795 2806
                 }
2796 2807
             }
2797 2808
             if (nextda != 0)
2798 2809
             {
2799
-                model.F_Flag = 9;
2800
-                var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl,3,9);          
2801
-                return res;
2810
+                if (nextda2 != 0)
2811
+                {
2812
+                    model.F_Flag = 3;
2813
+                    var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 1, 3);
2814
+                    var res2 = AssignWO(ua, model, Input[0], cont2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 2);
2815
+                    return 2;
2816
+                }
2817
+                else
2818
+                {
2819
+                    model.F_Flag = 9;
2820
+                    var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 3, 9);
2821
+                    return 1;
2822
+                }              
2823
+            }
2824
+            else
2825
+            {
2826
+                return 0;
2802 2827
             }
2803
-            else return false;
2804 2828
         }
2805 2829
 
2806 2830
         /// <summary>
@@ -3083,7 +3107,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
3083 3107
                                 {
3084 3108
                                     foreach (var item in itemnext2)
3085 3109
                                     {
3086
-                                        if (item.F_WoState != 10)
3110
+                                        if (item.F_WoState != 11)
3087 3111
                                             flag = item.F_Type;
3088 3112
                                     }
3089 3113
                                 }
@@ -3885,9 +3909,9 @@ namespace CallCenterApi.Interface.Controllers.weixin
3885 3909
                     model.F_Manufacturers = model1[i].F_Manufacturers;//质量管理科-原料及厂家
3886 3910
                     model.F_ProductionNum = model1[i].F_ProductionNum;//质量管理科-该批次生产数量
3887 3911
                     model.F_Flag = model1[i].F_Flag;//1单线外 2单线内 3双线 9市场科可以双线指派工单 0 未指派工单
3888
-                    model.inout = GetNodeState(model1[i].F_ID,ua.F_UserCode,state);
3889 3912
                     if (ua != null)
3890 3913
                     {
3914
+                        model.inout = GetNodeState(model1[i].F_ID, ua.F_UserCode, state);
3891 3915
                         var deptmodel = departmentBLL.GetModel(ua.F_DeptId);
3892 3916
                         if (deptmodel != null)
3893 3917
                         {
@@ -4913,7 +4937,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4913 4937
                                 {
4914 4938
                                     deptname1 = deptmodel1.F_DeptName + "-";
4915 4939
                                 }
4916
-                                AddLog(modlelist.F_ID, 0, deptname1 + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms );
4940
+                                AddLog(modlelist.F_ID, 0, deptname1 + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4917 4941
                                 AddLog(modlelist.F_ID, modlelist.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, ua, overtime, sms);
4918 4942
                                 if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
4919 4943
                                 {
@@ -4923,7 +4947,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4923 4947
                             else
4924 4948
                             {
4925 4949
                                 string deptname1 = "";
4926
-                                int dapt = 0, nextda = 0;
4950
+                                int dapt = 0, nextda = 0, nextda2 = 0;
4927 4951
                                 string deptment = "";
4928 4952
                                 var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
4929 4953
                                 if (deptmodel1 != null)
@@ -4933,7 +4957,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
4933 4957
                                     deptment = deptmodel1.F_DeptName;
4934 4958
                                 }
4935 4959
                                 AddLog(modlelist.F_ID, 0, deptname1 + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
4936
-                                string opt = "";
4960
+                                string opt = "", opt2 = "";
4937 4961
                                 //if (dapt != 0)
4938 4962
                                 //{
4939 4963
                                 if (CirculMarket(ua.F_DeptId, 11))
@@ -4967,8 +4991,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
4967 4991
                                 {
4968 4992
                                     nextda = 422;
4969 4993
                                     opt = "流转营销中心市场科";
4970
-                                    //nextda = 295;
4971
-                                    //opt = "流转新乡黑科质检";
4994
+                                    nextda2 = 295;
4995
+                                    opt2 = "流转新乡黑科质检";
4972 4996
                                 }
4973 4997
                                 else if (CirculMarket(ua.F_DeptId, 332))
4974 4998
                                 {
@@ -4976,31 +5000,37 @@ namespace CallCenterApi.Interface.Controllers.weixin
4976 5000
                                     opt = "流转营销管理处";
4977 5001
 
4978 5002
 
4979
-                                } 
5003
+                                }
4980 5004
                                 else if (ua.F_DeptId == 17 || ua.F_DeptId == 19 || ua.F_DeptId == 20 || ua.F_DeptId == 21)
4981
-                                    {
4982
-                                        nextda = ua.F_DeptId;
4983
-                                        opt = "流转" + deptment;
4984
-                                    }
5005
+                                {
5006
+                                    nextda = ua.F_DeptId;
5007
+                                    opt = "流转" + deptment;
5008
+                                }
4985 5009
                                 //}
4986 5010
                                 if (nextda != 0)
4987 5011
                                 {
4988
-                                    model.F_State = 1;
4989
-                                    model.F_State2 = 0;
4990
-                                    model.F_Flag = 9;
4991
-                                    var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, overtime, sms,0,0,0,"",1,3,9);
4992
-                                    if (res)
4993
-                                        return Success("添加成功");
5012
+                                    if (nextda2 != 0)
5013
+                                    {
5014
+                                        modlelist.F_Flag = 3;
5015
+                                        AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1, 1, 3);
5016
+                                        var res2 = AssignWO(ua, modlelist, input, opt2, "", nextda2, 0, 0, 0, 0, 0, 0, "", 1, 2, 3);
5017
+                                    }
4994 5018
                                     else
4995
-                                        return Error("流转失败!");
5019
+                                    {
5020
+                                        modlelist.F_State = 1;
5021
+                                        modlelist.F_State2 = 1;
5022
+                                        modlelist.F_Flag = 9;
5023
+                                        var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, overtime, sms, 0, 0, 0, "", 1, 3, 9);
5024
+                                    }
5025
+                                    return Success("添加成功");
4996 5026
                                 }
4997 5027
                                 else
4998 5028
                                 {
4999 5029
                                     return Error("流转失败!");
5000 5030
                                 }
5001 5031
 
5032
+                            }
5002 5033
                         }
5003
-                    }
5004 5034
                         else
5005 5035
                         {
5006 5036
                             AddLog(modlelist.F_ID, 0, "客户" + "创建工单", (int)EnumItemType.deal, (int)EnumItemOpt.create, "", 0, null, overtime, sms);
@@ -6277,25 +6307,25 @@ namespace CallCenterApi.Interface.Controllers.weixin
6277 6307
                             //}
6278 6308
                             var modellist = new BLL.T_Wo_WorkOrderItem_New().GetModelList("F_WoID=" + model.F_ID + " and F_IsUsed=0 and F_NextUser like '%" + ua.F_UserCode + "%' order by  F_ID desc ").FirstOrDefault();
6279 6309
 
6280
-                            int? zflag = 0;
6281
-                            if (inoutflag != 0)
6282
-                            {
6283
-                                zflag = inoutflag;
6284
-                            }
6285
-                            else
6286
-                            {
6287
-                                zflag = modellist.F_Type;
6288
-                            }
6310
+                            //int? zflag = 0;
6311
+                            //if (inoutflag != 0)
6312
+                            //{
6313
+                            //    zflag = inoutflag;
6314
+                            //}
6315
+                            //else
6316
+                            //{
6317
+                            //    zflag = modellist.F_Type;
6318
+                            //}
6289 6319
 
6290 6320
                             if (modellist == null)
6291 6321
                             {
6292 6322
                                 //if (modellist.F_NextUser != ua.F_UserCode)
6293 6323
                                 return Error("非接单人不可操作工单");
6294 6324
                             }
6295
-                            if (model.F_Flag == 9)
6296
-                            {
6297
-                                return Error("操作失败!");
6298
-                            }
6325
+                            //if (model.F_Flag == 9)
6326
+                            //{
6327
+                            //    return Error("操作失败!");
6328
+                            //}
6299 6329
                             if (markdepts.Contains(ua.F_DeptId.ToString()) || qualdepts.Contains(ua.F_DeptId.ToString()))
6300 6330
                             {
6301 6331
                                 input.F_ZL_ResponsibleUnit = deptment.ResponsibleUnit;// 责任单位
@@ -6308,7 +6338,24 @@ namespace CallCenterApi.Interface.Controllers.weixin
6308 6338
                                 input.F_TS_Level = deptment.TS_Level;//投诉-重要级别:轻微、一般、较大、重大
6309 6339
 
6310 6340
                             }
6311
-                            
6341
+                            int? zflag = 0;
6342
+                            if (model.F_Flag == 9)
6343
+                            {
6344
+                                model.F_Flag = 1;//默认外线操作
6345
+                                zflag = 1;
6346
+                                Overorder(ua, model, 2);
6347
+                            }
6348
+                            else
6349
+                            {
6350
+                                if (inoutflag != 0)
6351
+                                {
6352
+                                    zflag = inoutflag;
6353
+                                }
6354
+                                else
6355
+                                {
6356
+                                    zflag = modellist.F_Type;
6357
+                                }
6358
+                            }
6312 6359
                             var modellast = new BLL.T_Wo_WorkOrderItem_New().GetModelList("F_WoID=" + model.F_ID + "and F_IsUsed=0   order by  F_ID desc ").FirstOrDefault();
6313 6360
                             if (model.F_State == 10 && model.F_State2 == 10)
6314 6361
                                 return Error("工单已处理请勿重复操作!");
@@ -7282,7 +7329,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
7282 7329
                     {
7283 7330
 
7284 7331
                         string deptname1 = "";
7285
-                        int dapt = 0, nextda = 0; string opt = "";
7332
+                        int dapt = 0, nextda = 0, nextda2 = 0; string opt = "", opt2 = "";
7286 7333
                         var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
7287 7334
                         if (deptmodel1 != null)
7288 7335
                         {
@@ -7322,8 +7369,8 @@ namespace CallCenterApi.Interface.Controllers.weixin
7322 7369
                         {
7323 7370
                             nextda = 422;
7324 7371
                             opt = "流转营销中心市场科";
7325
-                            //nextda = 295;
7326
-                            //opt = "流转新乡黑科质检";
7372
+                            nextda2 = 295;
7373
+                            opt2 = "流转新乡黑科质检";
7327 7374
                         }
7328 7375
                         else if (CirculMarket(ua.F_DeptId, 332))
7329 7376
                         {
@@ -7339,11 +7386,20 @@ namespace CallCenterApi.Interface.Controllers.weixin
7339 7386
                         //}
7340 7387
                         if (nextda != 0)
7341 7388
                         {
7342
-                            var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, sms, 0, 0, 0, "", 1);
7343
-                            if (res)
7344
-                                return Success("保存成功");
7389
+                            if (nextda2 != 0)
7390
+                            {
7391
+                                model.F_Flag = 3;
7392
+                                AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, sms, 0, 0, 0, "", 1, 1, 3);
7393
+                                var res2 = AssignWO(ua, model, input, opt2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, "", 1, 2, 3);
7394
+                            }
7345 7395
                             else
7346
-                                return Error("流转失败!");
7396
+                            {
7397
+                                model.F_State = 1;
7398
+                                model.F_State2 = 1;
7399
+                                model.F_Flag = 9;
7400
+                                var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, sms, 0, 0, 0, "", 1, 3, 9);
7401
+                            }
7402
+                            return Success("保存成功");                        
7347 7403
                         }
7348 7404
                         else
7349 7405
                         {

+ 145 - 93
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -1441,7 +1441,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1441 1441
         /// </summary>
1442 1442
         public bool Approval(long orderid, string AuditCont, Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, float overtime = 0, int sms = -1, int IsAudit = 0, int AuditState = 0)
1443 1443
         {
1444
-            bool res = true;
1444
+            int res = 1;
1445 1445
             string touser = ""; string tousername = "";
1446 1446
             string opt = "审核";
1447 1447
             string deptname = "";
@@ -1495,7 +1495,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1495 1495
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:同意上报" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reaudit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
1496 1496
                         var uaid = AddLog(model.F_ID, model.F_State.Value, deptname + user.F_UserName + "(" + user.F_WorkNumber + ")" + "待审批", (int)EnumItemType.audit, (int)EnumItemOpt.audit, user.F_UserCode, user.F_DeptId, nowUser, overtime, sms);
1497 1497
                         if (userid <= 0 || uaid <= 0)
1498
-                            res = false;
1498
+                            res = 0;
1499 1499
                         else
1500 1500
                         {
1501 1501
                             if (sms == 1 && !string.IsNullOrEmpty(user.F_Mobile))
@@ -1509,7 +1509,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1509 1509
                         opt = "驳回修订";
1510 1510
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
1511 1511
                         if (userid <= 0)
1512
-                            res = false;
1512
+                            res = 0;
1513 1513
                     }
1514 1514
                     else
1515 1515
                     {
@@ -1517,7 +1517,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1517 1517
                         wostate = 11;
1518 1518
                         var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
1519 1519
                         if (userid <= 0)
1520
-                            res = false;
1520
+                            res = 0;
1521 1521
                     }
1522 1522
                 }
1523 1523
                 else
@@ -1546,8 +1546,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1546 1546
                             opt = "同意上报";
1547 1547
                             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);
1548 1548
                             res = GetDaQucirCulation(AuditCont, nowUser, DateTime.Now.ToString(), model.F_ID, true);
1549
-                            if (userid <= 0 || !res)
1550
-                                res = false;
1549
+                            if (userid <= 0 || res==0)
1550
+                                res = 0;
1551 1551
                             wostate = 1;
1552 1552
                             woflag = 9;
1553 1553
                         }
@@ -1556,7 +1556,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1556 1556
                             opt = "驳回修订";
1557 1557
                             var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:驳回修订" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.reback, toussers, 0, nowUser, overtime, sms);
1558 1558
                             if (userid <= 0)
1559
-                                res = false;
1559
+                                res = 0;
1560 1560
                             wostate = 16;
1561 1561
                         }
1562 1562
                         else
@@ -1564,30 +1564,40 @@ namespace CallCenterApi.Interface.Controllers.workorder
1564 1564
                             opt = "强制结案";
1565 1565
                             var userid = AddLog(model.F_ID, model.F_State.Value, deptmodelsname + nowUser.F_UserName + "(" + nowUser.F_WorkNumber + ")" + "工单审批:强制结案" + AuditCont, (int)EnumItemType.audit, (int)EnumItemOpt.visit, "", 0, nowUser, overtime, sms);
1566 1566
                             if (userid <= 0)
1567
-                                res = false;
1567
+                                res = 0;
1568 1568
                             wostate = 11;
1569 1569
                         }
1570 1570
 
1571 1571
                     }
1572 1572
                     else
1573 1573
                     {
1574
-                        res = false;
1574
+                        res = 0;
1575 1575
                     }
1576 1576
                 }
1577 1577
             }
1578 1578
             #endregion
1579
-            if (res)
1579
+            if (res>0)
1580 1580
             {
1581
-                model.F_State = wostate;
1582
-                if (woflag == 9)
1581
+                if (res == 1)
1583 1582
                 {
1584
-                    model.F_State2 = 0;
1583
+                    model.F_State = wostate;
1584
+                    //if (woflag == 9)
1585
+                    //{
1586
+                    //    model.F_State2 = 0;
1587
+                    //}
1588
+                    //else
1589
+                    //{
1590
+                    //    model.F_State2 = wostate;
1591
+                    //}
1592
+                    model.F_State2 = wostate;
1593
+                    model.F_Flag = woflag;
1585 1594
                 }
1586
-                else
1595
+                else if (res == 2)
1587 1596
                 {
1597
+                    model.F_State = wostate;
1588 1598
                     model.F_State2 = wostate;
1599
+                    model.F_Flag = 3;
1589 1600
                 }
1590
-                model.F_Flag = woflag;
1591 1601
                 //处理内容
1592 1602
                 if (!string.IsNullOrEmpty(AuditCont))
1593 1603
                     model.F_AuditCont += AuditCont + ";";
@@ -1667,7 +1677,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
1667 1677
         /// <param name="ua"></param>
1668 1678
         /// <param name="time"></param>
1669 1679
         /// <param name="id"></param>
1670
-        public bool GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
1680
+        public int GetDaQucirCulation(string AuditCont, Model.T_Sys_UserAccount ua, string time, long id, bool istrue)
1671 1681
         {
1672 1682
             DateTime times = DateTime.Parse(time).AddHours(24);
1673 1683
             Model.T_Wo_WorkOrder model = workOrder.GetModel(id);
@@ -1730,8 +1740,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
1730 1740
             {
1731 1741
                 nextda = 422;
1732 1742
                 opt = "流转营销中心市场科";
1733
-                //nextda = 295;
1734
-                //opt = "流转新乡黑科质检";
1743
+                nextda2 = 295;
1744
+                opt2 = "流转新乡黑科质检";
1735 1745
 
1736 1746
 
1737 1747
             }
@@ -1759,18 +1769,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
1759 1769
                 if (ro.F_RoleCode == "DQJL")
1760 1770
                 {
1761 1771
                     cont = "大区经理已审批:" + AuditCont + "," + opt;
1762
-                    //if (!string.IsNullOrEmpty(opt2))
1763
-                    //{
1764
-                    //    cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
1765
-                    //}
1772
+                    if (!string.IsNullOrEmpty(opt2))
1773
+                    {
1774
+                        cont2 = "大区经理已审批: " + AuditCont + "," + opt2;
1775
+                    }
1766 1776
                 }
1767 1777
                 else
1768 1778
                 {
1769 1779
                     cont = "分公司经理已审批:" + AuditCont + "," + opt;
1770
-                    //if (!string.IsNullOrEmpty(opt2))
1771
-                    //{
1772
-                    //    cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
1773
-                    //}
1780
+                    if (!string.IsNullOrEmpty(opt2))
1781
+                    {
1782
+                        cont2 = "分公司经理已审批: " + AuditCont + "," + opt2;
1783
+                    }
1774 1784
                 }
1775 1785
             }
1776 1786
             else
@@ -1778,18 +1788,18 @@ namespace CallCenterApi.Interface.Controllers.workorder
1778 1788
                 if (ro.F_RoleCode == "DQJL")
1779 1789
                 {
1780 1790
                     cont = "大区经理未审批" + opt;
1781
-                    //if (!string.IsNullOrEmpty(opt2))
1782
-                    //{
1783
-                    //    cont2 = "大区经理未审批" + opt2;
1784
-                    //}
1791
+                    if (!string.IsNullOrEmpty(opt2))
1792
+                    {
1793
+                        cont2 = "大区经理未审批" + opt2;
1794
+                    }
1785 1795
                 }
1786 1796
                 else
1787 1797
                 {
1788 1798
                     cont = "分公司经理未审批" + opt;
1789
-                    //if (!string.IsNullOrEmpty(opt2))
1790
-                    //{
1791
-                    //    cont2 = "分公司经理未审批" + opt2;
1792
-                    //}
1799
+                    if (!string.IsNullOrEmpty(opt2))
1800
+                    {
1801
+                        cont2 = "分公司经理未审批" + opt2;
1802
+                    }
1793 1803
                 }
1794 1804
             }
1795 1805
             if (nextda != 0)
@@ -1799,18 +1809,25 @@ namespace CallCenterApi.Interface.Controllers.workorder
1799 1809
                 //    model.F_State2 = (int)EnumWorkOrderState.finish;
1800 1810
                 //    model.F_Flag = 1;
1801 1811
                 //}
1802
-                model.F_Flag = 9;
1803
-                var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl,3,9);
1804
-                //if (nextda2 != 0)
1805
-                //{
1806
-                //    model.F_Flag = 3;
1807
-                //    var res2 = AssignWO(ua, model, Input[0], cont2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 2);
1808
-                //}
1809
-                return res;
1812
+
1813
+                if (nextda2 != 0)
1814
+                {
1815
+                    model.F_Flag = 3;
1816
+                    var res= AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 1, 3);
1817
+                    var res2 = AssignWO(ua, model, Input[0], cont2, "", nextda2, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 2);
1818
+                    return 2;
1819
+                }
1820
+                else
1821
+                {
1822
+                    model.F_Flag = 9;
1823
+                    var res = AssignWO(ua, model, Input[0], cont, "", nextda, 0, model.F_limit, sms, 0, 0, 0, time.ToString(), isbl, 3, 9);
1824
+                    return 1;
1825
+                }
1826
+               
1810 1827
             }
1811 1828
             else
1812 1829
             {
1813
-                return false;
1830
+                return 0;
1814 1831
             }
1815 1832
 
1816 1833
         }
@@ -2617,7 +2634,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2617 2634
                                 {
2618 2635
                                     foreach (var item in itemnext2)
2619 2636
                                     {
2620
-                                        if (item.F_WoState != 10)
2637
+                                        if (item.F_WoState != 11)
2621 2638
                                             flag = item.F_Type;
2622 2639
                                     }
2623 2640
                                 }
@@ -5726,7 +5743,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5726 5743
                         else
5727 5744
                         {
5728 5745
 
5729
-                            int dapt = 0, nextda = 0;
5746
+                            int dapt = 0, nextda = 0, nextda2=0;
5730 5747
                             var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
5731 5748
                             string deptneme = "";
5732 5749
                             if (deptmodel1 != null)
@@ -5735,7 +5752,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
5735 5752
                                 deptneme = deptmodel1.F_DeptName;
5736 5753
                             }
5737 5754
                             AddLog(modlelist.F_ID, 0, deptname + ua.F_UserName + "(" + ua.F_WorkNumber + ")" + "创建工单", (int)EnumWorkOrderState.neworder, (int)EnumItemOpt.create, "", 0, ua, overtime, sms);
5738
-                            string opt = "";
5755
+                            string opt = "",opt2="";
5739 5756
 
5740 5757
                             //if (dapt != 0)
5741 5758
                             //{
@@ -5770,8 +5787,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
5770 5787
                             {
5771 5788
                                 nextda = 422;
5772 5789
                                 opt = "流转营销中心市场科";
5773
-                                //nextda = 295;
5774
-                                //opt = "流转新乡黑科质检";
5790
+                                nextda2 = 295;
5791
+                                opt2 = "流转新乡黑科质检";
5775 5792
                             }
5776 5793
                             else if (CirculMarket(ua.F_DeptId, 332))
5777 5794
                             {
@@ -5788,14 +5805,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
5788 5805
                             //}
5789 5806
                             if (nextda != 0)
5790 5807
                             {
5791
-                                modlelist.F_Flag = 9;
5792
-                                modlelist.F_State = 1;
5793
-                                modlelist.F_State2 = 0;
5794
-                                var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1,3,9);
5795
-                                if (res)
5796
-                                    return Success("添加成功");
5808
+                                if (nextda2 != 0)
5809
+                                {
5810
+                                    modlelist.F_Flag = 3;
5811
+                                    AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1, 1, 3);
5812
+                                    var res2 = AssignWO(ua, modlelist, input, opt2, "", nextda2, 0, 0, 0, 0, 0, 0, "", 1, 2,3);
5813
+                                }
5797 5814
                                 else
5798
-                                    return Error("流转失败!");
5815
+                                {
5816
+                                    modlelist.F_Flag = 9;
5817
+                                    modlelist.F_State = 1;
5818
+                                    modlelist.F_State2 = 1;
5819
+                                    var res = AssignWO(ua, modlelist, input, opt, "", nextda, 0, 0, 0, 0, 0, 0, "", 1, 3, 9);
5820
+                                }
5821
+                                return Success("添加成功");
5799 5822
                             }
5800 5823
                             else
5801 5824
                             {
@@ -6051,7 +6074,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6051 6074
                 if (model == null)
6052 6075
                     return Error("查询不到此工单!");
6053 6076
 
6054
-                if (ua.F_UserCode != "8000" & ua.F_UserCode != "9000" & ua.F_UserCode != "8003" & ua.F_UserCode != "8002" & ua.F_WorkNumber!= "9000")
6077
+                if (ua.F_UserCode != "8000" & ua.F_UserCode != "9000" & ua.F_UserCode != "8003" & ua.F_UserCode != "8002" & ua.F_WorkNumber != "9000")
6055 6078
                 {
6056 6079
 
6057 6080
                     if (ro != null)
@@ -6064,16 +6087,30 @@ namespace CallCenterApi.Interface.Controllers.workorder
6064 6087
                             }
6065 6088
                         }
6066 6089
                     }
6067
-                    if (model.F_State == 2)
6090
+                    if ((model.F_Type == "2" || model.F_Type == "5") && (input.F_Type == 2 || input.F_Type == 5))
6068 6091
                     {
6069
-                        return Error("此工单已接单不能修改!");
6070 6092
                     }
6071
-                    else if (model.F_State == 11 || model.F_State == 10)
6093
+                    else
6072 6094
                     {
6073
-                        return Error("此工单已处理不能修改!");
6095
+                        if (model.F_State == 2)
6096
+                        {
6097
+                            return Error("此工单已接单不能修改!");
6098
+                        }
6099
+                        else if (model.F_State == 11 || model.F_State == 10)
6100
+                        {
6101
+                            return Error("此工单已处理不能修改!");
6102
+                        }
6074 6103
                     }
6075 6104
                 }
6076 6105
 
6106
+                if ((model.F_Type == "2" || model.F_Type == "5") && (input.F_Type == 2 || input.F_Type == 5))
6107
+                {
6108
+                }
6109
+                else
6110
+                {
6111
+                    return Error("此工单类型不能修改!");
6112
+                }
6113
+
6077 6114
                 if (!string.IsNullOrEmpty(input.F_CustomerID))
6078 6115
                 {
6079 6116
                     var Customer = cusbll.GetModel(input.F_CustomerID.Trim());
@@ -6134,7 +6171,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
6134 6171
                             else
6135 6172
                             {
6136 6173
                                 string deptname1 = "";
6137
-                                int dapt = 0, nextda = 0; string opt = "";
6174
+                                int dapt = 0, nextda = 0, nextda2 = 0; string opt = "", opt2 = "";
6138 6175
                                 var deptmodel1 = departmentBLL.GetModel(ua.F_DeptId);
6139 6176
                                 if (deptmodel1 != null)
6140 6177
                                 {
@@ -6174,8 +6211,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
6174 6211
                                 {
6175 6212
                                     nextda = 422;
6176 6213
                                     opt = "流转营销中心市场科";
6177
-                                    //nextda = 295;
6178
-                                    //opt = "流转新乡黑科质检";
6214
+                                    nextda2 = 295;
6215
+                                    opt2 = "流转新乡黑科质检";
6179 6216
                                 }
6180 6217
                                 else if (CirculMarket(ua.F_DeptId, 332))
6181 6218
                                 {
@@ -6191,11 +6228,20 @@ namespace CallCenterApi.Interface.Controllers.workorder
6191 6228
                                 //}
6192 6229
                                 if (nextda != 0)
6193 6230
                                 {
6194
-                                    var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "",1,1,9);
6195
-                                    if (res)
6196
-                                        return Success("保存成功");
6231
+                                    if (nextda2 != 0)
6232
+                                    {
6233
+                                        model.F_Flag = 3;
6234
+                                        AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "", 1, 1, 3);
6235
+                                        var res2 = AssignWO(ua, model, input, opt2, "", nextda2, 0, 0, 0, 0, 0, 0, "", 1, 2, 3);
6236
+                                    }
6197 6237
                                     else
6198
-                                        return Error("流转失败!");
6238
+                                    {
6239
+                                        model.F_State = 1;
6240
+                                        model.F_State2 = 1;
6241
+                                        model.F_Flag = 9;
6242
+                                        var res = AssignWO(ua, model, input, opt, "", nextda, 0, model.F_limit, 0, 0, 0, 0, "", 1, 3, 9);
6243
+                                    }
6244
+                                    return Success("保存成功");
6199 6245
                                 }
6200 6246
                                 else
6201 6247
                                 {
@@ -8054,16 +8100,16 @@ namespace CallCenterApi.Interface.Controllers.workorder
8054 8100
         {
8055 8101
             #region 工单处理
8056 8102
             int sms = 0;
8057
-            int? woflag = model.F_Flag;
8058
-            string strsql = "";
8059
-            if (woflag == 1)
8060
-            {
8061
-                strsql = $" and F_Type in(1,3)";
8062
-            }
8063
-            else if (woflag == 2)
8064
-            {
8065
-                strsql = $" and F_Type in(2,3)";
8066
-            }
8103
+            int woflag = 0;
8104
+            //string strsql = "";
8105
+            //if (woflag == 1)
8106
+            //{
8107
+            //    strsql = $" and F_Type in(1,3)";
8108
+            //}
8109
+            //else if (woflag == 2)
8110
+            //{
8111
+            //    strsql = $" and F_Type in(2,3)";
8112
+            //}
8067 8113
             var itemlasts = itembll.GetModelList($"F_ItemType={(int)EnumItemType.deal} and  F_WoID={model.F_ID}");
8068 8114
             string creatuser1 = "";
8069 8115
             string creatuser2 = "";
@@ -8071,11 +8117,12 @@ namespace CallCenterApi.Interface.Controllers.workorder
8071 8117
             {
8072 8118
                 foreach (var it in itemlasts)
8073 8119
                 {
8074
-                    if (it.F_WoState == 10 && it.F_Type == 1 && (it.F_Flag == 1 || it.F_Flag == 3))
8120
+                    if (it.F_WoState == 10)
8075 8121
                     {
8076 8122
                         creatuser1 = it.F_CreateUser;
8123
+                        woflag = Convert.ToInt32(it.F_Type);
8077 8124
                     }
8078
-                    if (it.F_WoState == 10 && it.F_Type==2 && (it.F_Flag == 2 || it.F_Flag == 3))
8125
+                    if (it.F_WoState == 10 && it.F_Type==2 )
8079 8126
                     {
8080 8127
                         creatuser2 = it.F_CreateUser;
8081 8128
                     }
@@ -8105,7 +8152,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
8105 8152
             string smscont = "";
8106 8153
 
8107 8154
             if (deptid1 > 0)
8108
-                AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser1, deptid1, nowUser, model.F_limit, sms, "", 0, 1);
8155
+                AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser1, deptid1, nowUser, model.F_limit, sms, "", 0, woflag);
8109 8156
             if (deptid2 > 0)
8110 8157
                 AddLog((int)model.F_ID, 3, content, (int)EnumItemType.deal, 4, creatuser2, deptid2, nowUser, model.F_limit, sms, "", 0, 2);
8111 8158
             //if (itemid > 0)
@@ -8835,10 +8882,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
8835 8882
                                 //if (modellist.F_NextUser != ua.F_UserCode)
8836 8883
                                     return Error("非接单人不可操作工单");
8837 8884
                             }
8838
-                            if (model.F_Flag == 9)
8839
-                            {
8840
-                                return Error("操作失败!");
8841
-                            }
8885
+                            //if (model.F_Flag == 9)
8886
+                            //{
8887
+                            //    return Error("操作失败!");
8888
+                            //}
8842 8889
                             if (markdepts.Contains(ua.F_DeptId.ToString()) || qualdepts.Contains(ua.F_DeptId.ToString()))
8843 8890
                             {
8844 8891
                                 input.F_ZL_ResponsibleUnit = deptment.ResponsibleUnit;// 责任单位
@@ -8899,13 +8946,22 @@ namespace CallCenterApi.Interface.Controllers.workorder
8899 8946
                             //}
8900 8947
                             #endregion
8901 8948
                             int? zflag = 0;
8902
-                            if (inoutflag != 0)
8949
+                            if (model.F_Flag == 9)
8903 8950
                             {
8904
-                                zflag = inoutflag;
8951
+                                model.F_Flag = 1;//默认外线操作
8952
+                                zflag = 1;
8953
+                                Overorder(ua, model, 2, 2);
8905 8954
                             }
8906 8955
                             else
8907 8956
                             {
8908
-                                zflag = modellist.F_Type;
8957
+                                if (inoutflag != 0)
8958
+                                {
8959
+                                    zflag = inoutflag;
8960
+                                }
8961
+                                else
8962
+                                {
8963
+                                    zflag = modellist.F_Type;
8964
+                                }
8909 8965
                             }
8910 8966
                             var modellast = new BLL.T_Wo_WorkOrderItem_New().GetModelList($"F_WoID={ model.F_ID }and F_IsUsed=0 and (F_CreateUser={ua.F_UserCode} or F_NextUser like '%{ua.F_UserCode}%')  order by  F_ID desc ").FirstOrDefault();
8911 8967
                             if (model.F_State == 10 && model.F_State2 == 10)
@@ -9903,13 +9959,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
9903 9959
                 #region 向上一级操作人员推送消息
9904 9960
                 if (!string.IsNullOrWhiteSpace(touser) && touser != nowUser.F_UserCode)
9905 9961
                 {//排除上一级指派人是自己
9906
-                    sendsysmsg(model, nowUser, touser, 0, opt);
9907
-                    // var lastUser = sysUserAccountBll.GetModel(touser);
9908
-                    //if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
9909
-                    //    sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
9962
+                    sendsysmsg(model, nowUser, touser, 0, opt);                 
9910 9963
                 }
9911
-                //   if (!string.IsNullOrEmpty(model.F_WxOpenId))
9912
-                //    sendwxmsg(model, model.F_WxOpenId, nowUser, model.F_DealContent );
9964
+                
9913 9965
                 #endregion
9914 9966
                 #endregion
9915 9967
                 return true;