PtlAgreementService.java 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. /**
  29. * 获取可以报价的 可录入外部订单的协议
  30. * @param deptId
  31. * @return
  32. */
  33. List<PtlAgreementInsCompanyDto> getAgreementCompanyExternal(String deptId);
  34. PtlAgreementInsCompanyDto getAgreementCompany(String deptId,String companyId);
  35. /**
  36. * 通过协议id 判断是否存在
  37. *
  38. * @param agreementId 协议id
  39. */
  40. PtlAgreement ifExistsById(String agreementId);
  41. /**
  42. * 添加协议
  43. *
  44. * @param agreement 上传的协议信息
  45. * @param userName 用户名
  46. * @return HttpResult
  47. */
  48. HttpResult<Object> saveAgreement(PtlAgreementSaveVo agreement, String userName);
  49. /**
  50. * 添加协议产品费用
  51. * @param agreement
  52. * @param userName
  53. * @return
  54. */
  55. HttpResult<Object> saveAgreementProduct(PtlAgreementProductCosts agreement, String userName);
  56. /**
  57. * 修改协议产品费用
  58. * @param agreement
  59. * @param userName
  60. * @return
  61. */
  62. HttpResult<Object> updateAgreementProduct(PtlAgreementProductCosts agreement, String userName);
  63. /**
  64. *
  65. * @param id
  66. * @return
  67. */
  68. HttpResult<Object> deleteAgreementProduct(String id, String userName);
  69. /**
  70. * 添加非车产品协议
  71. * @param agreement
  72. * @param userName
  73. * @return
  74. */
  75. HttpResult<Object> saveAgreementNonCarProductCosts(PtlAgreementNonVehicleProductCostsVo agreement, String userName);
  76. /**
  77. * 添加承保规则
  78. * @param ptlAgreementUndwrtRules
  79. * @param userName
  80. * @return
  81. */
  82. HttpResult<Object> saveAgreementUndwrtRules(PtlAgreementUndwrtRules ptlAgreementUndwrtRules, String userName);
  83. /**
  84. * 修改承保规则
  85. * @param ptlAgreementUndwrtRules
  86. * @param userName
  87. * @return
  88. */
  89. HttpResult<Object> updateAgreementUndwrtRules(PtlAgreementUndwrtRules ptlAgreementUndwrtRules, String userName);
  90. /**
  91. * 删除承保规则
  92. * @param id
  93. * @param userName
  94. * @return
  95. */
  96. HttpResult<Object> deleteAgreementUndwrtRules(String id, String userName);
  97. /**
  98. * 分页查询协议
  99. *
  100. * @param ptlAgreementPageVo 分页查询参数
  101. * @return HttpResult
  102. */
  103. Page<PtlAgreement> pageAgreement(Page page,PtlAgreementPageVo ptlAgreementPageVo);
  104. /**
  105. * 根据保险公司查询协议
  106. * @param ptlAgreementPageVo
  107. * @return
  108. */
  109. HttpResult<List<PtlAgreement>> listAgreement( PtlAgreementPageVo ptlAgreementPageVo);
  110. /**
  111. * 通过协议id查询
  112. *
  113. * @param agreementId 协议id
  114. * @return HttpResult
  115. */
  116. HttpResult<PtlAgreementQueryVo> getByAgreementId(String agreementId);
  117. /**
  118. * 删除协议
  119. *
  120. * @param agreementId 协议id
  121. * @return HttpResult
  122. */
  123. HttpResult<Object> deleteAgreement(String agreementId,String userName);
  124. /**
  125. * 修改协议
  126. *
  127. * @param userName 用户名
  128. * @param agreementId 协议id
  129. * @param agreement 上传的协议信息
  130. * @return HttpResult
  131. */
  132. HttpResult<Object> reviseAgreement(String userName, String agreementId, PtlAgreementSaveVo agreement);
  133. /**
  134. * 提交 产品费用 承保规则 账号信息 授权部门
  135. *
  136. * @param agreementId 协议id
  137. * @param agreement 提交内容
  138. */
  139. void saveAssociationInformation(String agreementId, EsmInsCompany insuranceCompanyId, PtlAgreementSaveVo agreement);
  140. /**
  141. * 删除关联信息 产品费用 删除非车险产品费用 承保规则 账号信息 授权部门
  142. *
  143. * @param agreementId 协议id
  144. */
  145. void deleteAssociationInformation(String agreementId);
  146. /**
  147. * 删除关联信息 删除非车险产品费用 承保规则 账号信息 授权部门
  148. */
  149. void deleteAssociationInformationExcludeCosts(String agreementId);
  150. /**
  151. * 审核协议
  152. *
  153. * @param agreementId 协议id
  154. * @param ptlAgreementAuditVo 审核内容
  155. * @return
  156. */
  157. HttpResult<Object> auditAgreement(String agreementId, PtlAgreementAuditVo ptlAgreementAuditVo);
  158. /**
  159. * 校验登录
  160. *
  161. * @param ptlAgreement 协议信息
  162. * @param agreementSaveDto 协议添加实体
  163. * @param attribution 协议归属添加实体
  164. * @param verificationLogin 验证登录
  165. */
  166. EsmInsCompany verifyLogin(PtlAgreement ptlAgreement, PtlAgreementSaveDto agreementSaveDto, PtlAgreementAttributionDto attribution, boolean verificationLogin);
  167. /**
  168. * 根据协议编码,归属保险公司获取非车险费用配置信息
  169. * @param agreementId
  170. * @param companyId
  171. * @return
  172. */
  173. HttpResult<List<PtlAgreementNonCarProductCostsVo>> getNonCarCostsInfo(String agreementId, String companyId);
  174. /**
  175. * 根据归属保司,查询上级以及本级相关协议集合
  176. * @param associationCompaniesId
  177. * @return
  178. */
  179. HttpResult<List<PtlAgreement>> findRelationAgreement(String associationCompaniesId);
  180. /**
  181. * @version
  182. * @author: hxl
  183. * @Date: 2024/4/15 18:04
  184. * @Description: 查询所有审核的协议
  185. */
  186. List<PtlAgreement> findCheckAgreementList(PtlAgreement ptlAgreement);
  187. /**
  188. * 获取当前费用的保险公司所有协议
  189. * @param agreementId
  190. * @return
  191. */
  192. List<PtlAgreement> getCurrentAgreementList(String agreementId);
  193. PtlAgreement getByAgreementIdNew(String agreementId);
  194. /**
  195. * 根据保险公司code 获取协议信息
  196. */
  197. List<PtlAgreement> getByCompanyCode(String companyCode);
  198. List<HashMap<String, Object>> getDockingPersonList();
  199. PtlAgreement selectAgreeId(HashMap<String, Object> params);
  200. List<PtlAgreementInsCompanyDto> getExternalAgreement();
  201. List<PtlAgreement> getAllAgreement();
  202. }