Просмотр исходного кода

ios版本更新,工单导出,用户权限

duhongyu лет назад: 6
Родитель
Сommit
175f752320

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.DAL/T_Sys_ApplicationsVersion.cs

@@ -32,7 +32,7 @@ namespace CallCenterApi.DAL
32 32
                     new SqlParameter("@F_VersionName", SqlDbType.NVarChar,50),
33 33
                     new SqlParameter("@F_VersionCode", SqlDbType.NVarChar,50),
34 34
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,50),
35
-                    new SqlParameter("@F_Url", SqlDbType.NVarChar,50),
35
+                    new SqlParameter("@F_Url", SqlDbType.NVarChar,500),
36 36
                     new SqlParameter("@F_CreateUser", SqlDbType.NVarChar,50),
37 37
                     new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
38 38
                     new SqlParameter("@F_UpdateUser", SqlDbType.NVarChar,50),
@@ -91,7 +91,7 @@ namespace CallCenterApi.DAL
91 91
                     new SqlParameter("@F_VersionName", SqlDbType.NVarChar,50),
92 92
                     new SqlParameter("@F_VersionCode", SqlDbType.NVarChar,50),
93 93
                     new SqlParameter("@F_Files", SqlDbType.NVarChar,50),
94
-                    new SqlParameter("@F_Url", SqlDbType.NVarChar,50),
94
+                    new SqlParameter("@F_Url", SqlDbType.NVarChar,500),
95 95
                     new SqlParameter("@F_CreateUser", SqlDbType.NVarChar,50),
96 96
                     new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
97 97
                     new SqlParameter("@F_UpdateUser", SqlDbType.NVarChar,50),

+ 20 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/ApplicationsVersionController.cs

@@ -100,6 +100,26 @@ namespace CallCenterApi.Interface.Controllers
100 100
             }
101 101
             return NoToken("未知错误,请重新登录");
102 102
         }
103
+        public ActionResult GetIos()
104
+        {
105
+            var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();
106
+            var model = new BLL.T_Sys_ApplicationsVersion().GetModelList("F_IsDelete=0 and F_Type=1 order by F_ID DESC ").FirstOrDefault();
107
+            if (model != null)
108
+            {
109
+                ApplicationsVersion app = new ApplicationsVersion();
110
+                app.F_ID = model.F_ID;
111
+                app.F_Type = (int)model.F_Type;
112
+                app.F_VersionName = model.F_VersionName;
113
+                app.F_VersionCode = model.F_VersionCode;
114
+                app.F_Files = model.F_Files;
115
+                app.F_Url = model.F_Url;
116
+                app.F_Sort = (int)model.F_Sort;
117
+                app.F_Remarks = model.F_Remarks;
118
+                app.FileUrl = GetFileData(model.F_Files, configfj.F_ParamValue);
119
+                return Success("成功", app);
120
+            }
121
+            return Error("获取失败");
122
+        }
103 123
         public ActionResult GetAndroid()
