فهرست منبع

Merge remote-tracking branch 'origin/master'

zouxuan 4 سال پیش
والد
کامیت
fc5766fa74
42فایلهای تغییر یافته به همراه1010 افزوده شده و 277 حذف شده
  1. 2 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/ResourceServerConfig.java
  2. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java
  3. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java
  4. 9 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentRouteOrderDao.java
  5. 10 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPreRegistrationDao.java
  6. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/FeeFlagNumDto.java
  7. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/IndexBaseDto.java
  8. 91 8
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java
  9. 36 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPreRegistrationDto.java
  10. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPreRegistration.java
  11. 4 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexDataType.java
  12. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java
  13. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/EmployeeInfoQueryInfo.java
  14. 54 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPreRegistrationQueryInfo.java
  15. 12 12
      mec-biz/src/main/java/com/ym/mec/biz/event/listener/CourseEventListener.java
  16. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeService.java
  17. 18 1
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  18. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPreRegistrationService.java
  19. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  20. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  21. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java
  22. 6 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  23. 210 36
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  24. 5 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  25. 29 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPreRegistrationServiceImpl.java
  26. 10 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java
  27. 3 0
      mec-biz/src/main/resources/config/mybatis/EmployeeInfoMapper.xml
  28. 15 0
      mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml
  29. 51 4
      mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml
  30. 3 1
      mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml
  31. 2 0
      mec-biz/src/main/resources/config/mybatis/StudentMapper.xml
  32. 1 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  33. 7 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentRouteOrderMapper.xml
  34. 57 4
      mec-biz/src/main/resources/config/mybatis/StudentPreRegistrationMapper.xml
  35. 1 1
      mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java
  36. 12 3
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  37. 6 0
      mec-web/src/main/java/com/ym/mec/web/controller/ContractsController.java
  38. 19 0
      mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java
  39. 206 160
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  40. 15 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java
  41. 33 14
      mec-web/src/main/java/com/ym/mec/web/controller/StudentRegistrationController.java
  42. 1 0
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

+ 2 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/config/ResourceServerConfig.java

@@ -26,7 +26,8 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
 		http.csrf().disable().exceptionHandling().accessDeniedHandler(baseAccessDeniedHandler).authenticationEntryPoint(baseAuthenticationEntryPoint).and()
-				.authorizeRequests().antMatchers("/task/**","/user/updatePassword","/user/noAuth/queryUserByPhone").hasIpAddress("0.0.0.0/0").anyRequest().authenticated().and().httpBasic();
+				.authorizeRequests().antMatchers("/task/**", "/user/updatePassword", "/user/noAuth/queryUserByPhone", "/user/queryUserByPhone", "/user/add").hasIpAddress("0.0.0.0/0")
+				.anyRequest().authenticated().and().httpBasic();
 	}
 
 	@Override

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java

@@ -166,4 +166,13 @@ public interface EmployeeDao extends BaseDAO<Integer, Employee> {
      * @param employeeLevelDtos
      */
     void employeeLevel(@Param("employeeLevelDtos") List<EmployeeLevelDto> employeeLevelDtos);
+
+    /**
+     * @param roleIds:  角色编号列表
+     * @param organIds: 部门编号列表
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+     * @describe 根据角色和用户查找用户(包含离职和冻结的)
+     */
+    List<SimpleUserDto> findAllByRole(@Param("roleIds") String roleIds,
+                                   @Param("organIds") String organIds);
 }

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

@@ -4,6 +4,7 @@ import com.ym.mec.biz.dal.entity.IndexBaseMonthData;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.IndexDataType;
 import com.ym.mec.biz.dal.enums.JobNatureEnum;
+import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 import org.apache.poi.ss.formula.functions.Index;
@@ -79,6 +80,11 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
     List<IndexBaseMonthData> getMusicStudentData(@Param("month") String month,
                                                  @Param("type") String type);
 
+    List<IndexBaseMonthData> getMusicGroupPreRegistrationStudentData(@Param("month") String month);
+
+    List<IndexBaseMonthData> getMusicGroupStudentFromPreData(@Param("month") String month,
+                                                             @Param("paymentStatus") PaymentStatusEnum paymentStatus);
+
     List<IndexBaseMonthData> getStudentConversionData(@Param("month") String month);
 
     List<IndexBaseMonthData> getOtherStudentData(@Param("month") String month);

+ 9 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentRouteOrderDao.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dao;
 
 
+import com.ym.mec.biz.dal.dto.FeeFlagNumDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentRouteOrderDto;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
@@ -57,16 +58,18 @@ public interface StudentPaymentRouteOrderDao extends BaseDAO<Long, StudentPaymen
 
     /**
      * 插入外部订单
+     *
      * @return
      */
     int insertOrder(StudentPaymentOrder order);
-    
+
     int queryAuditCount(Map<String, Object> params);
-    
+
     List<StudentPaymentRouteOrder> queryAuditPage(Map<String, Object> params);
 
     /**
      * 是否有重复到订单号
+     *
      * @param transNos
      * @return
      */
@@ -74,6 +77,7 @@ public interface StudentPaymentRouteOrderDao extends BaseDAO<Long, StudentPaymen
 
     /**
      * 获取审核通过的学校缴费金额
+     *
      * @param calenderId
      * @return
      */
@@ -81,8 +85,11 @@ public interface StudentPaymentRouteOrderDao extends BaseDAO<Long, StudentPaymen
 
     /**
      * 更换订单号获取
+     *
      * @param orderNo
      * @return
      */
     StudentPaymentRouteOrder getByOrderNo(String orderNo);
+
+    FeeFlagNumDto getCountFeeFlagNum(@Param("orderNo") String orderNo);
 }

+ 10 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPreRegistrationDao.java

@@ -1,12 +1,21 @@
 package com.ym.mec.biz.dal.dao;
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.ibatis.annotations.Param;
 
+import com.ym.mec.biz.dal.dto.StudentPreRegistrationDto;
 import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.common.dal.BaseDAO;
 
 public interface StudentPreRegistrationDao extends BaseDAO<Long, StudentPreRegistration> {
 
-	StudentPreRegistration queryByUserId(@Param("userId") Integer userId, @Param("musicGroupId") String musicGroupId);
+	StudentPreRegistration queryByMusicGroupIdAndUserId(@Param("userId") Integer userId, @Param("musicGroupId") String musicGroupId);
 
+	StudentPreRegistration queryByMusicGroupIdAndPhone(@Param("phone") String phone, @Param("musicGroupId") String musicGroupId);
+	
+	List<StudentPreRegistration> queryByMusicGroupId(String musicGroupId);
+	
+	List<StudentPreRegistrationDto> queryListForPage(Map<String,Object> params);
 }

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/FeeFlagNumDto.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.dal.dto;
+
+public class FeeFlagNumDto {
+    private Integer totalNum;
+    private Integer yesNum;
+
+    public Integer getTotalNum() {
+        return totalNum;
+    }
+
+    public void setTotalNum(Integer totalNum) {
+        this.totalNum = totalNum;
+    }
+
+    public Integer getYesNum() {
+        return yesNum;
+    }
+
+    public void setYesNum(Integer yesNum) {
+        this.yesNum = yesNum;
+    }
+}

+ 4 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/IndexBaseDto.java

@@ -6,7 +6,9 @@ import com.ym.mec.common.constant.CommonConstants;
 import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.Comparator;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -69,7 +71,7 @@ public class IndexBaseDto {
         return indexMonthData;
     }
 
-    public void setIndexMonthData(List<IndexBaseMonthData> indexMonthData) {
+    public void setIndexMonthData(List<IndexBaseMonthData> indexMonthData, Date currentMonth) {
         this.indexMonthData = indexMonthData;
         if(!CollectionUtils.isEmpty(indexMonthData)){
             BigDecimal total = indexMonthData.stream().map(IndexBaseMonthData::getTotalNum).reduce(BigDecimal.ZERO, BigDecimal::add);
@@ -81,7 +83,7 @@ public class IndexBaseDto {
                     this.percent = activateNum.divide(total, CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(100)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN);
                 }
             }else{
-                this.percent = indexMonthData.stream().max(Comparator.comparing(IndexBaseMonthData::getMonth)).get().getPercent();
+                this.percent = indexMonthData.stream().filter(i->currentMonth.compareTo(i.getMonth())==0).max(Comparator.comparing(IndexBaseMonthData::getMonth)).get().getPercent();
             }
         }
     }

+ 91 - 8
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java

@@ -14,24 +14,41 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     //零星费用类型
     private String sporadicType;
 
-    private BigDecimal courseFee;
+    //课程费用(废弃)
+    private BigDecimal courseFee = BigDecimal.ZERO;
 
-    private BigDecimal highOnlineCourseFee;
+    //新生专享(废弃)
+    private BigDecimal highOnlineCourseFee = BigDecimal.ZERO;
 
     //乐器费用
-    private BigDecimal musicalFee;
+    private BigDecimal musicalFee = BigDecimal.ZERO;
 
-    //租赁费用
-    private BigDecimal leaseFee;
+    //押金费用
+    private BigDecimal leaseFee = BigDecimal.ZERO;
 
     //教辅费用
-    private BigDecimal teachingFee;
+    private BigDecimal teachingFee = BigDecimal.ZERO;
 
     //维修费用
-    private BigDecimal repairFee;
+    private BigDecimal repairFee = BigDecimal.ZERO;
 
     //手续费
-    private BigDecimal transferFee;
+    private BigDecimal transferFee = BigDecimal.ZERO;
+
+    //乐团课程费用
+    private BigDecimal musicGroupCourseFee = BigDecimal.ZERO;
+    //网络基础训练课程费用
+    private BigDecimal highCourseFee = BigDecimal.ZERO;
+    //VIP课程费用
+    private BigDecimal vipCourseFee = BigDecimal.ZERO;
+    //网管课程费用
+    private BigDecimal practiceCourseFee = BigDecimal.ZERO;
+    //乐理课程费用
+    private BigDecimal theoryCourseFee = BigDecimal.ZERO;
+    //考级费用
+    private BigDecimal degreeFee = BigDecimal.ZERO;
+    //其它费用
+    private BigDecimal otherFee = BigDecimal.ZERO;
 
     private String organName;
     private String schoolName;
@@ -53,6 +70,8 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     //分润余额
     private BigDecimal routeBalance;
 
+    private String feeFlag;
+
     public BigDecimal getSporadicAmount() {
         return sporadicAmount;
     }
@@ -204,4 +223,68 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     public void setRepairFee(BigDecimal repairFee) {
         this.repairFee = repairFee;
     }
+
+    public BigDecimal getMusicGroupCourseFee() {
+        return musicGroupCourseFee;
+    }
+
+    public void setMusicGroupCourseFee(BigDecimal musicGroupCourseFee) {
+        this.musicGroupCourseFee = musicGroupCourseFee;
+    }
+
+    public BigDecimal getHighCourseFee() {
+        return highCourseFee;
+    }
+
+    public void setHighCourseFee(BigDecimal highCourseFee) {
+        this.highCourseFee = highCourseFee;
+    }
+
+    public BigDecimal getVipCourseFee() {
+        return vipCourseFee;
+    }
+
+    public void setVipCourseFee(BigDecimal vipCourseFee) {
+        this.vipCourseFee = vipCourseFee;
+    }
+
+    public BigDecimal getPracticeCourseFee() {
+        return practiceCourseFee;
+    }
+
+    public void setPracticeCourseFee(BigDecimal practiceCourseFee) {
+        this.practiceCourseFee = practiceCourseFee;
+    }
+
+    public BigDecimal getTheoryCourseFee() {
+        return theoryCourseFee;
+    }
+
+    public void setTheoryCourseFee(BigDecimal theoryCourseFee) {
+        this.theoryCourseFee = theoryCourseFee;
+    }
+
+    public BigDecimal getDegreeFee() {
+        return degreeFee;
+    }
+
+    public void setDegreeFee(BigDecimal degreeFee) {
+        this.degreeFee = degreeFee;
+    }
+
+    public BigDecimal getOtherFee() {
+        return otherFee;
+    }
+
+    public void setOtherFee(BigDecimal otherFee) {
+        this.otherFee = otherFee;
+    }
+
+    public String getFeeFlag() {
+        return feeFlag;
+    }
+
+    public void setFeeFlag(String feeFlag) {
+        this.feeFlag = feeFlag;
+    }
 }

