整理代码
This commit is contained in:
parent
1f7a61a601
commit
f1d87b3907
|
@ -48,17 +48,17 @@ public class CIMController {
|
|||
}
|
||||
|
||||
@GetMapping("/cimImgResources")
|
||||
@ApiOperation("根据应用领域查询图层服务")
|
||||
public Result cimImgResources(@RequestParam String type){
|
||||
List<Map> imgServices = cimService.getImgServices(type);
|
||||
return new Result().ok(imgServices);
|
||||
@ApiOperation("CIM平台根据应用领域查询图层服务")
|
||||
@LogOperation(value = "CIM平台根据应用领域查询图层服务")
|
||||
public Result<List<Map>> cimImgResources(@RequestParam String type){
|
||||
return new Result<List<Map>>().ok(cimService.getImgServices(type));
|
||||
}
|
||||
|
||||
@GetMapping("/cimAssemblyResources")
|
||||
@ApiOperation("查询智能算法组件")
|
||||
public Result cimAssemblyResources(){
|
||||
List<Map> maps = cimService.cimAssemblyResources();
|
||||
return new Result().ok(maps);
|
||||
@ApiOperation("CIM平台查询智能算法组件")
|
||||
@LogOperation(value = "CIM平台查询智能算法组件")
|
||||
public Result<List<Map>> cimAssemblyResources(){
|
||||
return new Result<List<Map>>().ok(cimService.cimAssemblyResources());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
|||
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);
|
||||
}
|
|
@ -72,16 +72,24 @@ public class CIMServiceImpl implements CIMService {
|
|||
|
||||
@Override
|
||||
public List<Map> getImgServices(String type) {
|
||||
SysDeptEntity sysDeptEntity = sysDeptDao.getByName(zjjName);
|
||||
if (ObjectUtil.isEmpty(sysDeptEntity)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<Map> imgServices = new ArrayList<>();
|
||||
imgServices = resourceDao.getImgServices(type);
|
||||
imgServices = resourceDao.getImgServices(sysDeptEntity.getId(),type);
|
||||
|
||||
return imgServices;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> cimAssemblyResources() {
|
||||
SysDeptEntity sysDeptEntity = sysDeptDao.getByName(zjjName);
|
||||
if (ObjectUtil.isEmpty(sysDeptEntity)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<Map> result = new ArrayList<>();
|
||||
result = resourceDao.cimAssemblyResources();
|
||||
result = resourceDao.cimAssemblyResources(sysDeptEntity.getId());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1630,17 +1630,15 @@
|
|||
tdr.create_date
|
||||
</select>
|
||||
|
||||
<select id="getImgServices" parameterType="java.lang.String" resultType="java.util.Map">
|
||||
<select id="getImgServices" resultType="java.util.Map">
|
||||
with A as
|
||||
(
|
||||
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
|
||||
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
|
||||
|
||||
) m
|
||||
|
||||
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
|
||||
)
|
||||
|
@ -1649,8 +1647,13 @@
|
|||
</select>
|
||||
|
||||
<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
|
||||
WHERE a.dept_id = 1555080592128163841 AND a.type = '组件服务' AND a.del_flag = 0
|
||||
AND (b.attr_type = '组件类型' AND b.attr_value = '智能算法' ) AND b.del_flag = 0
|
||||
SELECT a.name,a.id
|
||||
FROM tb_data_resource a INNER JOIN tb_data_attr b ON a.id = b.data_resource_id
|
||||
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>
|
||||
</mapper>
|
Loading…
Reference in New Issue