Kaynağa Gözat

工单调整

zhengbingbing 7 yıl önce
ebeveyn
işleme
e322340a7f

+ 338 - 141
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -483,50 +483,19 @@ namespace CallCenterApi.Interface.Controllers.tel
483 483
             return res;
484 484
         }
485 485
 
486
+        #region 创建工单
487
+        //zhengbingbing 20180503 根据息县工单调整
486 488
         /// <summary>
487 489
         /// 创建工单
488 490
         /// </summary>
489 491
         /// <returns></returns>
490
-        public ActionResult AddWorkOrder()
492
+        public ActionResult AddWorkOrder(string callid, int khid, string source, string file
493
+            , string customer, string custel, string country, string address, string inqtime, string inquser
494
+           , string detail, string cont, string answer, string remark, int infotypeid, int unitid, int clbm, int clid)
491 495
         {
492 496
             ActionResult res = NoToken("未知错误,请重新登录");
493 497
             if (Request.IsAuthenticated)
494 498
             {
495
-                #region 获取参数
496
-                int type = RequestString.GetInt("type", 0);
497
-                //int tslx = RequestString.GetInt("tslx", 0);
498
-                string callid = RequestString.GetFormString("callid");
499
-                int khid = RequestString.GetInt("khid", 0);
500
-                string tskh = RequestString.GetFormString("tskh");
501
-                string tsdh = RequestString.GetFormString("tsdh");
502
-                //int zrbm = RequestString.GetInt("zrbm", 0);
503
-                //int zrid = RequestString.GetInt("zrid", 0);
504
-                string cont = RequestString.GetFormString("cont");
505
-                //string answer = RequestString.GetFormString("answer");
506
-                string clcont = RequestString.GetFormString("clcont");
507
-
508
-                int clbm = RequestString.GetInt("clbm", 0);
509
-                int clid = RequestString.GetInt("clid", 0);
510
-                string source = RequestString.GetFormString("source");
511
-                //string address = RequestString.GetFormString("address");
512
-                #region 新增字段
513
-                int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
514
-                //int isreward = RequestString.GetInt("isreward", 0);//上报奖励
515
-                //string reamount = RequestString.GetFormString("reamount");//奖励金额
516
-                //string retime = RequestString.GetFormString("retime");//奖励时间
517
-                int unitid = RequestString.GetInt("unitid", 0);//交办单位
518
-                int isaudit = RequestString.GetInt("isaudit", 0);//0未审核,1无效,2有效
519
-                #endregion
520
-                #endregion
521
-
522
-                #region 判断输入数据类型
523
-                if (!Validate.IsNumber(tsdh))
524
-                {
525
-                    res = Error("电话必须为数字");
526
-                    return res;
527
-                }
528
-                #endregion
529
-
530 499
                 int userId = CurrentUser.UserData.F_UserId;
531 500
                 if (userId != 0)
532 501
                 {
@@ -536,38 +505,28 @@ namespace CallCenterApi.Interface.Controllers.tel
536 505
                         Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
537 506
                         model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmssmsfff");//工单编号
538 507
                         model.CallID = callid;
539
-                        model.Customer = tskh;
540 508
                         model.CustomerID = khid;
541
-                        model.CustomerTel = tsdh;
542
-                        model.Detail = cont;
543
-                        model.Clcontent = clcont;
544
-                        model.Type = type;
545
-                        //model.TypeClass = tslx;
546
-
547
-                        if (type == 1)
548
-                        {
549
-                            model.State = 2;
550
-                        }
551
-                        else
552
-                            model.State = 0;
553
-                        model.IsDel = 0;
554
-                        model.IsReturn = 0;
555
-                        model.IsReturnBak = 0;
556
-                        //model.ResponDept = zrbm;
557
-                        //model.Answer = answer;
558
-                        model.IsTimeOut = 0;
559
-                        model.IsUserSend = 0;
560
-                        model.IsAdminSend = 0;
561
-                        model.IsAudit = isaudit;//0未审核,1无效,2有效
562
-
563
-                        if (source.Trim() == "1")
564
-                            model.Source = "手工制单";
565
-                        else if (source.Trim() == "2")
566
-                            model.Source = "电话";
567
-                        else if (source.Trim() == "3")
568
-                            model.Source = "微信";
569
-
570
-                        #region 新增字段
509
+                        #region 息县工单
510
+                        if (!string.IsNullOrWhiteSpace(customer))
511
+                            model.Customer = customer;
512
+                        if (!string.IsNullOrWhiteSpace(inqtime))
513
+                            model.Inqtime = DateTime.Parse(inqtime);
514
+                        if (!string.IsNullOrWhiteSpace(inquser))
515
+                            model.Inquser = inquser;
516
+                        if (!string.IsNullOrWhiteSpace(country))
517
+                            model.County = country;
518
+                        if (!string.IsNullOrWhiteSpace(address))
519
+                            model.Address = address;
520
+                        if (!string.IsNullOrWhiteSpace(detail))
521
+                            model.Detail = detail;
522
+                        if (!string.IsNullOrWhiteSpace(answer))
523
+                            model.Answer = answer;
524
+                        if (!string.IsNullOrWhiteSpace(cont))
525
+                            model.Clcontent = cont;
526
+                        if (!string.IsNullOrWhiteSpace(remark))
527
+                            model.Remark = remark;
528
+                        #endregion
529
+                        #region 信息分类和交办单位
571 530
                         model.InfoTypeID = infotypeid;
572 531
                         if (infotypeid != 0)
573 532
                         {
@@ -577,9 +536,6 @@ namespace CallCenterApi.Interface.Controllers.tel
577 536
                                 model.InfoType = dicVModel.F_Name;
578 537
                             }
579 538
                         }
580
-                        model.ISReward = 0;
581
-                        //model.RewardAmount = reamount;
582
-                        //model.RewardTime = retime;
583 539
                         model.UnitID = unitid;
584 540
                         if (unitid != 0)
585 541
                         {
@@ -590,16 +546,25 @@ namespace CallCenterApi.Interface.Controllers.tel
590 546
                             }
591 547
                         }
592 548
                         #endregion
593
-                        
594
-                        #region 工单超时
595
-                        Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
596
-                        if (to != null)
597
-                        {
598
-                            model.LimitTime = to.MainTime;
599
-                        }
600
-                        #endregion
549
+                        if (source.Trim() == "1")
550
+                            model.Source = "手工制单";
551
+                        else if (source.Trim() == "2")
552
+                            model.Source = "电话";
553
+                        else if (source.Trim() == "3")
554
+                            model.Source = "微信";
555
+                        #region 无需参数字段
556
+                        model.Type = 3;//默认为投诉工单
557
+                        model.State = 0;
558
+                        model.IsDel = 0;
559
+                        model.IsReturn = 0;
560
+                        model.IsReturnBak = 0;
561
+                        model.IsTimeOut = 0;
562
+                        model.IsUserSend = 0;
563
+                        model.IsAdminSend = 0;
601 564
                         model.CreateUser = ua.F_UserCode;
602 565
                         model.CreateTime = DateTime.Now;
566
+                        #endregion
567
+                        
603 568
                         #region 工单明细
604 569
                         if (clbm != 0 || clid != 0)
605 570
                         {
@@ -633,11 +598,7 @@ namespace CallCenterApi.Interface.Controllers.tel
633 598
                                 }
634 599
                                 item.ToUser = users;
635 600
                             }
