|
|
@@ -6,7 +6,9 @@ import com.jzg.commons.entity.orders.po.InsOrders;
|
|
|
import com.jzg.commons.entity.orders.po.InsOrdersCosts;
|
|
|
import com.jzg.commons.entity.po.InsFeeOrders;
|
|
|
import com.jzg.commons.entity.po.PtlAgreement;
|
|
|
+import com.jzg.commons.entity.vo.AgreementInfoVo;
|
|
|
import com.jzg.commons.entity.vo.PtlAgreementCostRatioVo;
|
|
|
+import com.jzg.commons.entity.vo.PtlAgreementCostTypeVo;
|
|
|
import com.jzg.quotation.commons.client.OrgClient;
|
|
|
import com.jzg.quotation.summary.mapper.InsFeeOrdersMapper;
|
|
|
import com.jzg.quotation.summary.service.InsFeeOrdersService;
|
|
|
@@ -121,7 +123,8 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
totalPayable = totalPayable.add(export);
|
|
|
}
|
|
|
|
|
|
- // 6. 设置总费用并更新
|
|
|
+ // 6. 设置总费用、 比例并更新
|
|
|
+ saveRatio(ptlAgreementCostRatioVo,insFeeOrders);
|
|
|
insFeeOrders.setTotalReceivablePremium(scale(totalReceivable, SCALE));
|
|
|
insFeeOrders.setTotalPayablePremium(scale(totalPayable, SCALE));
|
|
|
this.updateById(insFeeOrders);
|
|
|
@@ -200,4 +203,32 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
|
|
|
Method setter = clazz.getMethod(setterName, BigDecimal.class);
|
|
|
setter.invoke(obj, value);
|
|
|
}
|
|
|
+
|
|
|
+ // 保存比例
|
|
|
+ private void saveRatio(PtlAgreementCostRatioVo ptlAgreementCostRatioVo, InsFeeOrders insFeeOrders) {
|
|
|
+ // 手续费比例
|
|
|
+ insFeeOrders.setJqCommissionRatio(covertPercent(ptlAgreementCostRatioVo.getJqCommissionRatio()));
|
|
|
+ insFeeOrders.setSyCommissionRatio(covertPercent(ptlAgreementCostRatioVo.getSyCommissionRatio()));
|
|
|
+ insFeeOrders.setJyCommissionRatio(covertPercent(ptlAgreementCostRatioVo.getJyCommissionRatio()));
|
|
|
+ // 入口比例
|
|
|
+ insFeeOrders.setJqInletRatio(covertPercent(ptlAgreementCostRatioVo.getJqInletRatio()));
|
|
|
+ insFeeOrders.setSyInletRatio(covertPercent(ptlAgreementCostRatioVo.getSyInletRatio()));
|
|
|
+ insFeeOrders.setJyInletRatio(covertPercent(ptlAgreementCostRatioVo.getJyInletRatio()));
|
|
|
+ // 跟单比例
|
|
|
+ insFeeOrders.setJqFollowRatio(insFeeOrders.getJqInletRatio().subtract(insFeeOrders.getJqCommissionRatio()));
|
|
|
+ insFeeOrders.setSyFollowRatio(insFeeOrders.getSyInletRatio().subtract(insFeeOrders.getSyCommissionRatio()));
|
|
|
+ insFeeOrders.setJyFollowRatio(insFeeOrders.getJyInletRatio().subtract(insFeeOrders.getJyCommissionRatio()));
|
|
|
+ // 加投比例
|
|
|
+ insFeeOrders.setJqAdditionalRatio(covertPercent(ptlAgreementCostRatioVo.getJqAdditionalRatio()));
|
|
|
+ insFeeOrders.setSyAdditionalRatio(covertPercent(ptlAgreementCostRatioVo.getJqAdditionalRatio()));
|
|
|
+ insFeeOrders.setJyAdditionalRatio(covertPercent(ptlAgreementCostRatioVo.getJqAdditionalRatio()));
|
|
|
+ // 留点比例
|
|
|
+ insFeeOrders.setJqKeepPointRatio(covertPercent(ptlAgreementCostRatioVo.getJqKeepPointRatio()));
|
|
|
+ insFeeOrders.setSyKeepPointRatio(covertPercent(ptlAgreementCostRatioVo.getSyKeepPointRatio()));
|
|
|
+ insFeeOrders.setJyKeepPointRatio(covertPercent(ptlAgreementCostRatioVo.getJyKeepPointRatio()));
|
|
|
+ // 出口比例
|
|
|
+ insFeeOrders.setJqExportRatio(covertPercent(ptlAgreementCostRatioVo.getJqExportRatio()));
|
|
|
+ insFeeOrders.setSyExportRatio(covertPercent(ptlAgreementCostRatioVo.getSyExportRatio()));
|
|
|
+ insFeeOrders.setJyExportRatio(covertPercent(ptlAgreementCostRatioVo.getJyExportRatio()));
|
|
|
+ }
|
|
|
}
|