| | |
| | | import com.iailab.module.model.mcs.pre.vo.MmItemTypeRespVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmResultTablePageReqVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @date 2021年04月22日 9:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/pre/result-table") |
| | | @RequestMapping("/model/pre/result-table") |
| | | public class MmResultTableController { |
| | | |
| | | @Autowired |
| | |
| | | * 结果存放列表 |
| | | */ |
| | | @GetMapping("/page") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-result:query')") |
| | | public CommonResult<PageResult<MmItemTypeRespVO>> page(@Validated MmResultTablePageReqVO reqVO) { |
| | | PageResult<MmResultTableEntity> page = mmResultTableService.page(reqVO); |
| | | |
| | |
| | | } |
| | | |
| | | @GetMapping("/get/{id}") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-result:query')") |
| | | public CommonResult<MmResultTableEntity> info(@PathVariable("id") String id){ |
| | | MmResultTableEntity resultTable = mmResultTableService.selectById(id); |
| | | |
| | |
| | | * 保存结果存放 |
| | | */ |
| | | @PostMapping("/create") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-result:create')") |
| | | public CommonResult<Boolean> save(@RequestBody MmResultTableEntity resultTable){ |
| | | int count = mmResultTableService.check(resultTable); |
| | | if (count > 0) { |
| | |
| | | * 修改结果存放 |
| | | */ |
| | | @PutMapping("/update") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-result:update')") |
| | | public CommonResult<Boolean> update(@RequestBody MmResultTableEntity resultTable){ |
| | | int count = mmResultTableService.check(resultTable); |
| | | if (count > 0) { |
| | |
| | | * 删除结果存放 |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-result:delete')") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | mmResultTableService.deleteBatch(new String[]{id}); |
| | | return success(true); |