zhoufan лет назад: 7
Родитель
Сommit
a33d7d9059

+ 15 - 24
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/customer/CustomerController.cs

@@ -36,7 +36,7 @@ namespace CallCenterApi.Interface.Controllers.customer
36 36
                 DataTable dt = new DataTable();
37 37
 
38 38
                 //分组代码
39
-                string strcode = RequestString.GetQueryString("code");
39
+                string code = RequestString.GetFormString("code");
40 40
                 //类型
41 41
                 int type = RequestString.GetInt("type", 0);
42 42
                 //联系人
@@ -58,17 +58,11 @@ namespace CallCenterApi.Interface.Controllers.customer
58 58
                 string strpagesize = RequestString.GetQueryString("pagesize");
59 59
                 int pagesize = 10;
60 60
 
61
-                if (userModel.rolecode != "XTGLY")
61
+                if (string.IsNullOrEmpty(code) && !string.IsNullOrEmpty(userModel.groupcode))
62 62
                 {
63 63
                     sql += " and F_GroupCode = '" + userModel.groupcode + "' ";
64 64
                 }
65
-                else
66
-                {
67
-                    if (strcode.Trim() != "" && strcode != "undefined")
68
-                    {
69
-                        sql += " and F_GroupCode = '" + strcode + "' ";
70
-                    }
71
-                }
65
+
72 66
                 if (type!=0)
