Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

zouxuan 4 tahun lalu
induk
melakukan
dae68aa0dc

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -1091,6 +1091,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 		if(Objects.isNull(studentInfo)){
 			studentInfo = new StudentInfo();
 		}
+		if(StringUtils.isEmpty(studentInfo.getCertificateType())){
+			studentInfo.setCertificateType(CertificateTypeEnum.IDENTITY.getCode());
+		}
 		params.put("studentInfo", studentInfo);
 		params.put("isShowVisualSeal", true);
 

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

@@ -4644,7 +4644,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		Date date = new Date();
 		List<Long> courseIds1 = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toList());
 		//获取修改日志
-		List<CourseScheduleModifyLog> modifyLogs = getModifyLogs(courseIds1, courseSchedules, user.getId(), date);
+		List<CourseScheduleModifyLog> modifyLogs = new ArrayList<>();
+		if(!CollectionUtils.isEmpty(courseIds1)){
+			modifyLogs = getModifyLogs(courseIds1, courseSchedules, user.getId(), date);
+		}
 
 		PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(practiceGroupId));
 
@@ -4720,7 +4723,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		//清除考勤申述
 		teacherAttendanceDao.clearAttendanceComplaints(courseScheduleIds);
 		//保存修改记录
-		saveModifyLog(modifyLogs,courseIds1);
+		if(!CollectionUtils.isEmpty(modifyLogs))
+			saveModifyLog(modifyLogs,courseIds1);
 
         if (teacherIdMap != null && teacherIdMap.size() > 0) {
             sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_COURSE_SCHEDULE_CHANGE_RESULT,

+ 7 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2067,7 +2067,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			}
 
 			CourseSchedule courseSchedule = newCourseSchedules.stream().max(Comparator.comparing(CourseSchedule::getClassDate)).get();
-			if(vipGroup.getCoursesExpireDate().compareTo(courseSchedule.getEndClassTime())<=0||DateUtil.isSameDay(vipGroup.getCoursesExpireDate(), courseSchedule.getEndClassTime())){
+			if(vipGroup.getCoursesExpireDate().compareTo(courseSchedule.getEndClassTime())<=0&&!DateUtil.isSameDay(vipGroup.getCoursesExpireDate(), courseSchedule.getEndClassTime())){
 				throw new BizException("排课时间不可超过{}", DateUtil.dateToString(vipGroup.getCoursesExpireDate(), "yyyy年MM月dd日"));
 			}
 
@@ -2102,6 +2102,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("剩余课时不足,无法与现有课时对齐");
 		}
 
+
+		CourseSchedule lastCourseSchedule = surplusCourseWithGroup.stream().max(Comparator.comparing(CourseSchedule::getClassDate)).get();
+		if(vipGroup.getCoursesExpireDate().compareTo(lastCourseSchedule.getEndClassTime())<=0&&!DateUtil.isSameDay(vipGroup.getCoursesExpireDate(), lastCourseSchedule.getEndClassTime())){
+			throw new BizException("排课时间不可超过{}", DateUtil.dateToString(vipGroup.getCoursesExpireDate(), "yyyy年MM月dd日"));
+		}
+
 		List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
 		for (int i=0;i<surplusCourseWithGroup.size();i++) {
 			CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();

+ 5 - 3
mec-biz/src/main/resources/config/contracts/product.ftl

@@ -99,9 +99,11 @@
                     <span>家长姓名:${studentInfo.realName!}</span>
                     <span>电话:${studentInfo.phone!}</span>
                 </div>
-                <div class="iInfo">
-                    <span>身份证号:${studentInfo.idCardNo!}</span>
-                </div>
+                <#if studentInfo.certificateType == 'IDENTITY'>
+                    <div class="iInfo">
+                        <span>身份证号:${studentInfo.idCardNo!}</span>
+                    </div>
+                </#if>
                 <div class="iInfo">
                     <span>学生姓名:${studentInfo.username!}</span>
                 </div>

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

@@ -72,6 +72,7 @@
         <result column="id_card_no_" property="idCardNo"/>
         <result column="real_name_" property="realName"/>
         <result column="wechat_id_" property="wechatId"/>
+        <result column="certificate_type_" property="certificateType"/>
         <result column="name_" property="name"/>
         <result column="parents_name_" property="parentsName"/>
         <result column="current_grade_" property="grade"/>

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

@@ -73,7 +73,7 @@ public class VipGroupManageController extends BaseController {
             if(Objects.isNull(oldVipGroup)){
                 throw new BizException("此课程组不存在");
             }
-            if(!VipGroupStatusEnum.PROGRESS.equals(oldVipGroup.getStatus())){
+            if(!VipGroupStatusEnum.PROGRESS.equals(oldVipGroup.getStatus())&&!VipGroupStatusEnum.PAUSE.equals(oldVipGroup.getStatus())){
                 throw new BizException("此课程组状态暂不支持修改");
             }
         }