+ 36 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPreRegistrationDto.java

@@ -0,0 +1,36 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.StudentPreRegistration;
+
+public class StudentPreRegistrationDto extends StudentPreRegistration {
+	
+	private boolean isRegistered;
+	
+	private String subjectFirstName;
+	
+	private String subjectSecondName;
+
+	public boolean getIsRegistered() {
+		return isRegistered;
+	}
+
+	public void setIsRegistered(boolean isRegistered) {
+		this.isRegistered = isRegistered;
+	}
+
+	public String getSubjectFirstName() {
+		return subjectFirstName;
+	}
+
+	public void setSubjectFirstName(String subjectFirstName) {
+		this.subjectFirstName = subjectFirstName;
+	}
+
+	public String getSubjectSecondName() {
+		return subjectSecondName;
+	}
+
+	public void setSubjectSecondName(String subjectSecondName) {
+		this.subjectSecondName = subjectSecondName;
+	}
+}

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPreRegistration.java

@@ -19,7 +19,7 @@ public class StudentPreRegistration {
 	private String phone;
 	
 	/** 学生姓名 */
-	private Integer userName;
+	private String userName;
 	
 	/** 性别 */
 	private boolean gender;
@@ -77,11 +77,11 @@ public class StudentPreRegistration {
 		return this.phone;
 	}
 			
-	public void setUserName(Integer userName){
+	public void setUserName(String userName){
 		this.userName = userName;
 	}
 	
-	public Integer getUserName(){
+	public String getUserName(){
 		return this.userName;
 	}
 			

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/IndexDataType.java

@@ -31,6 +31,10 @@ public enum IndexDataType implements BaseEnum<String, IndexDataType> {
     NEWLY_STUDENT_NUM("NEWLY_STUDENT_NUM","新增学员"),
     QUIT_MUSIC_GROUP_STUDENT_NUM("QUIT_MUSIC_GROUP_STUDENT_NUM","退团学员"),
     STUDENT_CONVERSION("STUDENT_CONVERSION","学员转化"),
+    STUDENT_CONVERSION_PRE_STUDENT_NUM("STUDENT_CONVERSION_PRE_STUDENT_NUM","预报名人数"),
+    STUDENT_CONVERSION_STUDENT_NUM("STUDENT_CONVERSION_STUDENT_NUM","报名人数"),
+    STUDENT_CONVERSION_PAYMENT_STUDENT_NUM("STUDENT_CONVERSION_PAYMENT_STUDENT_NUM","学员转化"),
+    STUDENT_CONVERSION_VIP_PRACTICE_STUDENT_NUM("STUDENT_CONVERSION_VIP_PRACTICE_STUDENT_NUM","VIP/网管课购买"),
 
     MUSIC_GROUP_COURSE("MUSIC_GROUP_COURSE","乐团课"),
     VIP_GROUP_COURSE("VIP_GROUP_COURSE","VIP课"),

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java

@@ -161,7 +161,8 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     SMS_PAYMENT_DETAIL("SMS_PAYMENT_DETAIL","缴费项目缴费详情提醒"),
     SMS_PAYMENT_CREATE("SMS_PAYMENT_CREATE","缴费项目创建提醒"),
     SMS_GOODS_REPERTORY_WARN("SMS_GOODS_REPERTORY_WARN","商品库存预警"),
-    SMS_REPAIR_SEND_COMPLETED("SMS_REPAIR_SEND_COMPLETED","乐器维修完成邮寄");
+    SMS_REPAIR_SEND_COMPLETED("SMS_REPAIR_SEND_COMPLETED","乐器维修完成邮寄"),
+    SMS_MUSIC_GROUP_PARENT_MEETING_NOTICE("SMS_MUSIC_GROUP_PARENT_MEETING_NOTICE","乐团家长会通知");
 
 
 

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

@@ -25,6 +25,9 @@ public class EmployeeInfoQueryInfo extends QueryInfo {
 	@ApiModelProperty(value = "职位", required = false)
 	private JobTypeEnum position;
 
+	@ApiModelProperty(value = "意向城市", required = false)
+	private String intentionCity;
+
 	@ApiModelProperty(value = "状态", required = false)
 	private StaffStatusEnum status;
 	
@@ -105,4 +108,12 @@ public class EmployeeInfoQueryInfo extends QueryInfo {
 	public void setOperator(String operator) {
 		this.operator = operator;
 	}
+
+	public String getIntentionCity() {
+		return intentionCity;
+	}
+
+	public void setIntentionCity(String intentionCity) {
+		this.intentionCity = intentionCity;
+	}
 }

+ 54 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPreRegistrationQueryInfo.java

@@ -0,0 +1,54 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import com.ym.mec.common.page.QueryInfo;
+
+public class StudentPreRegistrationQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "乐团编号",required = false)
+    private String musicGroupId;
+
+    @ApiModelProperty(value = "是否允许调剂",required = false)
+    private String isAllowAdjust;
+
+    @ApiModelProperty(value = "专业编号",required = false)
+    private Integer subjectId;
+
+    @ApiModelProperty(value = "用户名或手机号",required = false)
+    private String name;
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public String getIsAllowAdjust() {
+        return isAllowAdjust;
+    }
+
+    public void setIsAllowAdjust(String isAllowAdjust) {
+        this.isAllowAdjust = isAllowAdjust;
+    }
+
+}

+ 12 - 12
mec-biz/src/main/java/com/ym/mec/biz/event/listener/CourseEventListener.java

@@ -42,18 +42,18 @@ public class CourseEventListener {
     @Async
     @EventListener
     public void courseStatusChangeMonitor(CourseStatusChangeEvent courseStatusChangeEvent){
-        if(redisCache.getRedisTemplate().opsForValue().size(KEY)>0){
-            logger.info("课程状态变更(未执行,任务执行中):{}", courseStatusChangeEvent.getCourseIds());
-            return;
-        }
-
-        Boolean success = redisCache.getRedisTemplate().opsForValue().setIfAbsent(KEY, Thread.currentThread().getId(), 1, TimeUnit.HOURS);
-        if(!success){
-            logger.info("课程状态变更(未执行,任务执行中):{}", courseStatusChangeEvent.getCourseIds());
-            return;
-        }
-
-        logger.info("课程状态变更(执行开始):{}", courseStatusChangeEvent.getCourseIds());
+//        if(redisCache.getRedisTemplate().opsForValue().size(KEY)>0){
+//            logger.info("课程状态变更(未执行,任务执行中):{}", courseStatusChangeEvent.getCourseIds());
+//            return;
+//        }
+//
+//        Boolean success = redisCache.getRedisTemplate().opsForValue().setIfAbsent(KEY, Thread.currentThread().getId(), 1, TimeUnit.HOURS);
+//        if(!success){
+//            logger.info("课程状态变更(未执行,任务执行中):{}", courseStatusChangeEvent.getCourseIds());
+//            return;
+//        }
+//
+//        logger.info("课程状态变更(执行开始):{}", courseStatusChangeEvent.getCourseIds());
 
         try{
             courseScheduleStudentPaymentService.updateCourseActualPrice(null, null, null);

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeService.java

@@ -83,4 +83,14 @@ public interface EmployeeService extends BaseService<Integer, Employee> {
      * @param employeeLevelDtos
      */
     void level(List<EmployeeLevelDto> employeeLevelDtos);
+
+    /**
+     * @describe 根据角色和部门获取用户(包含冻结和离职的)
+     * @author Joburgess
+     * @date 2020/3/12
+     * @param roleIds: 角色编号列表
+     * @param organIds: 用户编号列表
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+     */
+    List<SimpleUserDto> findAllByRole(String roleIds,String organIds);
 }

+ 18 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java

@@ -32,6 +32,23 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @return
 	 */
 	boolean preRegister(StudentPreRegistration studentPreRegistration);
+	
+	/**
+	 * 结束预报名
+	 * @param musicGroupId
+	 * @param isCheckStudentNum
+	 * @return
+	 */
+	boolean finishPreApply(String musicGroupId,boolean isCheckStudentNum);
+
+	/**
+	 * 发送家长会通知
+	 * @param musicGroupId
+	 * @param meetingDate
+	 * @param address
+	 * @return
+	 */
+	boolean sendParentMeetingNotice(String musicGroupId, Date meetingDate, String address);
 
 	/**
 	 * 零星缴费
@@ -300,7 +317,7 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	void musicGroupAuditFailed(String musicGroupId, String memo) throws Exception;
 
 	/**
-	 * 审核通过(审核中 -> 报名
+	 * 审核通过(审核中 -> 报名)
 	 * @param musicGroupId
 	 */
 	void musicGroupAuditSuccess(String musicGroupId) throws Exception;

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/StudentPreRegistrationService.java

@@ -1,8 +1,12 @@
 package com.ym.mec.biz.service;
 
+import com.ym.mec.biz.dal.dto.StudentPreRegistrationDto;
 import com.ym.mec.biz.dal.entity.StudentPreRegistration;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface StudentPreRegistrationService extends BaseService<Long, StudentPreRegistration> {
-
+	
+	public PageInfo<StudentPreRegistrationDto> queryListForPage(QueryInfo queryInfo);
 }

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

@@ -3959,8 +3959,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             courseScheduleDao.batchUpdate(updateList);
         }
 
-		courseEventSource.courseStatusChange(null);
-
         // 更新班级已上课次
         if (classGroupIds.size() > 0) {
             classGroupService.batchIncreaseClassTimes(classGroupIds);

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -283,4 +283,9 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 		//冻结用户
 		employeeDao.updateUserLock(levelUserId,1);
 	}
+
+	@Override
+	public List<SimpleUserDto> findAllByRole(String roleIds, String organIds) {
+		return employeeDao.findAllByRole(roleIds,organIds);
+	}
 }

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

@@ -50,6 +50,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		List<IndexBaseDto> result = new ArrayList<>();
 
 		DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM");
+		LocalDate nowDate = LocalDate.now();
+		nowDate = nowDate.withDayOfMonth(1);
+		Date currentMonth = Date.from(nowDate.atStartOfDay(DateUtil.zoneId).toInstant());
+
 		LocalDate startDate = LocalDate.now();
 		if(Objects.nonNull(year)){
 			startDate = startDate.withYear(year);
@@ -104,7 +108,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 				}
 			}
 			IndexBaseDto indexBaseData = new IndexBaseDto(typeDateMapEntry.getKey(),typeDateMapEntry.getKey().getMsg());
-			indexBaseData.setIndexMonthData(typeDateMapEntry.getValue());
+			indexBaseData.setIndexMonthData(typeDateMapEntry.getValue(), currentMonth);
 			result.add(indexBaseData);
 		}
 

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

@@ -197,9 +197,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			throw new BizException("乐团查询失败,请检查参数");
 		}
 		
-		/*if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_BUILD_FEE) {
+		if (musicGroup.getStatus() != MusicGroupStatusEnum.PROGRESS && musicGroup.getStatus() != MusicGroupStatusEnum.PRE_BUILD_FEE) {
 			throw new BizException("创建失败:乐团当前状态不能创建缴费");
-		}*/
+		}
 		
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		if (sysUser == null) {
@@ -1097,7 +1097,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			int count = musicGroupPaymentCalenderDao.countAuditReject(calender.getMusicGroupId(),calender.getId());
 			if(count == 0){
 				MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
-				musicGroup.setStatus(MusicGroupStatusEnum.AUDIT);
+				musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
 				musicGroup.setUpdateTime(date);
 				musicGroupDao.update(musicGroup);
 				SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -1105,7 +1105,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 					throw new BizException("请重新登录");
 				}
 				//记录操作日志
-				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "报名缴费项目通过(草稿 -> 审核中)", sysUser.getId(), ""));
+				musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "报名缴费项目通过(费用审核中 -> 报名中)", sysUser.getId(), ""));
 				Set<Integer> roleIds = new HashSet<>(1);
 				roleIds.add(SysUserRole.SECTION_MANAGER);
 				sysMessageService.batchSeoMessage(musicGroupDao.queryUserIdByRoleId(roleIds, musicGroup.getOrganId()), MessageTypeEnum.BACKSTAGE_CREATE_MUSIC_GROUP_APPLY, "", sysUser.getUsername());
