| | |
| | | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.iems.common.validator.AssertUtils; |
| | | import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO; |
| | | import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService; |
| | | import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO; |
| | |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/quality/detection") |
| | | @RequestMapping("/coal-quality/quality/detection") |
| | | @Tag(name = "煤质检测") |
| | | public class QualityDetectionController { |
| | | @Autowired |
| | |
| | | return success(page); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @GetMapping("/get") |
| | | @Operation(summary ="信息") |
| | | public CommonResult<QualityDetectionDTO> get(@PathVariable("id") String id) { |
| | | public CommonResult<QualityDetectionDTO> get(String id) { |
| | | QualityDetectionDTO data = qualityDetectionService.get(id); |
| | | return success(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @PostMapping("/create") |
| | | @Operation(summary ="保存") |
| | | public CommonResult<Boolean> save(@RequestBody QualityDetectionDTO dto) { |
| | | public CommonResult<Boolean> create(@RequestBody QualityDetectionDTO dto) { |
| | | // if (qualityDetectionService.cheack(dto) > 0) { |
| | | // return new CommonResult().error("编号重复"); |
| | | // } |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping |
| | | @PutMapping("/update") |
| | | @Operation(summary ="修改") |
| | | public CommonResult<Boolean> update(@RequestBody QualityDetectionDTO dto) { |
| | | |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary ="删除") |
| | | public CommonResult<Boolean> delete(@RequestBody String[] ids) { |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | |
| | | qualityDetectionService.delete(ids); |
| | | |