| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DepartmentDto; |
| | | import com.yuanchu.mom.dto.PersonBasicInfoDetailsDto; |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | |
| | | @Api(tags = "人员-人员基本信息") |
| | | @RestController |
| | | @RequestMapping("/personBasicInfo") |
| | | @CustomClazzName(name = "资源要求",index = 8) |
| | | //@CustomClazzName(name = "资源要求", index = 8) |
| | | public class PersonBasicInfoController { |
| | | |
| | | @Resource |
| | |
| | | @Resource |
| | | private AnnexService annexService; |
| | | |
| | | @ValueClassify("人员基本信息") |
| | | @ValueAuth |
| | | @ApiOperation(value = "查询CNAS人员侧边栏") |
| | | @GetMapping("/selectCNSAPersonTree") |
| | | public Result<List<DepartmentDto>> selectCNSAPersonTree() { |
| | | return Result.success(personBasicInfoService.selectCNSAPersonTree()); |
| | | } |
| | | |
| | | @ValueClassify("人员基本信息") |
| | | @ValueAuth |
| | | @ApiOperation(value = "获取CNAS人员基本信息") |
| | | @GetMapping("/getCNASPersonnelInfo") |
| | | public Result getCNASPersonnelInfo(Integer userId) { |
| | |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "人员明细分页查询") |
| | | @ValueClassify("人员基本信息") |
| | | @ApiOperation(value = "人员明细分页查询") |
| | | @GetMapping("basicInformationOfPersonnelSelectPage") |
| | | public Result<IPage<Map<String, Object>>> basicInformationOfPersonnelSelectPage(Page<List<PersonBasicInfoDetailsDto>> page, String name, Integer departmentId) { |
| | | return Result.success(personBasicInfoService.basicInformationOfPersonnelSelectPage(page, name, departmentId)); |
| | |
| | | // 上传文件接口 |
| | | @ApiOperation(value = "上传文件接口") |
| | | @PostMapping("/saveCNASFile") |
| | | @ValueAuth |
| | | public Result saveFile(@RequestPart("file") MultipartFile file) { |
| | | String s = FileSaveUtil.StoreFile(file); |
| | | String s = FileSaveUtil.uploadWordFile(file); |
| | | return Result.success("上传成功", s); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @GetMapping("/getAnnexByUserId") |
| | | public Result<List<Annex>> getAnnexByUserId(Integer userId) { |
| | | List<Annex> list = annexService.list(new LambdaQueryWrapper<Annex>().eq(Annex::getUserId, userId)); |
| | |
| | | } |
| | | |
| | | // 删除文件 |
| | | @ValueAuth |
| | | @DeleteMapping("/deleteCNASFile") |
| | | public Result saveFile(String fileName) { |
| | | String[] split = fileName.split(","); |
| | |
| | | /** |
| | | * 人员基本信息附件新增 |
| | | */ |
| | | @ValueAuth |
| | | @PostMapping("/addAnnex") |
| | | public Result addAnnex(@RequestBody Annex annex) { |
| | | annexService.save(annex); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @GetMapping("/getAnnex") |
| | | public Result<Annex> getAnnex(Integer id) { |
| | | return Result.success(annexService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 人员基本信息附件删除 |
| | | */ |
| | | @ValueAuth |
| | | @DeleteMapping("/deleteAnnex/{id}") |
| | | public Result deleteAnnex(@PathVariable("id") Integer id) { |
| | | annexService.removeById(id); |
| | |
| | | |
| | | /** |
| | | * 人员基本信息附件修改 |
| | | * |
| | | */ |
| | | @ValueAuth |
| | | @PostMapping("/updateAnnex") |
| | | public Result updateAnnex(@RequestBody Annex annex) { |
| | | annexService.updateById(annex); |
| | |
| | | |
| | | @ApiOperation(value = "导出人员基本信息") |
| | | @PostMapping("/exportPersonBasicInfo") |
| | | @ValueClassify("人员基本信息") |
| | | public void exportPersonBasicInfo(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception { |
| | | UserPageDto userPageDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), UserPageDto.class); |
| | | personBasicInfoService.exportPersonBasicInfo(userPageDto,response); |
| | | personBasicInfoService.exportPersonBasicInfo(userPageDto, response); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载人员档案卡") |
| | | @PostMapping("/exportPersonBasicInfoById") |
| | | @ValueClassify("人员基本信息") |
| | | public Result exportPersonBasicInfoById(Integer id, HttpServletResponse response) { |
| | | return Result.success(personBasicInfoService.exportPersonBasicInfoById(id,response)); |
| | | return Result.success(personBasicInfoService.exportPersonBasicInfoById(id, response)); |
| | | } |
| | | } |