|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.core.page.PageRequest;
|
|
import com.ydtech.core.page.PageRequest;
|
|
|
|
|
+import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
import com.ydtech.modules.inv.dao.InvReceivableMapper;
|
|
import com.ydtech.modules.inv.dao.InvReceivableMapper;
|
|
|
import com.ydtech.modules.inv.dao.InvSettlementSourceMapper;
|
|
import com.ydtech.modules.inv.dao.InvSettlementSourceMapper;
|
|
@@ -457,6 +458,8 @@ public class InvReceivableServiceImpl implements InvReceivableService {
|
|
|
"已结算".equals(invSource.getClearingState()) ? "1" : invSource.getClearingState());
|
|
"已结算".equals(invSource.getClearingState()) ? "1" : invSource.getClearingState());
|
|
|
invSource.setInsuranceClearingState("未结算".equals(invSource.getInsuranceClearingState()) ? "0" :
|
|
invSource.setInsuranceClearingState("未结算".equals(invSource.getInsuranceClearingState()) ? "0" :
|
|
|
"已结算".equals(invSource.getInsuranceClearingState()) ? "1" : invSource.getInsuranceClearingState());
|
|
"已结算".equals(invSource.getInsuranceClearingState()) ? "1" : invSource.getInsuranceClearingState());
|
|
|
|
|
+ invSource.setUpdateUserId(BaseController.getUser().getId());
|
|
|
|
|
+ invSource.setUpdateName(BaseController.getUser().getName());
|
|
|
return invSourceMapper.updateById(invSource) > 0;
|
|
return invSourceMapper.updateById(invSource) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -627,9 +630,9 @@ public class InvReceivableServiceImpl implements InvReceivableService {
|
|
|
invSource.builder();
|
|
invSource.builder();
|
|
|
BigDecimal tax = new BigDecimal(1.06);
|
|
BigDecimal tax = new BigDecimal(1.06);
|
|
|
/**
|
|
/**
|
|
|
- * jqPremiumTax 交强险保费
|
|
|
|
|
- * syPremiumTax 商业险保费
|
|
|
|
|
- * nonCarPremiumTax 非车保费
|
|
|
|
|
|
|
+ * jqPremiumTax 交强险保费(含税)
|
|
|
|
|
+ * syPremiumTax 商业险保费(含税)
|
|
|
|
|
+ * nonCarPremiumTax 非车保费(含税)
|
|
|
* jqReceivableRatio 交强应收比例
|
|
* jqReceivableRatio 交强应收比例
|
|
|
* syReceivableRatio 商业应收比列
|
|
* syReceivableRatio 商业应收比列
|
|
|
* nonCarReceivableRatio 非车应收比列
|
|
* nonCarReceivableRatio 非车应收比列
|
|
@@ -668,14 +671,14 @@ public class InvReceivableServiceImpl implements InvReceivableService {
|
|
|
.add(invSource.getSyPremium().multiply(invSource.getSyPremiumRatio())
|
|
.add(invSource.getSyPremium().multiply(invSource.getSyPremiumRatio())
|
|
|
.add(invSource.getNonCarPremium().multiply(invSource.getNonCarPremiumRatio()))));
|
|
.add(invSource.getNonCarPremium().multiply(invSource.getNonCarPremiumRatio()))));
|
|
|
|
|
|
|
|
- //非跟单金额 nonCopying
|
|
|
|
|
|
|
+ //非跟单金额 nonCopying 不含税保费 * 非跟单比例
|
|
|
invSource.setNonCopying(invSource.getJqPremium().multiply(invSource.getJqNonCopyingRatio())
|
|
invSource.setNonCopying(invSource.getJqPremium().multiply(invSource.getJqNonCopyingRatio())
|
|
|
.add(invSource.getSyPremium().multiply(invSource.getSyNonCopyingRatio())
|
|
.add(invSource.getSyPremium().multiply(invSource.getSyNonCopyingRatio())
|
|
|
.add(invSource.getNonCarPremium().multiply(invSource.getNonCarNonCopyingRatio()))));
|
|
.add(invSource.getNonCarPremium().multiply(invSource.getNonCarNonCopyingRatio()))));
|
|
|
|
|
|
|
|
|
|
|
|
|
- //选择类型为平台类型时 应收金额 = 含税保费 * 应收比例
|
|
|
|
|
- if (invSource.getInvSourceType().equals("platform")) {
|
|
|
|
|
|
|
+ //选择类型为含税类型时 应收金额 = 含税保费 * 应收比例
|
|
|
|
|
+ if (invSource.getInvSourceType().equals("inclusive")) {
|
|
|
//处理应收金额
|
|
//处理应收金额
|
|
|
invSource.setReceivable(invSource.getJqPremiumTax().multiply(invSource.getJqReceivableRatio())
|
|
invSource.setReceivable(invSource.getJqPremiumTax().multiply(invSource.getJqReceivableRatio())
|
|
|
.add(invSource.getSyPremiumTax().multiply(invSource.getSyReceivableRatio())
|
|
.add(invSource.getSyPremiumTax().multiply(invSource.getSyReceivableRatio())
|
|
@@ -685,8 +688,8 @@ public class InvReceivableServiceImpl implements InvReceivableService {
|
|
|
invSource.getReceivable().add(invSource.getSubsidyAmount()));
|
|
invSource.getReceivable().add(invSource.getSubsidyAmount()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //选择类型为私有类型时 应收金额 = ( 不含税保费 * 手续费 )+ (不含税保费 * 非跟单比例)
|
|
|
|
|
- if (invSource.getInvSourceType().equals("privately")) {
|
|
|
|
|
|
|
+ //选择类型为不含税类型时 应收金额 = (不含税保费 * 手续费)+ (不含税保费 * 非跟单比例)
|
|
|
|
|
+ if (invSource.getInvSourceType().equals("exclusive")) {
|
|
|
//应收金额
|
|
//应收金额
|
|
|
invSource.setReceivable(invSource.getPremium().add(invSource.getNonCopying()));
|
|
invSource.setReceivable(invSource.getPremium().add(invSource.getNonCopying()));
|
|
|
|
|
|