FeeRuleSchemeService.java 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. package com.ydtech.modules.fee.service;
  2. import com.ydtech.modules.ins.model.vo.QuoteRespVo;
  3. import com.ydtech.modules.order.entity.vo.*;
  4. import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
  5. import com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsNew;
  6. import java.math.BigDecimal;
  7. import java.util.List;
  8. /**
  9. * 该类中只要包含费用的一些相关接口
  10. * 跟单费用的获取、跟单费用的拆分等
  11. */
  12. public interface FeeRuleSchemeService {
  13. /**
  14. * 总处理费用匹配方法
  15. * @param quoteInfoVo
  16. * @param quoteRespVo
  17. * @param agreementId
  18. * @param businessNo
  19. */
  20. // public void dealFeeOrderInfo(BaseQuoteInfoVo quoteInfoVo, QuoteRespVo quoteRespVo, String agreementId,String businessNo);
  21. /**
  22. * 查询费用明细
  23. *
  24. * @param companyId
  25. * @return
  26. */
  27. public QueryOrderFeeVo queryFeeOrderInfo(String companyId);
  28. // public List<QueryOrderFeeResultVo> convertOrderFeeVoData(QueryOrderFeeVo orderFeeVo);
  29. /**
  30. * 比较和更新总费用比例
  31. *
  32. * @param insOrderNo
  33. * @param jqCostsProportionStr
  34. * @param syCostsProportionStr
  35. */
  36. void compareAndUpdateFeeOrderInfo(String insOrderNo, String jqCostsProportionStr, String syCostsProportionStr, String dealUser);
  37. /**
  38. * 计算入口费用
  39. *
  40. * @param premium 保费
  41. * @param superviseCostsProportion 手续费比例
  42. * @param otherCostsProportion 跟单比例
  43. */
  44. FeeOrderNewVo.EntranceFee calcEntranceFee(BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal otherCostsProportion, BigDecimal taxRate);
  45. /**
  46. * 计算机构管理费用
  47. *
  48. * @param premium 保费
  49. * @param level1Proportion 一级比例
  50. * @param level2Proportion 二级比例
  51. * @param level3Proportion 三级比例
  52. * @param level4Proportion 四级比例
  53. * @param level5Proportion 五级比例
  54. * @return
  55. */
  56. FeeOrderNewVo.DeptManagerFee calcDeptManagerFee(BigDecimal premium, BigDecimal level1Proportion, BigDecimal level2Proportion,
  57. BigDecimal level3Proportion, BigDecimal level4Proportion, BigDecimal level5Proportion);
  58. /**
  59. * 计算出口费用
  60. *
  61. * @param premium 保费
  62. * @param superviseCostsProportion 出口手续费
  63. * @param entranceTotalProportion 入口总比例
  64. * @param deptTotalProportion 机构管理费总比例
  65. * @param retailTotalProportion 分销总比例
  66. * @param taxRate 税率
  67. * @return
  68. */
  69. FeeOrderNewVo.ExportFee calcExportFee(BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal entranceTotalProportion,
  70. BigDecimal deptTotalProportion, BigDecimal retailTotalProportion, BigDecimal taxRate, BigDecimal enterProportion);
  71. /**
  72. * 计算分销费用
  73. *
  74. * @param jqPremiums
  75. * @param jqProportion
  76. * @param syPremiums
  77. * @param syProportion
  78. * @param noPremiums
  79. * @param noProportion
  80. * @param jqRetailProportion
  81. */
  82. FeeOrderNewVo.RetailFee calcRetail(BigDecimal jqPremiums, BigDecimal jqProportion, BigDecimal syPremiums, BigDecimal syProportion, BigDecimal noPremiums,
  83. BigDecimal noProportion, BigDecimal jqRetailProportion, BigDecimal syRetailProportion, BigDecimal noRetailProportion);
  84. FeeOrderNewVo newConvertOrderFeeVoData(InsFeeOrderNew insFeeOrderNew, PtlAgreementProductCostsNew ptlAgreementProductCostsNew);
  85. FeeOrderNewVo.EntranceFee assignEntranceFee(String title, BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal otherCostsProportion,
  86. BigDecimal costsProportion, BigDecimal superviseCostsPremiums, BigDecimal otherCostsPremiums,
  87. BigDecimal costsPremiums);
  88. FeeOrderNewVo.DeptManagerFee assignDeptFee(String title, BigDecimal level1Proportion, BigDecimal level1Premium,
  89. BigDecimal level2Proportion, BigDecimal level2Premium,
  90. BigDecimal level3Proportion, BigDecimal level3Premium,
  91. BigDecimal level4Proportion, BigDecimal level4Premium,
  92. BigDecimal level5Proportion, BigDecimal level5Premium,
  93. BigDecimal profitMarginPremiums,
  94. BigDecimal externalProportion, BigDecimal externalPremiums
  95. );
  96. FeeOrderNewVo.ExportFee assignExportFee(String title, BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal otherCostsProportion,
  97. BigDecimal superviseCostsPremiums, BigDecimal otherCostsPremiums
  98. );
  99. /**
  100. * 推算比例是否正确
  101. *
  102. * @param entranceFee 入口
  103. * @param deptManagerFee 机构管理
  104. * @param exportFee 出口
  105. * @param retailRadio 分销比例
  106. * @param premiums 保费
  107. * @return
  108. */
  109. boolean calculateProportion(FeeOrderNewVo.EntranceFee entranceFee, FeeOrderNewVo.DeptManagerFee deptManagerFee, FeeOrderNewVo.ExportFee exportFee, BigDecimal retailRadio, BigDecimal taxRadio, BigDecimal premiums);
  110. List<DistributionLevelVo> converDistrbutionData(InsFeeOrderNew insFeeOrderNew);
  111. }