mark
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user