Commit 84b6e7e9 by henry

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

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