Browse Source

Merge remote-tracking branch 'origin/online1' into online1

zouxuan 4 years ago
parent
commit
1c831efc9f

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

@@ -156,7 +156,9 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
 
     List<Map<Integer, Integer>> getOrganNoClassMusicGroupStudentNum(@Param("organIds") Set<Integer> organIds, @Param("educationUserId") Integer educationUserId);
 
-    int countNoPaymentStudentNum(@Param("organIds") Set<Integer> organIds, @Param("educationUserId") Integer educationUserId);
+    int countNoPaymentStudentNum(@Param("organIds") Set<Integer> organIds,
+                                 @Param("educationUserId") Integer educationUserId,
+                                 @Param("noPaymentType") Integer noPaymentType);
 
     List<Map<Integer, Integer>> countOrganNoPaymentStudentNum(@Param("organIds") Set<Integer> organIds, @Param("educationUserId") Integer educationUserId);
 

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexErrorType.java

@@ -13,6 +13,7 @@ public enum IndexErrorType implements BaseEnum<String, IndexErrorType> {
     NO_CLASS_MUSIC_GROUP_STUDENT_INFO("NO_CLASS_MUSIC_GROUP_STUDENT_INFO", "当前有{0}个乐团共{1}名学员未加入任何班级"),
 
     STUDENT_INFO("STUDENT_INFO", "学员处理"),
+    STUDENT_ARREARAGE("STUDENT_NOT_PAYMENT", "欠费学员数"),
     STUDENT_NOT_PAYMENT("STUDENT_NOT_PAYMENT", "未缴费学员数"),
     STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP("STUDENT_APPLY_FOR_QUIT_MUSIC_GROUP", "申请退团学员数"),
     WAIT_CREATE_PAYMENT_CALENDER("WAIT_CREATE_PAYMENT_CALENDER", "待创建缴费项目"),

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ArrearageStudentsQueryInfo.java

@@ -18,6 +18,9 @@ public class ArrearageStudentsQueryInfo extends QueryInfo {
 
     private Integer eduTeacherId;
 
+    @ApiModelProperty(value = "未缴费类型:0历史,1进行中")
+    private Integer noPaymentType;
+
     public String getOrganIds() {
         return organIds;
     }
@@ -49,4 +52,12 @@ public class ArrearageStudentsQueryInfo extends QueryInfo {
     public void setEduTeacherId(Integer eduTeacherId) {
         this.eduTeacherId = eduTeacherId;
     }
+
+    public Integer getNoPaymentType() {
+        return noPaymentType;
+    }
+
+    public void setNoPaymentType(Integer noPaymentType) {
+        this.noPaymentType = noPaymentType;
+    }
 }

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

@@ -381,7 +381,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			List<IndexErrInfoDto> twoChild = new ArrayList<>();
 
 			//未缴费学员数
-			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId), Arrays.asList(educationUserId)));
+			twoChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_ARREARAGE, IndexErrorType.STUDENT_ARREARAGE.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId,0), Arrays.asList(educationUserId)));
 
 			//申请退团学员数
 			List<Long> quitGroupNum = indexBaseMonthDataDao.queryApplyForQuitGroupNum(organIds,educationUserId);
@@ -440,12 +440,6 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 				noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds);
 				courseTimeError = indexBaseMonthDataDao.getCourseTimeError(organIds,classGroupIds);
 			}
-			String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
-			//全职未离职老师
-			//预计课酬较低
-			int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIdsStr,monthStr);
-			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW, IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW.getMsg(),lowTeacherSalary, null));
-
 			fourChild.add(new IndexErrInfoDto(IndexErrorType.COURSE_TIME_ERROR, IndexErrorType.COURSE_TIME_ERROR.getMsg(), courseTimeError, null));
 
 			fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE.getMsg(), attendanceError, null));
@@ -714,6 +708,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		if (sysUser == null) {
 			throw new BizException("用户信息获取失败");
 		}
+
+		Set<Integer> organIdSet = null;
+		if(StringUtils.isNotBlank(organIds)){
+			organIdSet = Arrays.stream(organIds.split(",")).map(Integer::new).collect(Collectors.toSet());
+		}
+
 		//当前用户是否是分部经理
 		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 		Integer educationUserId = null;
@@ -738,6 +738,18 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			}
 		}
 		result.add(indexErrInfoDto);
