package com.ydtech.modules.protocol.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ydtech.modules.protocol.entity.po.PtlAgreement; import com.ydtech.modules.protocol.entity.po.PtlAgreementDept; import com.ydtech.modules.protocol.entity.vo.PltAgreementDeptDispositionVo; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @author wenks * @description 针对表【ptl_agreement_dept(协议授权部门表)】的数据库操作Service * @createDate 2023-07-03 09:31:16 */ public interface PtlAgreementDeptService extends IService { /** * 通过 协议id 批量添加 协议授权部门 * * @param agreementId 协议id */ void saveBatchDept(String agreementId, List dept); /** * 通过 协议id 获取 协议授权部门 * * @param agreementId 协议id */ List getByAgreementId(String agreementId); /** * 通过 协议id 删除 协议授权部门 * * @param agreementId 协议id */ void deleteByAgreementId(String agreementId); /** * 判断此协议是否授权 */ void agreementIsAuthorized(String deptId, String agreementId); /** * 团队批量配置协议信息 * * @param agreementId 协议id * @param dept 部门 */ @Transactional default void disposition(String agreementId, List dept) { deleteByAgreementId(agreementId); saveBatchDept(agreementId, dept); } /** * 部门关联协议 * @param pltAgreementDeptDispositionVo */ void agreementRelation(PltAgreementDeptDispositionVo pltAgreementDeptDispositionVo); /** * 根据部门id获取所有协议信息 * @param deptId * @return */ List getInfo(String deptId); }