| | |
| | | @RequiredArgsConstructor |
| | | @Api(value = "项目(法人)单位登记信息表", tags = "项目(法人)单位登记信息表管理") |
| | | @RestController |
| | | @RequestMapping("/project-unit-registration-info") |
| | | @RequestMapping("/project/unitRegistrationInfo") |
| | | public class ProjectUnitRegistrationInfoController { |
| | | |
| | | private final ProjectUnitRegistrationInfoService projectUnitRegistrationInfoService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:add')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) ProjectUnitRegistrationInfoForm form) { |
| | | return projectUnitRegistrationInfoService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:edit')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) ProjectUnitRegistrationInfoForm form) { |
| | | return projectUnitRegistrationInfoService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:del')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:del')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return projectUnitRegistrationInfoService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:del:batch')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:del:batch')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return projectUnitRegistrationInfoService.remove(ids); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:page')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:page')") |
| | | public Result page(ProjectUnitRegistrationInfoQuery query) { |
| | | return projectUnitRegistrationInfoService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:detail')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:detail')") |
| | | public Result detail(@PathVariable("id") Integer id) { |
| | | return projectUnitRegistrationInfoService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:list')") |
| | | // @PreAuthorize("hasAuthority('projectUnitRegistrationInfo:list')") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return projectUnitRegistrationInfoService.all(); |
| | | } |
| | | |
| | | @PostMapping("/getUnitRegistrationInfoByName") |
| | | @ApiOperation(value = "更具单位名获得数据库已存在信息", notes = "更具单位名获得数据库已存在信息") |
| | | public Result getUnitRegistrationInfoByName(@RequestBody ProjectUnitRegistrationInfoForm form){ |
| | | |
| | | return projectUnitRegistrationInfoService.getUnitRegistrationInfoByName(form.getProjectUnit()); |
| | | } |
| | | } |