|
|
@@ -2344,6 +2344,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
if(batchModifyVo.getJqSuperviseCostsProportion() != null && batchModifyVo.getJqOtherCostsProportion() == null){
|
|
|
jqInletRatio = insFeeOrders .getJqInletRatio();
|
|
|
jqCommissionRatio = batchModifyVo.getJqSuperviseCostsProportion();
|
|
|
+ if (jqCommissionRatio.compareTo(jqInletRatio) > 0){
|
|
|
+ jqCommissionRatio = jqInletRatio;
|
|
|
+ }
|
|
|
jqFollowRatio = BigDecimalUtil.subtract(jqInletRatio,jqCommissionRatio);
|
|
|
}else if(batchModifyVo.getJqSuperviseCostsProportion() == null && batchModifyVo.getJqOtherCostsProportion() != null){
|
|
|
jqCommissionRatio = BigDecimalUtil.null2Zero(insPlyIncome.getJqSuperviseCostsProportion());
|
|
|
@@ -2369,6 +2372,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
if(batchModifyVo.getSySuperviseCostsProportion() != null && batchModifyVo.getSyOtherCostsProportion() == null){
|
|
|
syInletRatio = insFeeOrders.getSyInletRatio();
|
|
|
syCommissionRatio = batchModifyVo.getSySuperviseCostsProportion();
|
|
|
+ if (syCommissionRatio.compareTo(syInletRatio) > 0){
|
|
|
+ syCommissionRatio = syInletRatio;
|
|
|
+ }
|
|
|
syFollowRatio = BigDecimalUtil.subtract(syInletRatio,syCommissionRatio);
|
|
|
}else if(batchModifyVo.getSySuperviseCostsProportion() == null && null != batchModifyVo.getSyOtherCostsProportion()){
|
|
|
syCommissionRatio = BigDecimalUtil.null2Zero(insPlyIncome.getSySuperviseCostsProportion());
|
|
|
@@ -2394,6 +2400,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
if(batchModifyVo.getJySuperviseCostsProportion() != null && batchModifyVo.getJyOtherCostsProportion() == null){
|
|
|
jyInletRatio = insFeeOrders.getJyInletRatio();
|
|
|
jyCommissionRatio = batchModifyVo.getJySuperviseCostsProportion();
|
|
|
+ if (jyCommissionRatio.compareTo(jyInletRatio) > 0){
|
|
|
+ jyCommissionRatio = jyInletRatio;
|
|
|
+ }
|
|
|
jyFollowRatio = BigDecimalUtil.subtract(jyInletRatio,jyCommissionRatio);
|
|
|
}else if(batchModifyVo.getJySuperviseCostsProportion() == null && batchModifyVo.getJyOtherCostsProportion() != null){
|
|
|
jyCommissionRatio = BigDecimalUtil.null2Zero(insPlyIncome.getJySuperviseCostsProportion());
|
|
|
@@ -4115,9 +4124,10 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
List<String> invoiceIdList = Arrays.asList(invoiceIds.split(","));
|
|
|
log.info("invoiceIdList.size=[{}]", CollUtil.size(invoiceIdList));
|
|
|
log.info("invoiceIdList=[{}]", JSONUtil.toJsonStr(invoiceIdList));
|
|
|
- BigDecimal amount = baseMapper.querySettledAmountByInvoiceIds(invoiceIdList);
|
|
|
- action.setSettledAmount(Objects.toString(amount,"0"));
|
|
|
- action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),amount).toString());
|
|
|
+ InsPlyIncomeInvoiceSettlementVo insPlyIncomeInvoiceSettlementVo = baseMapper.querySettledAmountByInvoiceIds(invoiceIdList);
|
|
|
+ action.setSettledAmount(Objects.toString(insPlyIncomeInvoiceSettlementVo.getActualReceivedAmount(),"0"));
|
|
|
+ action.setTotalPaymentDifference(insPlyIncomeInvoiceSettlementVo.getSettlementPaymentDifference());
|
|
|
+ action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),insPlyIncomeInvoiceSettlementVo.getActualReceivedAmount()).toString());
|
|
|
}else{
|
|
|
action.setSettledAmount("0");
|
|
|
action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),BigDecimal.ZERO).toString());
|