Commit 5a139576 by zhangxingmin

push

parent 67f8648e
...@@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.Operation; ...@@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -38,6 +39,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -38,6 +39,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
...@@ -347,7 +349,7 @@ public class ApiCommissionExpectedController { ...@@ -347,7 +349,7 @@ public class ApiCommissionExpectedController {
receivableReportPage = commissionExpectedService.receivableReportPage(reportPage, allExpectedIdList); receivableReportPage = commissionExpectedService.receivableReportPage(reportPage, allExpectedIdList);
} }
// enrichReceivableReportWithCompanyName(receivableReportPage); // enrichReceivableReportWithCompanyName(receivableReportPage);
receivableReportPage = convertProductName(receivableReportPage); receivableReportPage = convertReceivableReport(receivableReportPage);
// 组装返回结果 // 组装返回结果
ReceivableReportResponse response = new ReceivableReportResponse(); ReceivableReportResponse response = new ReceivableReportResponse();
response.setStatisticsVO(statisticsVO); response.setStatisticsVO(statisticsVO);
...@@ -355,18 +357,8 @@ public class ApiCommissionExpectedController { ...@@ -355,18 +357,8 @@ public class ApiCommissionExpectedController {
return Result.success(response); return Result.success(response);
} }
// /**
// * 保單持有人(中/英)/签单人/转介人名称(主)查询 public IPage<ReceivableReportVO> convertReceivableReport(IPage<ReceivableReportVO> receivableReportPage) {
// * @param policyHolder
// * @param signer
// * @param brokerName
// * @return
// */
// public List<String> getPolicyNoList(String policyHolder,String signer,String brokerName) {
//
// }
public IPage<ReceivableReportVO> convertProductName(IPage<ReceivableReportVO> receivableReportPage) {
if (!org.springframework.util.CollectionUtils.isEmpty(receivableReportPage.getRecords())) { if (!org.springframework.util.CollectionUtils.isEmpty(receivableReportPage.getRecords())) {
List<String> policyNoList = receivableReportPage.getRecords().stream().map(ReceivableReportVO::getPolicyNo).collect(Collectors.toList()); List<String> policyNoList = receivableReportPage.getRecords().stream().map(ReceivableReportVO::getPolicyNo).collect(Collectors.toList());
List<PolicyFollow> policyFollowList = new ArrayList<>(); List<PolicyFollow> policyFollowList = new ArrayList<>();
...@@ -383,6 +375,17 @@ public class ApiCommissionExpectedController { ...@@ -383,6 +375,17 @@ public class ApiCommissionExpectedController {
vo.setProductName(policyFollow.getProductName()); vo.setProductName(policyFollow.getProductName());
vo.setProductLaunchBizId(policyFollow.getProductLaunchBizId()); vo.setProductLaunchBizId(policyFollow.getProductLaunchBizId());
} }
//已入账比例(%)>= 预计入账比例(%) 待入账比例和待入账金额归零
//已入账比例(%)
BigDecimal paidRatio = ObjectUtils.defaultIfNull(vo.getPaidRatio(), BigDecimal.ZERO);
//预计入账比例(%)
BigDecimal commissionRatio = ObjectUtils.defaultIfNull(vo.getCommissionRatio(), BigDecimal.ZERO);
if (paidRatio.compareTo(commissionRatio) >= 0) {
//待入账金额(港币)
vo.setUnpaidAmount(BigDecimal.ZERO);
//待入账比例(%)
vo.setUnpaidRatio(BigDecimal.ZERO);
}
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
receivableReportPage.setRecords(voList); receivableReportPage.setRecords(voList);
......
...@@ -155,4 +155,14 @@ public class ReceivableReportVO { ...@@ -155,4 +155,14 @@ public class ReceivableReportVO {
* 保單持有人(投保人,保单表)(英文名) * 保單持有人(投保人,保单表)(英文名)
*/ */
private String policyHolderEn; private String policyHolderEn;
/**
* 受保人
*/
private String insured;
/**
* 受保人-英文
*/
private String insuredEn;
} }
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