| | |
| | | public Result add(@RequestBody @Validated(Add.class) ProjectInfoForm form) { |
| | | return projectInfoService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/document") |
| | | @ApiOperation(value = "添加相关文件", notes = "添加相关文件") |
| | | // @PreAuthorize("hasAuthority('projectInfo:add')") |
| | | public Result addDoc(@RequestBody @Validated(Add.class) DocumentInfoForm form) { |
| | | return projectInfoService.addDoc(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | // @PreAuthorize("hasAuthority('projectInfo:edit')") |
| | |
| | | public Result detail(@PathVariable("id") Integer id) { |
| | | return projectInfoService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/document/{id}") |
| | | @ApiOperation(value = "相关文件详情", notes = "相关文件详情") |
| | | // @PreAuthorize("hasAuthority('projectInfo:detail')") |
| | | public Result docDetail(@PathVariable("id") Integer id) { |
| | | return projectInfoService.docDetail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | // @PreAuthorize("hasAuthority('projectInfo:list')") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | |
| | | |
| | | /** |
| | | * 生成项目编号 |
| | | * |
| | | * @return 项目编号 |
| | | */ |
| | | @GetMapping("/getProjectCode") |
| | | public Result generateProjectCode() { |
| | | return Result.ok().data(ProjectCodeGenerator.generateProjectCode()); |
| | | }; |
| | | } |
| | | |
| | | ; |
| | | |
| | | @GetMapping("/getManagerFlag/{recordId}") |
| | | public Result getManagerFlag(@PathVariable("recordId") Integer recordId) { |
| | |
| | | |
| | | /** |
| | | * 导出模板 |
| | | * |
| | | * @param response |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 项目导出 |
| | | * |
| | | * @param response |
| | | * @throws IOException |
| | | */ |
| | |
| | | public void export(HttpServletResponse response, ProjectExportQuery query) throws IOException { |
| | | projectInfoService.export(response, query); |
| | | } |
| | | |
| | | @PutMapping("usedStatus/{id}/{usedStatus}") |
| | | @ApiOperation(value = "修改使用状态", notes = "修改使用状态") |
| | | // @PreAuthorize("hasAuthority('projectInfo:edit')") |
| | | public Result updateUsedStatus(@PathVariable Integer id, @PathVariable Integer usedStatus) { |
| | | return projectInfoService.updateUsedStatus(id, usedStatus); |
| | | } |
| | | } |