From c944d37fcf25d9c217949a171fde868078049f02 Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期二, 20 五月 2025 16:32:09 +0800 Subject: [PATCH] 修改设置检修权限接口 --- project/后台管理/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git "a/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" "b/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" index 7bd5718..ecdaae4 100644 --- "a/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" +++ "b/project/\345\220\216\345\217\260\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs" @@ -25,14 +25,15 @@ private readonly ISys_MenuService _menuService; private readonly IRepository<Dt_FaceRecognition> _faceServer; private readonly IRepository<Dt_Loginhsy> _LoginhsyServer; - public Sys_UserService(IRepository<Dt_Loginhsy> LoginhsyServer,IRepository<Dt_FaceRecognition> faceServer, IRepository<Sys_User> repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, ISys_MenuService menuService) : base(repository) + private readonly IRepository<Dt_Maintenance> _MainServer; + public Sys_UserService(IRepository<Dt_Loginhsy> LoginhsyServer,IRepository<Dt_FaceRecognition> faceServer, IRepository<Sys_User> repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, ISys_MenuService menuService, IRepository<Dt_Maintenance> MainServer) : base(repository) { _faceServer = faceServer; _LoginhsyServer = LoginhsyServer; _unitOfWorkManage = unitOfWorkManage; _cacheService = cacheService; _menuService = menuService; - + _MainServer = MainServer; } @@ -552,10 +553,19 @@ Enable = addUserDTO.enable, UserPwd = "j79rYYvCz4vdhcboB1Ausg==", Userteam = addUserDTO.userteam, + Dept_Id=addUserDTO.dept_Id, CardNumber = addUserDTO.carnuber, CreateDate = DateTime.Now }; BaseDal.AddData(sys); + //鍒涘缓Dt_Maintenance琛ㄤ腑鐨勬暟鎹� + var Main = new Dt_Maintenance + { + UserAccount = addUserDTO.username, + }; + _MainServer.AddData(Main); + + return new WebResponseContent { Status = true, Data = sys }; } catch (Exception ex) @@ -579,6 +589,8 @@ // 1. 鏌ヨ鐢ㄦ埛 var userList = BaseDal.QueryData(); var sys = userList.FirstOrDefault(x => x.User_Id == addUserDTO.id); + //鏌ユ壘Dt_MaintenanceTeam涓殑鏁版嵁 + var team = _MainServer.QueryData(x => x.UserAccount == sys.UserName).FirstOrDefault(); if (sys == null) { return new WebResponseContent { Status = false, Message = "娌℃壘鍒拌鐢ㄦ埛" }; @@ -603,6 +615,7 @@ sys.CardNumber = addUserDTO.carnuber; sys.Userteam = addUserDTO.userteam; sys.Enable = addUserDTO.enable; + sys.Dept_Id = addUserDTO.dept_Id; //濡傛灉浜鸿劯璇嗗埆娣诲姞浜嗚繖閲屽氨娉ㄩ噴鎺� sys.HeadImageUrl = addUserDTO.path; @@ -634,6 +647,10 @@ // 8. 鏇存柊鏁版嵁搴� BaseDal.UpdateData(sys); + //鏇存柊Dt_Maintenance琛ㄤ腑鐨勬暟鎹拰user琛ㄤ腑淇敼鐨勪竴鏍� + team.UserAccount = addUserDTO.username;//璐﹀彿 + _MainServer.UpdateData(team); + return new WebResponseContent { Status = true, Data = sys }; } catch (Exception ex) -- Gitblit v1.9.3