| | |
| | | import com.iailab.module.model.mcs.pre.service.MmPredictInfluenceFactorService; |
| | | import com.iailab.module.model.mcs.pre.vo.*; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | |
| | | PageResult<MmPredictInfluenceFactorResultVO> pageResult = influenceFactorResultService.page(params); |
| | | return success(pageResult); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getResultList") |
| | | @Operation(summary = "获得影响因素结果列表") |
| | | public CommonResult<Map<String,List<MmPredictInfluenceFactorResultVO>>> getResultList(@RequestBody MmPredictInfluenceFactorResultListReqVO params) { |
| | | if (CollectionUtils.isEmpty(params.getOutIds())) { |
| | | return success(new HashMap<>()); |
| | | } |
| | | Map<String,List<MmPredictInfluenceFactorResultVO>> list = influenceFactorResultService.getResultList(params); |
| | | return success(list); |
| | | } |
| | | |
| | | @GetMapping("/getListByOutId") |
| | | @Operation(summary = "通过outId获得影响因素列表") |
| | | public CommonResult<List<MmPredictInfluenceFactorVO>> getListByOutId(String outId) { |
| | | if (StringUtils.isBlank(outId)) { |
| | | return success(new ArrayList<>()); |
| | | } |
| | | List<MmPredictInfluenceFactorVO> list = influenceFactorService.getListByOutId(outId); |
| | | return success(list); |
| | | } |
| | | } |