PtlAgreementService.java 7.1 KB

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