+
+		//未缴费学员数
+		result.add(new IndexErrInfoDto(IndexErrorType.STUDENT_NOT_PAYMENT, IndexErrorType.STUDENT_NOT_PAYMENT.getMsg(), indexBaseMonthDataDao.countNoPaymentStudentNum(organIdSet,educationUserId, 1), Arrays.asList(educationUserId)));
+
+
+		String monthStr = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
+		//全职未离职老师
+		//预计课酬较低
+		int lowTeacherSalary = indexBaseMonthDataDao.queryLowTeacherSalary(organIds,monthStr);
+		result.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW, IndexErrorType.TEACHER_EXPECT_SALARY_BE_LOW.getMsg(),lowTeacherSalary, null));
+
+
 		return result;
 	}
 
@@ -781,7 +793,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		resultMap.put("musicPatrol",flag1);
 		boolean flag2 = false;
 		if(!flag2){
-			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId);
+			int countNoPaymentStudentNum = indexBaseMonthDataDao.countNoPaymentStudentNum(organIds,educationUserId, 0);
 			if(countNoPaymentStudentNum > 0){
 				flag2 = true;
 			}

+ 7 - 2
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -709,7 +709,12 @@
 		LEFT JOIN music_group mg ON mgpc.music_group_id_ = mg.id_
 		WHERE
 		mg.status_ = 'PROGRESS'
-		AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
+		<if test="noPaymentType==null or noPaymentType==0">
+			AND DATE_FORMAT(NOW(),'%Y-%m-%d') > mgpc.payment_valid_end_date_
+		</if>
+		<if test="noPaymentType!=null and noPaymentType==1">
+			AND DATE_FORMAT(NOW(),'%Y-%m-%d') BETWEEN mgpc.payment_valid_start_date_ AND mgpc.payment_valid_end_date_
+		</if>
 		AND mgpcd.payment_status_ = 'NON_PAYMENT' AND mgpcd.expect_amount_ > 0 AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT'
 		<if test="educationUserId != null">
 			AND mg.educational_teacher_id_ = #{educationUserId}
@@ -732,7 +737,7 @@
 		LEFT JOIN music_group mg ON mgpc.music_group_id_ = mg.id_
 		WHERE
 		mg.status_ = 'PROGRESS'
-		AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
+		AND DATE_FORMAT(NOW(),'%Y-%m-%d') > mgpc.payment_valid_end_date_
 		AND mgpcd.payment_status_ = 'NON_PAYMENT' AND mgpcd.expect_amount_ > 0 AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT'
 		<if test="educationUserId != null">
 			AND mg.educational_teacher_id_ = #{educationUserId}

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

@@ -425,7 +425,12 @@
 	<sql id="queryArrearageStudentsCondition">
 		<where>
 			mg.status_ = 'PROGRESS'
-			AND DATE_FORMAT( NOW(), '%Y-%m-%d' ) >= DATE_FORMAT( mgpc.payment_valid_start_date_, '%Y-%m-%d' )
+			<if test="noPaymentType==null or noPaymentType==0">
+				AND DATE_FORMAT(NOW(),'%Y-%m-%d') > mgpc.payment_valid_end_date_
+			</if>
+			<if test="noPaymentType!=null and noPaymentType==1">
+				AND DATE_FORMAT(NOW(),'%Y-%m-%d') BETWEEN mgpc.payment_valid_start_date_ AND mgpc.payment_valid_end_date_
+			</if>
 			AND mgpcd.payment_status_ = 'NON_PAYMENT' AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT'
 			AND mgpcd.expect_amount_ > 0
 			<if test="organIds!=null and organIds.size()>0">

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -2595,7 +2595,7 @@ public class ExportController extends BaseController {
         OutputStream outputStream = response.getOutputStream();
 
         try {
-            String[] header = {"分部", "基础技能班学员数量异常", "乐团巡查事项异常", "未在班级学员数", "未缴费学员数",
+            String[] header = {"分部", "基础技能班学员数量异常", "乐团巡查事项异常", "未在班级学员数", "费学员数",
                     "申请退团学员数", "预计课酬较低", "课程时间安排异常", "乐团巡查未计划", "乐团巡查任务未提交",
                     "回访任务未完成", "课程考勤异常", "课程异常", "服务指标异常", "总计",};
             String[] body = {"organName", "highClassStudentLessThanThreeNum", "musicPatrolItem", "noClassMusicGroupStudentInfo", "studentNotPayment",