zhoufan 7 lat temu
rodzic
commit
a33d7d9059

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

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

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

79
             }
79
             }
80
             string where = " F_IsDelete=0 and datediff(day,F_CreateTime,'" + stime + "')>=0 "
80
             string where = " F_IsDelete=0 and datediff(day,F_CreateTime,'" + stime + "')>=0 "
81
                 + " and datediff(day,F_CreateTime,'" + etime + "')<=0 and F_Type=F_DictionaryValueId ";
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
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
84
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
85
             }
85
             }
112
             string strcity = RequestString.GetQueryString("city");
112
             string strcity = RequestString.GetQueryString("city");
113
 
113
 
114
             string where = " F_IsDelete=0 and datediff(month,F_CreateTime,getdate())<=12 ";
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
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
117
                 where += " and F_GroupCode = '" + userModel.groupcode + "' ";
118
             }
118
             }

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

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