| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.beust.jcommander.internal.Lists; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.mdc.dto.OptionsDto; |
| | | import org.jeecg.modules.mdc.entity.MdcDowntimeReason; |
| | | import org.jeecg.modules.mdc.service.IMdcDowntimeReasonService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | |
| | | return Result.OK(result); |
| | | } |
| | | |
| | | /** |
| | | * 停机原因下拉选择 |
| | | * |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "停机原因表-停机原因下拉选择") |
| | | @ApiOperation(value = "停机原因表-停机原因下拉选择", notes = "停机原因表-停机原因下拉选择") |
| | | @GetMapping(value = "/reasonList") |
| | | public Result<List<OptionsDto>> reasonList() { |
| | | List<MdcDowntimeReason> result = mdcDowntimeReasonService.list(); |
| | | List<OptionsDto> list = Lists.newArrayList(); |
| | | result.forEach(mdcDowntimeReason -> { |
| | | OptionsDto optionsDto = new OptionsDto(); |
| | | optionsDto.setValue(mdcDowntimeReason.getId()); |
| | | optionsDto.setLabel(mdcDowntimeReason.getDowntimeDescription()); |
| | | list.add(optionsDto); |
| | | }); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | } |