| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.domain.entity.Company; |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.core.dto.PersonDto; |
| | | import com.ruoyi.framework.util.HeaderToken; |
| | | import com.ruoyi.system.service.UserService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.web.controller.dto.UpdateUserDto; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private HeaderToken headerToken; |
| | | |
| | | /** |
| | | *type : 1: 获取检测人员信息 |
| | | type : 2: 获取当前部门(实验室人员) |
| | | * @param user |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据条件获取用户列表") |
| | | @GetMapping("/selectUserCondition") |
| | | public Result selectUserCondition(User user, String type){ |
| | | return Result.success(userService.selectUserCondition(user, type)); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前登录的客户信息 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getUserNow") |
| | | @ApiOperation(value = "获取当前登录的客户信息") |
| | | public Result<?> getUserNow(){ |
| | | return Result.success(userService.getUserNow()); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前登录用户部门 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectUserDepartmentLimsName") |
| | | @ApiOperation(value = "获取当前登录用户部门") |
| | | public Result<?> selectUserDepartmentLimsName(){ |
| | | return Result.success(userService.selectUserDepartmentLimsName()); |
| | | } |
| | | |
| | | @PostMapping("/upUserDepardLimsId") |
| | | @ApiOperation(value = "修改人员明细所在组织架构") |
| | | public Result<?> upUserDepardLimsId(@RequestBody UpdateUserDto dto){ |
| | | return Result.success(userService.upUserDepardLimsId(dto.getIds(), dto.getId())); |
| | | } |
| | | |
| | | @DeleteMapping("/delUserDepardLimsId") |
| | | @ApiOperation(value = "删除人员明细所在组织架构") |
| | | public Result<?> delUserDepardLimsId(Integer id){ |
| | | return Result.success(userService.delUserDepardLimsId(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查看人事系统组织架构") |
| | | @GetMapping(value = "/selectCompaniesList") |
| | | public Result<List<Company>> selectCompaniesList() { |
| | | return Result.success(headerToken.companyUrl()); |
| | | } |
| | | |
| | | @ApiOperation("获取人事系统组织下的人员") |
| | | @GetMapping(value = "/selectSimpleList") |
| | | public Result<?> selectSimpleList(String companyId) { |
| | | return Result.success(headerToken.userUrl(companyId)); |
| | | } |
| | | |
| | | @ApiOperation("将人事系统勾选的内容转移到本系统") |
| | | @PostMapping(value = "/addPersonUser") |
| | | public Result<?> addPersonUser(@RequestBody PersonDto personDto) { |
| | | return Result.success(userService.addPersonUser(personDto)); |
| | | } |
| | | |
| | | } |
| | | |