| | |
| | | package com.vci.ubcs.ddl.service; |
| | | |
| | | import com.vci.starter.word.bo.WordMergeStartTableDataBO; |
| | | import com.vci.ubcs.ddl.bo.DdlTableBO; |
| | | import com.vci.ubcs.ddl.enums.DataBaseEnum; |
| | | import com.vci.ubcs.omd.dto.OmdBtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.OmdBtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.OsModifyAttributeInfoDO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OmdBtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.OsLinkTypeVO; |
| | | import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.entity.ModifyAttributeInfo; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | |
| | | void createDbTablesByOidCollection(Collection<String> oidCollection) throws VciBaseException; |
| | | |
| | | /** |
| | | * 获取创建的sql语句中属性部分 |
| | | * @param attributeVOList 属性的立碑 |
| | | * @return sql语句 |
| | | */ |
| | | String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList); |
| | | |
| | | /** |
| | | * 批量将业务类型创建数据库表 |
| | | * @param ids 业务类型的英文名称 |
| | | * @throws VciBaseException 参数为空或者创建表出现了错误的时候会抛出异常 |
| | |
| | | * @param modifyLengthAttrDOList 需要修改的属性对象 |
| | | * @throws VciBaseException 执行出错的时候会抛出异常 |
| | | */ |
| | | void changeColumnForBtm(List<OmdBtmTypeAttributeVO> modifyLengthAttrDOList) throws VciBaseException; |
| | | void changeColumnForBtm(List<BtmTypeAttributeVO> modifyLengthAttrDOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * 修改链接类型中的属性字段的长度,注意在执行这个方法时就会将以前的事务提交。 |
| | | * @param modifyLengthAttrDOListForLinkType 需要修改的属性对象 |
| | | * @throws VciBaseException 执行出错的时候会抛出异常 |
| | | */ |
| | | void changeColumnForLink(List<OsLinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException; |
| | | void changeColumnForLink(List<LinkTypeAttributeVO> modifyLengthAttrDOListForLinkType) throws VciBaseException; |
| | | |
| | | /** |
| | | * 添加属性字段到业务类型中,注意在执行这个方法时就会将以前的事务提交。 |
| | | * @param addAttrDOList 需要添加的属性对象 |
| | | * @throws VciBaseException 执行出错的时候会抛出异常 |
| | | */ |
| | | void addColumn2TableForBtm(List<OmdBtmTypeAttributeVO> addAttrDOList) throws VciBaseException; |
| | | void addColumn2TableForBtm(List<BtmTypeAttributeVO> addAttrDOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * 添加属性字段到链接类型中,注意在执行这个方法时就会将以前的事务提交。 |
| | | * @param addAttrDOListForLinkType 需要添加的属性对象 |
| | | * @throws VciBaseException 执行出错的时候会抛出异常 |
| | | */ |
| | | void addColumn2TableForLink(List<OsLinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException; |
| | | void addColumn2TableForLink(List<LinkTypeAttributeVO> addAttrDOListForLinkType) throws VciBaseException; |
| | | |
| | | /** |
| | | * 判断表中是否有数据 |
| | |
| | | * @param linkTypeVOList 链接类型对象,有属性时需要包含属性 |
| | | * @return 不同的地方,每一个业务类型或者链接类型一条数据 |
| | | */ |
| | | List<OsModifyAttributeInfoDO> checkDifferent(List<OmdBtmTypeVO> btmTypeVOList, List<OsLinkTypeVO> linkTypeVOList) throws VciBaseException; |
| | | List<ModifyAttributeInfo> checkDifferent(List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * 清理业务类型中和数据库里不一样的 |
| | | * @param differentAttributeList 不同的属性的列表 |
| | | * @param btmTypeVOList 业务类型数据 |
| | | * @param linkTypeVOList 链接类型数据 |
| | | * @throws VciBaseException 参数为空或者执行出错的时候会抛出异常 |
| | | */ |
| | | void reflexDifferent(List<OsModifyAttributeInfoDO> differentAttributeList) throws VciBaseException; |
| | | void reflexDifferent(List<ModifyAttributeInfo> differentAttributeList,List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException; |
| | | |
| | | /** |
| | | * 获取数据库中所有的表格 |
| | |
| | | * 拷贝数据到word模板中 |
| | | * @param tableDataBO 要写入的数据 |
| | | * @return word 文件路径 |
| | | */ |
| | | String writeDataToWord(WordMergeStartTableDataBO tableDataBO); |
| | | *//* |
| | | String writeDataToWord(WordMergeStartTableDataBO tableDataBO);*/ |
| | | |
| | | /** |
| | | * 判断是否为兼容性的表,这些表不应该被创建和修改 |
| | |
| | | |
| | | /** |
| | | * 数据库新增或修改表 |
| | | * @param dto 业务类型传输对象 |
| | | * @param ddlDTO 业务类型传输对象 |
| | | * @return 执行结果 |
| | | */ |
| | | R submitBtmType(OmdBtmTypeDTO dto); |
| | | R submit(BtmAndLinkTypeDdlDTO ddlDTO); |
| | | |
| | | /** |
| | | * 按表名获取表信息 |
| | |
| | | * 获取所有表信息 |
| | | * @return 表信息集合 |
| | | */ |
| | | List<DdlTableBO> getAllTableInfo(); |
| | | List<BtmTypeVO> getAllTableInfo(); |
| | | } |