| | |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * 编码库定义-模板管理 服务类 |
| | |
| | | */ |
| | | 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); |
| | | |
| | | /** |
| | | * 获取所有子分类模板 |
| | | * @param codeClassifyOid 父分类的主键 |
| | | * @return true表示相同 |
| | | */ |
| | | List<CodeClstemplateVO> childTemplates(String codeClassifyOid); |
| | | |
| | | /** |
| | | * 使用主题库的分类主键,获取生效的模板 |
| | | * @param codeClassifyOid 主题库分类主键 |
| | | * @param hasAttribute 是否包含属性 |
| | | * @return 模板的信息 |
| | | */ |
| | | List<CodeClstemplateVO> listReleaseTemplateByClassifyOid(String codeClassifyOid,boolean hasAttribute); |
| | | |
| | | /** |
| | | * 用模板的版本来排序 |
| | | * @param templateVOList 模板的显示对象 |
| | | * @return 排序后的列表 |
| | | */ |
| | | List<CodeClstemplateVO> sortTemplateByRevision(List<CodeClstemplateVO> templateVOList); |
| | | |
| | | |
| | | /** |
| | | * 主键获取分类模板对象(包含属性) |
| | | * @param templateOid 主键 |
| | | * @return 分类模板对象显示对象 |
| | | */ |
| | | CodeClstemplateVO getObjectHasAttrByOid(String templateOid); |
| | | |
| | | |
| | | } |