|
@@ -2,6 +2,7 @@ package com.hdkj.lt.bf.service.impl;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
+import com.hdkj.hussar.ApiResponse;
|
|
|
import com.hdkj.lt.base.constants.DictConstants;
|
|
import com.hdkj.lt.base.constants.DictConstants;
|
|
|
import com.hdkj.lt.base.exception.BusinessException;
|
|
import com.hdkj.lt.base.exception.BusinessException;
|
|
|
import com.hdkj.lt.base.model.response.PageVO;
|
|
import com.hdkj.lt.base.model.response.PageVO;
|
|
@@ -47,7 +48,7 @@ public class ReconQueryServiceImpl implements ReconQueryService {
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public ReconListVO getSchemeList(ReconListReqDTO reqDTO) {
|
|
|
|
|
|
|
+ public ApiResponse<ReconListVO> getSchemeList(ReconListReqDTO reqDTO) {
|
|
|
if (Objects.isNull(reqDTO.getEventId())) {
|
|
if (Objects.isNull(reqDTO.getEventId())) {
|
|
|
throw new BusinessException("事件ID为空");
|
|
throw new BusinessException("事件ID为空");
|
|
|
}
|
|
}
|
|
@@ -57,6 +58,9 @@ public class ReconQueryServiceImpl implements ReconQueryService {
|
|
|
new LambdaQueryWrapper<FhzgReconResult>()
|
|
new LambdaQueryWrapper<FhzgReconResult>()
|
|
|
.eq(FhzgReconResult::getEventId, reqDTO.getEventId())
|
|
.eq(FhzgReconResult::getEventId, reqDTO.getEventId())
|
|
|
);
|
|
);
|
|
|
|
|
+ if(resultList.isEmpty()){
|
|
|
|
|
+ return ApiResponse.success(new ReconListVO(),"无调优方案");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 构建方案VO列表
|
|
// 构建方案VO列表
|
|
|
List<ReconSchemeVO> schemeList = resultList.stream()
|
|
List<ReconSchemeVO> schemeList = resultList.stream()
|
|
@@ -76,7 +80,7 @@ public class ReconQueryServiceImpl implements ReconQueryService {
|
|
|
eventInfo.setEventId(reqDTO.getEventId());
|
|
eventInfo.setEventId(reqDTO.getEventId());
|
|
|
vo.setEventInfo(eventInfo);
|
|
vo.setEventInfo(eventInfo);
|
|
|
vo.setSchemeList(schemeList);
|
|
vo.setSchemeList(schemeList);
|
|
|
- return vo;
|
|
|
|
|
|
|
+ return ApiResponse.success(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|