From c944d37fcf25d9c217949a171fde868078049f02 Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期二, 20 五月 2025 16:32:09 +0800 Subject: [PATCH] 修改设置检修权限接口 --- project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs index da37b8e..58af81c 100644 --- a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs +++ b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserService.cs @@ -26,13 +26,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; } @@ -555,10 +557,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) @@ -582,6 +593,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 = "娌℃壘鍒拌鐢ㄦ埛" }; @@ -605,6 +618,7 @@ sys.RoleName = addUserDTO.rolename; sys.CardNumber = addUserDTO.carnuber; sys.Userteam = addUserDTO.userteam; + sys.Dept_Id = addUserDTO.dept_Id; sys.Enable = addUserDTO.enable; //濡傛灉浜鸿劯璇嗗埆娣诲姞浜嗚繖閲屽氨娉ㄩ噴鎺� sys.HeadImageUrl = addUserDTO.path; @@ -636,6 +650,9 @@ // 8. 鏇存柊鏁版嵁搴� BaseDal.UpdateData(sys); + //鏇存柊Dt_Maintenance琛ㄤ腑鐨勬暟鎹拰user琛ㄤ腑淇敼鐨勪竴鏍� + team.UserAccount = addUserDTO.username;//璐﹀彿 + _MainServer.UpdateData(team); return new WebResponseContent { Status = true, Data = sys }; } -- Gitblit v1.9.3