73 67
                 {
74 68
                     sql += " and F_Type = '" + type + "' ";
@@ -150,7 +144,7 @@ namespace CallCenterApi.Interface.Controllers.customer
150 144
                 Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
151 145
 
152 146
                 //分组代码
153
-                string strcode = RequestString.GetQueryString("code");
147
+                string code = RequestString.GetFormString("code");
154 148
                 //类型
155 149
                 int type = RequestString.GetInt("type", 0);
156 150
                 //关键词
@@ -162,14 +156,11 @@ namespace CallCenterApi.Interface.Controllers.customer
162 156
                 //城市
163 157
                 string strcity = RequestString.GetQueryString("city");
164 158
 
165
-                if (userModel.rolecode != "XTGLY")
166
-                {
167
-                    strcode= userModel.groupcode ;
168
-                }
159
+
169 160
                 string sql = " F_IsDelete=0";
170
-                if (strcode.Trim() != "" && strcode != "undefined")
161
+                if (string.IsNullOrEmpty(code) && !string.IsNullOrEmpty(userModel.groupcode))
171 162
                 {
172
-                    sql += " and F_GroupCode = '" + strcode + "' ";
163
+                    sql += " and F_GroupCode = '" + userModel.groupcode + "' ";
173 164
                 }
174 165
                 if (type != 0)
175 166
                 {
@@ -274,7 +265,7 @@ namespace CallCenterApi.Interface.Controllers.customer
274 265
                 //id
275 266
                 int id = RequestString.GetInt("id", 0);
276 267
                 //分组代码
277
-                string strcode = RequestString.GetFormString("code");
268
+                string code = RequestString.GetFormString("code");
278 269
                 //类型
279 270
                 int type = RequestString.GetInt("type", 0);
280 271
                 //联系人
@@ -288,17 +279,14 @@ namespace CallCenterApi.Interface.Controllers.customer
288 279
                 //城市
289 280
                 string strcity = RequestString.GetFormString("city");
290 281
 
291
-                if (userModel.rolecode != "XTGLY")
292
-                {
293
-                    strcode = userModel.groupcode;
294
-                }
295 282
 
296 283
                 Model.T_Cus_Customer model = new Model.T_Cus_Customer();
297 284
                 BLL.T_Cus_Customer bll = new BLL.T_Cus_Customer();
298 285
 
299 286
                 if (id == 0)
300 287
                 {
301
-                    model.F_GroupCode = strcode;
288
+                    model.F_GroupCode = string.IsNullOrEmpty(code) ? userModel.groupcode : code;
289
+
302 290
                     model.F_Type = type;
303 291
                     model.F_Name = strname;
304 292
                     model.F_Phone = strtel;
@@ -324,7 +312,10 @@ namespace CallCenterApi.Interface.Controllers.customer
324 312
                     model = bll.GetModel(id);
325 313
                     if (model != null)
326 314
                     {
327
-                        model.F_GroupCode = strcode;
315
+                        if (!string.IsNullOrEmpty(code))
316
+                        {
317
+                            model.F_GroupCode = code;
318
+                        }
328 319
                         model.F_Type = type;
329 320
                         model.F_Name = strname;
330 321
                         model.F_Phone = strtel;
@@ -419,7 +410,7 @@ namespace CallCenterApi.Interface.Controllers.customer
419 410
                 //类型
420 411
                 int type = RequestString.GetInt("type", 0);
421 412
 
422
-                if (userModel.rolecode != "XTGLY")
413
+                if (string.IsNullOrEmpty(code))
423 414
                 {
424 415
                     code = userModel.groupcode;
425 416
                 }

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/report/BusinessController.cs

@@ -79,7 +79,7 @@ namespace CallCenterApi.Interface.Controllers.report
79 79
             }
80 80
             string where = " F_IsDelete=0 and datediff(day,F_CreateTime,'" + stime + "')>=0 "
81 81
                 + " and datediff(day,F_CreateTime,'" + etime + "')<=0 and F_Type=F_DictionaryValueId ";
82
-            if (userModel.rolecode != "XTGLY")
82
+            if (!string.IsNullOrEmpty(userModel.groupcode))
83 83
             {
84 84
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
85 85
             }
@@ -112,7 +112,7 @@ namespace CallCenterApi.Interface.Controllers.report
112 112
             string strcity = RequestString.GetQueryString("city");
113 113
 
114 114
             string where = " F_IsDelete=0 and datediff(month,F_CreateTime,getdate())<=12 ";
115
-            if (userModel.rolecode != "XTGLY")
115
+            if (!string.IsNullOrEmpty(userModel.groupcode))
116 116
             {
117 117
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
118 118
             }

+ 5 - 6
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -363,7 +363,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
363 363
             string cusphone = RequestString.GetFormString("cusphone");
364 364
             //分组代码
365 365
             string code = RequestString.GetQueryString("code");
366
-            if (userModel.rolecode != "XTGLY")
366
+            if (!string.IsNullOrEmpty(userModel.groupcode))
367 367
             {
368 368
                 code = userModel.groupcode;
369 369
             }
@@ -512,10 +512,6 @@ namespace CallCenterApi.Interface.Controllers.workorder
512 512
             string cusphone = RequestString.GetFormString("cusphone");
513 513
             //分组代码
514 514
             string code = RequestString.GetQueryString("code");
515
-            if (userModel.rolecode != "XTGLY")
516
-            {
517
-                code = userModel.groupcode;
518
-            }
519 515
             //事件描述
520 516
             string content = RequestString.GetQueryString("content");
521 517
             //产品名称
@@ -575,7 +571,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
575 571
                     modelT_Bus_WorkOrder.F_CusName = cusname;//投诉人姓名
576 572
                     modelT_Bus_WorkOrder.F_CusSex = cussex;//性别
577 573
                     modelT_Bus_WorkOrder.F_CusPhone = cusphone;//来电号码
578
-                    modelT_Bus_WorkOrder.F_GroupCode = code;//分组代码
574
+                    if (!string.IsNullOrEmpty(code))
575
+                    {
576
+                        modelT_Bus_WorkOrder.F_GroupCode = code;//分组代码
577
+                    }
579 578
                     modelT_Bus_WorkOrder.F_Content = content;//事件描述
580 579
                     modelT_Bus_WorkOrder.F_ProductName = productname;//产品名称
581 580
                     modelT_Bus_WorkOrder.F_BuyDate = buydate;//购买日期