Przeglądaj źródła

任务问卷增加固定项:姓名、住址、乡镇、固定电话等

zhengbingbing 7 lat temu
rodzic
commit
2dd304c5ef

+ 64 - 17
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/callout/CallOutPlanController.cs

@@ -10,6 +10,7 @@ using System.Data;
10 10
 using CallCenterApi.DB;
11 11
 using System.IO;
12 12
 using System.Data.SqlClient;
13
+using CallCenterApi.Interface.Models.Dto;
13 14
 
14 15
 namespace CallCenterApi.Interface.Controllers.callout
15 16
 {
@@ -680,12 +681,42 @@ namespace CallCenterApi.Interface.Controllers.callout
680 681
                 return Error("参数不正确");
681 682
             var model = otnBLL.GetModel(id);
682 683
             var paperid = 0;
684
+            var taskmodel = new CallPlanNewDto();
683 685
             if (model != null)
684 686
             {
687
+                
688
+                #region 绑定任务和客户信息
689
+                if (model.F_CusID != null)
690
+                {
691
+                    var cusmodel = cusBLL.GetModel(model.F_CusID.Value);
692
+                    if (cusmodel != null)
693
+                    {
694
+                        taskmodel.F_CusID = model.F_CusID.Value;//客户id                
695
+                        taskmodel.F_CityID = cusmodel.F_CityID.Value;//乡镇id                
696
+                        taskmodel.F_CusName = cusmodel.F_CustomerName;//客户姓名                
697
+                        taskmodel.F_Phone = cusmodel.F_Telephone;//号码                
698
+                        taskmodel.F_Telephone = cusmodel.F_Mobile;//手机号码        
699
+                        taskmodel.F_City = cusmodel.F_City;//乡镇   
700
+                    }
701
+                }
702
+                taskmodel.F_Id = model.F_Id;//号码id
703
+                taskmodel.F_TaskId = model.F_TaskId.Value;//任务id
704
+                taskmodel.F_HJJGId = model.F_HJJGId.Value;//呼叫结果id
705
+
706
+                if (!string.IsNullOrWhiteSpace(model.F_CusName))
707
+                    taskmodel.F_CusName = model.F_CusName;//客户姓名
708
+                if (!string.IsNullOrWhiteSpace(model.F_Phone))
709
+                    taskmodel.F_Phone = model.F_Phone;//号码
710
+                if (!string.IsNullOrWhiteSpace(model.ExpandVchField12))
711
+                    taskmodel.F_Address = model.ExpandVchField12;//住址
712
+                #endregion
685 713
                 var tmodel = otBLL.GetModel(model.F_TaskId.Value);
686 714
                 if (tmodel != null)
687 715
                 {
688 716
                     paperid = tmodel.F_PagerID.Value;
717
+
718
+                    taskmodel.F_TaskName = tmodel.F_TaskName;//任务名称                
719
+                    taskmodel.F_TaskRemark = tmodel.F_TaskRemark;//任务备注 
689 720
                 }
690 721
             }
691 722
 
@@ -694,7 +725,7 @@ namespace CallCenterApi.Interface.Controllers.callout
694 725
 
695 726
             var obj = new
696 727
             {
697
-                taskModel = model,
728
+                taskModel = taskmodel,
698 729
                 paperid = paperid
699 730
             };
700 731
             return Success("获取成功", obj);
@@ -839,12 +870,32 @@ namespace CallCenterApi.Interface.Controllers.callout
839 870
             var paperid = 0;
840 871
             if (model != null)
841 872
             {
842
-
843
-                //modelPhoneImport.F_CusName = dr[0].ToString();//客户名称
844
-                //modelPhoneImport.F_Phone = dr[1].ToString();//号码
845
-                //modelPhoneImport.ExpandVchField12 = dr[2].ToString();//地址
846
-
847
-                var cusmodel = cusBLL.GetModel(model.F_CusID.Value);
873
+                var taskmodel = new CallPlanNewDto();
874
+                #region 绑定任务和客户信息
875
+                if (model.F_CusID != null)
876
+                {
877
+                    var cusmodel = cusBLL.GetModel(model.F_CusID.Value);
878
+                    if (cusmodel != null)
879
+                    {
880
+                        taskmodel.F_CusID = model.F_CusID.Value;//客户id                
881
+                        taskmodel.F_CityID = cusmodel.F_CityID.Value;//乡镇id                
882
+                        taskmodel.F_CusName = cusmodel.F_CustomerName;//客户姓名                
883
+                        taskmodel.F_Phone = cusmodel.F_Telephone;//号码                
884
+                        taskmodel.F_Telephone = cusmodel.F_Mobile;//手机号码        
885
+                        taskmodel.F_City = cusmodel.F_City;//乡镇   
886
+                    }
887
+                }
888
+                taskmodel.F_Id = model.F_Id;//号码id
889
+                taskmodel.F_TaskId = model.F_TaskId.Value;//任务id
890
+                taskmodel.F_HJJGId = model.F_HJJGId.Value;//呼叫结果id
891
+
892
+                if (!string.IsNullOrWhiteSpace(model.F_CusName))
893
+                    taskmodel.F_CusName = model.F_CusName;//客户姓名
894
+                if (!string.IsNullOrWhiteSpace(model.F_Phone))
895
+                    taskmodel.F_Phone = model.F_Phone;//号码
896
+                if (!string.IsNullOrWhiteSpace(model.ExpandVchField12))
897
+                    taskmodel.F_Address = model.ExpandVchField12;//住址
898
+                #endregion
848 899
 
849 900
                 var anslist = ansBLL.GetModelList(" F_TaskID=" + model.F_TaskId.Value + " and F_CusTelID=" + id + " ");
850 901
                 var tmodel = otBLL.GetModel(model.F_TaskId.Value);
@@ -898,18 +949,14 @@ namespace CallCenterApi.Interface.Controllers.callout
898 949
                         })
