zhoufan 7 vuotta sitten
vanhempi
commit
f59625e2a8

File diff suppressed because it is too large
+ 60 - 51
codegit/CallCenterApi/CallCenterApi.DAL/T_Bus_WorkOrder.cs


+ 105 - 105
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallleaveController.cs

@@ -15,80 +15,80 @@ namespace CallCenterApi.Interface.Controllers.tel
15 15
         //获取留言列表
16 16
         public ActionResult GetList(string strtelnum)
17 17
         {
18
-            
18
+
19 19
             if (Request.IsAuthenticated)
20 20
             {
21 21
                 string sql = "";
22 22
                 DataTable dt = new DataTable();
23
-               
24 23
 
25
-                    string strsettime = HttpUtility.UrlDecode(RequestString.GetQueryString("settime"));
26
-                    string strremovetime = HttpUtility.UrlDecode(RequestString.GetQueryString("removetime"));
27
-                    string status = HttpUtility.UrlDecode(RequestString.GetQueryString("status"));
28 24
 
29
-                    string strpageindex = RequestString.GetQueryString("page");
30
-                    int pageindex = 1;
31
-                    string strpagesize = RequestString.GetQueryString("pagesize");
32
-                    int pagesize = 10;
25
+                string strsettime = HttpUtility.UrlDecode(RequestString.GetQueryString("settime"));
26
+                string strremovetime = HttpUtility.UrlDecode(RequestString.GetQueryString("removetime"));
27
+                string status = HttpUtility.UrlDecode(RequestString.GetQueryString("status"));
33 28
 
34
-                    if (strtelnum != null && strtelnum.Trim() != "")
35
-                    {
36
-                        sql += " and F_Phone= '" + strtelnum.Trim() + "' ";
37
-                    }
38
-                    if (strsettime.Trim() != "" && strsettime != "undefined")
39
-                    {
40
-                        sql += " and CONVERT(varchar(10),F_LeaveTime, 23) = '" + strsettime.Trim() + "' ";
41
-                    }
42
-                    if (strremovetime.Trim() != "" && strremovetime != "undefined")
43
-                    {
44
-                        sql += " and CONVERT(varchar(10),F_DealTime, 23) = '" + strremovetime.Trim() + "' ";
45
-                    }
46
-                    if (status.Trim() != "-1" && status != "undefined")
47
-                    {
48
-                        sql += " and F_Status = " + Convert.ToInt32(status);
49
-                    }
29
+                string strpageindex = RequestString.GetQueryString("page");
30
+                int pageindex = 1;
31
+                string strpagesize = RequestString.GetQueryString("pagesize");
32
+                int pagesize = 10;
50 33
 
51
-                    if (strpageindex.Trim() != "")
52
-                    {
53
-                        pageindex = Convert.ToInt32(strpageindex);
54
-                    }
34
+                if (strtelnum != null && strtelnum.Trim() != "")
35
+                {
36
+                    sql += " and F_Phone= '" + strtelnum.Trim() + "' ";
37
+                }
38
+                if (strsettime.Trim() != "" && strsettime != "undefined")
39
+                {
40
+                    sql += " and CONVERT(varchar(10),F_LeaveTime, 23) = '" + strsettime.Trim() + "' ";
41
+                }
42
+                if (strremovetime.Trim() != "" && strremovetime != "undefined")
43
+                {
44
+                    sql += " and CONVERT(varchar(10),F_DealTime, 23) = '" + strremovetime.Trim() + "' ";
45
+                }
46
+                if (status.Trim() != "-1" && status != "undefined")
47
+                {
48
+                    sql += " and F_Status = " + Convert.ToInt32(status);
49
+                }
55 50
 
56
-                    if (strpagesize.Trim() != "")
57
-                    {
58
-                        pagesize = Convert.ToInt32(strpagesize);
59
-                    }
60
-                    int recordCount = 0;
61
-                    dt = BLL.PagerBLL.GetListPager(
62
-                        "T_Call_LeaveRecord",
63
-                        "F_Id",
64
-                        "*",
65
-                        sql,
66
-                        "ORDER BY F_Id desc",
67
-                        pagesize,
68
-                        pageindex,
69
-                        true,
70
-                        out recordCount);
71
-
72
-                    var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayLeaveVoice' ").FirstOrDefault();
73
-                    foreach (DataRow dr in dt.Rows)
51
+                if (strpageindex.Trim() != "")
52
+                {
53
+                    pageindex = Convert.ToInt32(strpageindex);
54
+                }
55
+
56
+                if (strpagesize.Trim() != "")
57
+                {
58
+                    pagesize = Convert.ToInt32(strpagesize);
59
+                }
60
+                int recordCount = 0;
61
+                dt = BLL.PagerBLL.GetListPager(
62
+                    "T_Call_LeaveRecord",
63
+                    "F_Id",
64
+                    "*",
65
+                    sql,
66
+                    "ORDER BY F_Id desc",
67
+                    pagesize,
68
+                    pageindex,
69
+                    true,
70
+                    out recordCount);
71
+
72
+                var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayLeaveVoice' ").FirstOrDefault();
73
+                foreach (DataRow dr in dt.Rows)
74
+                {
75
+                    string path = dr["F_RecFileUrl"] != null ? dr["F_RecFileUrl"].ToString() : "";
76
+                    if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
74 77
                     {
75
-                        string path = dr["F_RecFileUrl"] != null ? dr["F_RecFileUrl"].ToString() : "";
76
-                        if (path != "" && config != null && !string.IsNullOrEmpty(config.F_ParamValue))
77
-                        {
78
-                            dr["F_RecFileUrl"] = config.F_ParamValue + path;
79
-                        }
78
+                        dr["F_RecFileUrl"] = config.F_ParamValue + path;
80 79
                     }
80
+                }
81
+
82
+                var obj = new
83
+                {
84
+                    state = "success",
85
+                    message = "成功",
86
+                    rows = dt,
87
+                    total = recordCount
88
+                };
89
+
90
+                return Content(obj.ToJson());
81 91
 
82
-                    var obj = new
83
-                    {
84
-                        state = "success",
85
-                        message = "成功",
86
-                        rows = dt,
87
-                        total = recordCount
88
-                    };
89
-
90
-                    return Content(obj.ToJson());
91
-              
92 92
             }
93 93
             return NoToken("未知错误,请重新登录");
94 94
         }
