|
|
@@ -6,6 +6,7 @@ import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.lang.tree.Tree;
|
|
|
import cn.hutool.core.lang.tree.TreeNodeConfig;
|
|
|
import cn.hutool.core.lang.tree.TreeUtil;
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
@@ -601,6 +602,23 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
return followCompanyFeeVos;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<FollowCompanyFeeVO> platformCompanySuperviseSettlementReport(SettlementReportQueryVo settlementReportQueryVo) {
|
|
|
+ log.info("平台协议-结算记录-结算报表: settlementReportQueryVo=[{}]", JSONUtil.toJsonStr(settlementReportQueryVo));
|
|
|
+
|
|
|
+ List<FollowCompanyFeeVO> platformCompanyFeeVos = baseMapper.selectPlatformCompanySettlementReport(settlementReportQueryVo);
|
|
|
+ // 过滤掉对接人和对接人手机号为空的数据
|
|
|
+ List<FollowCompanyFeeVO> list = platformCompanyFeeVos.stream().filter(plat -> StrUtil.isNotBlank(plat.getContactPerson()) && StrUtil.isNotBlank(plat.getContactPersonPhone())).toList();
|
|
|
+ // 查询所有保险公司,匹配保险公司的id和名称
|
|
|
+ HttpResult<Map<String, EsmInsCompany>> mapHttpResult = esmInsCompanyClient.queryAllCompanyMap();
|
|
|
+ Map<String, EsmInsCompany> data = mapHttpResult.getData();
|
|
|
+ for (FollowCompanyFeeVO platformCompanyFeeVo : list) {
|
|
|
+ platformCompanyFeeVo.setCompanyName(null != data.get(platformCompanyFeeVo.getCompanyId()) ? data.get(platformCompanyFeeVo.getCompanyId()).getName() : "");
|
|
|
+ platformCompanyFeeVo.setTotalUnSettlementAmount(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* BigDecimal安全相加工具:null值转为0
|
|
|
*/
|
|
|
@@ -1088,6 +1106,11 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
SettlementVo settlementVo = platformSettlementVo.getSettlementVo();
|
|
|
InvoicingVo invoicingVo = platformSettlementVo.getInvoicingVo();
|
|
|
log.info("平台结算:platformSettlement=[{}]", JSONUtil.toJsonStr(platformSettlementVo));
|
|
|
+
|
|
|
+ if (StrUtil.isBlank(platformSettlementVo.getInvoicingVo().getContactPerson())
|
|
|
+ || StrUtil.isBlank(platformSettlementVo.getInvoicingVo().getContactPersonPhone())){
|
|
|
+ throw new SystemException("对接人信息不能为空");
|
|
|
+ }
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
LocalDateTime settlementDateTime = LocalDateTime.parse(platformSettlementVo.getSettlementVo().getReceivePaymentDate(), formatter);
|
|
|
try {
|
|
|
@@ -1111,6 +1134,8 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
invoice.setOverinflatedAmount(invoicingVo.getOverinflatedAmount());
|
|
|
invoice.setReceivableSupervisePremium(invoicingVo.getReceivablePremium());
|
|
|
invoice.setTaxPoint(invoicingVo.getTaxPoint());
|
|
|
+ invoice.setContactPerson(platformSettlementVo.getInvoicingVo().getContactPerson());
|
|
|
+ invoice.setContactPersonPhone(platformSettlementVo.getInvoicingVo().getContactPersonPhone());
|
|
|
|
|
|
List<InsPlyIncomeInvoiceLink> invoicingLinkList = new ArrayList<>();
|
|
|
|