899 950
                     };
900 951
                     #endregion
952
+
953
+                    
954
+                    taskmodel.F_TaskName = tmodel.F_TaskName;//任务名称                
955
+                    taskmodel.F_TaskRemark = tmodel.F_TaskRemark;//任务备注                
956
+                    
901 957
                     var objy = new
902 958
                     {
903
-                        cusModel = new
904
-                        {
905
-                            cusname = cusmodel.F_CustomerName,
906
-                            telphone = cusmodel.F_Mobile,
907
-                            phone = cusmodel.F_Telephone,
908
-                            country = cusmodel.F_City,
909
-                            countryid = cusmodel.F_CityID,
910
-                            address = cusmodel.F_Address
911
-                        },
912
-                        taskModel = model,
959
+                        taskModel = taskmodel,
913 960
                         paperModel = newmodel
914 961
                     };
915 962
                     return Success("获取详情成功", objy);

+ 43 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Models/Dto/CallPlan.cs

@@ -34,4 +34,47 @@ namespace CallCenterApi.Interface.Models.Dto
34 34
         public int connectedagentcount { get; set; }
35 35
         public string connectedagentrate { get; set; }
36 36
     }
37
+
38
+    public class CallPlanNewDto
39
+    {
40
+        //F_CusName
41
+        //F_Phone
42
+        //F_CusID
43
+        //F_Id
44
+        //F_TaskId
45
+        //F_HJJGId
46
+        //F_TaskName
47
+        //F_TaskRemark
48
+        //    cusname = cusmodel.F_CustomerName,
49
+        //    telphone = cusmodel.F_Mobile,
50
+        //    phone = cusmodel.F_Telephone,
51
+        //    country = cusmodel.F_City,
52
+        //    countryid = cusmodel.F_CityID,
53
+        //    address = cusmodel.F_Address
54
+
55
+        //号码id
56
+        public int F_Id { get; set; }
57
+        //任务id
58
+        public int F_TaskId { get; set; }
59
+        //呼叫结果id
60
+        public int F_HJJGId { get; set; }
61
+        //客户id
62
+        public int F_CusID { get; set; }
63
+        //乡镇id
64
+        public int F_CityID { get; set; }
65
+        //客户姓名
66
+        public string F_CusName { get; set; }
67
+        //固定电话
68
+        public string F_Phone { get; set; }
69
+        //手机号码
70
+        public string F_Telephone { get; set; }
71
+        //任务名称
72
+        public string F_TaskName { get; set; }
73
+        //任务备注
74
+        public string F_TaskRemark { get; set; }
75
+        //乡镇
76
+        public string F_City { get; set; }
77
+        //住址
78
+        public string F_Address { get; set; }
79
+    }
37 80
 }