Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-08-19 15:53:52 +08:00
commit 22f897ddb9
5 changed files with 36 additions and 20 deletions

View File

@ -48,17 +48,17 @@ public class CIMController {
} }
@GetMapping("/cimImgResources") @GetMapping("/cimImgResources")
@ApiOperation("根据应用领域查询图层服务") @ApiOperation("CIM平台根据应用领域查询图层服务")
public Result cimImgResources(@RequestParam String type){ @LogOperation(value = "CIM平台根据应用领域查询图层服务")
List<Map> imgServices = cimService.getImgServices(type); public Result<List<Map>> cimImgResources(@RequestParam String type){
return new Result().ok(imgServices); return new Result<List<Map>>().ok(cimService.getImgServices(type));
} }
@GetMapping("/cimAssemblyResources") @GetMapping("/cimAssemblyResources")
@ApiOperation("查询智能算法组件") @ApiOperation("CIM平台查询智能算法组件")
public Result cimAssemblyResources(){ @LogOperation(value = "CIM平台查询智能算法组件")
List<Map> maps = cimService.cimAssemblyResources(); public Result<List<Map>> cimAssemblyResources(){
return new Result().ok(maps); return new Result<List<Map>>().ok(cimService.cimAssemblyResources());
} }
} }

View File

@ -182,7 +182,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map> getCIMApplyApplicationList(@Param("deptId") Long deptId); List<Map> getCIMApplyApplicationList(@Param("deptId") Long deptId);
List<Map> getImgServices(@Param("type") String type); List<Map> getImgServices(@Param("deptid") Long deptid,@Param("type") String type);
List<Map> cimAssemblyResources(); List<Map> cimAssemblyResources(@Param("deptid") Long deptid);
} }

View File

@ -72,16 +72,24 @@ public class CIMServiceImpl implements CIMService {
@Override @Override
public List<Map> getImgServices(String type) { public List<Map> getImgServices(String type) {
SysDeptEntity sysDeptEntity = sysDeptDao.getByName(zjjName);
if (ObjectUtil.isEmpty(sysDeptEntity)) {
return new ArrayList<>();
}
List<Map> imgServices = new ArrayList<>(); List<Map> imgServices = new ArrayList<>();
imgServices = resourceDao.getImgServices(type); imgServices = resourceDao.getImgServices(sysDeptEntity.getId(),type);
return imgServices; return imgServices;
} }
@Override @Override
public List<Map> cimAssemblyResources() { public List<Map> cimAssemblyResources() {
SysDeptEntity sysDeptEntity = sysDeptDao.getByName(zjjName);
if (ObjectUtil.isEmpty(sysDeptEntity)) {
return new ArrayList<>();
}
List<Map> result = new ArrayList<>(); List<Map> result = new ArrayList<>();
result = resourceDao.cimAssemblyResources(); result = resourceDao.cimAssemblyResources(sysDeptEntity.getId());
return result; return result;
} }

File diff suppressed because one or more lines are too long

View File

@ -1630,27 +1630,30 @@
tdr.create_date tdr.create_date
</select> </select>
<select id="getImgServices" parameterType="java.lang.String" resultType="java.util.Map"> <select id="getImgServices" resultType="java.util.Map">
with A as with A as
( (
SELECT m.* FROM SELECT m.* FROM
( (
SELECT a.name,a.id,a.info_list FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id SELECT a.name,a.id,a.info_list FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id
WHERE a.dept_id = 1555080592128163841 AND a.del_flag = 0 and a.type = '组件服务' WHERE a.dept_id = #{deptid} AND a.del_flag = 0 and a.type = '组件服务'
AND (b.attr_type = '组件类型' AND b.attr_value = '图层服务' ) AND b.del_flag = 0 AND (b.attr_type = '组件类型' AND b.attr_value = '图层服务' ) AND b.del_flag = 0
) m ) m
INNER JOIN tb_data_attr b ON m.id = b.data_resource_id INNER JOIN tb_data_attr b ON m.id = b.data_resource_id
AND b.attr_type = '应用领域' AND LOCATE(#{type},b.attr_value) AND b.del_flag = 0 AND b.attr_type = '应用领域' AND LOCATE(#{type},b.attr_value) AND b.del_flag = 0
) )
SELECT A.*,c.attr_value as link FROM A INNER JOIN tb_data_attr c ON A.id = c.data_resource_id SELECT A.*,c.attr_value as link FROM A INNER JOIN tb_data_attr c ON A.id = c.data_resource_id
AND c.attr_type = '图层缩略图' AND c.del_flag = 0 AND c.attr_type = '图层缩略图' AND c.del_flag = 0
</select> </select>
<select id="cimAssemblyResources" resultType="java.util.Map"> <select id="cimAssemblyResources" resultType="java.util.Map">
SELECT a.name,a.id,a.info_list FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id SELECT a.name,a.id
WHERE a.dept_id = 1555080592128163841 AND a.type = '组件服务' AND a.del_flag = 0 FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id
AND (b.attr_type = '组件类型' AND b.attr_value = '智能算法' ) AND b.del_flag = 0 WHERE
a.dept_id = #{deptid}
AND a.type = '组件服务'
AND a.del_flag = 0
AND (b.attr_type = '组件类型' AND b.attr_value = '智能算法' )
AND b.del_flag = 0
</select> </select>
</mapper> </mapper>