Procházet zdrojové kódy

上线后测试调整bug

zhengbingbing %!s(int64=6) %!d(string=před) roky
rodič
revize
9505690232

+ 5 - 1
codegit/CallCenterApi/CallCenterAPI.WechatSDK/WxHelper.cs

@@ -318,10 +318,14 @@ namespace CallCenterAPI.WechatSDK
318 318
             //var result = TemplateApi.SendTemplateMessageAsync(AppId, openid, templateid, url, jsondata.ToJObject());
319 319
             SendTemplateMessageResult sendResult = TemplateApi.SendTemplateMessage(AppId, openid, templateid, url, jsondata);
320 320
 
321
+            
322
+
321 323
             //return AppId + "||||" + openid + "||||" + templateid + "||||" + url + "||||" ;
322 324
             object result = sendResult;
323 325
 
324
-            return result;
326
+            return "AppId:" + AppId + "||||openid:" + openid + "||||templateid:" + templateid + "||||url:" + url + "||||result" + result;
327
+
328
+            //return result;
325 329
             
326 330
         }
327 331
         #endregion

+ 10 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Configs/system.config

@@ -19,12 +19,18 @@
19 19
   <!-- 设置邮箱主机 -->
20 20
   <add key="MailHost" value="smtp.ym.163.com" />
21 21
   <!-- ================== 3:微信配置参数 ================== -->
22
-  <add key="WechatAppid" value="wx7d4e9a7f19dba557" />
23
-  <add key="WechatAppsecret" value="5a532d8297621663d29f3aae4ab01eab" />
22
+  <!--加一测试-->
23
+  <add key="WechatAppid" value="wx0d67bbb5666ec226" />
24
+  <add key="WechatAppsecret" value="be4785fa9866f2b380cd18999785baa3" />
25
+  <add key="TemplateId" value="cQ7F1ePjEsOl7ntBEV_BV4OQoFcoU5Zh69S2qmyZrW4" />
26
+  <add key="MessageUrl" value="http://jiayi.800100.net/sycw/index.html?menucode=GDXQ" />
27
+  <!--三元正式-->
28
+  <!--<add key="WechatAppid" value="wx7d4e9a7f19dba557" />
29
+  <add key="WechatAppsecret" value="5a532d8297621663d29f3aae4ab01eab" />-->
24 30
   <!-- 设置微信TemplateId 	工单进度提醒 -->
25
-  <add key="TemplateId" value="eaFYbnUIBf-6ggEYEKtYS4x4B2yrYFMZbi9GkLFgkYM" />
31
+  <!--<add key="TemplateId" value="eaFYbnUIBf-6ggEYEKtYS4x4B2yrYFMZbi9GkLFgkYM" />-->
26 32
   <!-- 设置微信 消息跳转url MessageUrl -->
27
-  <add key="MessageUrl" value="http://sycw.800100.net/index.html?menucode=GDXQ" />
33
+  <!--<add key="MessageUrl" value="http://sycw.800100.net/index.html?menucode=GDXQ" />-->
28 34
   <!-- ================== 4:公司名称中需截取掉的字符串 ================== -->
29 35
   <add key="keystring" value="有限公司,公司,科技,网络,信息,河南,河南省,洛阳,洛阳市,郑州,郑州市,南阳,南阳市,新乡,新乡市,有限、商贸、市"/>
30 36
 </appSettings>

+ 6 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/WOReportController.cs

