| | |
| | | using System; |
| | | using DocumentServiceAPI.Application.Repository; |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services; |
| | | using DocumentServiceAPI.Application.UserAndLogin.Services.Interfaces; |
| | | using DocumentServiceAPI.Application.UserAndLogin.ViewMode; |
| | | using DocumentServiceAPI.Model.cyDocumentModel; |
| | | using DocumentServiceAPI.Utility; |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | /// </summary> |
| | | [ApiDescriptionSettings("LogInAndUser")] |
| | | [DynamicApiController] |
| | | [Authorize] |
| | | public class UserInfoController |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void GetUserInfo() |
| | | { |
| | | |
| | | private readonly UserService _userService; |
| | | public UserInfoController(UserService userService) { |
| | | _userService = userService; |
| | | } |
| | | /// <summary> |
| | | /// 获取用户详情 |
| | | /// </summary> |
| | | public async Task< RetUserInfo> GetUserInfo() |
| | | { |
| | | var jwt=_userService.GetJwtInfo(); |
| | | return await _userService.GetUserInfo(jwt.TEID, jwt.EID, jwt.UID); |
| | | } |
| | | /// <summary> |
| | | /// 获取员工列表 |
| | | /// </summary> |
| | | /// <param name="page"></param> |
| | | /// <returns></returns> |
| | | public async Task<PageResult<EmployeeInfoVM>> postEmployeeList( EmployeePageSearch page) |
| | | { |
| | | return await _userService.postEmployeeList(page); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建新员工 |
| | | /// </summary> |
| | | /// <param name="Parma"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> CreateEmployee(EmployeeInfoVM Parma) |
| | | { |
| | | return await _userService.InEmployee(Parma); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新员工信息 |
| | | /// </summary> |
| | | /// <param name="Parma"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> UpDataEmployee(EmployeeInfoVM Parma) |
| | | { |
| | | return await _userService.UpEmployee(Parma); |
| | | } |
| | | } |
| | | } |