636
-
637
-                            if (to != null)
638
-                            {
639
-                                item.LimitTime = to.ItemTime;
640
-                            }
601
+                            
641 602
                             if (item.ToUser != "")
642 603
                             {
643 604
                                 item.SureUser = ua.F_UserCode;
@@ -650,10 +611,8 @@ namespace CallCenterApi.Interface.Controllers.tel
650 611
                                 item.State = 0;
651 612
                                 item.IsStart = 0;
652 613
                             }
653
-                            item.Detail = clcont;
614
+                            item.Detail = model.Detail;
654 615
                             item.IsLast = 0;
655
-                            //item.State = 0;
656
-                            //item.IsStart = 0;
657 616
                             item.IsTimeOut = 0;
658 617
                             item.IsDel = 0;
659 618
                             item.CreateUser = ua.F_UserCode;
@@ -664,23 +623,7 @@ namespace CallCenterApi.Interface.Controllers.tel
664 623
                             {
665 624
                                 model.State = 1;//已指派
666 625
                                 model.AppointTime = DateTime.Now;
667
-
668
-                                #region 消息表
669
-                                //foreach (string ur in item.ToUser.Split(','))
670
-                                //{
671
-                                //    Model.T_Msg_List msg = new Model.T_Msg_List();
672
-                                //    msg.Type = 1;
673
-                                //    msg.ToUser = ur;
674
-                                //    msg.ToID = Int32.Parse(itemid.ToString());
675
-                                //    msg.Detail = ua.F_UserName + "给你指派了工单,单号:" + model.WorkOrderID;
676
-                                //    msg.State = 0;
677
-                                //    msg.IsDel = 0;
678
-                                //    msg.CreateUser = ua.F_UserCode;
679
-                                //    msg.CreateDate = DateTime.Now;
680
-
681
-                                //    new BLL.T_Msg_List().Add(msg);
682
-                                //}
683
-                                #endregion
626
+                                
684 627
                             }
