Selaa lähdekoodia

update:首页数据排除测试分部

yonge 5 vuotta sitten
vanhempi
commit
e8e26b60d8

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml

@@ -307,18 +307,17 @@
 		select sum(case when dgcp.status_ = 0 then 1 else 0 end) unbooked_num_,
 		select sum(case when dgcp.status_ = 0 then 1 else 0 end) unbooked_num_,
 		sum(case when dgcp.status_ = 1 then 1 else 0 end) booked_num_
 		sum(case when dgcp.status_ = 1 then 1 else 0 end) booked_num_
 		from demo_group_courses_plan dgcp left join demo_group dg on dgcp.demo_group_id_ = dg.id_
 		from demo_group_courses_plan dgcp left join demo_group dg on dgcp.demo_group_id_ = dg.id_
-		<where>
-            <if test="organIds != null">
-                AND INTE_ARRAY(dg.organ_id_list_,#{organIds})
-            </if>
-    	</where> 
+		where INTE_ARRAY(dg.organ_id_list_,'36,38') = 0
+        <if test="organIds != null">
+            AND INTE_ARRAY(dg.organ_id_list_,#{organIds})
+        </if>
 	</select>
 	</select>
     
     
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     	select count(cs.id_) from course_schedule cs
     	select count(cs.id_) from course_schedule cs
         left join demo_group vg on cs.music_group_id_ = vg.id_
         left join demo_group vg on cs.music_group_id_ = vg.id_
         where cs.type_ = 'DEMO'
         where cs.type_ = 'DEMO'
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and INTE_ARRAY(vg.organ_id_list_,'36,38') = 0
         <if test="organIds != null">
         <if test="organIds != null">
             AND INTE_ARRAY(vg.organ_id_list_,#{organIds})
             AND INTE_ARRAY(vg.organ_id_list_,#{organIds})
         </if>
         </if>

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -304,11 +304,10 @@
     
     
   	<select id="queryOrganMusicGroupNum" resultType="map">
   	<select id="queryOrganMusicGroupNum" resultType="map">
     	select count(*) total,sum(case when status_ = 'PREPARE' then 1 else 0 end) prepare_num_,sum(case when status_ = 'PROGRESS' then 1 else 0 end) progress_num_,sum(case when status_ = 'PAUSE' then 1 else 0 end) pause_num_ from music_group
     	select count(*) total,sum(case when status_ = 'PREPARE' then 1 else 0 end) prepare_num_,sum(case when status_ = 'PROGRESS' then 1 else 0 end) progress_num_,sum(case when status_ = 'PAUSE' then 1 else 0 end) pause_num_ from music_group
-    	<where>
-    		<if test="organId != null">
-    			FIND_IN_SET(organ_id_,#{organId})
-    		</if>
-    	</where>
+   		where organ_id_ not in (36,38)
+   		<if test="organId != null">
+   			and FIND_IN_SET(organ_id_,#{organId})
+   		</if>
   	</select>
   	</select>
   	
   	
   	<select id="queryCurrentMonthCoursesNum" resultType="int">
   	<select id="queryCurrentMonthCoursesNum" resultType="int">
@@ -316,7 +315,7 @@
 		left join class_group cg on cs.class_group_id_ = cg.id_
 		left join class_group cg on cs.class_group_id_ = cg.id_
 		left join music_group mg on cg.music_group_id_ = mg.id_
 		left join music_group mg on cg.music_group_id_ = mg.id_
 		where cs.group_type_ = 'MUSIC' AND cg.group_type_ = 'MUSIC'
 		where cs.group_type_ = 'MUSIC' AND cg.group_type_ = 'MUSIC'
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and mg.organ_id_ not in (36,38)
    		<if test="organId != null">
    		<if test="organId != null">
    			AND FIND_IN_SET(mg.organ_id_,#{organId})
    			AND FIND_IN_SET(mg.organ_id_,#{organId})
    		</if>
    		</if>

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -522,7 +522,7 @@
     <select id="queryIncomeStatisticsWithCurrentMonth" resultType="map">
     <select id="queryIncomeStatisticsWithCurrentMonth" resultType="map">
         select count(*) total,sum(actual_amount_) total_num_ from student_payment_order
         select count(*) total,sum(actual_amount_) total_num_ from student_payment_order
         where actual_amount_ &gt; 0 and DATE_FORMAT(create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) AND
         where actual_amount_ &gt; 0 and DATE_FORMAT(create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) AND
-        status_ = 'SUCCESS'
+        status_ = 'SUCCESS' and organ_id_ not in (36,38)
         <if test="organId != null">
         <if test="organId != null">
             and FIND_IN_SET(organ_id_,#{organId})
             and FIND_IN_SET(organ_id_,#{organId})
         </if>
         </if>

+ 4 - 5
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -502,11 +502,10 @@
     <select id="queryStudentNum" resultType="map">
     <select id="queryStudentNum" resultType="map">
         SELECT count(distinct sr.user_id_) total_num_,sum(case when sr.create_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) new_num_,sum(case when sr.music_group_status_ = 'QUIT' and sr.update_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) quit_num_
         SELECT count(distinct sr.user_id_) total_num_,sum(case when sr.create_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) new_num_,sum(case when sr.music_group_status_ = 'QUIT' and sr.update_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) quit_num_
         FROM student_registration sr left join music_group mg on sr.music_group_id_ = mg.id_
         FROM student_registration sr left join music_group mg on sr.music_group_id_ = mg.id_
-        <where>
-    		<if test="organId != null">
-    			AND FIND_IN_SET(mg.organ_id_,#{organId})
-    		</if>
-    	</where>
+        where mg.organ_id_ not in (36,38)
+   		<if test="organId != null">
+   			AND FIND_IN_SET(mg.organ_id_,#{organId})
+   		</if>
     </select>
     </select>
     <select id="findMapByMusicGroupId" resultType="java.util.Map">
     <select id="findMapByMusicGroupId" resultType="java.util.Map">
         SELECT sr.user_id_ 'key',MIN(sr.parents_phone_) 'value' FROM student_registration sr
         SELECT sr.user_id_ 'key',MIN(sr.parents_phone_) 'value' FROM student_registration sr

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml

@@ -194,7 +194,7 @@
         sucad.type_ = 'REWARDS' or sucad.type_ = 'WAGE') then sucad.amount_ else 0 end) expend_total_ from
         sucad.type_ = 'REWARDS' or sucad.type_ = 'WAGE') then sucad.amount_ else 0 end) expend_total_ from
         sys_user_cash_account_detail sucad
         sys_user_cash_account_detail sucad
         left join sys_user u on sucad.user_id_ = u.id_
         left join sys_user u on sucad.user_id_ = u.id_
-        where sucad.status_ = 'SUCCESS' and DATE_FORMAT(sucad.create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' )
+        where sucad.status_ = 'SUCCESS' and DATE_FORMAT(sucad.create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) and u.organ_id_ not in (36,38)
         <if test="organId != null">
         <if test="organId != null">
             AND FIND_IN_SET(u.organ_id_,#{organId})
             AND FIND_IN_SET(u.organ_id_,#{organId})
         </if>
         </if>

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -662,7 +662,7 @@
     <select id="queryOrganTeacherNum" resultType="map">
     <select id="queryOrganTeacherNum" resultType="map">
         select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case when
         select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case when
         job_nature_ = 'FULL_TIME' then 1 else 0 end) full_time_num_ from teacher
         job_nature_ = 'FULL_TIME' then 1 else 0 end) full_time_num_ from teacher
-        where demission_date_ is null
+        where demission_date_ is null and organ_id_ not in (36,38)
             <if test="organId != null">
             <if test="organId != null">
                 and FIND_IN_SET(organ_id_,#{organId})
                 and FIND_IN_SET(organ_id_,#{organId})
             </if>
             </if>

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -741,16 +741,15 @@
     
     
     <select id="queryVipGroupNum" resultType="map">
     <select id="queryVipGroupNum" resultType="map">
     	select count(*) total,sum(case when group_status_ = 2 then 1 else 0 end) applying_num_,sum(case when group_status_ = 4 then 1 else 0 end) finished_num_ from vip_group
     	select count(*) total,sum(case when group_status_ = 2 then 1 else 0 end) applying_num_,sum(case when group_status_ = 4 then 1 else 0 end) finished_num_ from vip_group
-    	<where>
-    		<if test="organId != null">
-                FIND_IN_SET(organ_id_,#{organId})
-    		</if>
-    	</where>
+    	where organ_id_ not in (36,38)
+   		<if test="organId != null">
+              and FIND_IN_SET(organ_id_,#{organId})
+   		</if>
     </select>
     </select>
     
     
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     	select count(cs.id_) from course_schedule cs left join vip_group vg on cs.music_group_id_ = vg.id_ where cs.type_ in ('VIP')
     	select count(cs.id_) from course_schedule cs left join vip_group vg on cs.music_group_id_ = vg.id_ where cs.type_ in ('VIP')
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and  vg.organ_id_ not in (36,38)
    		<if test="organId != null">
    		<if test="organId != null">
    		    AND FIND_IN_SET(vg.organ_id_,#{organId})
    		    AND FIND_IN_SET(vg.organ_id_,#{organId})
    		</if>
    		</if>