Joburgess 4 anos atrás
pai
commit
8ee2b818fd

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java

@@ -108,4 +108,7 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
     List<String> getNoPaymentMusicGroup(@Param("organIds") Set<Integer> organIds);
     List<String> getNoPaymentMusicGroup(@Param("organIds") Set<Integer> organIds);
 
 
     int countApplyForQuitGroupNum(@Param("organIds") Set<Integer> organIds);
     int countApplyForQuitGroupNum(@Param("organIds") Set<Integer> organIds);
+
+    int countStudentAttendanceInfo(@Param("organIds") Set<Integer> organIds,
+                                   @Param("type") String type);
 }
 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -337,8 +337,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 
 
 
 
 		IndexErrInfoDto<IndexErrInfoDto> three = new IndexErrInfoDto<>();
 		IndexErrInfoDto<IndexErrInfoDto> three = new IndexErrInfoDto<>();
-		one.setErrorType(IndexErrorType.TEACHER_INFO);
-		one.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
+		three.setErrorType(IndexErrorType.TEACHER_INFO);
+		three.setDesc(IndexErrorType.TEACHER_INFO.getMsg());
 		List<IndexErrInfoDto> threeChild = new ArrayList<>();
 		List<IndexErrInfoDto> threeChild = new ArrayList<>();
 
 
 		three.setNum(threeChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
 		three.setNum(threeChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());

+ 20 - 0
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -297,6 +297,7 @@
 			m.del_flag_ = 0
 			m.del_flag_ = 0
 			AND (m.is_lock_ = 0 OR m.is_lock_ IS NULL)
 			AND (m.is_lock_ = 0 OR m.is_lock_ IS NULL)
 		  	AND m.status_ = 'OVER'
 		  	AND m.status_ = 'OVER'
+			AND (m.new_course_id_ IS NULL OR m.new_course_id_=m.id_)
 			AND m.organ_id_ IS NOT NULL
 			AND m.organ_id_ IS NOT NULL
 			<if test="groupType!=null">
 			<if test="groupType!=null">
 				AND m.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 				AND m.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
@@ -521,4 +522,23 @@
 			</foreach>
 			</foreach>
 		</if>
 		</if>
 	</select>
 	</select>
+
+	<select id="countStudentAttendanceInfo" resultType="java.lang.Integer">
+		SELECT
+			COUNT( DISTINCT cssp.user_id_ )
+		FROM
+			course_schedule_student_payment cssp
+				LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+				LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_ AND sa.user_id_ = cssp.user_id_
+				LEFT JOIN student_visit sv ON cssp.id_=sv.object_id_
+		WHERE
+			( sa.status_ = 'LEAVE' AND sa.remark_ IS NOT NULL AND sv.id_ IS NULL)
+			OR sa.id_ IS NULL
+			<if test="organIds!=null and organIds.size()>0">
+				AND cs.organ_id_ IN
+				<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
+					#{organId}
+				</foreach>
+			</if>
+	</select>
 </mapper>
 </mapper>