@@ -1155,11 +1155,11 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		//如果是报名,并且所有的报名都审核通过,需要修改乐团状态
 		if (calender.getPaymentType() == MUSIC_APPLY) {
 			MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
-			musicGroup.setStatus(MusicGroupStatusEnum.AUDIT_FAILED);
+			musicGroup.setStatus(MusicGroupStatusEnum.PRE_BUILD_FEE);
 			musicGroup.setUpdateTime(date);
 			musicGroupDao.update(musicGroup);
 			//记录操作日志
-			musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "报名缴费项目失败(费用审核中 -> 草稿)", sysUser.getId(), ""));
+			musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "报名缴费项目失败(费用审核中 -> 审核拒绝)", sysUser.getId(), ""));
 		}
 		musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenders);
 	}

+ 210 - 36
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -19,11 +19,6 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
-import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType;
-import com.ym.mec.biz.dal.enums.*;
-
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -36,6 +31,42 @@ import com.alibaba.fastjson.TypeReference;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.api.entity.SysUserRole;
+import com.ym.mec.biz.dal.dao.ChargeTypeDao;
+import com.ym.mec.biz.dal.dao.ClassGroupDao;
+import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
+import com.ym.mec.biz.dal.dao.CooperationOrganDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
+import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.dao.MusicGroupBuildLogDao;
+import com.ym.mec.biz.dal.dao.MusicGroupDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderCourseSettingsDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderStudentDetailDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentEntitiesDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPaymentStudentCourseDetailDao;
+import com.ym.mec.biz.dal.dao.MusicGroupPurchaseListDao;
+import com.ym.mec.biz.dal.dao.MusicGroupQuitDao;
+import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
+import com.ym.mec.biz.dal.dao.MusicGroupSubjectGoodsGroupDao;
+import com.ym.mec.biz.dal.dao.MusicGroupSubjectPlanDao;
+import com.ym.mec.biz.dal.dao.OrganizationDao;
+import com.ym.mec.biz.dal.dao.SchoolDao;
+import com.ym.mec.biz.dal.dao.SporadicChargeInfoDao;
+import com.ym.mec.biz.dal.dao.StudentDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao;
+import com.ym.mec.biz.dal.dao.StudentPreRegistrationDao;
+import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
+import com.ym.mec.biz.dal.dao.StudentVisitDao;
+import com.ym.mec.biz.dal.dao.SubjectChangeDao;
+import com.ym.mec.biz.dal.dao.SubjectDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
+import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.CloseMusicGroupDto;
 import com.ym.mec.biz.dal.dto.CourseFormDto;
@@ -47,13 +78,60 @@ import com.ym.mec.biz.dal.dto.SporadicPayDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.dto.SubjectRegisterDto;
 import com.ym.mec.biz.dal.dto.UpdateExpectedNumDto;
+import com.ym.mec.biz.dal.entity.ApprovalStatus;
+import com.ym.mec.biz.dal.entity.ChargeType;
+import com.ym.mec.biz.dal.entity.ClassGroup;
+import com.ym.mec.biz.dal.entity.CooperationOrgan;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.CourseScheduleTeacherSalary;
+import com.ym.mec.biz.dal.entity.Goods;
+import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderStudentDetail;
+import com.ym.mec.biz.dal.entity.MusicGroupPurchaseList;
+import com.ym.mec.biz.dal.entity.MusicGroupQuit;
+import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
+import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
+import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
+import com.ym.mec.biz.dal.entity.Organization;
+import com.ym.mec.biz.dal.entity.School;
+import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
+import com.ym.mec.biz.dal.entity.Student;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
+import com.ym.mec.biz.dal.entity.StudentPreRegistration;
+import com.ym.mec.biz.dal.entity.StudentRegistration;
+import com.ym.mec.biz.dal.entity.Subject;
+import com.ym.mec.biz.dal.entity.SubjectChange;
+import com.ym.mec.biz.dal.entity.SysUserCashAccount;
+import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
+import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
+import com.ym.mec.biz.dal.enums.GoodsType;
+import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
+import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
+import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
+import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
+import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.ClassGroupStudentMapperService;
 import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
 import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.ImGroupMemberService;
+import com.ym.mec.biz.service.ImGroupService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.MusicGroupSubjectGoodsGroupService;
@@ -68,6 +146,7 @@ import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.biz.service.SysUserCashAccountDetailService;
 import com.ym.mec.biz.service.SysUserCashAccountService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
@@ -198,6 +277,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     @Autowired
     private ImGroupMemberService imGroupMemberService;
     @Autowired
+    private ImGroupService imGroupService;
+    @Autowired
     private StudentPaymentRouteOrderService studentPaymentRouteOrderService;
     @Autowired
     private MusicGroupPaymentCalenderCourseSettingsDao musicGroupPaymentCalenderCourseSettingsDao;
@@ -209,6 +290,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     private StudentVisitDao studentVisitDao;
     @Autowired
     private SubjectDao subjectDao;
+    @Autowired
+    private SysUserCashAccountDao sysUserCashAccountDao;
     
     @Autowired
     private StudentPreRegistrationDao studentPreRegistrationDao;
@@ -341,30 +424,106 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
 	public boolean preRegister(StudentPreRegistration studentPreRegistration) {
-    	Integer userId = studentPreRegistration.getUserId();
-    	
-    	String musicGroupId = studentPreRegistration.getMusicGroupId();
-    	
-    	//查询乐团状态
-    	MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
-    	if(musicGroup == null){
-    		throw new BizException("乐团信息查询失败");
-    	}
-    	if(musicGroup.getStatus() != MusicGroupStatusEnum.PRE_APPLY){
-    		throw new BizException("乐团当前状态不能预报名");
-    	}
-    	
-    	StudentPreRegistration originRegistration = studentPreRegistrationDao.queryByUserId(userId, musicGroupId);
-    	if(originRegistration != null){
-    		throw new BizException("您已预报名成功,请勿重复提交资料");
-    	}
-    	Date date = new Date();
-    	
-    	studentPreRegistration.setCreateTime(date);
-    	
-    	studentPreRegistrationDao.update(studentPreRegistration);
-    	
+
+		String musicGroupId = studentPreRegistration.getMusicGroupId();
+
+		// 查询乐团状态
+		MusicGroup musicGroup = musicGroupDao.getLocked(musicGroupId);
+		if (musicGroup == null) {
+			throw new BizException("乐团信息查询失败");
+		}
+		if (musicGroup.getStatus() != MusicGroupStatusEnum.PRE_APPLY) {
+			throw new BizException("乐团当前状态不能预报名");
+		}
+
+		StudentPreRegistration originRegistration = studentPreRegistrationDao.queryByMusicGroupIdAndPhone(studentPreRegistration.getPhone(), musicGroupId);
+		if (originRegistration != null) {
+			throw new BizException("您已预报名成功,请勿重复提交资料");
+		}
+		Date date = new Date();
+
+		// 判断用户是否存在
+		SysUser user = sysUserFeignService.queryUserByMobile(studentPreRegistration.getPhone());
+		if (user == null || user.getId() == null) {
+			user = new SysUser();
+			user.setPhone(studentPreRegistration.getPhone());
+			user.setUsername(studentPreRegistration.getUserName());
+			user.setOrganId(musicGroup.getOrganId());
+			user.setUserType("STUDENT");
+			user.setCreateTime(date);
+			user.setUpdateTime(date);
+			// 注册账户信息
+			HttpResponseResult<Integer> result = sysUserFeignService.addUser(user);
+
+			Integer userId = result.getData();
+			user.setId(userId);
+
+			Student student = new Student();
+			student.setUserId(userId);
+			student.setCreateTime(date);
+			student.setUpdateTime(date);
+			student.setIsNewUser(true);
+			studentDao.insert(student);
+			sysUserCashAccountDao.insert(new SysUserCashAccount(userId, "CNY"));
+		}
+
+		studentPreRegistration.setCreateTime(date);
+		studentPreRegistration.setUserId(user.getId());
+
+		studentPreRegistrationDao.insert(studentPreRegistration);
+		
+		// 添加成员
+		imGroupMemberService.join(Long.parseLong(musicGroupId), user.getId(), null, false);
+
+		return true;
+	}
+
+	@Override
+	public boolean finishPreApply(String musicGroupId, boolean isCheckStudentNum) {
+		MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
+		if (musicGroup == null) {
+			throw new BizException("乐团信息查询失败");
+		}
+		if (musicGroup.getStatus() != MusicGroupStatusEnum.PRE_APPLY) {
+			throw new BizException("操作失败:只有乐团在[{}]状态才能操作", MusicGroupStatusEnum.PRE_APPLY.getMsg());
+		}
+		if (isCheckStudentNum) {
+			// 查询乐团已报名人数
+			List<StudentPreRegistration> studentPreRegistrationList = studentPreRegistrationDao.queryByMusicGroupId(musicGroupId);
+			if (studentPreRegistrationList == null || studentPreRegistrationList.size() < 120) {
+				throw new BizException("操作失败:报名人数没有达到120人");
+			}
+		}
+		musicGroup.setStatus(MusicGroupStatusEnum.PRE_BUILD_FEE);
+		musicGroup.setUpdateTime(new Date());
+		musicGroupDao.update(musicGroup);
+		
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if(sysUser == null || sysUser.getId() == null){
+			throw new BizException("请重新登录");
+		}
+		
+		//记录操作日志
+		musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "报名缴费项目失败(预报名 -> 准备创建缴费)", sysUser.getId(), ""));
+		
+		return true;
+	}
+
+	@Override
+	public boolean sendParentMeetingNotice(String musicGroupId, Date meetingDate, String address) {
+		MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
+		if (musicGroup == null) {
+			throw new BizException("乐团信息查询失败");
+		}
+		if (musicGroup.getStatus() != MusicGroupStatusEnum.PRE_APPLY) {
+			throw new BizException("操作失败:只有乐团在[{}]状态才能操作", MusicGroupStatusEnum.PRE_APPLY.getMsg());
+		}
+		List<StudentPreRegistration> studentPreRegistrationList = studentPreRegistrationDao.queryByMusicGroupId(musicGroupId);
+		Map<Integer,String> receiverList = studentPreRegistrationList.stream().collect(Collectors.toMap(StudentPreRegistration :: getUserId, StudentPreRegistration :: getPhone));
+		
+		sysMessageService.batchSendMessage(MessageSender.AWSMS, MessageTypeEnum.SMS_MUSIC_GROUP_PARENT_MEETING_NOTICE, receiverList, null, 1, null, null, meetingDate, address);
 		return true;
 	}
 
@@ -1159,13 +1318,23 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "审核通过(审核中 -> 预报名)", sysUser.getId(), ""));
         musicGroup.setStatus(MusicGroupStatusEnum.PRE_APPLY);
         musicGroupDao.update(musicGroup);