104 124
         {
105 125
             var configfj = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='FileUrlPath' ").FirstOrDefault();

+ 33 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -150,8 +150,7 @@ namespace CallCenterApi.Interface.Controllers
150 150
 
151 151
                 if (userModel != null)
152 152
                 {
153
-                    if (userModel.F_RoleId == 51 || userModel.F_RoleId == 52)
154
-                        filter.dptid = userModel.F_DeptId;
153
+                    filter.dptid = userModel.F_DeptId;
155 154
                 }
156 155
                 if (filter.dptid > 0)
157 156
                 {
@@ -257,8 +256,17 @@ namespace CallCenterApi.Interface.Controllers
257 256
                 //}
258 257
                 if (userModel != null)
259 258
                 {
260
-                    if (userModel.F_RoleId == 51|| userModel.F_RoleId == 52)
261
-                        filter.dptid= userModel.F_DeptId;
259
+                    Model.T_Sys_Department deptModel = new BLL.T_Sys_Department().GetModel(filter.dptid);
260
+                    if (deptModel != null)
261
+                    {
262
+                        if (userModel.F_RoleId != 1 || userModel.F_RoleId != 4 || userModel.F_RoleId != 17
263
+                        || userModel.F_RoleId != 50 || userModel.F_RoleId != 67)
264
+                            sql += " and F_DeptId in ( select F_DeptId from T_Sys_Department where F_DeptCode like '%" + deptModel.F_DeptCode + "%') ";
265
+                    }
266
+                    else
267
+                    {
268
+                        filter.dptid = userModel.F_DeptId;
269
+                    }
262 270
                 }
263 271
                 if (filter.dptid > 0)
264 272
                 {
@@ -428,11 +436,20 @@ namespace CallCenterApi.Interface.Controllers
428 436
         {
429 437
             if (Request.IsAuthenticated)
430 438
             {
439
+                int userId = CurrentUser.UserData.F_UserId;
440
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
441
+                if (userModel.F_RoleId ==53)
442
+                {
443
+                    return Error("无操作权限");
444
+                }
431 445
 
432 446
                 Model.T_Sys_UserAccount userAccountModel = new Model.T_Sys_UserAccount();
433 447
                 //员工工号不能重复
434
-                
435
-               
448
+                var user = new BLL.T_Sys_UserAccount().GetModelList("F_UserName='" + input.Username + "' and F_Mobile='" + input.Mobile + "'");
449
+                if (user.Count >0)
450
+                {
451
+                    return Error("已存在该账号!");
452
+                }
436 453
                 if (!string.IsNullOrEmpty(input.Usercode))
437 454
                 {
438 455
                     string ucode = input.Usercode.Trim();
@@ -465,7 +482,7 @@ namespace CallCenterApi.Interface.Controllers
465 482
                 if (input.RoleId != 0)
466 483
                 {
467 484
                     userAccountModel.F_RoleId = input.RoleId;
468
-                    if (input.RoleId==17|| input.RoleId == 50|| input.RoleId == 49 || input.RoleId == 65)
485
+                    if (input.RoleId==17|| input.RoleId == 50|| input.RoleId == 49 || input.RoleId == 65 || input.RoleId == 66 || input.RoleId == 67)
469 486
                     {
470 487
                         userAccountModel.F_See = "0";
471 488
                     }
@@ -481,10 +498,7 @@ namespace CallCenterApi.Interface.Controllers
481 498
                     {
482 499
                         userAccountModel.F_See = "3";
483 500
                     }
484
-                    else if (input.RoleId==66)
485
-                    {
486
-                        userAccountModel.F_See = "4";
487
-                    }
501
+                   
488 502
                 }
489 503
                     
490 504
                
@@ -558,6 +572,12 @@ namespace CallCenterApi.Interface.Controllers
558 572
         {
559 573
             if (Request.IsAuthenticated)
560 574
             {
575
+                int userId = CurrentUser.UserData.F_UserId;
576
+                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
577
+                if (userModel.F_RoleId == 53)
578
+                {
579
+                    return Error("无操作权限");
580
+                }
561 581
                 BLL.T_Sys_UserAccount sysUserAccountBll = new BLL.T_Sys_UserAccount();
562 582
                 Model.T_Sys_UserAccount userAccountModel = sysUserAccountBll.GetModelList("  F_UserId = " + input.UserId).FirstOrDefault();
563 583
                 if (userAccountModel == null)
@@ -590,7 +610,7 @@ namespace CallCenterApi.Interface.Controllers
590 610
                 if (input.RoleId != 0)
591 611
                 {
592 612
                     userAccountModel.F_RoleId = input.RoleId;
593
-                    if (input.RoleId == 17 || input.RoleId == 50 || input.RoleId == 49 || input.RoleId == 65)
613
+                    if (input.RoleId == 17 || input.RoleId == 50 || input.RoleId == 49 || input.RoleId == 65|| input.RoleId == 66 || input.RoleId == 67)
594 614
                     {
595 615
                         userAccountModel.F_See = "0";
596 616
                     }
@@ -606,10 +626,7 @@ namespace CallCenterApi.Interface.Controllers
606 626
                     {
607 627
                         userAccountModel.F_See = "3";
608 628
                     }
609
-                    else if (input.RoleId == 66)
610
-                    {
611
-                        userAccountModel.F_See = "4";
612
-                    }
629
+                  
613 630
                 }
614 631
                    if (input.Pid!=0)
615 632
                     userAccountModel.F_PId  = input.Pid;

+ 21 - 3
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -311,7 +311,24 @@ namespace CallCenterApi.Interface.Controllers.workorder
311 311
                         drNew["问题代码"] = it.F_ProblemCode;
312 312
                         drNew["质量问题"] = it.F_QualityProblem;
313 313
                         drNew["通知人"] = it.F_Notifications;
314
+                        if (!string.IsNullOrEmpty(it.F_Notifications))
315
+                        {
316
+                            var user = new BLL.T_Sys_UserAccount().GetModel(it.F_Notifications);
317
+                            if (user != null)
318
+                            {
319
+                                drNew["通知人"] = user.F_UserName;
320
+                            }
321
+
322
+                        }
314 323
                         drNew["接听人"] = it.F_ReceivingPerson;
324
+                        if (!string.IsNullOrEmpty(it.F_ReceivingPerson))
325
+                        {
326
+                            var user = new BLL.T_Sys_UserAccount().GetModel(it.F_ReceivingPerson);
327
+                            if (user != null)
328
+                            {
329
+                                drNew["接听人"] = user.F_UserName;
330
+                            }
331
+                        }
315 332
                         drNew["落实情况"] = it.F_ImplementationSituation;
316 333
                         var itemlast = itembll.GetModelList(" isnull(F_IsUsed,'0')='1' and F_ItemType=" + 11 + " and  F_WoID=" + it.F_Id  + " ").FirstOrDefault ();
317 334
                         if (itemlast!=null )
@@ -1116,10 +1133,11 @@ namespace CallCenterApi.Interface.Controllers.workorder
1116 1133
                     if (deptmodel != null)
1117 1134
                         deptname = deptmodel.F_DeptName;
1118 1135
 
1119
-                    AddLog(model.F_Id, int.Parse(model.F_State.ToString()), deptname + userModel.F_UserName + "修改工单", 0, 0, "", 0, userModel, 1);
1136
+                 //   AddLog(model.F_Id, int.Parse(model.F_State.ToString()), deptname + userModel.F_UserName + "修改工单", 0, 0, "", 0, userModel, 1);
1120 1137
                     AddLog(model.F_Id, int.Parse(model.F_State.ToString()), input .F_Content, 0, 12, input .F_CallId  , 0, userModel, 1);
1121
-                   
1122
-                    return Success("修改成功!");
1138
+
1139
+                        AddLog(model.F_Id, (int)model.F_State, deptname + userModel.F_UserName + "修改重复工单", 11, 11, "", 0, userModel, 1);
1140
+                        return Success("修改重复工单成功");
1123 1141
 
1124 1142
                 }
1125 1143
                 else

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkorderAppController.cs