Commit ef0bfbbb by zhangxingmin

Merge remote-tracking branch 'origin/test' into test

parents 3ab38b9c ccfebff0
...@@ -1012,7 +1012,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1012,7 +1012,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
// 5. 组装返回结果 // 5. 组装返回结果
ApiExpectedFortunePageResponseVO response = new ApiExpectedFortunePageResponseVO(); ApiExpectedFortunePageResponseVO response = new ApiExpectedFortunePageResponseVO();
response.setStatisticsVO(statisticsVO); response.setStatisticsVO(statisticsVO);
response.setPage(iExpectedFortuneService.getVOPage(iPage)); // 调整数据顺序 response.setPage(iExpectedFortuneService.getVOPage(iPage)); // 字段填充、调整数据顺序
log.info("查询应付款管理列表完成, 耗时: {}ms, 页码: {}, 页大小: {}, 总记录数: {}", log.info("查询应付款管理列表完成, 耗时: {}ms, 页码: {}, 页大小: {}, 总记录数: {}",
System.currentTimeMillis() - startTime, System.currentTimeMillis() - startTime,
...@@ -1199,25 +1199,14 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1199,25 +1199,14 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
public IPage<PayableReportVO> convertPayableReportVO(IPage<PayableReportVO> payableReportPage) { public IPage<PayableReportVO> convertPayableReportVO(IPage<PayableReportVO> payableReportPage) {
if (!CollectionUtils.isEmpty(payableReportPage.getRecords())) { if (!CollectionUtils.isEmpty(payableReportPage.getRecords())) {
// 查询转介人等级
List<String> brokerBizIdList = payableReportPage.getRecords().stream().map(PayableReportVO::getBrokerBizId).collect(Collectors.toList()); List<String> brokerBizIdList = payableReportPage.getRecords().stream().map(PayableReportVO::getBrokerBizId).collect(Collectors.toList());
List<UserGradeDto> userGradeDtoList = new ArrayList<>(); Map<String, UserGradeDto> userGradeMap = iAgentAccumulatedFycService.queryUserGradeMap(brokerBizIdList);
if (!CollectionUtils.isEmpty(brokerBizIdList)) {
userGradeDtoList = iAgentAccumulatedFycService.queryUserGradeList(brokerBizIdList);
}
Map<String, UserGradeDto> userGradeMap = userGradeDtoList.stream()
.collect(Collectors.toMap(UserGradeDto::getClientUserBizId, Function.identity()));
// 查询新单跟进
List<String> policyNoList = payableReportPage.getRecords().stream().map(PayableReportVO::getPolicyNo).collect(Collectors.toList()); List<String> policyNoList = payableReportPage.getRecords().stream().map(PayableReportVO::getPolicyNo).collect(Collectors.toList());
Map<String, PolicyFollow> policyFollowMap = policyFollowService.queryPolicyFollowMap(policyNoList);
List<PolicyFollow> policyFollowList = new ArrayList<>();
if (!CollectionUtils.isEmpty(policyNoList)) {
policyFollowList = policyFollowService.lambdaQuery()
.in(PolicyFollow::getPolicyNo, policyNoList)
.list();
}
Map<String, PolicyFollow> policyFollowMap = policyFollowList.stream()
.collect(Collectors.toMap(PolicyFollow::getPolicyNo, Function.identity()));
List<PayableReportVO> voList = payableReportPage.getRecords().stream().map(vo -> { List<PayableReportVO> voList = payableReportPage.getRecords().stream().map(vo -> {
PolicyFollow policyFollow= policyFollowMap.get(vo.getPolicyNo()); PolicyFollow policyFollow= policyFollowMap.get(vo.getPolicyNo());
UserGradeDto userGradeDto= userGradeMap.get(vo.getBrokerBizId()); UserGradeDto userGradeDto= userGradeMap.get(vo.getBrokerBizId());
...@@ -1229,6 +1218,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService ...@@ -1229,6 +1218,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if (policyFollow != null) { if (policyFollow != null) {
vo.setProductName(policyFollow.getProductName()); vo.setProductName(policyFollow.getProductName());
vo.setProductLaunchBizId(policyFollow.getProductLaunchBizId()); vo.setProductLaunchBizId(policyFollow.getProductLaunchBizId());
vo.setPolicyHolder(policyFollow.getPolicyHolder());
vo.setPolicyHolderEn(policyFollow.getPolicyHolderEn());
} }
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
......
...@@ -60,9 +60,7 @@ public class ApiExpectedFortunePageRequest extends PageDto { ...@@ -60,9 +60,7 @@ public class ApiExpectedFortunePageRequest extends PageDto {
@Schema(description = "应付款类型 R-关联保单应付款 U-非关联保单应付款") @Schema(description = "应付款类型 R-关联保单应付款 U-非关联保单应付款")
private String fortuneBizType; private String fortuneBizType;
/** @Schema(description = "保單持有人(中/英)")
* 保單持有人(中/英)
*/
private String policyHolder; private String policyHolder;
private List<String> PolicyNoList; private List<String> PolicyNoList;
......
...@@ -99,27 +99,24 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe ...@@ -99,27 +99,24 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
List<String> brokerBizIds = expectedFortuneList.stream().map(ApiExpectedFortunePageResponse::getBrokerBizId).collect(Collectors.toList()); List<String> brokerBizIds = expectedFortuneList.stream().map(ApiExpectedFortunePageResponse::getBrokerBizId).collect(Collectors.toList());
Map<String, UserGradeDto> userGradeMap = iAgentAccumulatedFycService.queryUserGradeMap(brokerBizIds); Map<String, UserGradeDto> userGradeMap = iAgentAccumulatedFycService.queryUserGradeMap(brokerBizIds);
// 2. 关联查询保单信息 // 2. 关联查询新单跟进信息
Set<String> policyNoList = expectedFortuneList.stream().map(ApiExpectedFortunePageResponse::getPolicyNo).collect(Collectors.toSet());
Map<String, PolicyFollow> policyFollowMap = policyFollowService.queryPolicyFollowMap(policyNoList);
for (ApiExpectedFortunePageResponse vo : expectedFortuneList) { for (ApiExpectedFortunePageResponse vo : expectedFortuneList) {
// 出账币种名称
vo.setCurrencyName("港币"); 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()); UserGradeDto userGradeDto = userGradeMap.get(vo.getBrokerBizId());
if (userGradeDto != null) { if (userGradeDto != null) {
vo.setBrokerGradeName(userGradeDto.getGradeName()); vo.setBrokerGradeName(userGradeDto.getGradeName());
} }
// if (policy != null) {
// vo.setInsuranceCompany(policy.getInsuranceCompany()); PolicyFollow policyFollow = policyFollowMap.get(vo.getPolicyNo());
// } if (policyFollow != null) {
// if (follow != null) { vo.setInsuranceCompany(policyFollow.getInsuranceCompany());
// vo.setProductName(follow.getProductName()); vo.setProductName(policyFollow.getProductName());
// vo.setProductLaunchBizId(follow.getProductLaunchBizId()); }
// }
} }
expectedFortuneVOPage.setRecords(expectedFortuneList); expectedFortuneVOPage.setRecords(expectedFortuneList);
......
...@@ -3,6 +3,7 @@ package com.yd.csf.service.vo; ...@@ -3,6 +3,7 @@ package com.yd.csf.service.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
...@@ -21,6 +22,18 @@ public class PayableReportVO { ...@@ -21,6 +22,18 @@ public class PayableReportVO {
private String policyNo; private String policyNo;
/** /**
* 投保人
*/
@Schema(description = "投保人")
private String policyHolder;
/**
* 投保人英文
*/
@Schema(description = "投保人英文")
private String policyHolderEn;
/**
* 转介人 * 转介人
*/ */
@Schema(description = "转介人(保单的第一位转介人)") @Schema(description = "转介人(保单的第一位转介人)")
......
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