Commit 23cbe561 by jianan

出账检核-增加币种13

parent ac0ceda5
......@@ -1011,7 +1011,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
// 5. 组装返回结果
ApiExpectedFortunePageResponseVO response = new ApiExpectedFortunePageResponseVO();
response.setStatisticsVO(statisticsVO);
response.setPage(iPage); // 恢复分页数据
response.setPage(iExpectedFortuneService.getVOPage(iPage)); // 恢复分页数据
log.info("查询应付款管理列表完成, 耗时: {}ms, 页码: {}, 页大小: {}, 总记录数: {}",
System.currentTimeMillis() - startTime,
......
......@@ -38,7 +38,7 @@ public class ApiExpectedFortunePageResponse {
/**
* 应付款编号
*/
@Schema(description = "应付款编号")
@Schema(description = "应付款编号(业务编号)")
private String payableNo;
/**
......
......@@ -5,6 +5,7 @@ import com.yd.csf.service.model.AgentAccumulatedFyc;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -20,6 +21,8 @@ public interface IAgentAccumulatedFycService extends IService<AgentAccumulatedFy
List<UserGradeDto> queryUserGradeList(List<String> userBizIdList);
Map<String, UserGradeDto> queryUserGradeMap(List<String> userBizIdList);
List<AgentAccumulatedFyc> queryList(List<String> agentIdList);
List<AgentAccumulatedFyc> queryAll();
......
......@@ -33,7 +33,7 @@ public interface IExpectedFortuneService extends IService<ExpectedFortune> {
ExpectedFortuneStatisticsVO getStatistics(List<Long> expectedFortuneIds);
IPage<ApiExpectedFortunePageResponse> getVOPage(IPage<ExpectedFortune> iPage);
IPage<ApiExpectedFortunePageResponse> getVOPage(IPage<ApiExpectedFortunePageResponse> iPage);
List<ApiExpectedFortunePageResponse> toVOList(List<ExpectedFortune> fortuneList);
......
......@@ -9,7 +9,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* <p>
......@@ -53,4 +58,14 @@ public class AgentAccumulatedFycServiceImpl extends ServiceImpl<AgentAccumulated
return this.baseMapper.queryUserGradeList(userBizIdList);
}
@Override
public Map<String, UserGradeDto> queryUserGradeMap(List<String> userBizIdList) {
if (CollectionUtils.isEmpty(userBizIdList)) {
return Collections.emptyMap();
}
return this.baseMapper.queryUserGradeList(userBizIdList)
.stream()
.collect(Collectors.toMap(UserGradeDto::getClientUserBizId, Function.identity()));
}
}
......@@ -83,14 +83,42 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
}
@Override
public IPage<ApiExpectedFortunePageResponse> getVOPage(IPage<ExpectedFortune> iPage) {
List<ExpectedFortune> expectedFortuneList = iPage.getRecords();
public IPage<ApiExpectedFortunePageResponse> getVOPage(IPage<ApiExpectedFortunePageResponse> iPage) {
List<ApiExpectedFortunePageResponse> expectedFortuneList = iPage.getRecords();
Page<ApiExpectedFortunePageResponse> expectedFortuneVOPage = new Page<>(iPage.getCurrent(), iPage.getSize(), iPage.getTotal());
if (CollUtil.isEmpty(expectedFortuneList)) {
return expectedFortuneVOPage;
}
List<ApiExpectedFortunePageResponse> expectedFortuneVOList = toVOList(expectedFortuneList);
expectedFortuneVOPage.setRecords(expectedFortuneVOList);
// 1. 转介人职级信息
List<String> brokerBizIds = expectedFortuneList.stream().map(ApiExpectedFortunePageResponse::getBrokerBizId).collect(Collectors.toList());
Map<String, UserGradeDto> userGradeMap = iAgentAccumulatedFycService.queryUserGradeMap(brokerBizIds);
// 2. 关联查询保单信息
for (ApiExpectedFortunePageResponse vo : expectedFortuneList) {
vo.setCurrencyName("港币");
// String ratio = finalBrokerRatioMap.get(ef.getBrokerBizId());
// vo.setCommissionRatio(ratio);
// Policy policy = policyMap.get(vo.getPolicyNo());
// PolicyFollow follow = policyFollowMap.get(vo.getPolicyNo());
UserGradeDto userGradeDto = userGradeMap.get(vo.getBrokerBizId());
if (userGradeDto != null) {
vo.setBrokerGradeName(userGradeDto.getGradeName());
}
// if (policy != null) {
// vo.setInsuranceCompany(policy.getInsuranceCompany());
// }
// if (follow != null) {
// vo.setProductName(follow.getProductName());
// vo.setProductLaunchBizId(follow.getProductLaunchBizId());
// }
}
// expectedFortuneVOPage.setRecords(voList);
return expectedFortuneVOPage;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment