| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.modules.eam.constant.ReportRepairEnum; |
| | | import org.jeecg.modules.eam.entity.EamReportRepair; |
| | | import org.jeecg.modules.eam.request.EamReportRepairQuery; |
| | | import org.jeecg.modules.eam.service.IEamReportRepairService; |
| | |
| | | @ApiOperation(value = "故障报修-添加", notes = "故障报修-添加") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamReportRepair eamReportRepair) { |
| | | eamReportRepair.setReportStatus(CommonConstant.REPORT_STATUS); |
| | | eamReportRepair.setReportStatus(ReportRepairEnum.WAIT_REPAIR.name()); |
| | | eamReportRepair.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | eamReportRepairService.save(eamReportRepair); |
| | | return Result.OK("添加成功!"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过id作废 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "故障报修-作废") |
| | | @ApiOperation(value = "故障报修-作废", notes = "故障报修-作废") |
| | | @DeleteMapping(value = "/abolish") |
| | | public Result<?> abolish(@RequestParam(name = "id", required = true) String id) { |
| | | eamReportRepairService.update(new LambdaUpdateWrapper<EamReportRepair>().set(EamReportRepair::getReportStatus, ReportRepairEnum.ABOLISH.name()).eq(EamReportRepair::getId, id)); |
| | | return Result.OK("作废成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |