| | |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.entity.SysUser; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.Meetings; |
| | | import com.gkhy.exam.system.domain.PositionJob; |
| | | import com.gkhy.exam.system.service.PositionJobService; |
| | | import com.gkhy.exam.system.service.SysUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "用户前端控制器") |
| | | @RestController |
| | | @RequestMapping("/system/user") |
| | | public class SysUserController { |
| | | @Autowired |
| | | private SysUserService sysUserService; |
| | | |
| | | @Autowired |
| | | private PositionJobService positionJobService; |
| | | |
| | | // @PreAuthorize("hasAuthority('train:exam:company')") |
| | | // @PreAuthorize("hasAnyAuthority('train:exam:system','train:exam:company')") |
| | |
| | | sysUserService.updateUserStatus(user); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "特殊作业人员证书") |
| | | @PutMapping(value = "/specialCertificate") |
| | | public CommonResult specialCertificate(@RequestBody SysUser user){ |
| | | sysUserService.updateSpecialCertificate(user); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "单位人员情况分析") |
| | | @GetMapping(value = "/getUserData") |
| | | public CommonResult getUserData(@RequestParam Long companyId){ |
| | | Map<String, Object> userData = sysUserService.getUserData(companyId); |
| | | return CommonResult.success(userData); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "岗位任职管理(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id"), |
| | | }) |
| | | @GetMapping("/position/jobList") |
| | | public CommonResult selectPositionJobList(Integer companyId){ |
| | | return CommonResult.success(positionJobService.selectPositionJobList(companyId)); |
| | | } |
| | | @ApiOperation(value = "新增岗位任职") |
| | | @PostMapping("/position/savejob") |
| | | public CommonResult insertMeetings(@RequestBody PositionJob positionJob){ |
| | | return positionJobService.insertPositionJob(positionJob); |
| | | } |
| | | @ApiOperation(value = "修改岗位任职") |
| | | @PostMapping("/position/updatejob") |
| | | public CommonResult updateMeetings(@RequestBody PositionJob positionJob){ |
| | | return positionJobService.updatePositionJob(positionJob); |
| | | } |
| | | @ApiOperation(value = "删除岗位任职") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "id", dataType = "int", required = true, value = "id"), |
| | | }) |
| | | @GetMapping("/position/deletedjob") |
| | | public CommonResult deletedMeetings(@RequestParam Integer id){ |
| | | return positionJobService.deletedPositionJob(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |