| | |
| | | package org.jeecg.modules.mdc.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | |
| | | if (StringUtils.isBlank(mdcDowntime.getEquipmentIds())) { |
| | | return Result.error("未选择设备,请排查"); |
| | | } |
| | | if (CollectionUtils.isEmpty(mdcDowntime.getDateList())) { |
| | | return Result.error("未选择日期,请排查"); |
| | | } |
| | | boolean flag = mdcDowntimeService.saveDowntime(mdcDowntime); |
| | | return flag ? Result.ok("添加成功") : Result.error("添加失败"); |
| | | } |
| | |
| | | @ApiOperation(value = "待机停机表-编辑", notes = "待机停机表-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody MdcDowntime mdcDowntime) { |
| | | // if (mdcDowntime.getReasonId() != null) { |
| | | // mdcDowntime.setStatus(CommonConstant.DOWNTIME_STATUS_1); |
| | | // } |
| | | mdcDowntimeService.updateById(mdcDowntime); |
| | | return Result.OK("编辑成功!"); |
| | | } |