|
@@ -64,6 +64,7 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND rr.create_time <= #{map.endTime}
|
|
AND rr.create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and rr.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
rr.RESOURCE_TYPE,rt.name
|
|
rr.RESOURCE_TYPE,rt.name
|
|
@@ -86,6 +87,7 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND rr.create_time <= #{map.endTime}
|
|
AND rr.create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and rr.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
rr.COLLEGE_ID,so.name
|
|
rr.COLLEGE_ID,so.name
|
|
@@ -107,6 +109,7 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND rr.create_time <= #{map.endTime}
|
|
AND rr.create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and rr.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY rr.VERIFY_STATUS
|
|
GROUP BY rr.VERIFY_STATUS
|
|
|
</select>
|
|
</select>
|
|
@@ -129,13 +132,14 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND create_time <= #{map.endTime}
|
|
AND create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and rr.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="formatStatistic" resultType="map">
|
|
<select id="formatStatistic" resultType="map">
|
|
|
SELECT
|
|
SELECT
|
|
|
b.EXTEND_NAME extendName,
|
|
b.EXTEND_NAME extendName,
|
|
|
- count(a.id) num
|
|
|
|
|
|
|
+ count(distinct a.id) num
|
|
|
FROM
|
|
FROM
|
|
|
RESOURCE_RECORD a
|
|
RESOURCE_RECORD a
|
|
|
LEFT JOIN RESOURCE_USERFILE b ON a.USERFILE_ID = b.USER_FILE_ID
|
|
LEFT JOIN RESOURCE_USERFILE b ON a.USERFILE_ID = b.USER_FILE_ID
|
|
@@ -150,6 +154,7 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND a.create_time <= #{map.endTime}
|
|
AND a.create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY b.EXTEND_NAME
|
|
GROUP BY b.EXTEND_NAME
|
|
|
</select>
|
|
</select>
|
|
@@ -157,7 +162,7 @@
|
|
|
<select id="storageStatistic" resultType="map">
|
|
<select id="storageStatistic" resultType="map">
|
|
|
SELECT
|
|
SELECT
|
|
|
b.EXTEND_NAME extendName,
|
|
b.EXTEND_NAME extendName,
|
|
|
- count(a.id) num,
|
|
|
|
|
|
|
+ count(distinct a.id) num,
|
|
|
sum(c.FILE_SIZE) fileSize,
|
|
sum(c.FILE_SIZE) fileSize,
|
|
|
avg(c.FILE_SIZE) avgSize
|
|
avg(c.FILE_SIZE) avgSize
|
|
|
FROM
|
|
FROM
|
|
@@ -175,6 +180,7 @@
|
|
|
<if test="map.endTime != null">
|
|
<if test="map.endTime != null">
|
|
|
AND a.create_time <= #{map.endTime}
|
|
AND a.create_time <= #{map.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
b.EXTEND_NAME
|
|
b.EXTEND_NAME
|
|
@@ -183,4 +189,111 @@
|
|
|
<select id="selectOrgList" resultType="map">
|
|
<select id="selectOrgList" resultType="map">
|
|
|
SELECT id,name FROM sys_org WHERE "CATEGORY" !='student' AND PARENT_ID =0
|
|
SELECT id,name FROM sys_org WHERE "CATEGORY" !='student' AND PARENT_ID =0
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectResourceCans" resultType="map">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ a.RESOURCE_TYPE resourceType,
|
|
|
|
|
+ rt.NAME resourceName,
|
|
|
|
|
+ count(distinct b."user_id") num
|
|
|
|
|
+ FROM
|
|
|
|
|
+ RESOURCE_RECORD a
|
|
|
|
|
+ LEFT JOIN RESOURCE_FOOTPRINT b ON a.id = b.RESOURCE_RECORD_ID
|
|
|
|
|
+ LEFT JOIN "resource_type" rt ON a.RESOURCE_TYPE =rt.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="collegeId != null">
|
|
|
|
|
+ AND a.COLLEGE_ID = #{collegeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.startTime != null">
|
|
|
|
|
+ AND a.create_time >= #{map.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.endTime != null">
|
|
|
|
|
+ AND a.create_time <= #{map.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
|
|
+ </where>
|
|
|
|
|
+ GROUP BY a.RESOURCE_TYPE,rt.NAME
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectResourceSee" resultType="integer">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(distinct b."user_id") num
|
|
|
|
|
+ FROM
|
|
|
|
|
+ RESOURCE_RECORD a
|
|
|
|
|
+ LEFT JOIN RESOURCE_FOOTPRINT b ON a.id = b.RESOURCE_RECORD_ID
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="collegeId != null">
|
|
|
|
|
+ AND a.COLLEGE_ID = #{collegeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.startTime != null">
|
|
|
|
|
+ AND a.create_time >= #{map.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.endTime != null">
|
|
|
|
|
+ AND a.create_time <= #{map.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectResourceCollect" resultType="integer">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(distinct b."user_id")
|
|
|
|
|
+ FROM
|
|
|
|
|
+ RESOURCE_RECORD a
|
|
|
|
|
+ LEFT JOIN resource_collect b ON a.id = b.resource_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="collegeId != null">
|
|
|
|
|
+ AND a.COLLEGE_ID = #{collegeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.startTime != null">
|
|
|
|
|
+ AND a.create_time >= #{map.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.endTime != null">
|
|
|
|
|
+ AND a.create_time <= #{map.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectResourceShare" resultType="integer">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(distinct b."user_id")
|
|
|
|
|
+ FROM
|
|
|
|
|
+ RESOURCE_RECORD a
|
|
|
|
|
+ LEFT JOIN COURSE_STUDENT_BURIALPOINT b ON a.id = b.resource_record
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="collegeId != null">
|
|
|
|
|
+ AND a.COLLEGE_ID = #{collegeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.startTime != null">
|
|
|
|
|
+ AND a.create_time >= #{map.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.endTime != null">
|
|
|
|
|
+ AND a.create_time <= #{map.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE' AND b.FUNC_TYPE='3' AND b.TYPE='5'
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectResourceUpload" resultType="map">
|
|
|
|
|
+
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(distinct a.id) uploadNum,
|
|
|
|
|
+ count(distinct b."user_id") seeNum
|
|
|
|
|
+ FROM
|
|
|
|
|
+ RESOURCE_RECORD a
|
|
|
|
|
+ LEFT JOIN RESOURCE_FOOTPRINT b ON a.id = b.RESOURCE_RECORD_ID
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="collegeId != null">
|
|
|
|
|
+ AND a.COLLEGE_ID = #{collegeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.startTime != null">
|
|
|
|
|
+ AND a.create_time >= #{map.startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="map.endTime != null">
|
|
|
|
|
+ AND a.create_time <= #{map.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and a.DELETE_FLAG = 'NOT_DELETE'
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|