package org.jeecg.modules.dnc.service;
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import org.jeecg.modules.dnc.entity.ProductInfo;
|
import org.jeecg.modules.dnc.response.CommonGenericTree;
|
import org.jeecg.modules.dnc.ucenter.Department;
|
import org.jeecg.modules.dnc.ucenter.UserDepartExt;
|
import org.jeecg.modules.system.entity.SysUser;
|
|
import java.util.Collection;
|
import java.util.List;
|
|
public interface IProductInfoService extends IService<ProductInfo> {
|
/**
|
* 新增产品信息
|
* @param deviceGroup
|
* @return
|
*/
|
boolean addProductInfo(ProductInfo deviceGroup);
|
|
/**
|
* 编辑产品信息
|
* @param id
|
* @param productInfo
|
* @return
|
*/
|
boolean editProductInfo(String id ,ProductInfo productInfo);
|
|
/**
|
* 获取产品结构树接口
|
* @return
|
*/
|
List<CommonGenericTree> loadProductTree(String userId);
|
|
/**
|
* 根据用户id获取用户的产品数据
|
* @param userId
|
* @return
|
*/
|
List<ProductInfo> getByUserPerms(String userId);
|
|
/**
|
* 根据用户id和查询条件获取用户的产品数据
|
* @param userId
|
* @param queryParam
|
* @return
|
*/
|
List<ProductInfo> getByUserPerms(String userId, String queryParam);
|
|
/**
|
* 删除产品
|
* @param id
|
* @return
|
*/
|
boolean deleteProductInfo(String id);
|
|
/**
|
* 检查产品树节点的查看权限
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
boolean checkProductPerm(Integer nodeType, String paramId);
|
|
/**
|
* 获取已分配的用户
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<UserDepartExt> getUserPermsList(Integer nodeType, String paramId);
|
|
/**
|
* 获取未分配的用户
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<SysUser> getUserNonPermsList(Integer nodeType, String paramId);
|
|
/**
|
* 获取已分配的部门
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<Department> getDepartPermsList(Integer nodeType, String paramId);
|
|
/**
|
* 获取未分配的部门
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<Department> getDepartNonPermsList(Integer nodeType, String paramId);
|
|
/**
|
* 指派产品树节点的用户权限
|
* @param nodeType 1 产品 2 部件 3 零件
|
* @param paramId 产品树节点id
|
* @param userIds 添加用户ids
|
* @param relativeFlag 1 是 2 否
|
* @return
|
*/
|
boolean assignAddUser(Integer nodeType, String paramId, Integer relativeFlag, String[] userIds);
|
|
/**
|
* 移除产品树节点的用户权限
|
* @param nodeType 1 产品 2 部件 3 零件
|
* @param paramId 产品树节点id
|
* @param userIds 移除用户ids
|
* @param relativeFlag 1 是 2 否
|
* @return
|
*/
|
boolean assignRemoveUser(Integer nodeType, String paramId, Integer relativeFlag, String[] userIds);
|
|
/**
|
* 指派产品树节点的部门权限
|
* @param nodeType 1 产品 2 部件 3 零件
|
* @param paramId 产品树节点id
|
* @param departmentIds 添加部门ids
|
* @param relativeFlag 1 是 2 否
|
* @return
|
*/
|
boolean assignAddDepartment(Integer nodeType, String paramId, Integer relativeFlag, String[] departmentIds);
|
|
/**
|
* 移除产品树节点的部门权限
|
* @param nodeType 1 产品 2 部件 3 零件
|
* @param paramId 产品树节点id
|
* @param departmentIds 移除部门ids
|
* @param relativeFlag 1 是 2 否
|
* @return
|
*/
|
boolean assignRemoveDepartment(Integer nodeType, String paramId, Integer relativeFlag, String[] departmentIds);
|
|
|
/**
|
* 给产品树节点添加用户权限
|
* @param productInfo
|
* @param userList
|
* @return
|
*/
|
boolean assignAddUser(ProductInfo productInfo, Collection<SysUser> userList);
|
|
/**
|
* 移除产品树节点添加用户权限
|
* @param productInfo
|
* @param userList
|
* @return
|
*/
|
boolean assignRemoveUser(ProductInfo productInfo, Collection<SysUser> userList);
|
|
|
/**
|
* 给产品树节点添加部门权限
|
* @param productInfo
|
* @param departmentList
|
* @return
|
*/
|
boolean assignAddDepartment(ProductInfo productInfo, Collection<Department> departmentList);
|
|
|
/**
|
* 移除产品树节点添加部门权限
|
* @param productInfo
|
* @param departmentList
|
* @return
|
*/
|
boolean assignRemoveDepartment(ProductInfo productInfo, Collection<Department> departmentList);
|
|
/**
|
* 获取节点的部门权限
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<String> getDepartIdsByParams(Integer nodeType, String paramId);
|
|
/**
|
* 获取唯一产品编号
|
* @param productNo
|
* @return
|
*/
|
ProductInfo getByProductNo(String productNo);
|
|
/**
|
* 获取产品树的第一级和第二级
|
* @param userId
|
* @return
|
*/
|
List<CommonGenericTree> loadBaseTree(String userId);
|
|
/**
|
* 加载产品树子节点数据
|
* @param userId
|
* @param nodeType
|
* @param paramId
|
* @return
|
*/
|
List<CommonGenericTree> loadTree(String userId, Integer nodeType, String paramId);
|
|
/**
|
* 搜索接口
|
* @param userId
|
* @param queryParam
|
* @return
|
*/
|
List<CommonGenericTree> searchProductTree(String userId, String queryParam);
|
}
|