This commit is contained in:
caixiang
2023-05-09 14:24:13 +08:00
parent 7c21dfe8e1
commit 5a9f5ee38b
8 changed files with 17 additions and 54 deletions

View File

@@ -51,7 +51,6 @@ public class InspectionSheetController {
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:page')")
public Result<PageData<InspectionSheetDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<InspectionSheetDTO> page = inspectionSheetService.page(params);
return new Result<PageData<InspectionSheetDTO>>().ok(page);
}
@@ -60,7 +59,6 @@ public class InspectionSheetController {
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:info')")
public Result<InspectionSheetDTO> get(@PathVariable("id") Long id){
InspectionSheetDTO data = inspectionSheetService.get(id);
return new Result<InspectionSheetDTO>().ok(data);
}
@@ -71,7 +69,6 @@ public class InspectionSheetController {
public Result<Long> save(@RequestBody InspectionSheetDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
try {
inspectionSheetService.save(dto);
}catch (Exception e){
@@ -86,9 +83,7 @@ public class InspectionSheetController {
public Result<Long> update(@RequestBody InspectionSheetDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
inspectionSheetService.update(dto);
return new Result<Long>().ok(dto.getId());
}
@@ -99,9 +94,7 @@ public class InspectionSheetController {
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
inspectionSheetService.delete(ids);
return new Result();
}
@@ -111,8 +104,6 @@ public class InspectionSheetController {
@PreAuthorize("@ex.hasAuthority('code:inspectionSheet:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<InspectionSheetDTO> list = inspectionSheetService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, InspectionSheetExcel.class);
}
}