|
|
@@ -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
|
}
|