685 628
                         }
686 629
                         #endregion
@@ -728,49 +671,303 @@ namespace CallCenterApi.Interface.Controllers.tel
728 671
                         {
729 672
                             res = Error("新增失败!");
730 673
                         }
731
-
732
-                        #region no use
733
-                        //Model.T_Wo_WorkOrderBase model = new Model.T_Wo_WorkOrderBase();
734
-                        //model.F_CODE = DateTime.Now.ToString("yyyyMMddHHmmssms");//工单编号
735
-                        //model.F_WORKORDERTYPEID = type;
736
-                        //model.F_WORKORDERSTATEID = 0;
737
-                        //model.F_WORKORDERNAME = "";
738
-                        //model.F_WORKORDERFROM = "";
739
-                        //model.F_WORKORDERLEVELID = 0;
740
-                        //model.F_ADSLACCOUNT = callid;
741
-                        ////model.F_USERID = ua.F_UserId;
742
-                        ////model.F_USERNAME = ua.F_UserName;
743
-                        ////model.F_USERPHONE = ua.F_WorkNumber;
744
-                        //model.F_TypeName = "";
745
-                        //model.F_STARTTIME = DateTime.Now;
746
-                        //model.F_RETURNVISITFLAG = 0;
747
-                        //model.F_LINKMANTELEPHONE = tsdh;
748
-                        //model.F_LINKMAN = tskh;
749
-                        //model.F_DELETEFLAG = 0;
750
-                        //model.F_CUSTOMERTELEPHONE = tsdh;
751
-                        //model.F_CUSTOMERNAME = tskh;
752
-                        //model.F_CUSTOMERID = 0;//待实现
753
-                        //model.F_CREATEDATE = DateTime.Now;
754
-                        //model.F_CREATEBY = ua.F_UserId;
755
-                        //model.F_CONTENT = cont;
756
-                        //model.F_REPAIRMANNAME = tskh;
757
-                        //model.F_REPAIRMANPHONE = tsdh;
758
-
759
-                        //if (new BLL.T_Wo_WorkOrderBase().Add(model) > 0)
760
-                        //{
761
-                        //    res = Success("新增成功!");
762
-                        //}
763
-                        //else
764
-                        //{
765
-                        //    res = Error("新增失败!");
766
-                        //} 
767
-                        #endregion
674
+                        
768 675
                     }