@@ -15,10 +15,13 @@ namespace CallCenterApi.Interface.Controllers.report
15 15
     {
16 16
         public ActionResult GetDataList(string stime, string endtime, int deptid = 0)
17 17
         {
18
-            ActionResult res = NoToken("未知错误,请重新登录");
19 18
             DataTable dtNew = getData(stime, endtime, deptid);
20
-
21
-            return Success("获取业务报表数据", dtNew);
19
+            var obj = new
20
+            {
21
+                dtNew,
22
+                totle = dtNew.Rows.Count
23
+            };
24
+            return Success("获取业务报表数据", obj);
22 25
             
23 26
         }
24 27
         public ActionResult ExptList(string stime, string endtime, int deptid = 0)

+ 36 - 12
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -15,6 +15,7 @@ namespace CallCenterApi.Interface.Controllers.tel
15 15
     public class CallInScreenController : BaseController
16 16
     {
17 17
         private BLL.T_Sys_UserAccount sysUserAccountBll = new BLL.T_Sys_UserAccount();
18
+        private BLL.T_Sys_Department sysDeptBll = new BLL.T_Sys_Department();
18 19
         private BLL.T_Sys_DictionaryValue dicvalueBll = new BLL.T_Sys_DictionaryValue();
19 20
         /// <summary>
20 21
         /// 添加黑名单
@@ -544,7 +545,7 @@ namespace CallCenterApi.Interface.Controllers.tel
544 545
                     Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
545 546
                     if (ua != null)
546 547
                     {
547
-                        string users = string.Empty;
548
+                        
548 549
                         //工单来源
549 550
                         string source = RequestString.GetFormString("source");
550 551
                         //工单类型
@@ -601,22 +602,34 @@ namespace CallCenterApi.Interface.Controllers.tel
601 602
                         model.State = (int)EnumWorkOrderState.neworder;//0;    //工单状态
602 603
                         model.ResponDept = clbm;//指派部门
603 604
                         #region 获取接收人
605
+                        string touser = ""; string tousername = "";
604 606
                         if (clid != 0)
605 607
                         {
606 608
                             Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
607 609
                             if (clus != null)
608
-                                users = clus.F_UserCode;
610
+                            {
611
+                                touser = clus.F_UserCode;
612
+                                tousername = clus.F_UserName + "(" + touser + ")";
613
+                            }
609 614
                         }
610 615
                         else
611 616
                         {
617
+                            string users = string.Empty;
612 618
                             var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
613 619
                             foreach (var l in list)
614 620
                             {
615 621
                                 if (string.IsNullOrEmpty(users))
622
+                                {
616 623
                                     users = l.F_UserCode;
624
+                                    tousername = l.F_UserName + "(" + l.F_UserCode + ")";
625
+                                }
617 626
                                 else
627
+                                {
618 628
                                     users = users + "," + l.F_UserCode;
629
+                                    tousername = tousername + "," + l.F_UserName + "(" + l.F_UserCode + ")";
630
+                                }
619 631
                             }
632
+                            touser = users;
620 633
                         }
621 634
                         #endregion
622 635
                         model.F_IsOver = isover;
@@ -635,7 +648,7 @@ namespace CallCenterApi.Interface.Controllers.tel
635 648
                             }
636 649
                             else
637 650
                             {
638
-                                model.AuditUser = users;
651
+                                model.AuditUser = touser;
639 652
                                 model.State = (int)EnumWorkOrderState.assign;    //待处理
640 653
                             }
641 654
                         }
@@ -653,20 +666,31 @@ namespace CallCenterApi.Interface.Controllers.tel
653 666
                         if (orderid > 0)
654 667
                         {
655 668
                             #region 创建工单 处理记录
656
-                            var opt = "创建"; int optbut = (int)EnumItemOpt.create;
657
-                            if (clbm != 0 || clid != 0)
658
-                                opt = "创建并指派"; optbut = (int)EnumItemOpt.assign;
669
+                            var opt = "创建工单"; int optbut = (int)EnumItemOpt.create;
670
+                            string deptname = "";
671
+                            if (!string.IsNullOrWhiteSpace(touser))
672
+                            {
673
+                                #region 读取当前登录人部门
674
+                                var deptmodel = sysDeptBll.GetModel(ua.F_DeptId);
675
+                                if (deptmodel != null)
676
+                                {
677
+                                    deptname = deptmodel.F_DeptName + "-";
678
+                                }
679
+                                #endregion
680
+                                opt = "创建并指派工单给"+ tousername;
681
+                                optbut = (int)EnumItemOpt.assign;
682
+                            }
659 683
                             if (isover == 1)
660
-                                opt = "创建并处理完结"; optbut = (int)EnumItemOpt.end;
661
-                            var content = ua.F_UserName +opt+ "工单,单号:" + model.WorkOrderID;
662
-                            var itemid=new WorkOrderController().AddLog((int)orderid, model.State.Value, content, (int)EnumItemType.deal, optbut, users, clbm, ua);
684
+                                opt = "创建并处理完结工单"; optbut = (int)EnumItemOpt.end;
685
+                            var content = deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + opt;
686
+                            var itemid=new WorkOrderController().AddLog((int)orderid, model.State.Value, content, (int)EnumItemType.deal, optbut, touser, clbm, ua);
663 687
                             if (itemid > 0)
664 688
                             {
665
-                                if (!string.IsNullOrWhiteSpace(users))
689
+                                if (!string.IsNullOrWhiteSpace(touser))
666 690
                                 {
667 691
                                     model.ID = orderid;
668
-                                    new WorkOrderController().sendsysmsg(model, ua, users, (int)orderid, opt);//推送系统消息
669
-                                    var modelUser2 = sysUserAccountBll.GetModel(users);  //被指派人
692
+                                    new WorkOrderController().sendsysmsg(model, ua, touser, (int)orderid, opt);//推送系统消息
693
+                                    var modelUser2 = sysUserAccountBll.GetModel(touser);  //被指派人
670 694
                                     if (modelUser2 != null)
671 695
                                     {
672 696
                                         if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -696,7 +696,7 @@ namespace CallCenterApi.Interface.Controllers.weixin
696 696
         /// <summary>
697 697
         /// 工单列表
698 698
         /// </summary>
699
-        //[WechatActionFilter]
699
+        [WechatActionFilter]
700 700
         public ActionResult GetWoList()
701 701
         {
702 702
             workorder.WorkOrderController wo = new workorder.WorkOrderController();

+ 23 - 279
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -562,7 +562,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
562 562
                                 deptname = deptmodel.F_DeptName + "-";
563 563
                             }
564 564
                             #endregion
565
-                            AddLog(orderid, model.State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单,单号:" + model.WorkOrderID, (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua);
565
+                            AddLog(orderid, model.State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.update, (int)EnumItemOpt.update, "", 0, ua);
566 566
                             return Success("修改成功!");
567 567
                         }
568 568
                         else
@@ -608,7 +608,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
608 608
                                 {
609 609
                                     deptname = deptmodel.F_DeptName + "-";
610 610
                                 }
611
-                                AddLog(item.ID, item.State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单,单号:" + item.WorkOrderID, (int)EnumItemType.delete, (int)EnumItemOpt.delete, "", 0, ua);
611
+                                AddLog(item.ID, item.State.Value, deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + "修改工单", (int)EnumItemType.delete, (int)EnumItemOpt.delete, "", 0, ua);
612 612
                                 res &= true;
613 613
                             }
614 614
                             else
@@ -651,220 +651,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
651 651
                             return Success("处理成功");
652 652
                         else
653 653
                             return Error("处理失败!");
654
-                        #region 工单处理
655
-                        //var opt = "处理";
656
-                        //int optbut = (int)EnumItemOpt.deal;
657
-                        //int wostate = (int)EnumWorkOrderState.dealing;
658
-                        //if (isover == 1)
659
-                        //{
660
-                        //    opt = "处理完结";
661
-                        //    optbut = (int)EnumItemOpt.end;
662
-                        //    wostate = (int)EnumWorkOrderState.finish;
663
-                        //    model.LastDealUser = ua.F_UserCode;
664
-                        //    model.LastDealTime = DateTime.Now;
665
-                        //}
666
-                        //#region 读取当前登录人部门
667
-                        //string deptname = "";
668
-                        //var deptmodel = sysDeptBll.GetModel(ua.F_DeptId);
669
-                        //if (deptmodel != null)
670
-                        //{
671
-                        //    deptname = deptmodel.F_DeptName + "-";
672
-                        //}
673
-                        //#endregion
674
-                        //var content = deptname + ua.F_UserName + "(" + ua.F_UserCode + ")" + opt + "工单,单号:" + model.WorkOrderID;
675
-                        //var itemid = AddLog(orderid, wostate, content, (int)EnumItemType.deal, optbut, "", 0, ua);
676
-                        //if (itemid > 0)
677
-                        //{
678
-                        //    #region 处理工单
679
-                        //    model.State = wostate;
680
-                        //    //处理内容
681
-                        //    if (!string.IsNullOrEmpty(cont))
682
-                        //        model.Clcontent += cont + ";";
683
-                        //    new BLL.T_Wo_WorkOrder().Update(model);
684
-                        //    #endregion
685
-                        //    #region 推送消息
686
-                        //    #region 推送消息给添加的坐席 -处理情况
687
-                        //    if (ua.F_UserCode != model.CreateUser)
688
-                        //    {
689
-                        //        sendsysmsg(model, ua, model.CreateUser, (int)model.ID, opt);//推送系统消息
690
-                        //        var createmodel = sysUserAccountBll.GetModel(model.CreateUser);  //被指派人
691
-                        //        if (createmodel != null)
692
-                        //        {
693
-                        //            if (!string.IsNullOrEmpty(createmodel.F_WxOpenId))
694
-                        //            {
695
-                        //                sendwxmsg(model, createmodel.F_WxOpenId, ua, opt);
696
-                        //            }
697
-                        //        }
698
-                        //    }
699
-                        //    #endregion
700
-                        //    #region 向上一级操作人员推送消息
701
-                        //    var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and  F_WoID='" + model.ID + "' and F_NextUser='" + ua.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
702
-                        //    if (itemlast.F_CreateUser != model.CreateUser)
703
-                        //    {
704
-                        //        sendsysmsg(model, ua, itemlast.F_CreateUser, (int)itemid, opt);
705
-                        //        var lastUser = sysUserAccountBll.GetModel(itemlast.F_CreateUser);
706
-                        //        if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
707
-                        //            sendwxmsg(model, lastUser.F_WxOpenId, ua, opt);
708
-                        //    }
709
-                        //    #endregion
710
-                        //    #endregion
711
-                        //    return Success("处理成功");
712
-                        //}
713
-                        //else
714
-                        //    return Error("处理失败!");
715
-                        #endregion
716
-                        #region  工单记录集成 20190429 zhengbingbing
717
-                        //var clus = new BLL.T_Sys_UserAccount().GetModel(clid);
718
-                        #region
719
-                        //Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
720
-                        //#region 工单记录
721
-                        //item.WorkOrderID = orderid;
722
-                        //item.Type = (int)EnumItemType.deal; //1     //处理
723
-                        //item.ToDept = clbm; //部门
724
-                        ////item.ToUser = clus != null ? clus.F_UserCode : "";  //接收人
725
-                        //item.Detail = cont;
726
-                        //item.IsDel = 0;
727
-                        ////转派
728
-                        //if (isend == 0)
729
-                        //{
730
-                        //    item.State = (int)EnumItemState.assign;//0;
731
-                        //    item.IsLast = 0;
732
-                        //}
733
-                        //else
734
-                        //{
735
-                        //    if (isover == 1)
736
-                        //    {
737
-                        //        item.State = (int)EnumItemState.finish;//2;
738
-                        //        item.IsLast = 1;
739
-                        //    }
740
-                        //}
741
-                        //item.IsStart = 0;
742
-                        //item.IsTimeOut = 0;
743
-                        //item.CreateUser = ua.F_UserCode;
744
-                        //item.CreateTime = DateTime.Now;
745
-                        //long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
746
-                        //#endregion
747
-                        #endregion
748
-                        //long itemid = AddOrderItem(orderid, (int)EnumItemType.deal, clbm, touser, isend, cont, isover, 0, ua);
749
-                        //if (itemid > 0)
750
-                        //{
751
-                        //    #region
752
-                        //    //工单完结要更新工单的状态
753
-                        //    if (isend == 0)
754
-                        //    {
755
-                        //        model.ResponDept = clid;
756
-                        //        //无接收人时,状态修改成 0待指派
757
-                        //        if (clid == 0)
758
-                        //        {
759
-                        //            model.State = (int)EnumWorkOrderState.neworder;// 0;    //待指派
760
-                        //        }
761
-                        //        else
762
-                        //        {
763
-                        //            model.AuditUser = touser;
764
-                        //            model.State = (int)EnumWorkOrderState.assign;//1;    //待处理
765
-                        //        }
766
-                        //        //model.State = 1;    //已处理
767
-                        //    }
768
-                        //    else {
769
-                        //        if (isover == 1)
770
-                        //        {
771
-                        //            model.State = (int)EnumWorkOrderState.finish;//2;    //已处理item.ToUser
772
-                        //            model.LastDealUser = ua.F_UserCode;
773
-                        //            model.LastDealTime = DateTime.Now;
774
-                        //        }
775
-                        //    }
776
-                        //    //处理内容
777
-                        //    if (!string.IsNullOrEmpty(cont))
778
-                        //        model.Clcontent += cont + ";";
779
-                        //    //model.Clcontent = cont;
780
-                        //    //处理工单时,接待描述可以编辑 - 不能再修改
781
-                        //    //model.Detail = detail;
782
-
783
-                        //    new BLL.T_Wo_WorkOrder().Update(model);
784
-                        //    #endregion
785
-
786
-                        //    #region
787
-                        //    if (model.State == (int)EnumWorkOrderState.assign)
788
-                        //    {//已派单状态
789
-                        //        if (clid != 0)
790
-                        //        {
791
-                        //            #region 派单后发送微信推送
792
-                        //            var modelUser2 = sysUserAccountBll.GetModel(clid);  //被指派人
793
-                        //            if (modelUser2 != null)
794
-                        //            {
795
-                        //                if (!string.IsNullOrEmpty(modelUser2.F_WxOpenId))
796
-                        //                {
797
-                        //                    sendwxmsg(model, modelUser2.F_WxOpenId, ua, "处理完结");
798
-                        //                    //var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
799
-                        //                    //string content = string.Empty;
800
-                        //                    //var wotype = "";
801
-                        //                    //if (dicv != null)
802
-                        //                    //{
803
-                        //                    //    wotype = dicv.F_Name;
804
-                        //                    //    content = "客户" + model.Customer + "提出的工单已派单,请及时处理";
805
-                        //                    //}
806
-                        //                    //WxHelper.SendWechatMsg1(model.WorkOrderID, "你有新的工单需要处理", wotype, model.State.ToString(), content, orderid.ToString(), modelUser2.F_WxOpenId);
807
-                        //                }
808
-                        //            }
809
-                        //            #endregion
810
-                        //        }
811
-                        //        else
812
-                        //        {
813
-                        //            var createUser = sysUserAccountBll.GetModel(model.CreateUser);
814
-                        //            if (createUser != null)
815
-                        //            {
816
-                        //                sendsysmsg(model, ua, model.CreateUser, Int32.Parse(itemid.ToString()), "处理");
817
-                        //                if (!string.IsNullOrEmpty(createUser.F_WxOpenId))
818
-                        //                {
819
-                        //                    sendwxmsg(model, createUser.F_WxOpenId, ua, "处理");
820
-                        //                }
821
-                        //            }
822
-                        //        }
823
-                        //    }
824
-                        //    else if(model.State== (int)EnumWorkOrderState.finish)
825
-                        //    {
826
-                        //        #region 完结后推送消息给添加人员
827
-                        //        var createUser = sysUserAccountBll.GetModel(model.CreateUser);
828
-                        //        if (createUser != null)
829
-                        //        {
830
-                        //            #region 消息提醒
831
-                        //            sendsysmsg(model, ua, model.CreateUser, Int32.Parse(itemid.ToString()), "处理完结");
832
-                        //            //string strmsg = string.Empty;
833
-                        //            //strmsg = ua.F_UserName + "(" + ua.F_UserCode + ")" + "完结了工单,单号:" + model.WorkOrderID;
834
-                        //            //Model.T_Msg_List msg = new Model.T_Msg_List();
835
-                        //            //msg.Type = (int)Model.MSGType.workorder;//处理
836
-                        //            //msg.ToUser = model.CreateUser;
837
-                        //            //msg.ToID = Int32.Parse(itemid.ToString());
838
-                        //            //msg.Detail = strmsg;
839
-                        //            //msg.State = 0;
840
-                        //            //msg.IsDel = 0;
841
-                        //            //msg.CreateUser = ua.F_UserCode;
842
-                        //            //msg.CreateDate = DateTime.Now;
843
-
844
-                        //            //new BLL.T_Msg_List().Add(msg);
845
-                        //            #endregion
846
-                        //            #region 推送微信
847
-                        //            if (!string.IsNullOrEmpty(createUser.F_WxOpenId))
848
-                        //            {
849
-                        //                sendwxmsg(model, createUser.F_WxOpenId, ua, "处理完结");
850
-                        //                //var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
851
-                        //                //string content = string.Empty;
852
-                        //                //var wotype = "";
853
-                        //                //if (dicv != null)
854
-                        //                //{
855
-                        //                //    wotype = dicv.F_Name;
856
-                        //                //    content = "客户" + model.Customer + "提出的工单已完结,请查看";
857
-                        //                //}
858
-                        //                //WxHelper.SendWechatMsg1(model.WorkOrderID, "你有工单已被处理", wotype, model.State.ToString(), content, orderid.ToString(), createUser.F_WxOpenId);
859
-                        //            }
860
-                        //            #endregion
861
-                        //        }
862
-                        //        #endregion
863
-                        //    }
864
-                        //    #endregion
865
-                        //    res = Success("处理成功");
866
-                        //}
867
-                        #endregion
868 654
                     }
869 655
                     else
870 656
                         return Error("工单不存在!");
@@ -926,56 +712,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
926 712
                             return Success("接单成功");
927 713
                         else
928 714
                             return Error("接单失败");
929
-                        #region
930
-                        //Model.T_Wo_WorkOrderItem item = itembll.GetModelList(" WorkOrderID='" + orderid + "' and isdel=0 and Type=" + (int)EnumItemType.deal + " and isnull(IsUsed,'0')='0' ").OrderByDescending(p => p.CreateTime).FirstOrDefault();
931
-                        //if (item != null && item.State == (int)EnumItemState.assign && ("," + item.ToUser + ",").Contains("," + ua.F_UserCode + ","))
932
-                        //{
933
-                        //    item.SureUser = ua.F_UserCode;
934
-                        //    item.State = (int)EnumItemState.receive;//1;
935
-                        //    item.SureTime = DateTime.Now;
936
-                        //    if (itembll.Update(item))
937
-                        //    {
938
-                        //        #region 推送消息给添加人员
939
-                        //        var createUser = sysUserAccountBll.GetModel(model.CreateUser);
940
-                        //        if (createUser != null)
941
-                        //        {
942
-                        //            #region 消息提醒
943
-                        //            sendsysmsg(model, ua, model.CreateUser, (int)item.ID, "处理接单");
944
-                        //            //string strmsg = string.Empty;
945
-                        //            //strmsg = ua.F_UserName + "(" + ua.F_UserCode + ")" + "已接单,单号:" + model.WorkOrderID;
946
-                        //            //Model.T_Msg_List msg = new Model.T_Msg_List();
947
-                        //            //msg.Type = (int)Model.MSGType.workorder;//处理
948
-                        //            //msg.ToUser = model.CreateUser;
949
-                        //            //msg.ToID = (int)item.ID;
950
-                        //            //msg.Detail = strmsg;
951
-                        //            //msg.State = 0;
952
-                        //            //msg.IsDel = 0;
953
-                        //            //msg.CreateUser = ua.F_UserCode;
954
-                        //            //msg.CreateDate = DateTime.Now;
955
-
956
-                        //            //new BLL.T_Msg_List().Add(msg);
957
-                        //            #endregion
958
-                        //            #region 推送微信
959
-                        //            if (!string.IsNullOrEmpty(createUser.F_WxOpenId))
960
-                        //            {
961
-                        //                sendwxmsg(model, createUser.F_WxOpenId, ua, "接单");
962
-                        //                //var dicv = dicvalueBll.GetModel(model.TypeClass.Value);
963
-                        //                //string content = string.Empty;
964
-                        //                //var wotype = "";
965
-                        //                //if (dicv != null)
966
-                        //                //{
967
-                        //                //    wotype = dicv.F_Name;
968
-                        //                //    content = "客户" + model.Customer + "提出的工单已接单,接单人:"+ ua.F_UserName + "(" + ua.F_UserCode + ")";
969
-                        //                //}
970
-                        //                //WxHelper.SendWechatMsg1(model.WorkOrderID, "你有工单已接单", wotype, model.State.ToString(), content, orderid.ToString(), createUser.F_WxOpenId);
971
-                        //            }
972
-                        //            #endregion
973
-                        //        }
974
-                        //        #endregion
975
-                        //        res = Success("确认成功!");
976
-                        //    }
977
-                        //}
978
-                        #endregion
979 715
                     }
980 716
                     else
981 717
                         return Error("工单不存在");
@@ -2136,7 +1872,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2136 1872
                 deptname = deptmodel.F_DeptName + "-";
2137 1873
             }
2138 1874
             #endregion
2139
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单给 "+ tousername + " ,单号:" + model.WorkOrderID;
1875
+            var optcont = "";
1876
+            if (!string.IsNullOrEmpty(cont))
1877
+                optcont = ",说明:" + cont;
1878
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单给 " + tousername+ optcont;
2140 1879
             var itemid = AddLog(model.ID, wostate, content, (int)EnumItemType.deal, optbut, touser, clbm, nowUser);
2141 1880
             if (itemid > 0)
2142 1881
             {
@@ -2203,7 +1942,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2203 1942
                 deptname = deptmodel.F_DeptName + "-";
2204 1943
             }
2205 1944
             #endregion
2206
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + ",单号:" + model.WorkOrderID;
1945
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt;
2207 1946
             var itemid = AddLog((int)model.ID, wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser);
2208 1947
             if (itemid > 0)
2209 1948
             {
@@ -2261,7 +2000,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2261 2000
                 deptname = deptmodel.F_DeptName + "-";
2262 2001
             }
2263 2002
             #endregion
2264
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单,单号:" + model.WorkOrderID;
2003
+            var optcont = "";
2004
+            if (!string.IsNullOrEmpty(cont))
2005
+                optcont = ",处理内容:" + cont;
2006
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单"+ optcont;
2265 2007
             var itemid = AddLog(model.ID, wostate, content, (int)EnumItemType.deal, optbut, "", 0, nowUser);
2266 2008
             if (itemid > 0)
2267 2009
             {
@@ -2309,8 +2051,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
2309 2051
         /// </summary>
2310 2052
         public bool BackWO(Model.T_Sys_UserAccount nowUser, Model.T_Wo_WorkOrder model, string cont,int type)
2311 2053
         {
2312
-            model.State = (int)EnumWorkOrderState.reback;
2313
-
2314 2054
             #region 工单处理
2315 2055
             var opt = "退回";
2316 2056
             int optbut = (int)EnumItemOpt.reback;
@@ -2329,10 +2069,13 @@ namespace CallCenterApi.Interface.Controllers.workorder
2329 2069
                 deptname = deptmodel.F_DeptName + "-";
2330 2070
             }
2331 2071
             #endregion
2332
-            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单,单号:" + model.WorkOrderID + ",退回说明:" + cont;
2072
+            var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + opt + "工单,退回说明:" + cont;
2333 2073
             //获取上一级处理人员
2074
+            var touser = "";
2334 2075
             var itemlast = itembll.GetModelList(" F_ItemType=" + (int)EnumItemType.deal + " and  F_WoID='" + model.ID + "' and F_NextUser='" + nowUser.F_UserCode + "' order by F_CreateTime desc").FirstOrDefault();
2335
-            var itemid = AddLog((int)model.ID, wostate, content, (int)EnumItemType.deal, optbut, itemlast.F_CreateUser, 0, nowUser);
2076
+            if (itemlast != null)
2077
+                touser = itemlast.F_CreateUser;
2078
+            var itemid = AddLog((int)model.ID, wostate, content, (int)EnumItemType.deal, optbut, touser, 0, nowUser);
2336 2079
             if (itemid > 0)
2337 2080
             {
2338 2081
                 #region 处理工单
@@ -2341,10 +2084,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
2341 2084
                 #endregion
2342 2085
                 #region 推送消息
2343 2086
                 #region 向上一级操作人员推送消息
2344
-                if (itemlast.F_CreateUser != nowUser.F_UserCode)
2087
+                if (!string.IsNullOrWhiteSpace(touser)&& touser != nowUser.F_UserCode)
2345 2088
                 {//排除上一级指派人是自己
2346
-                    sendsysmsg(model, nowUser, itemlast.F_CreateUser, (int)itemid, opt);
2347
-                    var lastUser = sysUserAccountBll.GetModel(itemlast.F_CreateUser);
2089
+                    sendsysmsg(model, nowUser, touser, (int)itemid, opt);
2090
+                    var lastUser = sysUserAccountBll.GetModel(touser);
2348 2091
                     if (lastUser != null && !string.IsNullOrEmpty(lastUser.F_WxOpenId))
2349 2092
                         sendwxmsg(model, lastUser.F_WxOpenId, nowUser, opt);
2350 2093
                 }
@@ -2377,7 +2120,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2377 2120
                     deptname = deptmodel.F_DeptName + "-";
2378 2121
                 }
2379 2122
                 #endregion
2380
-                var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")催办工单,单号:" + model.WorkOrderID + ",催办说明:" + cont;
2123
+                var content = deptname + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")催办工单,催办说明:" + cont;
2381 2124
                 long itemid = AddLog(model.ID, model.State.Value, content, (int)EnumItemType.urge, (int)EnumItemOpt.urge, touser, todept, nowUser);
2382 2125
                 if (itemid > 0)
2383 2126
                 {
@@ -2703,7 +2446,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
2703 2446
         {
2704 2447
             #region 消息提醒
2705 2448
             string strmsg = string.Empty;
2706
-            strmsg = nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + "操作" + opt + "工单,单号:" + womodel.WorkOrderID;
2449
+            strmsg = nowUser.F_UserName + "(" + nowUser.F_UserCode + ")" + "操作" + opt + "工单";
2707 2450
             Model.T_Msg_List msg = new Model.T_Msg_List();
2708 2451
             msg.Type = (int)Model.MSGType.workorder;//处理
2709 2452
             msg.ToUser = touser;
@@ -2733,7 +2476,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
2733 2476
                         wotype = dicv.F_Name;
2734 2477
                     }
2735 2478
                     content = "编号" + womodel.WorkOrderID + "的工单已" + opt + ",操作人:" + nowUser.F_UserName + "(" + nowUser.F_UserCode + ")";
2736
-                    WxHelper.SendWechatMsg1(womodel.WorkOrderID, "你有工单已" + opt, wotype, womodel.State.ToString(), content, womodel.WorkOrderID.ToString(), openid);
2479
+                    var msg=WxHelper.SendWechatMsg1(womodel.WorkOrderID, "你有工单已" + opt, wotype, womodel.State.ToString(), content, womodel.ID.ToString(), openid,"");
2480
+                    Error("推送微信::::::"+msg.ToString());
2737 2481
                 }
2738 2482
             }
2739 2483
             catch { }