Browse Source

1.系统人员新增修改根据院系组织动态显示完善
2.组织变成可以根据类型枚举参检索

honorfire 5 tháng trước cách đây
mục cha
commit
a98b9b1f8e

+ 104 - 5
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/mapper/mapping/StudyBehaviorProgressMapper.xml

@@ -7,6 +7,12 @@
             COUNT(ci.COURSE_ID) AS allCourseCount
         FROM COURSE_INFO ci
         WHERE ci.DELETE_FLAG ='NOT_DELETE'
+        <if test="startTime!=null and startTime != ''">
+            and ci.CREATE_TIME &gt;=#{startTime}
+        </if>
+        <if test="endTime!=null and endTime != ''">
+            and ci.CREATE_TIME &lt;=#{endTime}
+        </if>
     </select>
     <select id="getActiveCourseCount" resultType="java.lang.String">
         SELECT
@@ -47,6 +53,12 @@
                 AND csb1.TYPE='1'
                 --		AND csb1.CREATE_TIME &gt; ='2025-09-01 00:00:00'
                 --		AND csb1.CREATE_TIME &lt; ='2025-09-30 23:59:59'
+                <if test="startTime!=null and startTime != ''">
+                    and csb1.CREATE_TIME &gt;=#{startTime}
+                </if>
+                <if test="endTime!=null and endTime != ''">
+                    and csb1.CREATE_TIME &lt;=#{endTime}
+                </if>
                 GROUP BY csb1.USER_ID,csb1.HOUR_ID
             ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
             WHERE 1=1
@@ -105,6 +117,12 @@
                             AND csb1.TYPE='1'
                             --		AND csb1.CREATE_TIME &gt;='2025-09-01 00:00:00'
                             --		AND csb1.CREATE_TIME &lt;='2025-09-30 23:59:59'
+                            <if test="startTime!=null and startTime != ''">
+                                and csb1.CREATE_TIME &gt;=#{startTime}
+                            </if>
+                            <if test="endTime!=null and endTime != ''">
+                                and csb1.CREATE_TIME &lt;=#{endTime}
+                            </if>
                             GROUP BY csb1.USER_ID,csb1.HOUR_ID
                         ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
                         WHERE 1=1
@@ -120,12 +138,24 @@
         FROM DEV_LOG dl
         WHERE dl.CATEGORY='LOGIN'
         AND dl.EXE_STATUS='SUCCESS'
+        <if test="startTime!=null and startTime != ''">
+            and dl.CREATE_TIME &gt;=#{startTime}
+        </if>
+        <if test="endTime!=null and endTime != ''">
+            and dl.CREATE_TIME &lt;=#{endTime}
+        </if>
     </select>
     <select id="getUserCount" resultType="java.lang.String">
         SELECT
             ifnull(COUNT(su.ID),0) AS userCount
         FROM SYS_USER su
         WHERE su.DELETE_FLAG ='NOT_DELETE'
+        <if test="startTime!=null and startTime != ''">
+            and su.CREATE_TIME &gt;=#{startTime}
+        </if>
+        <if test="endTime!=null and endTime != ''">
+            and su.CREATE_TIME &lt;=#{endTime}
+        </if>
     </select>
     <select id="getAvgLoginCount" resultType="java.lang.String">
         SELECT
@@ -137,6 +167,12 @@
             FROM DEV_LOG dl
             WHERE dl.CATEGORY='LOGIN'
             AND dl.EXE_STATUS='SUCCESS'
+            <if test="startTime!=null and startTime != ''">
+                and dl.CREATE_TIME &gt;=#{startTime}
+            </if>
+            <if test="endTime!=null and endTime != ''">
+                and dl.CREATE_TIME &lt;=#{endTime}
+            </if>
             GROUP BY dl.OP_USER
         )t1
     </select>
@@ -211,7 +247,17 @@
                     AND stu.ID IS NOT NULL
                     --		AND csb.USER_ID='1948586504800468993'
                 )t1
-                LEFT JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
+                LEFT JOIN (
+                    SELECT csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME
+                    FROM COURSE_STUDENT_BURIALPOINT csb1
+                    WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
+                    <if test="startTime!=null and startTime != ''">
+                        and csb1.CREATE_TIME &gt;=#{startTime}
+                    </if>
+                    <if test="endTime!=null and endTime != ''">
+                        and csb1.CREATE_TIME &lt;=#{endTime}
+                    </if>
+                ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
                 WHERE 1=1
                 --	AND t1.courseId='1954728193252552705'
                 GROUP BY t1.userId
@@ -255,7 +301,17 @@
                         AND stu.ID IS NOT NULL
                         --		AND csb.USER_ID='1948586504800468993'
                     )t1
