zhangherong
2025-06-25 23855599412c4d61b38d78f0f3abd3430a48b5b1
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDeviceGroupService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
package org.jeecg.modules.dnc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dnc.dto.DeviceGroupExt;
import org.jeecg.modules.dnc.entity.DeviceGroup;
import org.jeecg.modules.dnc.ucenter.Department;
import org.jeecg.modules.system.entity.SysUser;
import java.util.Collection;
import java.util.List;
public interface IDeviceGroupService extends IService<DeviceGroup> {
    /**
     *  æŸ¥è¯¢æ‰€æœ‰çˆ¶èŠ‚ç‚¹åç§°
     * @param parentId
     * @param stringList
     * @return
     */
    List<String> findListParentTree(String parentId,List<String> stringList);
    /**
     * èŽ·å–è®¾å¤‡çˆ¶å­çˆ¶å­ç»“æž„æ•°æ®
     * @return
     */
    List<DeviceGroupExt> findExtAll();
    /**
     * èŽ·å–ç”¨æˆ·æŽˆæƒå…³è”çš„è®¾å¤‡åˆ†ç»„
     * @param userId
     * @return
     */
    List<DeviceGroupExt> getByUserPerms(String userId);
    /**
     * èŽ·å–ç”¨æˆ·æŽˆæƒå…³è”çš„è®¾å¤‡åˆ†ç»„ å‘上查询父
     * @param userId
     * @return
     */
    List<DeviceGroupExt> getByUserPermsAs(String userId);
    /**
     *  æŸ¥è¯¢æ‰€æœ‰çˆ¶èŠ‚ç‚¹å’Œæœ¬èŠ‚ç‚¹åç§°
     * @param groupId
     * @return
     */
    List<String> findListParentTreeAll(String groupId);
    /**
     * èŽ·å–åˆ†ç»„ä¸‹æ‰€æœ‰çš„å­åˆ†ç»„
     * @param groupId
     * @return
     */
    List<DeviceGroup> getChildrenByParentId(String groupId);
    /**
     * åˆ†é…è®¾å¤‡ç”¨æˆ·
     * @param deviceGroup
     * @param userList
     * @return
     */
    boolean assignAddUser(DeviceGroup deviceGroup, Collection<SysUser> userList);
    /**
     * åˆ é™¤è®¾å¤‡ç”¨æˆ·
     * @param deviceGroup
     * @param userList
     * @return
     */
    boolean assignRemoveUser(DeviceGroup deviceGroup, Collection<SysUser> userList);
    /**
     *
     * @param departIds
     * @return
     */
    List<DeviceGroupExt> findExtByDeparts(List<String> departIds);
}