This commit is contained in:
wangliwen 2022-07-01 09:40:39 +08:00
commit 31d11b8009
2 changed files with 4 additions and 4 deletions

View File

@ -1397,7 +1397,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return new PageData<>(list, list.size()); return new PageData<>(list, list.size());
} }
//分别根据部门获取应用组件数和收藏组件数 //分别根据部门获取应用组件数和申请组件数
Map<String, Object> paraMap = new ConcurrentHashMap<>(); Map<String, Object> paraMap = new ConcurrentHashMap<>();
paraMap.put("resourceType", params.get("resourceType")); paraMap.put("resourceType", params.get("resourceType"));
CompletableFuture<Void> voidCompletableFuture01 = CompletableFuture.runAsync(() -> { CompletableFuture<Void> voidCompletableFuture01 = CompletableFuture.runAsync(() -> {

View File

@ -1243,7 +1243,7 @@
WHERE WHERE
a.del_flag = 0 a.del_flag = 0
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and (b.id = #{id} OR INSTR(b.pids,#{id}) and (b.id = #{id} OR INSTR(b.pids,#{id}))
</if> </if>
<if test="resourceType != null and resourceType != ''"> <if test="resourceType != null and resourceType != ''">
AND AND
@ -1295,14 +1295,14 @@
<select id="assemblyCarByDept" parameterType="java.util.Map" resultType="java.util.Map"> <select id="assemblyCarByDept" parameterType="java.util.Map" resultType="java.util.Map">
SELECT COUNT(distinct(a.resource_id)) as carNum,c.id FROM tb_resource_car a INNER JOIN sys_user b ON a.creator = SELECT COUNT(distinct(a.resource_id)) as carNum,c.id FROM tb_resource_car a INNER JOIN sys_user b ON a.creator =
b.id INNER JOIN sys_dept c ON b.dept_id = c.id INNER JOIN tb_data_resource d on a.resource_id = d.id b.id INNER JOIN sys_dept c ON b.dept_id = c.id INNER JOIN tb_data_resource d on a.resource_id = d.id
WHERE a.del_flag = 0 AND d.type = #{resourceType} AND (c.id =#{id} or INSTR(c.pids,#{id})) group by c.id WHERE a.del_flag = 0 AND c.id =#{id} AND d.type = #{resourceType} group by c.id
</select> </select>
<!--根据组件类型查询部门使用组件的数量--> <!--根据组件类型查询部门使用组件的数量-->
<select id="assemblyUseByDept" parameterType="java.util.Map" resultType="java.util.Map"> <select id="assemblyUseByDept" parameterType="java.util.Map" resultType="java.util.Map">
SELECT COUNT(distinct(a.key_id)) as useNum,c.id FROM tb_data_resource_rel a INNER JOIN sys_user b ON a.creator = SELECT COUNT(distinct(a.key_id)) as useNum,c.id FROM tb_data_resource_rel a INNER JOIN sys_user b ON a.creator =
b.id INNER JOIN sys_dept c ON b.dept_id = c.id INNER JOIN tb_data_resource d on a.key_id = d.id b.id INNER JOIN sys_dept c ON b.dept_id = c.id INNER JOIN tb_data_resource d on a.key_id = d.id
WHERE a.del_flag = 0 AND d.type = #{resourceType} AND (c.id = #{id} or INSTR(c.pids,#{id} )) group by c.id WHERE a.del_flag = 0 AND d.type = #{resourceType} AND c.id = #{id} group by c.id
</select> </select>
<select id="selectCountByDepts" resultType="java.util.Map"> <select id="selectCountByDepts" resultType="java.util.Map">