-                    LEFT JOIN (SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.CREATE_TIME FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
+                    LEFT JOIN (
+                        SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.CREATE_TIME
+                        FROM COURSE_STUDENT_BURIALPOINT csb1
+                        WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
+                        <if test="startTime!=null and startTime != ''">
+                            and csb1.CREATE_TIME &gt;=#{startTime}
+                        </if>
+                        <if test="endTime!=null and endTime != ''">
+                            and csb1.CREATE_TIME &lt;=#{endTime}
+                        </if>
+                    ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
                     WHERE 1=1
                     --	AND t1.courseId='1954728193252552705'
                 )tt1
@@ -275,6 +331,12 @@
             FROM DEV_LOG dl
             WHERE dl.CATEGORY='LOGIN'
             AND dl.EXE_STATUS='SUCCESS'
+            <if test="startTime!=null and startTime != ''">
+                and dl.CREATE_TIME &gt;=#{startTime}
+            </if>
+            <if test="endTime!=null and endTime != ''">
+                and dl.CREATE_TIME &lt;=#{endTime}
+            </if>
         )t1
         GROUP by t1.createTime
     </select>
@@ -321,7 +383,17 @@
                     AND stu.ID IS NOT NULL
                     GROUP BY stu.ID,cch.ID,cc.ID,ci.COURSE_ID
                 )t1
-                JOIN (SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
+                JOIN (
+                    SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID
+                    FROM COURSE_STUDENT_BURIALPOINT csb1
+                    WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
+                    <if test="startTime!=null and startTime != ''">
+                        and csb1.CREATE_TIME &gt;=#{startTime}
+                    </if>
+                    <if test="endTime!=null and endTime != ''">
+                        and csb1.CREATE_TIME &lt;=#{endTime}
+                    </if>
+                ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
                 WHERE 1=1
                 GROUP BY t1.courseId,t1.userId,t1.hourId,csb.ID
             )z1
@@ -336,6 +408,9 @@
         FROM SYS_ORG so
         WHERE so.DELETE_FLAG ='NOT_DELETE'
         AND so."CATEGORY" ='COLLEGE'
+        <if test="orgId !=null and orgId != ''">
+            and so.ID=#{orgId}
+        </if>
     </select>
     <select id="getCourseCountListCollegeCourse" resultType="java.util.Map">
         SELECT
@@ -377,6 +452,12 @@
                         #{item}
                     </foreach>
                 </if>
+                <if test="startTime!=null and startTime != ''">
+                    and ci.CREATE_TIME &gt;=#{startTime}
+                </if>
+                <if test="endTime!=null and endTime != ''">
+                    and ci.CREATE_TIME &lt;=#{endTime}
+                </if>
                 GROUP BY so.ID,ci.COURSE_ID
             )t1
             GROUP BY t1.orgId
@@ -446,7 +527,17 @@
                 AND stu.ID IS NOT NULL
                 GROUP BY stu.ID,cch.ID,cc.ID,z1.orgId,z1.gradesId,z1.courseId
             )t1
-            JOIN (SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
+            JOIN (
+                SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID
+                FROM COURSE_STUDENT_BURIALPOINT csb1
+                WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
+                <if test="startTime!=null and startTime != ''">
+                    and csb1.CREATE_TIME &gt;=#{startTime}
+                </if>
+                <if test="endTime!=null and endTime != ''">
+                    and csb1.CREATE_TIME &lt;=#{endTime}
+                </if>
+            ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
             WHERE 1=1
             GROUP BY t1.orgId
         )finalTwo ON so.ID =finalTwo.orgId
@@ -590,7 +681,12 @@
                             AND stu.ID IS NOT NULL
                             GROUP BY stu.ID,cch.ID,cc.ID,zz1.orgId,zz1.gradesId,zz1.courseId
                         )t1
-                        JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1' GROUP BY csb1.USER_ID,csb1.HOUR_ID) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
+                        JOIN (
+                            SELECT csb1.USER_ID,csb1.HOUR_ID
+                            FROM COURSE_STUDENT_BURIALPOINT csb1
+                            WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
+                            GROUP BY csb1.USER_ID,csb1.HOUR_ID
+                        ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
                         WHERE 1=1
                         --	AND t1.courseId='1954728193252552705'
                         GROUP BY t1.orgId,t1.userId
@@ -772,6 +868,9 @@
         )finalThree ON su.ID =finalThree.userId
         WHERE su.DELETE_FLAG ='NOT_DELETE'
         AND su.EDU_IDENTITY ='2'
+        <if test="name !=null and name != ''">
+            and su.NAME=#{orgId}
+        </if>
     </select>
     <select id="getCourseListStudentAnalyse" resultType="java.util.Map">
         SELECT