From 48c57b372759c86c5d9443e24594e26d5d7ef8a6 Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期三, 25 九月 2024 10:24:27 +0800 Subject: [PATCH] 预测模型接口修改 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java index bf58c85..06590e6 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java @@ -5,8 +5,13 @@ import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.module.model.mcs.pre.dto.MmPredictItemDTO; +import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; +import com.iailab.module.model.mcs.pre.entity.MmItemTypeEntity; import com.iailab.module.model.mcs.pre.entity.MmPredictItemEntity; +import com.iailab.module.model.mcs.pre.service.MmItemOutputService; +import com.iailab.module.model.mcs.pre.service.MmItemTypeService; import com.iailab.module.model.mcs.pre.service.MmPredictItemService; +import com.iailab.module.model.mcs.pre.service.MmResultTableService; import com.iailab.module.model.mcs.pre.vo.CountItemtypeVO; import com.iailab.module.model.mcs.pre.vo.MmPredictItemPageReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; @@ -19,7 +24,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.UUID; import static com.iailab.framework.common.pojo.CommonResult.success; @@ -34,6 +38,15 @@ @Autowired private MmPredictItemService mmPredictItemService; + @Autowired + private MmItemTypeService mmItemTypeService; + + @Autowired + private MmItemOutputService mmItemOutputService; + + @Autowired + private MmResultTableService mmResultTableService; + /** * 预测项列表 */ @@ -41,13 +54,23 @@ @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") public CommonResult<PageResult<MmPredictItemRespVO>> page(@Validated MmPredictItemPageReqVO reqVO) { PageResult<MmPredictItemEntity> page = mmPredictItemService.queryPage(reqVO); - return success(BeanUtils.toBean(page, MmPredictItemRespVO.class)); + PageResult<MmPredictItemRespVO> result = BeanUtils.toBean(page, MmPredictItemRespVO.class); + for (MmPredictItemRespVO item : result.getList()){ + + MmItemTypeEntity mmItemTypeEntity = mmItemTypeService.info(item.getItemtypeid()); + item.setItemtypename(mmItemTypeEntity== null ? "" :mmItemTypeEntity.getItemtypename()); + + MmItemOutputEntity mmItemOutputEntity = mmItemOutputService.getByItemid(item.getId()); + item.setTagname(mmItemOutputEntity== null ? "" :mmItemOutputEntity.getTagname()); + item.setResulttableid(mmItemOutputEntity== null ? "" :mmItemOutputEntity.getResulttableid()); + item.setTablename(item == null ? "" : mmResultTableService.info(item.getResulttableid()).getTablename()); + } + return success(result); } @GetMapping("/list") - @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") - public CommonResult<List<MmPredictItemEntity>> list(@RequestParam Map<String, Object> params) { - List<MmPredictItemEntity> list = mmPredictItemService.list(params); + public CommonResult<List<MmPredictItemEntity>> list() { + List<MmPredictItemEntity> list = mmPredictItemService.list(); return success(list); } -- Gitblit v1.9.3