Browse Source

Merge branch 'fee_audit' of http://git.dayaedu.com/yonge/mec

zouxuan 4 năm trước cách đây
mục cha
commit
6aa16c35db

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalenderCourseSettings.java

@@ -41,6 +41,26 @@ public class MusicGroupPaymentCalenderCourseSettings {
 	/**  */
 	private java.util.Date updateTime;
 
+	private String username;
+
+	private String phone;
+
+	public String getUsername() {
+		return username;
+	}
+
+	public void setUsername(String username) {
+		this.username = username;
+	}
+
+	public String getPhone() {
+		return phone;
+	}
+
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+
 	public void setStudentOptional(boolean studentOptional) {
 		isStudentOptional = studentOptional;
 	}

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

@@ -192,7 +192,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
 
         Date now=new Date();
 
-        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId(), "2021-03-10 00:00:00");
+        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId(), "2021-03-09 00:00:00");
 
         LocalDate courseStartDay=LocalDate.now();
         LocalDate tempCourseLocalDate=LocalDate.parse("2020-03-01", DateUtil.dateFormatter);
@@ -287,7 +287,8 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         BigDecimal oneMonthPrice;
         BigDecimal oneMonthOriginalPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
         if(practiceBuyActivityExpireDate.after(now)&&Objects.nonNull(sysUser.getOrganId())&&sysUser.getOrganId()==14&&studentExitChargePractices<=0){
-            oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceActivityPrice():practiceGroupSellPrice.getTwiceActivityPrice();
+//            oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceActivityPrice():practiceGroupSellPrice.getTwiceActivityPrice();
+            oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceOriginalPrice():practiceGroupSellPrice.getTwiceOriginalPrice();
             if(!now.before(practicePromotionActivityStartDate)&&practiceGroupBuyParams.getBuyMonths()>=3&&studentExitChargePractices>0){
                 oneMonthPrice=practiceGroupBuyParams.getDrillTimesOnWeek()==1?practiceGroupSellPrice.getOnceQuartActivityPrice():practiceGroupSellPrice.getTwiceQuartActivityPrice();
             }else if(!now.before(practicePromotionActivityStartDate)&&studentExitChargePractices<=0){

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

@@ -992,11 +992,29 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		MusicGroupPaymentCalenderAuditDetailDto calenderAuditDetailDto = new MusicGroupPaymentCalenderAuditDetailDto();
 		MusicGroupPaymentCalenderAuditDto auditDto = musicGroupPaymentCalenderDao.getAuditDetail(batchNo);
 		calenderAuditDetailDto.setAuditDto(auditDto);
-		//获取收费标准
-		calenderAuditDetailDto.setMusicGroupPaymentCalenderCourseSettings(musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettingsByBatchNo(batchNo));
 		//获取缴费周期
 		List<MusicGroupPaymentCalender> groupPaymentCalenders = musicGroupPaymentCalenderDao.findByBatchNo(batchNo);
 		calenderAuditDetailDto.setMusicGroupPaymentCalenders(groupPaymentCalenders);
+		//获取收费标准
+		List<MusicGroupPaymentCalenderCourseSettings> courseSettings = musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettingsByBatchNo(batchNo);
+		if(courseSettings != null && courseSettings.size() > 0){
+			MusicGroupPaymentCalender paymentCalender = groupPaymentCalenders.get(0);
+			if(paymentCalender.getPaymentType() == ADD_STUDENT){
+				try {
+					String studentIds = groupPaymentCalenders.get(0).getStudentIds();
+					if(StringUtils.isNotEmpty(studentIds)){
+						SysUser sysUser = sysUserFeignService.queryUserById(Integer.parseInt(studentIds));
+						courseSettings.forEach(e->{
+							e.setUsername(sysUser.getUsername());
+							e.setPhone(sysUser.getPhone());
+						});
+					}
+				}catch (Exception e){
+					e.printStackTrace();
+				}
+			}
+			calenderAuditDetailDto.setMusicGroupPaymentCalenderCourseSettings(courseSettings);
+		}
 		//获取跨团合班学员缴费详情
 		calenderAuditDetailDto.setMusicGroupPaymentCalenderStudentDetails(musicGroupPaymentCalenderStudentDetailDao.findByBatchNo(batchNo));
 		return calenderAuditDetailDto;

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

@@ -2786,7 +2786,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 
         Date now = new Date();
 
-        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId(),"2021-03-10 00:00:00");
+        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId(),"2021-03-09 00:00:00");
 
         LocalDate courseStartDay = LocalDate.now();
         LocalDate tempCourseLocalDate = LocalDate.parse("2020-03-01", DateUtil.dateFormatter);
@@ -2895,7 +2895,8 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         }
         BigDecimal oneMonthPrice;
         if (practiceBuyActivityExpireDate.after(now)&&Objects.nonNull(sysUser.getOrganId())&&sysUser.getOrganId()==14&& studentExitChargePractices <= 0) {
-            oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceActivityPrice() : practiceGroupSellPrice.getTwiceActivityPrice();
+//            oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceActivityPrice() : practiceGroupSellPrice.getTwiceActivityPrice();
+            oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceOriginalPrice() : practiceGroupSellPrice.getTwiceOriginalPrice();
             if (!now.before(practicePromotionActivityStartDate) && practiceGroupBuyParams.getBuyMonths() >= 3 && studentExitChargePractices > 0) {
                 oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceQuartActivityPrice() : practiceGroupSellPrice.getTwiceQuartActivityPrice();
             } else if (!now.before(practicePromotionActivityStartDate) && studentExitChargePractices <= 0) {

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/PracticeGroupController.java

@@ -198,7 +198,7 @@ public class PracticeGroupController extends BaseController {
         if (sysUser == null) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(sysUser.getId(),"2021-03-10 00:00:00");
+        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(sysUser.getId(),"2021-03-09 00:00:00");
         Map<String, Integer> result=new HashMap<>();
         result.put("organId", sysUser.getOrganId());
         result.put("isNewStudent", studentExitChargePractices<=0?0:1);

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

@@ -166,7 +166,7 @@ public class EduPracticeGroupController extends BaseController {
             throw new BizException("请指定学生");
         }
         SysUser student = sysUserFeignService.queryUserById(studentId);
-        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(studentId, "2021-03-10 00:00:00");
+        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(studentId, "2021-03-09 00:00:00");
         Map<String, Integer> result=new HashMap<>();
         result.put("organId", student.getOrganId());
         result.put("isNewStudent", studentExitChargePractices<=0?0:1);