| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "故障报修-通过id删除") |
| | | @ApiOperation(value = "故障报修-通过id删除", notes = "故障报修-通过id删除") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
| | | eamReportRepairService.removeById(id); |
| | | return Result.OK("删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * 批量作废 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "故障报修-批量删除") |
| | | @ApiOperation(value = "故障报修-批量删除", notes = "故障报修-批量删除") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | this.eamReportRepairService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量删除成功!"); |
| | | @AutoLog(value = "故障报修-批量作废") |
| | | @ApiOperation(value = "故障报修-批量作废", notes = "故障报修-批量作废") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<EamReportRepair> eamReportRepairs = eamReportRepairService.listByIds(Arrays.asList(ids.split(","))); |
| | | eamReportRepairs.forEach(eamReportRepair -> eamReportRepair.setReportStatus(ReportRepairEnum.ABOLISH.name())); |
| | | this.eamReportRepairService.updateBatchById(eamReportRepairs); |
| | | return Result.OK("批量作废成功!"); |
| | | } |
| | | |
| | | // /** |
| | | // * 通过id删除 |
| | | // * |
| | | // * @param id |
| | | // * @return |
| | | // */ |
| | | // @AutoLog(value = "故障报修-通过id删除") |
| | | // @ApiOperation(value = "故障报修-通过id删除", notes = "故障报修-通过id删除") |
| | | // @DeleteMapping(value = "/delete") |
| | | // public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
| | | // eamReportRepairService.removeById(id); |
| | | // return Result.OK("删除成功!"); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 批量删除 |
| | | // * |
| | | // * @param ids |
| | | // * @return |
| | | // */ |
| | | // @AutoLog(value = "故障报修-批量删除") |
| | | // @ApiOperation(value = "故障报修-批量删除", notes = "故障报修-批量删除") |
| | | // @DeleteMapping(value = "/deleteBatch") |
| | | // public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | // this.eamReportRepairService.removeByIds(Arrays.asList(ids.split(","))); |
| | | // return Result.OK("批量删除成功!"); |
| | | // } |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * |