Commit 84b6e7e9 by henry

添加获取架构资产树形结构接口

1 parent 562212f5
......@@ -83,19 +83,17 @@ public class ArchMapController {
/**
* 获取资产树型
*
* @return
*/
@PostMapping("getAssetTree")
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "获取架构多维分析树形结构数据", moduleName = "架构地图")
public Result getAssetTree(@RequestBody ArchMapDto mapDto) {
String archiType = mapDto.getArchiType();
if(StringUtils.isEmpty(archiType)){
if (StringUtils.isEmpty(archiType)) {
return Result.error("架构类型不能为空;");
}
List<ArchMapVo> allDatas = archMapService.getAssetTree(mapDto);
return Result.success(allDatas);
}
}
......@@ -8,6 +8,5 @@ import java.util.List;
public interface IArchMapService {
List<ArchMapVo> getOverAllBusAsset(ArchMapDto mapDto);
List<ArchMapVo> getAssetTree(ArchMapDto mapDto);
}
......@@ -3,30 +3,30 @@
<mapper namespace="org.arch.analysis.mapper.ArchMapMapper">
<select id="getOverAllBusAsset" resultType="org.arch.analysis.vo.ArchMapVo" parameterType="org.arch.analysis.dto.ArchMapDto">
select
ele_name as eleName,
n.asset_name as assetName,
m.element_id as elementId,
m.ea_level as eaLevel,
n.parent_asset_id as parentAssetId,
n.archi_type as archiType,
n.asset_code as assetCode,
n.asset_id as assetId
ele_name as eleName,
n.asset_name as assetName,
m.element_id as elementId,
m.ea_level as eaLevel,
n.parent_asset_id as parentAssetId,
n.archi_type as archiType,
n.asset_code as assetCode,
n.asset_id as assetId
from
archi_asset_info n,
archi_element m
archi_asset_info n,
archi_element m
where
n.archi_type = #{archiType}
and n.archi_ele_id = m.element_id
<if test="eaLevel!=null and eaLevel!=''">
and m.ea_level= #{eaLevel}
</if>
and n.del_flag = 0
and n.archi_stage = 1
and n.state = 1
and m.state=1
and m.del_flag=0
n.archi_type = #{archiType}
and n.archi_ele_id = m.element_id
<if test="eaLevel!=null and eaLevel!=''">
and m.ea_level= #{eaLevel}
</if>
and n.del_flag = 0
and n.archi_stage = 1
and n.state = 1
and m.state=1
and m.del_flag=0
<if test="parentAssetId!=null and parentAssetId!=''">
and n.parent_asset_id = #{parentAssetId}
and n.parent_asset_id = #{parentAssetId}
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!