769 676
                 }
770 677
 
771 678
             }
772 679
             return res;
773 680
         }
774
-
681
+        #endregion
682
+        #region 创建工单调整前
683
+        ///// <summary>
684
+        ///// 创建工单
685
+        ///// </summary>
686
+        ///// <returns></returns>
687
+        //public ActionResult AddWorkOrder()
688
+        //{
689
+        //    ActionResult res = NoToken("未知错误,请重新登录");
690
+        //    if (Request.IsAuthenticated)
691
+        //    {
692
+        //        #region 获取参数
693
+        //        int type = RequestString.GetInt("type", 0);
694
+        //        //int tslx = RequestString.GetInt("tslx", 0);
695
+        //        string callid = RequestString.GetFormString("callid");
696
+        //        int khid = RequestString.GetInt("khid", 0);
697
+        //        string tskh = RequestString.GetFormString("tskh");
698
+        //        string tsdh = RequestString.GetFormString("tsdh");
699
+        //        //int zrbm = RequestString.GetInt("zrbm", 0);
700
+        //        //int zrid = RequestString.GetInt("zrid", 0);
701
+        //        string cont = RequestString.GetFormString("cont");
702
+        //        //string answer = RequestString.GetFormString("answer");
703
+        //        string clcont = RequestString.GetFormString("clcont");
704
+
705
+        //        int clbm = RequestString.GetInt("clbm", 0);
706
+        //        int clid = RequestString.GetInt("clid", 0);
707
+        //        string source = RequestString.GetFormString("source");
708
+        //        //string address = RequestString.GetFormString("address");
709
+        //        #region 新增字段
710
+        //        int infotypeid = RequestString.GetInt("infotypeid", 0);//信息分类
711
+        //        //int isreward = RequestString.GetInt("isreward", 0);//上报奖励
712
+        //        //string reamount = RequestString.GetFormString("reamount");//奖励金额
713
+        //        //string retime = RequestString.GetFormString("retime");//奖励时间
714
+        //        int unitid = RequestString.GetInt("unitid", 0);//交办单位
715
+        //        int isaudit = RequestString.GetInt("isaudit", 0);//0未审核,1无效,2有效
716
+        //        #endregion
717
+        //        #endregion
718
+
719
+        //        #region 判断输入数据类型
720
+        //        if (!Validate.IsNumber(tsdh))
721
+        //        {
722
+        //            res = Error("电话必须为数字");
723
+        //            return res;
724
+        //        }
725
+        //        #endregion
726
+
727
+        //        int userId = CurrentUser.UserData.F_UserId;
728
+        //        if (userId != 0)
729
+        //        {
730
+        //            Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
731
+        //            if (ua != null)
732
+        //            {
733
+        //                Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
734
+        //                model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmssmsfff");//工单编号
735
+        //                model.CallID = callid;
736
+        //                model.Customer = tskh;
737
+        //                model.CustomerID = khid;
738
+        //                model.CustomerTel = tsdh;
739
+        //                model.Detail = cont;
740
+        //                model.Clcontent = clcont;
741
+        //                model.Type = type;
742
+        //                //model.TypeClass = tslx;
743
+
744
+        //                if (type == 1)
745
+        //                {
746
+        //                    model.State = 2;
747
+        //                }
748
+        //                else
749
+        //                    model.State = 0;
750
+        //                model.IsDel = 0;
751
+        //                model.IsReturn = 0;
752
+        //                model.IsReturnBak = 0;
753
+        //                //model.ResponDept = zrbm;
754
+        //                //model.Answer = answer;
755
+        //                model.IsTimeOut = 0;
756
+        //                model.IsUserSend = 0;
757
+        //                model.IsAdminSend = 0;
758
+        //                model.IsAudit = isaudit;//0未审核,1无效,2有效
759
+
760
+        //                if (source.Trim() == "1")
761
+        //                    model.Source = "手工制单";
762
+        //                else if (source.Trim() == "2")
763
+        //                    model.Source = "电话";
764
+        //                else if (source.Trim() == "3")
765
+        //                    model.Source = "微信";
766
+
767
+        //                #region 新增字段
768
+        //                model.InfoTypeID = infotypeid;
769
+        //                if (infotypeid != 0)
770
+        //                {
771
+        //                    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(infotypeid);
772
+        //                    if (dicVModel != null)
773
+        //                    {
774
+        //                        model.InfoType = dicVModel.F_Name;
775
+        //                    }
776
+        //                }
777
+        //                model.ISReward = 0;
778
+        //                //model.RewardAmount = reamount;
779
+        //                //model.RewardTime = retime;
780
+        //                model.UnitID = unitid;
781
+        //                if (unitid != 0)
782
+        //                {
783
+        //                    Model.T_Sys_DictionaryValue dicVModel = dictionaryValueBLL.GetModel(unitid);
784
+        //                    if (dicVModel != null)
785
+        //                    {
786
+        //                        model.Unit = dicVModel.F_Name;
787
+        //                    }
788
+        //                }
789
+        //                #endregion
790
+
791
+        //                #region 工单超时
792
+        //                Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
793
+        //                if (to != null)
794
+        //                {
795
+        //                    model.LimitTime = to.MainTime;
796
+        //                }
797
+        //                #endregion
798
+        //                model.CreateUser = ua.F_UserCode;
799
+        //                model.CreateTime = DateTime.Now;
800
+        //                #region 工单明细
801
+        //                if (clbm != 0 || clid != 0)
802
+        //                {
803
+        //                    Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
804
+        //                    item.WorkOrderID = model.WorkOrderID;
805
+        //                    item.ToDept = clbm;
806
+        //                    item.Type = 1;
807
+
808
+        //                    if (clid != 0)
809
+        //                    {
810
+        //                        Model.T_Sys_UserAccount clus = new BLL.T_Sys_UserAccount().GetModel(clid);
811
+        //                        if (clus != null)
812
+        //                        {
813
+        //                            item.ToUser = clus.F_UserCode;
814
+        //                        }
815
+        //                    }
816
+        //                    else
817
+        //                    {
818
+        //                        string users = string.Empty;
819
+        //                        var list = new BLL.T_Sys_UserAccount().GetModelList(" F_DeptId='" + clbm + "'");
820
+        //                        foreach (var l in list)
821
+        //                        {
822
+        //                            if (string.IsNullOrEmpty(users))
823
+        //                            {
824
+        //                                users = l.F_UserCode;
825
+        //                            }
826
+        //                            else
827
+        //                            {
828
+        //                                users = users + "," + l.F_UserCode;
829
+        //                            }
830
+        //                        }
831
+        //                        item.ToUser = users;
832
+        //                    }
833
+
834
+        //                    if (to != null)
835
+        //                    {
836
+        //                        item.LimitTime = to.ItemTime;
837
+        //                    }
838
+        //                    if (item.ToUser != "")
839
+        //                    {
840
+        //                        item.SureUser = ua.F_UserCode;
841
+        //                        item.State = 1;
842
+        //                        item.SureTime = DateTime.Now;
843
+        //                        item.IsStart = 1;
844
+        //                    }
845
+        //                    else
846
+        //                    {
847
+        //                        item.State = 0;
848
+        //                        item.IsStart = 0;
849
+        //                    }
850
+        //                    item.Detail = clcont;
851
+        //                    item.IsLast = 0;
852
+        //                    //item.State = 0;
853
+        //                    //item.IsStart = 0;
854
+        //                    item.IsTimeOut = 0;
855
+        //                    item.IsDel = 0;
856
+        //                    item.CreateUser = ua.F_UserCode;
857
+        //                    item.CreateTime = DateTime.Now;
858
+
859
+        //                    long itemid = new BLL.T_Wo_WorkOrderItem().Add(item);
860
+        //                    if (itemid > 0)
861
+        //                    {
862
+        //                        model.State = 1;//已指派
863
+        //                        model.AppointTime = DateTime.Now;
864
+
865
+        //                        #region 消息表
866
+        //                        //foreach (string ur in item.ToUser.Split(','))
867
+        //                        //{
868
+        //                        //    Model.T_Msg_List msg = new Model.T_Msg_List();
869
+        //                        //    msg.Type = 1;
870
+        //                        //    msg.ToUser = ur;
871
+        //                        //    msg.ToID = Int32.Parse(itemid.ToString());
872
+        //                        //    msg.Detail = ua.F_UserName + "给你指派了工单,单号:" + model.WorkOrderID;
873
+        //                        //    msg.State = 0;
874
+        //                        //    msg.IsDel = 0;
875
+        //                        //    msg.CreateUser = ua.F_UserCode;
876
+        //                        //    msg.CreateDate = DateTime.Now;
877
+
878
+        //                        //    new BLL.T_Msg_List().Add(msg);
879
+        //                        //}
880
+        //                        #endregion
881
+        //                    }
882
+        //                }
883
+        //                #endregion
884
+        //                #region 插入操作记录
885
+        //                Model.T_Wo_Operation oper = new Model.T_Wo_Operation();
886
+        //                oper.F_WorkOrderId = model.WorkOrderID;
887
+        //                oper.F_State = model.State;
888
+        //                oper.F_CallRecordId = model.CallID != "" ? int.Parse(model.CallID) : 0;
889
+        //                oper.F_File = model.Files;
890
+
891
+        //                string userinfo = ua.depname + "-" + ua.F_UserName + "(" + ua.F_UserCode + ")";
892
+        //                if (model.State == 0)
893
+        //                {
894
+        //                    oper.F_Message = userinfo + " 登记了工单,工单编号:" + model.WorkOrderID;
895
+        //                }
896
+        //                if (model.State == 1)
897
+        //                {
898
+        //                    oper.F_Message = userinfo + " 登记并提交了工单,工单编号:" + model.WorkOrderID;
899
+        //                }
900
+        //                if (model.State == 2)
901
+        //                {
902
+        //                    oper.F_Message = userinfo + " 登记并完结了工单,工单编号:" + model.WorkOrderID;
903
+        //                }
904
+
905
+        //                oper.F_CreateUser = ua.F_UserCode;
906
+        //                oper.F_CreateTime = DateTime.Now;
907
+        //                oper.F_IsDelete = 0;
908
+
909
+        //                new BLL.T_Wo_Operation().Add(oper);
910
+        //                #endregion
911
+        //                if (new BLL.T_Wo_WorkOrder().Add(model) > 0)
912
+        //                {
913
+        //                    if (!string.IsNullOrEmpty(callid))
914
+        //                    {
915
+        //                        var rec = new BLL.T_Call_CallRecords().GetModelByCallId(callid);
916
+        //                        if (rec != null)
917
+        //                        {
918
+        //                            rec.IsExitWorkOrder = true;
919
+        //                            new BLL.T_Call_CallRecords().Update(rec);
920
+        //                        }
921
+        //                    }
922
+        //                    res = Success("新增成功!");
923
+        //                }
924
+        //                else
925
+        //                {
926
+        //                    res = Error("新增失败!");
927
+        //                }
928
+
929
+        //                #region no use
930
+        //                //Model.T_Wo_WorkOrderBase model = new Model.T_Wo_WorkOrderBase();
931
+        //                //model.F_CODE = DateTime.Now.ToString("yyyyMMddHHmmssms");//工单编号
932
+        //                //model.F_WORKORDERTYPEID = type;
933
+        //                //model.F_WORKORDERSTATEID = 0;
934
+        //                //model.F_WORKORDERNAME = "";
935
+        //                //model.F_WORKORDERFROM = "";
936
+        //                //model.F_WORKORDERLEVELID = 0;
937
+        //                //model.F_ADSLACCOUNT = callid;
938
+        //                ////model.F_USERID = ua.F_UserId;
939
+        //                ////model.F_USERNAME = ua.F_UserName;
940
+        //                ////model.F_USERPHONE = ua.F_WorkNumber;
941
+        //                //model.F_TypeName = "";
942
+        //                //model.F_STARTTIME = DateTime.Now;
943
+        //                //model.F_RETURNVISITFLAG = 0;
944
+        //                //model.F_LINKMANTELEPHONE = tsdh;
945
+        //                //model.F_LINKMAN = tskh;
946
+        //                //model.F_DELETEFLAG = 0;
947
+        //                //model.F_CUSTOMERTELEPHONE = tsdh;
948
+        //                //model.F_CUSTOMERNAME = tskh;
949
+        //                //model.F_CUSTOMERID = 0;//待实现
950
+        //                //model.F_CREATEDATE = DateTime.Now;
951
+        //                //model.F_CREATEBY = ua.F_UserId;
952
+        //                //model.F_CONTENT = cont;
953
+        //                //model.F_REPAIRMANNAME = tskh;
954
+        //                //model.F_REPAIRMANPHONE = tsdh;
955
+
956
+        //                //if (new BLL.T_Wo_WorkOrderBase().Add(model) > 0)
957
+        //                //{
958
+        //                //    res = Success("新增成功!");
959
+        //                //}
960
+        //                //else
961
+        //                //{
962
+        //                //    res = Error("新增失败!");
963
+        //                //} 
964
+        //                #endregion
965
+        //            }
966
+        //        }
967
+
968
+        //    }
969
+        //    return res;
970
+        //}
971
+        #endregion
775 972
     }