-        //获取报名缴费项目
-        MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
-        if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
-            regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
-            regCalender.setUpdateTime(new Date());
-            musicGroupPaymentCalenderDao.update(regCalender);
+        
+        // 创建群
+        imGroupService.create(Long.parseLong(musicGroupId), null, "乐团预报名", null, musicGroup.getName(), null, null, GroupType.MUSIC.getCode());
+        
+        Map<Integer,String> userRoleMap = new HashMap<Integer, String>();
+        
+        if(musicGroup.getTeamTeacherId() != null){
+        	userRoleMap.put(musicGroup.getTeamTeacherId(), "运营主管");
+        }
+        if(musicGroup.getEducationalTeacherId() != null){
+        	userRoleMap.put(musicGroup.getEducationalTeacherId(), "乐团主管");
+        }
+        if(musicGroup.getDirectorUserId() != null){
+        	userRoleMap.put(musicGroup.getDirectorUserId(), "乐队指导");
         }
+        // 添加成员
+        imGroupMemberService.join(Long.parseLong(musicGroupId), userRoleMap);
 
         Set<Integer> roleIds = new HashSet<>(3);
         roleIds.add(SysUserRole.EDUCATIONAL_TEACHER);
@@ -1523,7 +1692,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new BizException("乐团找不到");
         }
 
-        if (musicGroup.getStatus() != MusicGroupStatusEnum.APPLY || musicGroup.getStatus() != MusicGroupStatusEnum.PAY) {
+        if (!(musicGroup.getStatus() == MusicGroupStatusEnum.APPLY || musicGroup.getStatus() == MusicGroupStatusEnum.PAY)) {
             throw new BizException("乐团当前状态是[{}],不能延长报名", musicGroup.getStatus().getMsg());
         }
 
@@ -1635,6 +1804,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         if (musicGroup == null) {
             throw new BizException("乐团不存在");
         }
+		if (musicGroup.getStatus() == MusicGroupStatusEnum.PAY || musicGroup.getStatus() == MusicGroupStatusEnum.PREPARE
+				|| musicGroup.getStatus() == MusicGroupStatusEnum.PROGRESS || musicGroup.getStatus() == MusicGroupStatusEnum.CANCELED
+				|| musicGroup.getStatus() == MusicGroupStatusEnum.PAUSE || musicGroup.getStatus() == MusicGroupStatusEnum.CLOSE) {
+			throw new BizException("乐团当前状态下不能取消");
+		}
         musicGroupQuit.setStatus(ApprovalStatus.CANCELED);
         musicGroupQuit.setReason(reason);
         musicGroupQuit.setQuitDate(new Date());
@@ -2018,7 +2192,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new BizException("缴费项目不存在");
         }
         StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, calender.getMusicGroupId());
