/*
|
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
*
|
* Redistribution and use in source and binary forms, with or without
|
* modification, are permitted provided that the following conditions are met:
|
*
|
* Redistributions of source code must retain the above copyright notice,
|
* this list of conditions and the following disclaimer.
|
* Redistributions in binary form must reproduce the above copyright
|
* notice, this list of conditions and the following disclaimer in the
|
* documentation and/or other materials provided with the distribution.
|
* Neither the name of the dreamlu.net developer nor the names of its
|
* contributors may be used to endorse or promote products derived from
|
* this software without specific prior written permission.
|
* Author: Chill 庄骞 (smallchill@163.com)
|
*/
|
package com.vci.ubcs.code.service;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.vci.ubcs.code.dto.CodeClstemplateDTO;
|
import com.vci.ubcs.code.entity.CodeClstemplateEntity;
|
import com.vci.ubcs.code.vo.CodeClstemplateVO;
|
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
|
import com.vci.ubcs.starter.web.pagemodel.DataGrid;
|
import com.vci.ubcs.starter.web.pagemodel.Tree;
|
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.tool.api.R;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 编码库定义-模板管理 服务类
|
*
|
* @author yuxc
|
* @since 2023-04-10
|
*/
|
public interface ICodeClstemplateService extends IService<CodeClstemplateEntity> {
|
|
/**
|
* 自定义分页
|
*
|
* @param page
|
* @param plCodeClstemplate
|
* @return
|
*/
|
IPage<CodeClstemplateVO> selectPlCodeClstemplatePage(IPage<CodeClstemplateVO> page, CodeClstemplateVO plCodeClstemplate);
|
|
/**
|
* 查询分类模板对象 树
|
* @param treeQueryObject 树查询对象
|
* @return 分类模板对象 显示树
|
*/
|
List<Tree> treeCodeClassifyTemplate(TreeQueryObject treeQueryObject);
|
|
/**
|
* 根据树形查询对象来查询数据对象
|
*
|
* @param treeQueryObject 树形查询对象
|
* @return 查询结果,数据对象
|
*/
|
List<CodeClstemplateEntity> selectCodeClassifyTemplateDOByTree(TreeQueryObject treeQueryObject);
|
|
/**
|
* 批量数据对象转换为显示对象
|
* @param codeClstemplateEntitys 数据对象列表
|
* @return 显示对象
|
*/
|
List<CodeClstemplateVO> codeClassifyTemplateDO2VOs(Collection<CodeClstemplateEntity> codeClstemplateEntitys);
|
|
/**
|
* 批量数据对象转换为显示对象
|
* @param codeClstemplateEntitys 数据对象列表
|
* @param hasAttr 是否包含属性
|
* @return 显示对象
|
*/
|
List<CodeClstemplateVO> codeClassifyTemplateDO2VOs(Collection<CodeClstemplateEntity> codeClstemplateEntitys, boolean hasAttr);
|
|
/**
|
* 数据对象转换为显示对象
|
* @param codeClstemplateEntity 数据对象
|
* @return 显示对象
|
*/
|
CodeClstemplateVO codeClassifyTemplateDO2VO(CodeClstemplateEntity codeClstemplateEntity);
|
|
// /**
|
// * 分类模板列表
|
// * @param conditionMap 查询条件
|
// * @param pageHelper 分页对象
|
// * @return 显示对象
|
// */
|
// DataGrid<CodeClstemplateVO> gridCodeClassifyTemplate(Map<String, String> conditionMap, PageHelper pageHelper) ;
|
|
/**
|
* 检查 分类模板对象是否删除
|
* @param codeClstemplateDTO 分类模板对象数据传输对象,必须要有oid和ts属性
|
* @return 执行结果 success为true为可以删除,false表示有数据引用,obj为true表示有下级
|
*/
|
R checkIsCanDelete(CodeClstemplateDTO codeClstemplateDTO);
|
|
/**
|
* 检查是否有下级是否关联了数据
|
*
|
* @param oid 主键
|
* @return true 表示有引用,false表示没有引用
|
*/
|
boolean checkChildIsLinked(String oid);
|
|
/**
|
* 校验是否有下级节点,不校验是否关联了数据
|
*
|
* @param oid 主键
|
* @return true表示有下级,false表示没有下级
|
*/
|
boolean checkHasChild(String oid);
|
|
/**
|
* 删除分类模板对象
|
* @param codeClstemplateDTO 分类模板对象数据传输对象,oid和ts需要传输
|
* @return 删除结果反馈::success:成功,fail:失败
|
*/
|
R deleteCodeClassifyTemplate(CodeClstemplateDTO codeClstemplateDTO);
|
|
/**
|
* 主键获取分类模板对象
|
* @param oid 主键
|
* @return 分类模板对象显示对象
|
*/
|
CodeClstemplateVO getObjectByOid(String oid) ;
|
|
/**
|
* 主键批量获取分类模板对象
|
* @param oidCollections 主键集合,但是受性能影响,建议一次查询不超过10000个
|
* @return 分类模板对象显示对象
|
*/
|
Collection<CodeClstemplateVO> listCodeClassifyTemplateByOids(List<String> oidCollections);
|
|
|
/**
|
* 参照树 分类模板对象
|
* @param treeQueryObject 树形查询对象
|
* @return 分类模板对象显示树
|
*/
|
List<Tree> referTree(TreeQueryObject treeQueryObject);
|
|
/**
|
* 启用、停用
|
* @param oid
|
* @param lcStatus
|
* @return
|
*/
|
R updateLcStatus(String oid, String lcStatus);
|
|
/**
|
* 升版
|
*/
|
R Upgrade(CodeClstemplateDTO codeClassifyDTO);
|
/**
|
* 模板克隆
|
*/
|
R copyTemplate(CodeClstemplateDTO codeClassifyDTO);
|
|
/**
|
* 分类模板列表
|
* @param plCodeClstemplate 查询条件
|
* @param query 分页对象
|
* @return 显示对象
|
*/
|
DataGrid<CodeClstemplateVO> gridCodeClassifyTemplate(CodeClstemplateVO plCodeClstemplate, Query query);
|
|
/**
|
* 增加分类模板对象
|
* @param codeClassifyTemplateDTO 分类模板对象数据传输对象
|
* @return 执行结果
|
*/
|
R<CodeClstemplateVO> addSave(CodeClstemplateDTO codeClassifyTemplateDTO);
|
|
/**
|
* 修改分类模板对象
|
* @param codeClassifyTemplateDTO 分类模板对象数据传输对象
|
* @return 执行结果
|
*/
|
R<CodeClstemplateVO> editSave(CodeClstemplateDTO codeClassifyTemplateDTO);
|
}
|