|
|
@@ -61,15 +61,6 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
private InsFeeOrdersMapper insFeeOrdersMapper;
|
|
|
|
|
|
|
|
|
- private String getSystemCode() {
|
|
|
- //如果是APP登录的话 则传递SystemCode的头部字段
|
|
|
- if (baseController.getUserSystemCode().equals("APP")) {
|
|
|
- HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
- return request.getHeader("system_code");
|
|
|
- }
|
|
|
- return baseController.getUserSystemCode();
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 订单审核时调整费用
|
|
|
*
|
|
|
@@ -162,7 +153,7 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
Integer withTax, BigDecimal taxRate, int scale) {
|
|
|
|
|
|
// 计算基数
|
|
|
- BigDecimal base = BigDecimal.ZERO;
|
|
|
+ BigDecimal base;
|
|
|
if (withTax == 0) {
|
|
|
// 不含税:保费 / 1.06
|
|
|
base = premium.divide(taxRate, scale, RoundingMode.HALF_EVEN);
|
|
|
@@ -172,8 +163,8 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
}
|
|
|
|
|
|
// ===================== 按比例计算各项费用 =====================
|
|
|
- BigDecimal commission = base.multiply(commissionRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
BigDecimal inlet = base.multiply(inletRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
+ BigDecimal commission = base.multiply(commissionRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
BigDecimal follow = base.multiply(followRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
|
|
|
// 加投直接乘
|
|
|
@@ -183,7 +174,8 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
BigDecimal exportKeepPoint = premium.multiply(exportKeepPointRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
// 留点比例直接乘, modify by lipf ,留点比例在infFeeOrder中计算得到。这里直接使用 2026年6月16日17:32:09, 为了保持金额一致,留点比例不适用百分比乘积,而是使用金额相减
|
|
|
// BigDecimal keepPoint = premium.multiply(keepPointRatio).setScale(scale, RoundingMode.HALF_EVEN);
|
|
|
- BigDecimal keepPoint = BigDecimalUtil.subtract(BigDecimalUtil.add(commission,addThrow),export);
|
|
|
+ BigDecimal keepPoint = BigDecimalUtil.subtract(BigDecimalUtil.add(inlet,addThrow),export);
|
|
|
+ log.info("计算留点:inlet=[{}],addThrow=[{}].export=[{}]", inlet, addThrow, export);
|
|
|
|
|
|
// 赋值到实体(自动匹配 jq / sy / jy)
|
|
|
if ("jq".equals(type)) {
|