776 973
 }

+ 5 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -228,19 +228,18 @@ namespace CallCenterApi.Interface.Controllers.weixin
228 228
         {
229 229
             DataTable dt = new DataTable();
230 230
 
231
-            string cusname = RequestString.GetFormString("cusname");
231
+            string cusname = HttpUtility.UrlDecode(RequestString.GetFormString("cusname"));
232 232
             string cusphone = RequestString.GetFormString("cusphone");//GetFormString
233
-            string country = RequestString.GetFormString("country");
234
-            string address = RequestString.GetFormString("address");
235
-            string content = RequestString.GetFormString("content");
233
+            string country = HttpUtility.UrlDecode(RequestString.GetFormString("country"));
234
+            string address = HttpUtility.UrlDecode(RequestString.GetFormString("address"));
235
+            string content = HttpUtility.UrlDecode(RequestString.GetFormString("content"));
236 236
             string files = RequestString.GetFormString("files");
237
-            int type = RequestString.GetInt("type", 3);//默认为3投诉建议
238 237
 
239 238
             string stropenid = HttpUtility.UrlDecode(RequestString.GetFormString("openid"));
240 239
             var wxuser = new BLL.T_Sys_Users().GetModelList(" F_OpenId='" + stropenid.Trim() + "'  and F_Type=1 ").FirstOrDefault();
241 240
 
242 241
             workorder.WorkOrderController wo = new workorder.WorkOrderController();
243
-            string workorderid = wo.AddWorkOrders(type, cusname, cusphone,country,address, content, files);
242
+            string workorderid = wo.AddWorkOrders(cusname, cusphone,country,address, content, files);
244 243
             if (string.IsNullOrEmpty(workorderid))
245 244
             {
246 245
                 return Error("新增失败");

+ 11 - 33
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -727,8 +727,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
727 727
         /// </summary>
728 728
         /// <returns></returns>
729 729
         public ActionResult AddWorkOrder(
730
-            int type,string callid,int khid,string source,string file
731
-            , string customer,string custel, string country, string address, string inqtime, string inquser
730
+            string callid,int khid,string source,string file
731
+            , string customer,string country, string address, string inqtime, string inquser
732 732
            , string detail, string cont, string answer, string remark , int infotypeid, int unitid,int clbm, int clid)
733 733
         {
734 734
             ActionResult res = NoToken("未知错误,请重新登录");
@@ -745,7 +745,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
745 745
                         model.WorkOrderID = DateTime.Now.ToString("yyyyMMddHHmmssmsfff");//工单编号
746 746
                         model.CallID = callid;
747 747
                         model.CustomerID = khid;
748
-                        model.Type = type;
748
+                        
749 749
                         #region 息县工单
750 750
                         if (!string.IsNullOrWhiteSpace(customer))
751 751
                             model.Customer = customer;
@@ -794,6 +794,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
794 794
                             model.Source = "电话";
795 795
 
796 796
                         #region 无需参数字段
797
+                        model.Type = 3;//默认为投诉工单
797 798
                         model.State = 0;
798 799
                         model.IsDel = 0;
799 800
                         model.IsReturn = 0;
@@ -805,14 +806,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
805 806
                         model.CreateUser = ua.F_UserCode;
806 807
                         model.CreateTime = DateTime.Now;
807 808
                         #endregion
808
-                        #region 工单超时
809
-                        Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
810
-                        if (to != null)
811
-                        {
812
-                            model.LimitTime = to.MainTime;
813
-                        }
814
-                        #endregion
815
-
809
+                        
816 810
                         #region 工单明细
817 811
                         if (clbm != 0 || clid != 0)
818 812
                         {
@@ -846,12 +840,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
846 840
                                 }
847 841
                                 item.ToUser = users;
848 842
                             }
849
-
850
-                            if (to != null)
851
-                            {
852
-                                item.LimitTime = to.ItemTime;
853
-                            }
854
-
843
+                            
855 844
                             if (item.ToUser != "")
856 845
                             {
857 846
                                 item.SureUser = ua.F_UserCode;
@@ -921,7 +910,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
921 910
         }
922 911
 
923 912
         //微信添加工单
924
-        public string AddWorkOrders(int type, string customer, string custel, string country, string address, string detail, string file)
913
+        public string AddWorkOrders( string customer, string custel, string country, string address, string detail, string file)
925 914
         {
926 915
             string workorderid = string.Empty;
927 916
             Model.T_Wo_WorkOrder model = new Model.T_Wo_WorkOrder();
@@ -932,8 +921,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
932 921
             model.Address = address;
933 922
             model.Detail = detail;
934 923
             model.Files = file;
935
-            model.Type = type;
924
+            
936 925
             #region 无需参数字段
926
+            model.Type = 3;//默认为投诉工单
937 927
             model.Source = "微信";
938 928
             model.State = 0;
939 929
             model.CallID = "";
@@ -947,23 +937,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
947 937
                               //model.CreateUser = ua.F_UserCode;
948 938
             model.CreateTime = DateTime.Now;
949 939
             #endregion
950
-
951
-            #region 工单超时
952
-            Model.T_Wo_WorkOrderTimeOut to = new BLL.T_Wo_WorkOrderTimeOut().GetModel(type);
953
-            if (to != null)
954
-            {
955
-                model.LimitTime = to.MainTime;
956
-            }
957
-            #endregion
958
-
940
+            
959 941
             #region 工单明细
960 942
             Model.T_Wo_WorkOrderItem item = new Model.T_Wo_WorkOrderItem();
961 943
             item.WorkOrderID = model.WorkOrderID;
962
-
963
-            if (to != null)
964
-            {
965
-                item.LimitTime = to.ItemTime;
966
-            }
944
+            
967 945
             item.Detail = model.Detail;
968 946
             item.IsLast = 0;
969 947
             item.State = 0;