@@ -96,29 +96,29 @@ namespace CallCenterApi.Interface.Controllers.tel
96 96
         //删除留言记录
97 97
         public ActionResult DelLeaveRecord(string[] ids)
98 98
         {
99
-            
99
+
100 100
             if (Request.IsAuthenticated)
101 101
             {
102
-              
103
-                    if (ids != null && ids.Length > 0)
102
+
103
+                if (ids != null && ids.Length > 0)
104
+                {
105
+                    string idd = " ";
106
+                    foreach (string str in ids)
104 107
                     {
105
-                        string idd = " ";
106
-                        foreach (string str in ids)
107
-                        {
108
-                            idd += str + ",";
109
-                        }
110
-                        if (new BLL.T_Call_LeaveRecord().DeleteList(idd.TrimEnd(',')))
111
-                        {
112
-                            return Success("删除成功");
113
-                        }
114
-                        else
115
-                            return Error("删除失败");
108
+                        idd += str + ",";
116 109
                     }
117
-                    else
110
+                    if (new BLL.T_Call_LeaveRecord().DeleteList(idd.TrimEnd(',')))
118 111
                     {
119
-                        return Error("请选择要删除的记录");
112
+                        return Success("删除成功");
120 113
                     }
121
-              
114
+                    else
115
+                        return Error("删除失败");
116
+                }
117
+                else
118
+                {
119
+                    return Error("请选择要删除的记录");
120
+                }
121
+
122 122
             }
123 123
             return NoToken("未知错误,请重新登录");
124 124
         }
@@ -126,42 +126,42 @@ namespace CallCenterApi.Interface.Controllers.tel
126 126
         //更新留言处理状态
127 127
         public ActionResult OptLeaveRecord(string[] ids)