-        if (studentRegistration == null || studentRegistration.getPaymentStatus() != YES) {
+        if (studentRegistration == null) {
             throw new BizException("请走报名缴费流程");
         }
         Integer organId = studentRegistration.getOrganId();

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

@@ -233,7 +233,8 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
             sysUserCashAccountService.updateBalance(order.getUserId(), order.getActualAmount(),
                     PlatformCashAccountDetailTypeEnum.REFUNDS, memo + ",订单号:" + order.getOrderNo());
 
-            if (order.getPaymentChannel().equals("ADAPAY")
+            if (StringUtils.isNotBlank(order.getPaymentChannel())
+                    && order.getPaymentChannel().equals("ADAPAY")
                     && !rpMap.containsKey("simulation")) {
                 confirmOrder(order);
             }
@@ -257,7 +258,9 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
 
         callOrderCallBack(order);
 
-        if (status.equals(DealStatusEnum.SUCCESS) && order.getPaymentChannel().equals("ADAPAY")
+        if (status.equals(DealStatusEnum.SUCCESS)
+                && StringUtils.isNotBlank(order.getPaymentChannel())
+                && order.getPaymentChannel().equals("ADAPAY")
                 && !rpMap.containsKey("simulation")) {
             confirmOrder(order);
         }

+ 29 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPreRegistrationServiceImpl.java

@@ -1,13 +1,22 @@
 package com.ym.mec.biz.service.impl;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.ym.mec.biz.dal.dao.StudentPreRegistrationDao;
+import com.ym.mec.biz.dal.dto.StudentPreRegistrationDto;
 import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.biz.service.StudentPreRegistrationService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.util.collection.MapUtil;
 
 @Service
 public class StudentPreRegistrationServiceImpl extends BaseServiceImpl<Long, StudentPreRegistration>  implements StudentPreRegistrationService {
@@ -19,5 +28,25 @@ public class StudentPreRegistrationServiceImpl extends BaseServiceImpl<Long, Stu
 	public BaseDAO<Long, StudentPreRegistration> getDAO() {
 		return studentPreRegistrationDao;
 	}
+
+	@Override
+	public PageInfo<StudentPreRegistrationDto> queryListForPage(QueryInfo queryInfo) {
+		PageInfo<StudentPreRegistrationDto> pageInfo = new PageInfo<StudentPreRegistrationDto>(queryInfo.getPage(), queryInfo.getRows());
+		Map<String, Object> params = new HashMap<String, Object>();
+		MapUtil.populateMap(params, queryInfo);
+		
+		List<StudentPreRegistrationDto> dataList = null;
+		int count = this.findCount(params);
+		if (count > 0) {
+			pageInfo.setTotal(count);
+			params.put("offset", pageInfo.getOffset());
+			dataList = studentPreRegistrationDao.queryListForPage(params);
+		}
+		if (count == 0) {
+			dataList = new ArrayList<StudentPreRegistrationDto>();
+		}
+		pageInfo.setRows(dataList);
+		return pageInfo;
+	}
 	
 }

+ 10 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -192,17 +192,17 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 					teacherAttendance.setSignInStatus(YesOrNoEnum.NO);
 				}
 			}else if(date.compareTo(add20Minutes) > 0){
-				if(StringUtils.isEmpty(teacherAttendance.getRemark())&&!teacherSignOutDto.isNotRturnErrorInfo()){
-					//当前为异常签到,请填写原因!
-					result.put("status",2);
-					return result;
-				}
 				//异常签到范围(开始之后  ~  结束之前)
 				teacherAttendance.setSignInStatus(YesOrNoEnum.NO);
 				result.put("signInStatus",1);
 			}else {
 				throw new BizException("签到时间异常");
 			}
+			if(YesOrNoEnum.NO.equals(teacherAttendance.getSignInStatus())&&StringUtils.isEmpty(teacherAttendance.getRemark())&&!teacherSignOutDto.isNotRturnErrorInfo()){
+				//当前为异常签到,请填写原因!
+				result.put("status",2);
+				return result;
+			}
 			teacherAttendance.setSignInDeviceNo(teacherSignOutDto.getTeacherAttendanceInfo().getDeviceNum());
 			if(Objects.nonNull(teacherAttendance.getId())){
 				teacherAttendanceDao.update(teacherAttendance);
@@ -250,16 +250,16 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 				teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
 				result.put("signOutStatus",0);
 			}else if(date.compareTo(classEndDateAdd60Minutes) > 0 && DateUtil.isSameDay(date, classEndDateTime)){
-				if(StringUtils.isEmpty(teacherAttendance.getSignOutRemark())&&!teacherSignOutDto.isNotRturnErrorInfo()){
-					//当前为异常签退,请填写原因!
-					result.put("status",2);
-					return result;
-				}
 				teacherAttendance.setSignOutStatus(YesOrNoEnum.NO);
 				result.put("signOutStatus",1);
 			}else {
 				throw new BizException("签退时间异常");
 			}
+			if(YesOrNoEnum.NO.equals(teacherAttendance.getSignOutStatus())&&StringUtils.isEmpty(teacherAttendance.getSignOutRemark())&&!teacherSignOutDto.isNotRturnErrorInfo()){
+				//当前为异常签退,请填写原因!
+				result.put("status",2);
+				return result;
+			}
 			teacherAttendance.setSignOutDeviceNo(teacherSignOutDto.getTeacherAttendanceInfo().getDeviceNum());
 			if(Objects.nonNull(teacherAttendance.getId())){
 				teacherAttendanceDao.update(teacherAttendance);

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/EmployeeInfoMapper.xml

@@ -132,6 +132,9 @@
 	        <if test="sourceFrom != null">
 	            AND ei.source_from_ = #{sourceFrom}
 	        </if>
+			<if test="intentionCity != null">
+				AND ei.intention_city_ LIKE CONCAT('%',#{intentionCity},'%')
+			</if>
 	        <if test="position != null">
 	            AND ei.position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 	        </if>

+ 15 - 0
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -346,4 +346,19 @@
             </if>
         </foreach>
     </update>
+
+    <select id="findAllByRole" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
+        SELECT DISTINCT su.id_ userId,
+        su.real_name_ userName,
+        su.avatar_ avatar,
+        e.organ_id_list_ organIds
+        FROM
+        sys_user su
+        LEFT JOIN sys_user_role sur ON su.id_ = sur.user_id_
+        LEFT JOIN employee e ON e.user_id_ = su.id_
+        WHERE FIND_IN_SET(sur.role_id_, #{roleIds})
+        <if test="organIds!=null and organIds!=''">
+            AND INTE_ARRAY(e.organ_id_list_,#{organIds})
+        </if>
+    </select>
 </mapper>

+ 51 - 4
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -195,7 +195,7 @@
 			COUNT( id_ ) activate_num_,
 			COUNT( id_ ) percent_
 		FROM
-			school
+			cooperation_organ
 		WHERE
 			del_flag_ = 0
 		  	AND organ_id_ IS NOT NULL
@@ -343,9 +343,10 @@
 			TRUNCATE(COUNT( DISTINCT IF((cssp.group_type_='PRACTICE' AND pg.type_='CHARGE') OR cssp.group_type_='VIP', cssp.user_id_, NULL) )/COUNT( DISTINCT sr.user_id_ )*100, 2) percent_
 		FROM
 			student_registration sr
-				LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
-				LEFT JOIN course_schedule_student_payment cssp ON sr.user_id_=cssp.user_id_
-				LEFT JOIN practice_group pg ON cssp.music_group_id_=pg.id_
+			LEFT JOIN student_pre_registration spr ON sr.user_id_ = spr.user_id_ AND sr.music_group_id_ = spr.music_group_id_
+			LEFT JOIN music_group mg ON spr.music_group_id_ = mg.id_
+			LEFT JOIN course_schedule_student_payment cssp ON sr.user_id_=cssp.user_id_
+			LEFT JOIN practice_group pg ON cssp.music_group_id_=pg.id_
 		WHERE
 			mg.del_flag_ = 0
 			AND mg.organ_id_ IS NOT NULL
@@ -357,4 +358,50 @@
 		ORDER BY
 			mg.organ_id_;
 	</select>
+
+	<select id="getMusicGroupPreRegistrationStudentData" resultMap="IndexBaseMonthData">
+		SELECT
+			mg.organ_id_,
+			CONCAT( #{month}, '-01' ) month_,
+			COUNT( DISTINCT spr.user_id_ ) total_num_,
+			COUNT( DISTINCT spr.user_id_ ) activate_num_,
+			COUNT( DISTINCT spr.user_id_ ) percent_
+		FROM
+			student_pre_registration spr
+			LEFT JOIN music_group mg ON spr.music_group_id_ = mg.id_
+		WHERE
+			mg.del_flag_ = 0
+			AND mg.organ_id_ IS NOT NULL
+			AND DATE_FORMAT( spr.create_time_, '%Y-%m' ) &lt;= #{month}
+		GROUP BY
+			mg.organ_id_
+		ORDER BY
+			mg.organ_id_;
+	</select>
+
+	<select id="getMusicGroupStudentFromPreData" resultMap="IndexBaseMonthData">
+		SELECT
+			mg.organ_id_,
+			CONCAT( #{month}, '-01' ) month_,
+			COUNT( DISTINCT sr.user_id_ ) total_num_,
+			COUNT( DISTINCT sr.user_id_ ) activate_num_,
+			COUNT( DISTINCT sr.user_id_ ) percent_
+		FROM
+			student_registration sr
+			LEFT JOIN student_pre_registration spr ON sr.user_id_ = spr.user_id_ AND sr.music_group_id_ = spr.music_group_id_
+			LEFT JOIN music_group mg ON spr.music_group_id_ = mg.id_
+		WHERE
+			mg.del_flag_ = 0
+			AND mg.organ_id_ IS NOT NULL
+			AND mg.status_ = 'PROGRESS'
+			AND sr.music_group_status_ = 'NORMAL'
+		  	<if test="paymentStatus!=null">
+				AND sr.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+			</if>
+			AND DATE_FORMAT( sr.create_time_, '%Y-%m' ) &lt;= #{month}
+		GROUP BY
+			mg.organ_id_
+		ORDER BY
+			mg.organ_id_;
+	</select>
 </mapper>

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

@@ -594,7 +594,9 @@
     <select id="getFeeByType" resultType="com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto">
         SELECT MAX(spo.expect_amount_)                                expectAmount,
                SUM(IF(g.type_ = 'INSTRUMENT', so.expect_amount_, 0))  musicalFee,
-               SUM(IF(g.type_ IS NULL || g.type_ != 'INSTRUMENT',IFNULL(so.expect_amount_,0), 0)) teachingFee
+               SUM(IF((g.type_ = 'ACCESSORIES' || g.type_ = 'TEACHING' || g.type_ = 'STAFF')  AND g.name_ !='乐器维护',IFNULL(so.expect_amount_,0), 0)) teachingFee,
+               SUM(IF((g.type_ = 'ACCESSORIES' || g.type_ = 'TEACHING' || g.type_ = 'STAFF')  AND g.name_ ='乐器维护',IFNULL(so.expect_amount_,0), 0)) repairFee,
+               SUM(IF((g.type_= 'OTHER' || g.type_ IS NULL) ,IFNULL(so.expect_amount_,0), 0)) otherFee
         FROM student_payment_order spo
                  LEFT JOIN sell_order so ON spo.id_ = so.order_id_
                  LEFT JOIN goods g ON IF(so.parent_goods_id_ IS NOT NULL,g.id_ = so.parent_goods_id_,g.id_ = so.goods_id_)

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -499,6 +499,8 @@
             LEFT JOIN student stu ON cssp.user_id_ = stu.user_id_
         WHERE stu.service_tag_=1
             AND (stu.service_tag_update_time_ IS NULL OR stu.service_tag_update_time_&lt;#{nextMonday})
+            AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
+            AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
             AND cs.class_date_&gt;=#{monday}
             AND cs.type_ IN ('SINGLE','VIP','MIX','PRACTICE')
             AND cssp.create_time_&lt;#{nextMonday}

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

@@ -495,6 +495,7 @@
         <result column="routeMerNo" property="routeMerNo"/>
         <result column="routeAmount" property="routeAmount"/>
         <result column="routeBalance" property="routeBalance"/>
+        <result column="feeFlag" property="feeFlag"/>
         <collection property="orderDetailList" ofType="com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail">
             <result column="detail_id_" property="id"/>
             <result column="detail_type_" property="type"/>

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

@@ -284,7 +284,7 @@
         detail_price_,spod.kit_group_purchase_type_ detail_kit_group_purchase_type_,
         sci.charge_type_,g.id_ goods_id, g.name_ goods_name,o.name_ organ_name,spro.route_amount_
         routeAmount,spro.route_balance_amount_ routeBalance,
-        spro.mer_no_ routeMerNo
+        spro.mer_no_ routeMerNo,spro.fee_flag_ feeFlag
         FROM student_payment_order spo
         LEFT JOIN student_payment_route_order spro ON spro.order_no_ = spo.order_no_
         LEFT JOIN sys_user u on spo.user_id_ = u.id_
@@ -393,5 +393,11 @@
     <select id="getByOrderNo" resultMap="StudentPaymentRouteOrder">
         SELECT * FROM student_payment_route_order WHERE order_no_ = #{orderNo} LIMIT 1
     </select>
+    <select id="getCountFeeFlagNum" resultType="com.ym.mec.biz.dal.dto.FeeFlagNumDto">
+        SELECT SUM(1) totalNum,
+               SUM(IF(fee_flag_='Y',1, 0)) yesNum
+        FROM student_payment_route_order WHERE order_no_=#{orderNo}
+    </select>
+
 
 </mapper>

+ 57 - 4
mec-biz/src/main/resources/config/mybatis/StudentPreRegistrationMapper.xml

@@ -20,6 +20,13 @@
 		<result column="is_allow_adjust_" property="isAllowAdjust" />
 		<result column="kit_purchase_method_" property="kitPurchaseMethod" />
 		<result column="create_time_" property="createTime" />
+		<result column="is_registered_" property="isRegistered" />
+	</resultMap>
+	
+	<resultMap type="com.ym.mec.biz.dal.dto.StudentPreRegistrationDto" id="StudentPreRegistrationDto" extends="StudentPreRegistration">
+		<result column="subject_first_name_" property="subjectFirstName" />
+		<result column="subject_second_name_" property="subjectSecondName" />
+		<result column="is_registered_" property="isRegistered" />
 	</resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -93,16 +100,62 @@
 	</delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="StudentPreRegistration" parameterType="map">
-		SELECT * FROM student_pre_registration ORDER BY id_ <include refid="global.limit"/>
+	<select id="queryListForPage" resultMap="StudentPreRegistrationDto" parameterType="map">
+		SELECT spr.*,case when sr.id_ is null then false else true end is_registered_,s1.name_ subject_first_name_,s2.name_ subject_second_name_ FROM student_pre_registration spr 
+		left join subject s1 on s1.id_ = spr.subject_first_
+		left join subject s2 on s2.id_ = spr.subject_second_
+		left join student_registration sr on spr.music_group_id_ = sr.music_group_id_ and spr.user_id_ = sr.user_id_
+		<where>
+			<if test="musicGroupId != null">
+				and spr.music_group_id_ = #{musicGroupId}
+			</if>
+			<if test="isAllowAdjust != null">
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
+			</if>
+			<if test="subjectId != null">
+				and (spr.subject_first_ = #{subjectId} or spr.subject_second_ = #{subjectId})
+			</if>
+			<if test="name != null">
+				and (spr.phone_ like concat('%',#{name},'%') or spr.user_name_ like concat('%',#{name},'%') or spr.user_id_ like concat('%',#{name},'%'))
+			</if>
+			<if test="isAllowAdjust != null">
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
+			</if>
+		</where>
+		ORDER BY spr.id_ <include refid="global.limit"/>
 	</select>
 	
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM student_pre_registration
+		SELECT COUNT(spr.id_) FROM student_pre_registration spr
+		<where>
+			<if test="musicGroupId != null">
+				and spr.music_group_id_ = #{musicGroupId}
+			</if>
+			<if test="isAllowAdjust != null">
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
+			</if>
+			<if test="subjectId != null">
+				and (spr.subject_first_ = #{subjectId} or spr.subject_second_ = #{subjectId})
+			</if>
+			<if test="name != null">
+				and (spr.phone_ like concat('%',#{name},'%') or spr.user_name_ like concat('%',#{name},'%') or spr.user_id_ like concat('%',#{name},'%'))
+			</if>
+			<if test="isAllowAdjust != null">
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
+			</if>
+		</where>
 	</select>
 	
-	<select id="queryByUserId" resultMap="StudentPreRegistration" parameterType="map">
+	<select id="queryByMusicGroupIdAndUserId" resultMap="StudentPreRegistration" parameterType="map">
 		SELECT * FROM student_pre_registration WHERE user_id_ = #{userId} and music_group_id_ = #{musicGroupId}
 	</select>
+	
+	<select id="queryByMusicGroupIdAndPhone" resultMap="StudentPreRegistration" parameterType="map">
+		SELECT * FROM student_pre_registration WHERE phone_ = #{phone} and music_group_id_ = #{musicGroupId}
+	</select>
+	
+	<select id="queryByMusicGroupId" resultMap="StudentPreRegistration">
+		SELECT * FROM student_pre_registration WHERE music_group_id_ = #{musicGroupId}
+	</select>
 </mapper>

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java

@@ -44,7 +44,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                 "/contracts/queryProduceContract",
                 "/repair/studentPaymentGoodsOrder",
                 "/studentCompetition/getWinnerList",
-                "/studentCompetition/get").permitAll().anyRequest().authenticated().and().httpBasic();
+                "/studentCompetition/get","/musicGroup/preRegister").permitAll().anyRequest().authenticated().and().httpBasic();
     }
 
     @Override

+ 12 - 3
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -26,15 +26,16 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
 import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
+import com.ym.mec.biz.dal.dao.StudentPreRegistrationDao;
 import com.ym.mec.biz.dal.dto.RegisterPayDto;
 import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
-import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
 import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import com.ym.mec.biz.dal.entity.StudentPreRegistration;
 import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
@@ -73,16 +74,24 @@ public class MusicGroupController extends BaseController {
     @Autowired
     private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
     
+    @Autowired
+    private StudentPreRegistrationDao studentPreRegistrationDao;
+    
     @ApiOperation("预报名")
     @PostMapping(value = "/preRegister")
 	public Object preRegister(@RequestBody StudentPreRegistration studentPreRegistration) {
+		return musicGroupService.preRegister(studentPreRegistration) ? succeed() : failed();
+	}
+    
+    @ApiOperation("预报名信息查询")
+    @GetMapping(value = "/queryPreRegister")
+	public Object queryPreRegister(String musicGroupId) {
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		if (sysUser == null) {
 			return failed(HttpStatus.FORBIDDEN, "请登录");
 		}
-		studentPreRegistration.setUserId(sysUser.getId());
 
-		return musicGroupService.preRegister(studentPreRegistration) ? succeed() : failed();
+		return succeed(studentPreRegistrationDao.queryByMusicGroupIdAndUserId(sysUser.getId(), musicGroupId));
 	}
 
     @ApiOperation("获取学生所在乐团列表")

+ 6 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ContractsController.java

@@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -78,4 +79,9 @@ public class ContractsController extends BaseController {
 		return succeed(contractService.queryPracticeCoursesContract(sysUser.getId(), courseSectionNum, startDate, endDate, fee));
 	}
 
+	@GetMapping("transferProduceContract")
+	public HttpResponseResult transferProduceContract(Integer userId,String musicGroupId){
+		contractService.transferProduceContract(userId,musicGroupId);
+		return succeed();
+	}
 }

+ 19 - 0
mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java

@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dto.EmployeeLevelDto;
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.enums.EmployeeOperateEnum;
 import com.ym.mec.biz.dal.page.EmployeeQueryInfo;
@@ -223,4 +224,22 @@ public class EmployeeController extends BaseController {
         employeeService.level(employeeLevelDtos);
         return succeed();
     }
+
+    @ApiOperation(value = "获取所有维修技师(包含离职和冻结的)")
+    @GetMapping("/findAllTechnician")
+    @PreAuthorize("@pcs.hasPermissions('employee/findAllTechnician')")
+    public HttpResponseResult<List<SimpleUserDto>> findAllTechnician(){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        String organIds = new String();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        if (!sysUser.getIsSuperAdmin()) {
+            Employee employee = employeeService.get(sysUser.getId());
+            if (StringUtils.isEmpty(organIds)) {
+                organIds=employee.getOrganIdList();
+            }
+        }
+        return succeed(employeeService.findAllByRole("37",organIds));
+    }
 }

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

@@ -1,6 +1,8 @@
 package com.ym.mec.web.controller;
 
 import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -23,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -32,48 +35,6 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dto.BasicUserDto;
-import com.ym.mec.biz.dal.dto.CourseGroupExportDto;
-import com.ym.mec.biz.dal.dto.CourseReviewDto;
-import com.ym.mec.biz.dal.dto.CourseScheduleEndDto;
-import com.ym.mec.biz.dal.dto.ExportStudentAttendanceDto;
-import com.ym.mec.biz.dal.dto.ExportTeacherSalaryDto;
-import com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto;
-import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderAuditDto;
-import com.ym.mec.biz.dal.dto.MusicGroupRegisterDto;
-import com.ym.mec.biz.dal.dto.MusicGroupStudentsDto;
-import com.ym.mec.biz.dal.dto.MusicalListDetailDto;
-import com.ym.mec.biz.dal.dto.OrderByTypeExportDto;
-import com.ym.mec.biz.dal.dto.PageInfoDegree;
-import com.ym.mec.biz.dal.dto.PracticeCourseDto;
-import com.ym.mec.biz.dal.dto.PracticeGroupDto;
-import com.ym.mec.biz.dal.dto.RegisterSubjectDto;
-import com.ym.mec.biz.dal.dto.Student4operating;
-import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
-import com.ym.mec.biz.dal.dto.StudentBuyPracticeDto;
-import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
-import com.ym.mec.biz.dal.dto.StudentManageListDto;
-import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
-import com.ym.mec.biz.dal.dto.TeacherCourseSalaryDetail4WebDto;
-import com.ym.mec.biz.dal.dto.TeacherDefaultSalaryDto;
-import com.ym.mec.biz.dal.dto.TeacherSalaryDto;
-import com.ym.mec.biz.dal.dto.VipBuyResultDto;
-import com.ym.mec.biz.dal.entity.CooperationOrgan;
-import com.ym.mec.biz.dal.entity.DegreeRegistration;
-import com.ym.mec.biz.dal.entity.Employee;
-import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
-import com.ym.mec.biz.dal.entity.School;
-import com.ym.mec.biz.dal.entity.SellOrder;
-import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
-import com.ym.mec.biz.dal.entity.Student;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
-import com.ym.mec.biz.dal.entity.StudentRegistration;
-import com.ym.mec.biz.dal.entity.TeacherCourseReward;
-import com.ym.mec.biz.dal.entity.TeacherSalaryComplaints;
-import com.ym.mec.biz.dal.entity.TenantPaymentOrder;
-import com.ym.mec.biz.dal.entity.VipGroup;
 import com.ym.mec.biz.dal.enums.AccountType;
 import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
@@ -312,15 +273,15 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
-            }else if(StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
@@ -330,7 +291,7 @@ public class ExportController extends BaseController {
         List<MusicGroupPaymentCalenderAuditDto> rows = musicGroupPaymentCalenderService.auditList(queryInfo).getRows();
         OutputStream outputStream = response.getOutputStream();
         try {
-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部名称","分部编号","乐团编号", "乐团名称", "申请类型", "订单类型", "加课总时长(分钟)", "原现价(元)",
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部名称", "分部编号", "乐团编号", "乐团名称", "申请类型", "订单类型", "加课总时长(分钟)", "原现价(元)",
                     "申请价格(元)", "备注", "申请人", "状态", "申请时间"}, new String[]{
                     "organName", "organId", "musicGroupId", "musicGroupName", "paymentType.desc", "payUserType.desc",
                     "addCourseTotalTime", "courseCurrentPrice", "courseOriginalPrice", "memo", "operatorName", "auditStatus.desc", "createTime"}, rows);
@@ -537,11 +498,11 @@ public class ExportController extends BaseController {
                     "课程分部", "课程组编号", "课程班名称", "乐团模式", "vip活动名称", "Vip课程类型", "阶梯奖励名称", "线上课/线下课", "线上课单价", "线下课单价",
                     "课程类别", "课时时长", "实际上课时长", "上课日期",
                     "上课时间", "教师签到状态", "教师签退状态", "教师签到时间", "教师签退时间", "考勤申诉处理状态", "处理意见",
-                    "主辅", "上课地点", "应到学员","学员签到时间", "学员签退时间", "课时课酬", "阶梯奖励", "扣款原因"}, new String[]{
+                    "主辅", "上课地点", "应到学员", "学员签到时间", "学员签退时间", "课时课酬", "阶梯奖励", "扣款原因"}, new String[]{
                     "courseScheduleId", "teacherId", "teacherName", "teacherOrganName", "jobType",
                     "courseScheduleOrganName", "groupId", "groupName", "changeType", "vipActiveName", "vipCategoryName", "activeName", "teachMode", "onlineClassesUnitPrice", "offlineClassesUnitPrice",
                     "courseScheduleType", "signCourseScheduleTime", "currentTime", "classDate", "courseScheduleStartTime", "signInStatus",
-                    "signOutStatus", "signInTime", "signOutTime","complaintsStatus", "disposeContent", "teacherRole", "address", "studentNum",
+                    "signOutStatus", "signInTime", "signOutTime", "complaintsStatus", "disposeContent", "teacherRole", "address", "studentNum",
                     "studentSignInTime", "studentSignOutTime", "price", "rewards", "deductionReason"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
@@ -814,16 +775,16 @@ public class ExportController extends BaseController {
             }
         }
         List<CourseScheduleEndDto> rows = scheduleService.endFindCourseSchedules(queryInfo).getRows();
-        for(CourseScheduleEndDto row : rows){
-        	row.setIsComplaints(StringUtils.equals(row.getIsComplaints(), "1") ? "有" : "无");
+        for (CourseScheduleEndDto row : rows) {
+            row.setIsComplaints(StringUtils.equals(row.getIsComplaints(), "1") ? "有" : "无");
         }
         OutputStream ouputStream = null;
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部名称", "课程编号", "开始时间", "结束时间",
                     "班级名称", "班级声部", "课程名称", "课程类型", "教学模式",
-                    "教学点", "课程状态", "指导老师", "学员编号", "是否点名","是否有考勤申诉"}, new String[]{
+                    "教学点", "课程状态", "指导老师", "学员编号", "是否点名", "是否有考勤申诉"}, new String[]{
                     "organName", "id", "startClassTime", "endClassTime", "classGroupName", "subjectName", "name",
-                    "groupType.desc", "teachMode.msg", "schoolName", "status.msg", "teacherName", "studentId", "isCallNames.msg","isComplaints"}, rows);
+                    "groupType.desc", "teachMode.msg", "schoolName", "status.msg", "teacherName", "studentId", "isCallNames.msg", "isComplaints"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             ouputStream = response.getOutputStream();
@@ -1056,66 +1017,104 @@ public class ExportController extends BaseController {
         OutputStream outputStream = response.getOutputStream();
         long i = 1;
         for (StudentPaymentOrderExportDto row : studentPaymentOrderExportDtos) {
-            if (queryInfo.getOrderType().equals("1")) {
-                BigDecimal comAmount = row.getComAmount() == null ? BigDecimal.ZERO : row.getComAmount();
-                row.setActualAmount(comAmount);
-            } else if (queryInfo.getOrderType().equals("2")) {
-                BigDecimal perAmount = row.getPerAmount() == null ? BigDecimal.ZERO : row.getPerAmount();
-                row.setActualAmount(perAmount);
-            }
             if (row.getActualAmount() == null) {
                 row.setActualAmount(BigDecimal.ZERO);
             }
             if (row.getBalancePaymentAmount() == null) {
                 row.setBalancePaymentAmount(BigDecimal.ZERO);
             }
-            BigDecimal transferFee = (row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
+            if (row.getMemo() == null) {
+                row.setMemo("");
+            }
+            BigDecimal transferFee = BigDecimal.ZERO;
+            if(row.getPaymentChannel() != null && row.getPaymentChannel().equals("ADAPAY")){
+                FeeFlagNumDto countFeeFlagNum = studentPaymentRouteOrderDao.getCountFeeFlagNum(row.getOrderNo());
+                if(countFeeFlagNum.getTotalNum() > countFeeFlagNum.getYesNum()){
+                    transferFee = row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
+                }
+                if(countFeeFlagNum.getTotalNum().equals(countFeeFlagNum.getYesNum())){
+                    List<StudentPaymentRouteOrder> routeOrders = studentPaymentRouteOrderDao.getRouteOrders(row.getOrderNo());
+                    for (StudentPaymentRouteOrder routeOrder : routeOrders) {
+                        transferFee = transferFee.add(routeOrder.getRouteAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP));
+                    }
+                }
+            }
             row.setTransferFee(transferFee);
-            BigDecimal musicalFee = BigDecimal.ZERO;
-            BigDecimal teachingFee = BigDecimal.ZERO;
-            BigDecimal courseFee = BigDecimal.ZERO;
-            BigDecimal leaseFee = BigDecimal.ZERO;
-            BigDecimal highOnlineCourseFee = BigDecimal.ZERO;
+
             String goodsName = "";
             if (row.getOrderDetailList() != null) {
                 for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
-                    if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
-                        if (orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
-                            leaseFee = orderDetail.getPrice();
-                        } else {
-                            musicalFee = orderDetail.getPrice();
-                        }
-                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.COURSE)) {
-                        courseFee = courseFee.add(orderDetail.getPrice());
-                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.ACCESSORIES) || orderDetail.getType().equals(OrderDetailTypeEnum.TEACHING) || orderDetail.getType().equals(OrderDetailTypeEnum.OTHER)) {
-                        teachingFee = teachingFee.add(orderDetail.getPrice());
-                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.HIGH_ONLINE_COURSE)) {
-                        highOnlineCourseFee = highOnlineCourseFee.add(orderDetail.getPrice());
+                    switch (orderDetail.getType()) {
+                        case COURSE:
+                        case CLASSROOM:
+                        case SINGLE:
+                        case MIX:
+                        case COMPREHENSIVE:
+                        case ENLIGHTENMENT:
+                        case TRAINING_SINGLE:
+                        case TRAINING_MIX:
+                        case MUSIC_NETWORK:
+                            row.setMusicGroupCourseFee(row.getMusicGroupCourseFee().add(orderDetail.getPrice()));
+                            break;
+                        case HIGH:
+                        case HIGH_ONLINE:
+                        case HIGH_ONLINE_COURSE:
+                            row.setHighCourseFee(row.getHighCourseFee().add(orderDetail.getPrice()));
+                        case MUSICAL:
+                            if (orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
+                                row.setLeaseFee(orderDetail.getPrice());
+                            } else {
+                                row.setMusicalFee(orderDetail.getPrice());
+                            }
+                            break;
+                        case ACCESSORIES:
+                        case TEACHING:
+                            row.setTeachingFee(row.getTeachingFee().add(orderDetail.getPrice()));
+                            break;
+                        case OTHER:
+                            row.setOtherFee(row.getOtherFee().add(orderDetail.getPrice()));
+                        default:
+                            break;
                     }
                 }
             }
             if (row.getGoodsList() != null) {
                 goodsName = row.getGoodsList().stream().map(Goods::getName).collect(Collectors.joining("|"));
             }
-            row.setCourseFee(courseFee);
-            row.setMusicalFee(musicalFee);
-            row.setTeachingFee(teachingFee);
-            row.setLeaseFee(leaseFee);
-            row.setMemo(goodsName);
-            row.setHighOnlineCourseFee(highOnlineCourseFee);
+            if (StringUtils.isNotBlank(goodsName)) {
+                row.setMemo(goodsName);
+            }
             //专业
             if (row.getGroupType().equals(GroupType.VIP)) {
-                row.setCourseFee(row.getActualAmount());
+                row.setVipCourseFee(row.getActualAmount());
                 VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
                 if (vipGroupInfo != null) {
                     row.setSchoolName(vipGroupInfo.getSchoolName());
                     row.setSubjectName(vipGroupInfo.getSubjectName());
                 }
-
             } else if (row.getGroupType().equals(GroupType.SPORADIC)) {
-                row.setSporadicAmount(row.getActualAmount());
-                row.setMusicalFee(BigDecimal.ZERO);
-                row.setTeachingFee(BigDecimal.ZERO);
+                //考级报名
+                if (row.getType().equals(OrderTypeEnum.DEGREE_REGISTRATION)) {
+                    String[] feeTypes = row.getMemo().split(";");
+                    List<String> feeTypeList = Arrays.asList(feeTypes);
+                    for (String feeTypeStr : feeTypeList) {
+                        int index = feeTypeStr.lastIndexOf(":");
+                        if (index < 0) {
+                            continue;
+                        }
+                        BigDecimal typeFee = new BigDecimal(feeTypeStr.substring(index + 1));
+                        if (feeTypeStr.contains("VIP")) {
+                            row.setVipCourseFee(typeFee);
+                        } else if (feeTypeStr.contains("网管课")) {
+                            row.setPracticeCourseFee(typeFee);
+                        } else if (feeTypeStr.contains("乐理课")) {
+                            row.setTheoryCourseFee(typeFee);
+                        }
+                    }
+                    row.setDegreeFee(row.getExpectAmount().subtract(row.getVipCourseFee()).subtract(row.getPracticeCourseFee()).subtract(row.getTheoryCourseFee()));
+                } else {
+                    row.setOtherFee(row.getExpectAmount());
+                }
                 if (row.getChargeType() != null) {
                     for (SporadicChargeTypeEnum chargeType : SporadicChargeTypeEnum.values()) {
                         if (!chargeType.getCode().equals(row.getChargeType())) continue;
@@ -1127,7 +1126,7 @@ public class ExportController extends BaseController {
                     row.setSchoolName(userSchool.getName());
                 }
             } else if (row.getGroupType().equals(GroupType.PRACTICE)) {
-                row.setCourseFee(row.getActualAmount());
+                row.setPracticeCourseFee(row.getActualAmount());
                 School userSchool = musicGroupDao.findUserSchool(row.getUserId());
                 if (userSchool != null) {
                     row.setSchoolName(userSchool.getName());
@@ -1138,8 +1137,13 @@ public class ExportController extends BaseController {
                 }
             } else {
                 StudentPaymentOrderExportDto feeByType = sellOrderDao.getFeeByType(row.getId());
+//                if(feeByType.getMusicalFee().add(feeByType.getTeachingFee()).add(feeByType.getRepairFee()).add(feeByType.getOtherFee()).compareTo(BigDecimal.ZERO) <=0){
+//                    break;
+//                }
                 row.setMusicalFee(feeByType.getMusicalFee());
                 row.setTeachingFee(feeByType.getTeachingFee());
+                row.setRepairFee(feeByType.getRepairFee());
+                row.setOtherFee(feeByType.getOtherFee());
                 if (row.getGroupType().equals(GroupType.MUSIC)) {
                     StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(row.getMusicGroupId(), row.getUserId());
                     if (studentRegistration != null) {
@@ -1147,19 +1151,20 @@ public class ExportController extends BaseController {
                         row.setSchoolName(studentRegistration.getSchoolName());
                         row.setCooperationOrganName(studentRegistration.getRemark());
                     }
-                    if (row.getCourseFee().compareTo(BigDecimal.ZERO) == 0) {
-                        row.setCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
-                    }
+                    row.setMusicGroupCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getRepairFee()).subtract(feeByType.getOtherFee()).subtract(row.getHighCourseFee()));
                 } else if (row.getType().equals(OrderTypeEnum.REPAIR)) {
-                    row.setRepairFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
+                    row.setRepairFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getOtherFee()));
                 } else if (row.getType().equals(OrderTypeEnum.OUTORDER)) {
-                    row.setCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
+                    row.setMusicGroupCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getRepairFee()).subtract(feeByType.getOtherFee()));
                     row.setTransferFee(BigDecimal.ZERO);
                 }
             }
+            if(row.getMusicGroupId()==null){
+                row.setMusicGroupId("");
+            }
             String paymentChannel = "";
-            if (row.getPaymentChannel() == null) {
-            } else if (row.getPaymentChannel().equals("YQPAY")) {
+            if(row.getPaymentChannel() == null) {
+            }else if (row.getPaymentChannel().equals("YQPAY")) {
                 paymentChannel = "双乾";
             } else if (row.getPaymentChannel().equals("ADAPAY")) {
                 paymentChannel = "汇付";
@@ -1172,10 +1177,10 @@ public class ExportController extends BaseController {
         }
 
         try {
-            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "创建时间", "到账时间",
-                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "新生专享课程费用", "乐器减免费用", "课程减免费用", "押金", "乐器", "教辅费用", "维修费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "合作机构", "备注"};
-            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "createTime", "payTime", "musicGroupId",
-                    "groupType.desc", "courseFee", "highOnlineCourseFee", "remitFee", "courseRemitFee", "leaseFee", "musicalFee", "teachingFee", "repairFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"};
+            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "乐团课", "网络基础训练", "VIP课", "网管课", "乐理课", "考级", "维修费用", "押金", "乐器", "教辅费用", "其它", "手续费", "到账时间",
+                    "关联乐团ID/VIP课ID", "课程形态", "零星收款类别", "专业", "分部", "教学点", "合作单位", "备注"};
+            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "musicGroupCourseFee", "highCourseFee", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "leaseFee", "musicalFee", "teachingFee", "otherFee", "transferFee", "payTime", "musicGroupId",
+                    "groupType.desc", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
@@ -1677,9 +1682,9 @@ public class ExportController extends BaseController {
                     row.setSignOutStatusStr(signOutTimeStr + "(异常签退)");
                 }
             }
-            if(row.getBelongDaya()==1){
+            if (row.getBelongDaya() == 1) {
                 row.setSalaryType("基本课酬");
-            }else{
+            } else {
                 row.setSalaryType("其它课酬");
             }
         }
@@ -2147,66 +2152,104 @@ public class ExportController extends BaseController {
         OutputStream outputStream = response.getOutputStream();
         long i = 1;
         for (StudentPaymentOrderExportDto row : studentPaymentOrderExportDtos) {
-            if (queryInfo.getOrderType().equals("1")) {
-                BigDecimal comAmount = row.getComAmount() == null ? BigDecimal.ZERO : row.getComAmount();
-                row.setActualAmount(comAmount);
-            } else if (queryInfo.getOrderType().equals("2")) {
-                BigDecimal perAmount = row.getPerAmount() == null ? BigDecimal.ZERO : row.getPerAmount();
-                row.setActualAmount(perAmount);
-            }
             if (row.getActualAmount() == null) {
                 row.setActualAmount(BigDecimal.ZERO);
             }
             if (row.getBalancePaymentAmount() == null) {
                 row.setBalancePaymentAmount(BigDecimal.ZERO);
             }
-            BigDecimal transferFee = row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
-            String delayRouteStartDate = sysConfigDao.findConfigValue("delay_route_start_date");
-            if (row.getCreateTime().after(Objects.requireNonNull(DateUtil.stringToDate(delayRouteStartDate, "yyyy-MM-dd HH:mm:ss")))) {
-                transferFee = row.getRouteAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
+            if (row.getRouteAmount() == null) {
+                row.setRouteAmount(BigDecimal.ZERO);
+            }
+            if (row.getMemo() == null) {
+                row.setMemo("");
+            }
+            BigDecimal transferFee = BigDecimal.ZERO;
+            if(row.getPaymentChannel() != null && row.getPaymentChannel().equals("ADAPAY")){
+                FeeFlagNumDto countFeeFlagNum = studentPaymentRouteOrderDao.getCountFeeFlagNum(row.getOrderNo());
+                if(countFeeFlagNum.getTotalNum() > countFeeFlagNum.getYesNum() && row.getFeeFlag().equals("Y")){
+                    transferFee = row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
+                }
+                if(countFeeFlagNum.getTotalNum().equals(countFeeFlagNum.getYesNum())){
+                    transferFee = row.getRouteAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP);
+                }
             }
             row.setTransferFee(transferFee);
-            BigDecimal musicalFee = BigDecimal.ZERO;
-            BigDecimal teachingFee = BigDecimal.ZERO;
-            BigDecimal courseFee = BigDecimal.ZERO;
-            BigDecimal leaseFee = BigDecimal.ZERO;
+
             String goodsName = "";
             if (row.getOrderDetailList() != null) {
                 for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
-                    if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
-                        if (orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
-                            leaseFee = orderDetail.getPrice();
-                        } else {
-                            musicalFee = orderDetail.getPrice();
-                        }
-                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.COURSE)) {
-                        courseFee = courseFee.add(orderDetail.getPrice());
-                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.ACCESSORIES) || orderDetail.getType().equals(OrderDetailTypeEnum.TEACHING) || orderDetail.getType().equals(OrderDetailTypeEnum.OTHER)) {
-                        teachingFee = teachingFee.add(orderDetail.getPrice());
+                    switch (orderDetail.getType()) {
+                        case COURSE:
+                        case CLASSROOM:
+                        case SINGLE:
+                        case MIX:
+                        case COMPREHENSIVE:
+                        case ENLIGHTENMENT:
+                        case TRAINING_SINGLE:
+                        case TRAINING_MIX:
+                        case MUSIC_NETWORK:
+                            row.setMusicGroupCourseFee(row.getMusicGroupCourseFee().add(orderDetail.getPrice()));
+                            break;
+                        case HIGH:
+                        case HIGH_ONLINE:
+                        case HIGH_ONLINE_COURSE:
+                            row.setHighCourseFee(row.getHighCourseFee().add(orderDetail.getPrice()));
+                        case MUSICAL:
+                            if (orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
+                                row.setLeaseFee(orderDetail.getPrice());
+                            } else {
+                                row.setMusicalFee(orderDetail.getPrice());
+                            }
+                            break;
+                        case ACCESSORIES:
+                        case TEACHING:
+                            row.setTeachingFee(row.getTeachingFee().add(orderDetail.getPrice()));
+                            break;
+                        case OTHER:
+                            row.setOtherFee(row.getOtherFee().add(orderDetail.getPrice()));
+                        default:
+                            break;
                     }
                 }
             }
             if (row.getGoodsList() != null) {
                 goodsName = row.getGoodsList().stream().map(Goods::getName).collect(Collectors.joining("|"));
             }
-            row.setCourseFee(courseFee);
-            row.setMusicalFee(musicalFee);
-            row.setTeachingFee(teachingFee);
-            row.setLeaseFee(leaseFee);
-            row.setMemo(goodsName);
+            if (StringUtils.isNotBlank(goodsName)) {
+                row.setMemo(goodsName);
+            }
             //专业
             if (row.getGroupType().equals(GroupType.VIP)) {
-                row.setCourseFee(row.getActualAmount());
+                row.setVipCourseFee(row.getActualAmount());
                 VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
                 if (vipGroupInfo != null) {
                     row.setSchoolName(vipGroupInfo.getSchoolName());
                     row.setSubjectName(vipGroupInfo.getSubjectName());
                 }
-
             } else if (row.getGroupType().equals(GroupType.SPORADIC)) {
-                row.setSporadicAmount(row.getActualAmount());
-                row.setMusicalFee(BigDecimal.ZERO);
-                row.setTeachingFee(BigDecimal.ZERO);
+                //考级报名
+                if (row.getType().equals(OrderTypeEnum.DEGREE_REGISTRATION)) {
+                    String[] feeTypes = row.getMemo().split(";");
+                    List<String> feeTypeList = Arrays.asList(feeTypes);
+                    for (String feeTypeStr : feeTypeList) {
+                        int index = feeTypeStr.lastIndexOf(":");
+                        if (index < 0) {
+                            continue;
+                        }
+                        BigDecimal typeFee = new BigDecimal(feeTypeStr.substring(index + 1));
+                        if (feeTypeStr.contains("VIP")) {
+                            row.setVipCourseFee(typeFee);
+                        } else if (feeTypeStr.contains("网管课")) {
+                            row.setPracticeCourseFee(typeFee);
+                        } else if (feeTypeStr.contains("乐理课")) {
+                            row.setTheoryCourseFee(typeFee);
+                        }
+                    }
+                    row.setDegreeFee(row.getExpectAmount().subtract(row.getVipCourseFee()).subtract(row.getPracticeCourseFee()).subtract(row.getTheoryCourseFee()));
+                } else {
+                    row.setOtherFee(row.getExpectAmount());
+                }
                 if (row.getChargeType() != null) {
                     for (SporadicChargeTypeEnum chargeType : SporadicChargeTypeEnum.values()) {
                         if (!chargeType.getCode().equals(row.getChargeType())) continue;
@@ -2218,7 +2261,7 @@ public class ExportController extends BaseController {
                     row.setSchoolName(userSchool.getName());
                 }
             } else if (row.getGroupType().equals(GroupType.PRACTICE)) {
-                row.setCourseFee(row.getActualAmount());
+                row.setPracticeCourseFee(row.getActualAmount());
                 School userSchool = musicGroupDao.findUserSchool(row.getUserId());
                 if (userSchool != null) {
                     row.setSchoolName(userSchool.getName());
@@ -2227,10 +2270,12 @@ public class ExportController extends BaseController {
                 if (practiceGroup != null) {
                     row.setSubjectName(practiceGroup.getSubjectName());
                 }
-            }else {
+            } else {
                 StudentPaymentOrderExportDto feeByType = sellOrderDao.getFeeByType(row.getId());
                 row.setMusicalFee(feeByType.getMusicalFee());
                 row.setTeachingFee(feeByType.getTeachingFee());
+                row.setRepairFee(feeByType.getRepairFee());
+                row.setOtherFee(feeByType.getOtherFee());
                 if (row.getGroupType().equals(GroupType.MUSIC)) {
                     StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(row.getMusicGroupId(), row.getUserId());
                     if (studentRegistration != null) {
@@ -2238,19 +2283,20 @@ public class ExportController extends BaseController {
                         row.setSchoolName(studentRegistration.getSchoolName());
                         row.setCooperationOrganName(studentRegistration.getRemark());
                     }
-                    if (row.getCourseFee().compareTo(BigDecimal.ZERO) == 0) {
-                        row.setCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
-                    }
+                    row.setMusicGroupCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getRepairFee()).subtract(feeByType.getOtherFee()).subtract(row.getHighCourseFee()));
                 } else if (row.getType().equals(OrderTypeEnum.REPAIR)) {
-                    row.setRepairFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
+                    row.setRepairFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getOtherFee()));
                 } else if (row.getType().equals(OrderTypeEnum.OUTORDER)) {
-                    row.setCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()));
+                    row.setMusicGroupCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getRepairFee()).subtract(feeByType.getOtherFee()));
                     row.setTransferFee(BigDecimal.ZERO);
                 }
             }
+            if(row.getMusicGroupId()==null){
+                row.setMusicGroupId("");
+            }
             String paymentChannel = "";
-            if (row.getPaymentChannel() == null) {
-            } else if (row.getPaymentChannel().equals("YQPAY")) {
+            if(row.getPaymentChannel() == null) {
+            }else if (row.getPaymentChannel().equals("YQPAY")) {
                 paymentChannel = "双乾";
             } else if (row.getPaymentChannel().equals("ADAPAY")) {
                 paymentChannel = "汇付";
@@ -2263,10 +2309,10 @@ public class ExportController extends BaseController {
         }
 
         try {
-            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分润余额", "到账时间",
-                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "减免费用", "押金", "乐器", "教辅费用", "维修费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "合作机构", "备注"};
-            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance", "payTime", "musicGroupId",
-                    "groupType.desc", "courseFee", "remitFee", "leaseFee", "musicalFee", "teachingFee","repairFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"};
+            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分润余额", "乐团课", "网络基础训练", "VIP课", "网管课", "乐理课", "考级", "维修费用", "押金", "乐器", "教辅费用", "其它", "手续费", "到账时间",
+                    "关联乐团ID/VIP课ID", "课程形态", "零星收款类别", "专业", "分部", "教学点", "合作单位", "备注"};
+            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance", "musicGroupCourseFee", "highCourseFee", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "leaseFee", "musicalFee", "teachingFee", "otherFee", "transferFee", "payTime", "musicGroupId",
+                    "groupType.desc", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); //    //收款账户
@@ -2314,12 +2360,12 @@ public class ExportController extends BaseController {
                     "基础技能课2.0(助教)", "课堂课(助教)", "单技课3.0(助教)", "合奏课3.0(助教)", "综合课3.0(助教)", "集训单技课3.0(助教)", "集训合奏课3.0(助教)",
                     "基础技能课3.0(助教)", "网络基础训练课1v3", "网络基础训练课1v4", "网络基础训练课1v5", "乐团网管课1v1"};
             String[] body = {"userId", "realName", "organName", "jobNature", "demissionStatus", "status", "vip1", "vip2", "vip3", "vip4", "vip5", "vip6", "vip7",
-                    "practiceSalary","mainSingleSalary2", "mainMixSalary2", "mainComprehensiveSalary2", "mainTraningSigleSalary2", "mainTraningMixSalary2",
-                    "mainHighSalary2","mainClassroomSalary2", "mainSingleSalary", "mainMixSalary", "mainComprehensiveSalary", "mainTraningSigleSalary", "mainTraningMixSalary",
+                    "practiceSalary", "mainSingleSalary2", "mainMixSalary2", "mainComprehensiveSalary2", "mainTraningSigleSalary2", "mainTraningMixSalary2",
+                    "mainHighSalary2", "mainClassroomSalary2", "mainSingleSalary", "mainMixSalary", "mainComprehensiveSalary", "mainTraningSigleSalary", "mainTraningMixSalary",
                     "mainHighSalary",
                     "assistantSingleSalary2", "assistantMixSalary2", "assistantComprehensiveSalary2", "assistantTraningSigleSalary2", "assistantTraningMixSalary2",
-                    "assistantHighSalary2","assistantClassroomSalary2", "assistantSingleSalary", "assistantMixSalary", "assistantComprehensiveSalary", "assistantTraningSigleSalary", "assistantTraningMixSalary",
-                    "assistantHighSalary","highOnline3Salary", "highOnline4Salary", "highOnline5Salary", "musicNetwork1Salary"};
+                    "assistantHighSalary2", "assistantClassroomSalary2", "assistantSingleSalary", "assistantMixSalary", "assistantComprehensiveSalary", "assistantTraningSigleSalary", "assistantTraningMixSalary",
+                    "assistantHighSalary", "highOnline3Salary", "highOnline4Salary", "highOnline5Salary", "musicNetwork1Salary"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, pageList);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=teacherDefaultSalary-" + DateUtil.getDate(new Date()) + ".xls");
@@ -2560,11 +2606,11 @@ public class ExportController extends BaseController {
         queryInfo.setRows(49999);
         List<SellOrder> rows = sellOrderService.queryPage(queryInfo).getRows();
         for (SellOrder row : rows) {
-            if(StringUtils.isNoneBlank(row.getPaymentChannel())){
+            if (StringUtils.isNoneBlank(row.getPaymentChannel())) {
                 row.setPaymentChannelStr(PaymentChannelEnum.valueOf(row.getPaymentChannel()).getDesc());
             }
-            row.setAccountTypeStr(AccountType.INTERNAL.equals(row.getAccountType())?"对内":"对外");
-            switch (row.getReceiveStatus()){
+            row.setAccountTypeStr(AccountType.INTERNAL.equals(row.getAccountType()) ? "对内" : "对外");
+            switch (row.getReceiveStatus()) {
                 case "NO_RECEIVE":
                     row.setReceiveStatusStr("未确认");
                     break;
@@ -2579,8 +2625,8 @@ public class ExportController extends BaseController {
         OutputStream outputStream = response.getOutputStream();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{
-                    "交易流水号", "订单号", "销售日期", "销售类型", "商品名称", "数量","应付金额(元)", "余额支付(元)",
-                    "现金支付(元)", "销售成本(元)", "学员姓名","交易方式", "收款账户", "账户类型", "扣减库存", "所属分部",
+                    "交易流水号", "订单号", "销售日期", "销售类型", "商品名称", "数量", "应付金额(元)", "余额支付(元)",
+                    "现金支付(元)", "销售成本(元)", "学员姓名", "交易方式", "收款账户", "账户类型", "扣减库存", "所属分部",
                     "所属学校", "教务老师", "确认收货", "状态"}, new String[]{
                     "transNo", "orderNo", "sellTime", "type.desc", "goodsName", "num", "expectAmount", "balanceAmount",
                     "actualAmount", "sellCost", "userName", "paymentChannelStr", "merNo", "accountTypeStr", "stockType.msg", "organName",

+ 15 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

@@ -4,6 +4,7 @@ import com.ym.mec.biz.dal.dto.CloseMusicGroupDto;
 import com.ym.mec.biz.dal.dto.MusicGroupRegsDto;
 import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.common.entity.HttpResponseResult;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -308,4 +309,18 @@ public class MusicGroupController extends BaseController {
 		return succeed(musicGroupService.closeMusicGroup(closeMusicGroupDto));
 	}
 
+	@ApiOperation(value = "完成预报名")
+	@PostMapping("/finishPreApply")
+	@PreAuthorize("@pcs.hasPermissions('musicGroup/finishPreApply')")
+	public HttpResponseResult<Boolean> finishPreApply(String musicGroupId,boolean isCheckStudentNum) {
+		return musicGroupService.finishPreApply(musicGroupId, isCheckStudentNum) ? succeed() : failed();
+	}
+
+	@ApiOperation(value = "发送家长会通知")
+	@PostMapping("/sendParentMeetingNotice")
+	@PreAuthorize("@pcs.hasPermissions('musicGroup/sendParentMeetingNotice')")
+	public HttpResponseResult<Boolean> sendParentMeetingNotice(String musicGroupId, Date meetingDate, String address) {
+		return musicGroupService.sendParentMeetingNotice(musicGroupId, meetingDate, address) ? succeed() : failed();
+	}
+
 }

+ 33 - 14
mec-web/src/main/java/com/ym/mec/web/controller/StudentRegistrationController.java

@@ -1,30 +1,40 @@
 package com.ym.mec.web.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderCourseSettingsDao;
 import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
 import com.ym.mec.biz.dal.dto.DelRegisterDto;
 import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
 import com.ym.mec.biz.dal.dto.StudentAddDto;
-import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
+import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.biz.dal.page.StudentPreRegistrationQueryInfo;
 import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
 import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
+import com.ym.mec.biz.service.StudentPreRegistrationService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
-import com.ym.mec.common.exception.BizException;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
 
 @RequestMapping("studentRegistration")
 @Api(tags = "学生报名信息服务")
@@ -39,6 +49,15 @@ public class StudentRegistrationController extends BaseController {
     private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
     @Autowired
     private MusicGroupPaymentCalenderCourseSettingsDao musicGroupPaymentCalenderCourseSettingsDao;
+    @Autowired
+    private StudentPreRegistrationService studentPreRegistrationService;
+
+    @ApiOperation(value = "乐团预报名列表分页查询")
+    @GetMapping("/queryPreApplyList")
+    @PreAuthorize("@pcs.hasPermissions('studentRegistration/queryPreApplyList')")
+    public Object queryPreApplyList(StudentPreRegistrationQueryInfo queryInfo) {
+        return succeed(studentPreRegistrationService.queryListForPage(queryInfo));
+    }
 
     @ApiOperation(value = "乐团添加学员")
     @PostMapping("/insertStudent")

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

@@ -156,6 +156,7 @@ public class TaskController extends BaseController {
 	public void updateCourseScheduleToOverStatus() {
 		courseScheduleService.updateCourseScheduleToOverStatus();
 		courseScheduleService.updateCourseScheduleToUnderway();
+		courseEventSource.courseStatusChange(null);
 	}
 
 	@GetMapping("/updateVipGroupToFinishedStatus")