PtlAgreementService.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. package com.ydtech.modules.protocol.service;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.baomidou.mybatisplus.extension.service.IService;
  4. import com.ydtech.core.page.HttpResult;
  5. import com.ydtech.core.page.PageResult;
  6. import com.ydtech.modules.esm.model.EsmInsCompany;
  7. import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
  8. import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
  9. import com.ydtech.modules.protocol.entity.dto.PtlAgreementSaveDto;
  10. import com.ydtech.modules.protocol.entity.po.PtlAgreement;
  11. import com.ydtech.modules.protocol.entity.po.PtlAgreementProductCosts;
  12. import com.ydtech.modules.protocol.entity.po.PtlAgreementUndwrtRules;
  13. import com.ydtech.modules.protocol.entity.vo.*;
  14. import java.util.HashMap;
  15. import java.util.List;
  16. /**
  17. * @author wenks
  18. * @description 针对表【ptl_agreement(协议信息表)】的数据库操作Service
  19. * @createDate 2023-06-05 17:59:52
  20. */
  21. public interface PtlAgreementService extends IService<PtlAgreement> {
  22. /**
  23. * 获取可以报价的 协议 及其保险公司
  24. *
  25. * @return List<PtlAgreementInsCompanyDto>
  26. */
  27. List<PtlAgreementInsCompanyDto> getAgreementCompany(String deptId);
  28. PtlAgreementInsCompanyDto getAgreementCompany(String deptId,String companyId);
  29. /**
  30. * 通过协议id 判断是否存在
  31. *
  32. * @param agreementId 协议id
  33. */
  34. PtlAgreement ifExistsById(String agreementId);
  35. /**
  36. * 添加协议
  37. *
  38. * @param agreement 上传的协议信息
  39. * @param userName 用户名
  40. * @return HttpResult
  41. */
  42. HttpResult<Object> saveAgreement(PtlAgreementSaveVo agreement, String userName);
  43. /**
  44. * 添加协议产品费用
  45. * @param agreement
  46. * @param userName
  47. * @return
  48. */
  49. HttpResult<Object> saveAgreementProduct(PtlAgreementProductCosts agreement, String userName);
  50. /**
  51. * 修改协议产品费用
  52. * @param agreement
  53. * @param userName
  54. * @return
  55. */
  56. HttpResult<Object> updateAgreementProduct(PtlAgreementProductCosts agreement, String userName);
  57. /**
  58. *
  59. * @param id
  60. * @return
  61. */
  62. HttpResult<Object> deleteAgreementProduct(String id, String userName);
  63. /**
  64. * 添加非车产品协议
  65. * @param agreement
  66. * @param userName
  67. * @return
  68. */
  69. HttpResult<Object> saveAgreementNonCarProductCosts(PtlAgreementNonVehicleProductCostsVo agreement, String userName);
  70. /**
  71. * 添加承保规则
  72. * @param ptlAgreementUndwrtRules
  73. * @param userName
  74. * @return
  75. */
  76. HttpResult<Object> saveAgreementUndwrtRules(PtlAgreementUndwrtRules ptlAgreementUndwrtRules, String userName);
  77. /**
  78. * 修改承保规则
  79. * @param ptlAgreementUndwrtRules
  80. * @param userName
  81. * @return
  82. */
  83. HttpResult<Object> updateAgreementUndwrtRules(PtlAgreementUndwrtRules ptlAgreementUndwrtRules, String userName);
  84. /**
  85. * 删除承保规则
  86. * @param id
  87. * @param userName
  88. * @return
  89. */
  90. HttpResult<Object> deleteAgreementUndwrtRules(String id, String userName);
  91. /**
  92. * 分页查询协议
  93. *
  94. * @param ptlAgreementPageVo 分页查询参数
  95. * @return HttpResult
  96. */
  97. Page<PtlAgreement> pageAgreement(Page page,PtlAgreementPageVo ptlAgreementPageVo);
  98. /**
  99. * 根据保险公司查询协议
  100. * @param ptlAgreementPageVo
  101. * @return
  102. */
  103. HttpResult<List<PtlAgreement>> listAgreement( PtlAgreementPageVo ptlAgreementPageVo);
  104. /**
  105. * 通过协议id查询
  106. *
  107. * @param agreementId 协议id
  108. * @return HttpResult
  109. */
  110. HttpResult<PtlAgreementQueryVo> getByAgreementId(String agreementId);
  111. /**
  112. * 删除协议
  113. *
  114. * @param agreementId 协议id
  115. * @return HttpResult
  116. */
  117. HttpResult<Object> deleteAgreement(String agreementId,String userName);
  118. /**
  119. * 修改协议
  120. *
  121. * @param userName 用户名
  122. * @param agreementId 协议id
  123. * @param agreement 上传的协议信息
  124. * @return HttpResult
  125. */
  126. HttpResult<Object> reviseAgreement(String userName, String agreementId, PtlAgreementSaveVo agreement);
  127. /**
  128. * 提交 产品费用 承保规则 账号信息 授权部门
  129. *
  130. * @param agreementId 协议id
  131. * @param agreement 提交内容
  132. */
  133. void saveAssociationInformation(String agreementId, EsmInsCompany insuranceCompanyId, PtlAgreementSaveVo agreement);
  134. /**
  135. * 删除关联信息 产品费用 删除非车险产品费用 承保规则 账号信息 授权部门
  136. *
  137. * @param agreementId 协议id
  138. */
  139. void deleteAssociationInformation(String agreementId);
  140. /**
  141. * 删除关联信息 删除非车险产品费用 承保规则 账号信息 授权部门
  142. */
  143. void deleteAssociationInformationExcludeCosts(String agreementId);
  144. /**
  145. * 审核协议
  146. *
  147. * @param agreementId 协议id
  148. * @param ptlAgreementAuditVo 审核内容
  149. * @return
  150. */
  151. HttpResult<Object> auditAgreement(String agreementId, PtlAgreementAuditVo ptlAgreementAuditVo);
  152. /**
  153. * 校验登录
  154. *
  155. * @param ptlAgreement 协议信息
  156. * @param agreementSaveDto 协议添加实体
  157. * @param attribution 协议归属添加实体
  158. */
  159. EsmInsCompany verifyLogin(PtlAgreement ptlAgreement, PtlAgreementSaveDto agreementSaveDto, PtlAgreementAttributionDto attribution);
  160. /**
  161. * 根据协议编码,归属保险公司获取非车险费用配置信息
  162. * @param agreementId
  163. * @param companyId
  164. * @return
  165. */
  166. HttpResult<List<PtlAgreementNonCarProductCostsVo>> getNonCarCostsInfo(String agreementId, String companyId);
  167. /**
  168. * 根据归属保司,查询上级以及本级相关协议集合
  169. * @param associationCompaniesId
  170. * @return
  171. */
  172. HttpResult<List<PtlAgreement>> findRelationAgreement(String associationCompaniesId);
  173. /**
  174. * @version
  175. * @author: hxl
  176. * @Date: 2024/4/15 18:04
  177. * @Description: 查询所有审核的协议
  178. */
  179. List<PtlAgreement> findCheckAgreementList(PtlAgreement ptlAgreement);
  180. /**
  181. * 获取当前费用的保险公司所有协议
  182. * @param agreementId
  183. * @return
  184. */
  185. List<PtlAgreement> getCurrentAgreementList(String agreementId);
  186. PtlAgreement getByAgreementIdNew(String agreementId);
  187. /**
  188. * 根据保险公司code 获取协议信息
  189. */
  190. List<PtlAgreement> getByCompanyCode(String companyCode);
  191. List<HashMap<String, Object>> getDockingPersonList();
  192. }