128 128
         {
129
-            
129
+
130 130
             if (Request.IsAuthenticated)
131 131
             {
132
-            
133
-                    int userId = CurrentUser.UserData.F_UserId;
134
-                    if (userId != 0)
132
+
133
+                int userId = CurrentUser.UserData.F_UserId;
134
+                if (userId != 0)
135
+                {
136
+                    Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
137
+                    if (ua != null)
135 138
                     {
136
-                        Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
137
-                        if (ua != null)
139
+                        if (ids.Length > 0)
138 140
                         {
139
-                            if (ids.Length>0)
141
+                            foreach (string arrid in ids)
140 142
                             {
141
-                                foreach (string arrid in ids)
143
+                                Model.T_Call_LeaveRecord model = new BLL.T_Call_LeaveRecord().GetModel(Convert.ToInt32(arrid));
144
+                                if (model != null)
142 145
                                 {
143
-                                    Model.T_Call_LeaveRecord model = new BLL.T_Call_LeaveRecord().GetModel(Convert.ToInt32(arrid));
144
-                                    if (model != null)
145
-                                    {
146
-                                        model.F_Status = 1;
147
-                                        model.F_DealTime = DateTime.Now;
148
-                                        model.F_DealContent = "1";
149
-                                        model.F_UserName = ua.F_UserName;
150
-                                        model.F_UserCode = ua.F_UserCode;
151
-                                        model.F_UserId = ua.F_UserId;
152
-
153
-                                        new BLL.T_Call_LeaveRecord().Update(model);
154
-                                    }
146
+                                    model.F_Status = 1;
147
+                                    model.F_DealTime = DateTime.Now;
148
+                                    model.F_DealContent = "1";
149
+                                    model.F_UserName = ua.F_UserName;
150
+                                    model.F_UserCode = ua.F_UserCode;
151
+                                    model.F_UserId = ua.F_UserId;
152
+
153
+                                    new BLL.T_Call_LeaveRecord().Update(model);
155 154
                                 }
156
-                                return Success("处理成功");
157
-                            }
158
-                            else
159
-                            {
160
-                                return Error("请选择要处理的留言");
161 155
                             }
156
+                            return Success("处理成功");
157
+                        }
158
+                        else
159
+                        {
160
+                            return Error("请选择要处理的留言");
162 161
                         }
163 162
                     }
164
-          
163
+                }
164
+
165 165
             }
166 166
             return NoToken("未知错误,请重新登录");
167 167
         }

+ 8 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -427,6 +427,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
427 427
             string province = RequestString.GetFormString("province");
428 428
             //城市
429 429
             string city = RequestString.GetFormString("city");
430
+            //县区
431
+            string county = RequestString.GetFormString("county");
430 432
             //附件
431 433
             string files = RequestString.GetFormString("files");
432 434
             //类型
@@ -486,6 +488,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
486 488
                 modelT_Bus_WorkOrder.F_Area = area;//大区
487 489
                 modelT_Bus_WorkOrder.F_Province = province;//省份
488 490
                 modelT_Bus_WorkOrder.F_City = city;//城市
491
+                modelT_Bus_WorkOrder.F_County = county; //县区
489 492
 
490 493
                 modelT_Bus_WorkOrder.F_IsBack = isback;//是否寄回
491 494
                 modelT_Bus_WorkOrder.F_VIPId = vipid;//专员id
@@ -587,6 +590,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
587 590
             string province = RequestString.GetFormString("province");
588 591
             //城市
589 592
             string city = RequestString.GetFormString("city");
593
+            //县区
594
+            string county = RequestString.GetFormString("county");
590 595
             //附件
591 596
             string files = RequestString.GetFormString("files");
592 597
             //类型
@@ -649,6 +654,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
649 654
                     modelT_Bus_WorkOrder.F_Area = area;//大区
650 655
                     modelT_Bus_WorkOrder.F_Province = province;//省份
651 656
                     modelT_Bus_WorkOrder.F_City = city;//城市
657
+                    modelT_Bus_WorkOrder.F_County = county; //县区
652 658
 
653 659
                     modelT_Bus_WorkOrder.F_IsBack = isback;//是否寄回
654 660
                     modelT_Bus_WorkOrder.F_VIPId = vipid;//专员id
@@ -660,8 +666,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
660 666
                             modelT_Bus_WorkOrder.F_VIPName = ml.F_Name;
661 667
                     }
662 668
 
663
-                    modelT_Bus_WorkOrder.F_CreateUser = userModel.F_UserCode;//登记人工号
664
-                    modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
669
+                    //modelT_Bus_WorkOrder.F_CreateUser = userModel.F_UserCode;//登记人工号
670
+                    //modelT_Bus_WorkOrder.F_CreateTime = DateTime.Now;//登记时间
665 671
                     modelT_Bus_WorkOrder.F_State = 0;//工单状态0登记中
666 672
                     modelT_Bus_WorkOrder.F_IsDelete = 0;//是否删除(0:否,1:是)
667 673
 

+ 9 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Bus_WorkOrder.cs

@@ -31,6 +31,7 @@ namespace CallCenterApi.Model
31 31
         private string _f_area;
32 32
         private string _f_province;
33 33
         private string _f_city;
34
+        private string _f_county;
34 35
         private int? _f_vipid;
35 36
         private string _f_vipname;
36 37
         private string _f_vipphone;
@@ -224,6 +225,14 @@ namespace CallCenterApi.Model
224 225
             get { return _f_city; }
225 226
         }
226 227
         /// <summary>
228
+        /// 县区
229
+        /// </summary>
230
+        public string F_County
231
+        {
232
+            set { _f_county = value; }
233
+            get { return _f_county; }
234
+        }
235
+        /// <summary>
227 236
         /// 专员id
228 237
         /// </summary>
229 238
         public int? F_VIPId