| | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import jakarta.validation.constraints.NotEmpty; |
| | |
| | | return ywUnitService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return ywUnitService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @DeleteMapping("/{ids}") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return ywUnitService.remove(ids); |
| | | public Result remove(@PathVariable String ids) { |
| | | return ywUnitService.remove(Arrays.asList(ids.split(","))); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('unit:list')") |
| | |
| | | return ywUnitService.all(); |
| | | } |
| | | |
| | | @GetMapping("/work/list") |
| | | @ApiOperation(value = "工单列表", notes = "工单列表") |
| | | public Result workList() { |
| | | return ywUnitService.workList(); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, YwUnitQuery query) |
| | | { |