| | |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.module.model.api.mcs.dto.StScheduleModelOutDTO; |
| | | import com.iailab.module.model.mcs.sche.entity.*; |
| | | import com.iailab.module.model.mcs.sche.service.StScheduleModelService; |
| | | import com.iailab.module.model.mcs.sche.service.StSuggestSnapshotConfMainService; |
| | | import com.iailab.module.model.mcs.sche.vo.*; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | |
| | | @Autowired |
| | | private StSuggestSnapshotConfMainService stSuggestSnapshotConfMainService; |
| | | |
| | | |
| | | @Autowired |
| | | private StScheduleModelService stScheduleModelService; |
| | | |
| | | @GetMapping("/page") |
| | | @PreAuthorize("@ss.hasPermission('suggest:snapshot:query')") |
| | | public CommonResult<PageResult<StSuggestSnapshotConfMainRespVO>> getPage(@Valid StSuggestSnapshotConfMainPageReqVO pageVO) { |
| | | PageResult<StSuggestSnapshotConfMainEntity> pageResult = stSuggestSnapshotConfMainService.page(pageVO); |
| | | return success(BeanUtils.toBean(pageResult, StSuggestSnapshotConfMainRespVO.class)); |
| | | PageResult<StSuggestSnapshotConfMainRespVO> result = BeanUtils.toBean(pageResult, StSuggestSnapshotConfMainRespVO.class); |
| | | result.getList().forEach(item -> { |
| | | item.setModelName(stScheduleModelService.get(item.getModelId())!=null?stScheduleModelService.get(item.getModelId()).getModelName():null); |
| | | }); |
| | | return success(result); |
| | | } |
| | | |
| | | @GetMapping("/get") |