PtlAgreementDeptService.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.ydtech.modules.protocol.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import com.ydtech.modules.protocol.entity.po.PtlAgreement;
  4. import com.ydtech.modules.protocol.entity.po.PtlAgreementDept;
  5. import com.ydtech.modules.protocol.entity.vo.PltAgreementDeptDispositionVo;
  6. import org.springframework.transaction.annotation.Transactional;
  7. import java.util.List;
  8. /**
  9. * @author wenks
  10. * @description 针对表【ptl_agreement_dept(协议授权部门表)】的数据库操作Service
  11. * @createDate 2023-07-03 09:31:16
  12. */
  13. public interface PtlAgreementDeptService extends IService<PtlAgreementDept> {
  14. /**
  15. * 通过 协议id 批量添加 协议授权部门
  16. *
  17. * @param agreementId 协议id
  18. */
  19. void saveBatchDept(String agreementId, List<String> dept);
  20. /**
  21. * 通过 协议id 获取 协议授权部门
  22. *
  23. * @param agreementId 协议id
  24. */
  25. List<PtlAgreementDept> getByAgreementId(String agreementId);
  26. /**
  27. * 通过 协议id 删除 协议授权部门
  28. *
  29. * @param agreementId 协议id
  30. */
  31. void deleteByAgreementId(String agreementId);
  32. /**
  33. * 判断此协议是否授权
  34. */
  35. void agreementIsAuthorized(String deptId, String agreementId);
  36. /**
  37. * 团队批量配置协议信息
  38. *
  39. * @param agreementId 协议id
  40. * @param dept 部门
  41. */
  42. @Transactional
  43. default void disposition(String agreementId, List<String> dept) {
  44. deleteByAgreementId(agreementId);
  45. saveBatchDept(agreementId, dept);
  46. }
  47. /**
  48. * 部门关联协议
  49. * @param pltAgreementDeptDispositionVo
  50. */
  51. void agreementRelation(PltAgreementDeptDispositionVo pltAgreementDeptDispositionVo);
  52. /**
  53. * 根据部门id获取所有协议信息
  54. * @param deptId
  55. * @return
  56. */
  57. List<PtlAgreement> getInfo(String deptId);
  58. }