浏览代码

Merge remote-tracking branch 'origin/master'

Joburgess 4 年之前
父节点
当前提交
2b0c1dff27
共有 24 个文件被更改,包括 541 次插入200 次删除
  1. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java
  2. 9 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentRouteOrderDao.java
  3. 4 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPreRegistrationDao.java
  4. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/FeeFlagNumDto.java
  5. 91 8
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java
  6. 36 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPreRegistrationDto.java
  7. 0 10
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPreRegistration.java
  8. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java
  9. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeService.java
  10. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  11. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPreRegistrationService.java
  12. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  13. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  14. 22 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  15. 29 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPreRegistrationServiceImpl.java
  16. 15 0
      mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml
  17. 3 1
      mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml
  18. 1 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  19. 7 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentRouteOrderMapper.xml
  20. 21 12
      mec-biz/src/main/resources/config/mybatis/StudentPreRegistrationMapper.xml
  21. 19 0
      mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java
  22. 206 160
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  23. 15 0
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java
  24. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/StudentRegistrationController.java

+ 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);
 }

+ 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);
 }

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPreRegistrationDao.java

@@ -1,9 +1,11 @@
 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;
 
@@ -14,4 +16,6 @@ public interface StudentPreRegistrationDao extends BaseDAO<Long, StudentPreRegis
 	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;
+    }
+}

+ 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;
+	}
+}

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

@@ -45,8 +45,6 @@ public class StudentPreRegistration {
 	/** 创建时间 */
 	private java.util.Date createTime;
 	
-	private boolean isRegistered;
-	
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -151,14 +149,6 @@ public class StudentPreRegistration {
 		return this.createTime;
 	}
 			
-	public boolean isRegistered() {
-		return isRegistered;
-	}
-
-	public void setRegistered(boolean isRegistered) {
-		this.isRegistered = isRegistered;
-	}
-
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 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","乐团家长会通知");
 
 
 

+ 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);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java

@@ -40,6 +40,13 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @return
 	 */
 	boolean finishPreApply(String musicGroupId,boolean isCheckStudentNum);
+	
+	/**
+	 * 发送家长会通知
+	 * @param musicGroupId
+	 * @return
+	 */
+	boolean sendParentMeetingNotice(String musicGroupId);
 
 	/**
 	 * 零星缴费

+ 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);
 }

+ 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);
+	}
 }

+ 2 - 2
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) {

+ 22 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -498,6 +498,22 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	}
 
 	@Override
+	public boolean sendParentMeetingNotice(String musicGroupId) {
+		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);
+		return true;
+	}
+
+	@Override
     @Transactional(rollbackFor = Exception.class)
     public Map sporadicPay(SporadicPayDto sporadicPayDto) throws Exception {
         //获取收费项价格
@@ -1652,7 +1668,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());
         }
 
@@ -1764,6 +1780,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());

+ 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;
+	}
 	
 }

+ 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>

+ 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_)

+ 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>

+ 21 - 12
mec-biz/src/main/resources/config/mybatis/StudentPreRegistrationMapper.xml

@@ -23,6 +23,12 @@
 		<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>
+	
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="StudentPreRegistration" >
 		SELECT * FROM student_pre_registration WHERE id_ = #{id} 
@@ -94,23 +100,26 @@
 	</delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="StudentPreRegistration" parameterType="map">
-		SELECT spr.*,case when sr.id_ is null then false else true end is_registered_ FROM student_pre_registration spr left join student_registration sr on spr.music_group_id_ = sr.music_group_id_ and spr.user_id_ = sr.user_id_
+	<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},
+				and spr.music_group_id_ = #{musicGroupId}
 			</if>
 			<if test="isAllowAdjust != null">
-				and spr.is_allow_adjust_ = #{isAllowAdjust},
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
 			</if>
 			<if test="subjectId != null">
-				and (spr.subject_first_ = #{subjectId} or spr.subject_second_ = #{subjectId}),
+				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},'%')),
+				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},
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
 			</if>
 		</where>
 		ORDER BY spr.id_ <include refid="global.limit"/>
@@ -121,19 +130,19 @@
 		SELECT COUNT(spr.id_) FROM student_pre_registration spr
 		<where>
 			<if test="musicGroupId != null">
-				and spr.music_group_id_ = #{musicGroupId},
+				and spr.music_group_id_ = #{musicGroupId}
 			</if>
 			<if test="isAllowAdjust != null">
-				and spr.is_allow_adjust_ = #{isAllowAdjust},
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
 			</if>
 			<if test="subjectId != null">
-				and (spr.subject_first_ = #{subjectId} or spr.subject_second_ = #{subjectId}),
+				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},'%')),
+				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},
+				and spr.is_allow_adjust_ = #{isAllowAdjust}
 			</if>
 		</where>
 	</select>

+ 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) {
+		return musicGroupService.sendParentMeetingNotice(musicGroupId) ? succeed() : failed();
+	}
+
 }

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

@@ -56,7 +56,7 @@ public class StudentRegistrationController extends BaseController {
     @GetMapping("/queryPreApplyList")
     @PreAuthorize("@pcs.hasPermissions('studentRegistration/queryPreApplyList')")
     public Object queryPreApplyList(StudentPreRegistrationQueryInfo queryInfo) {
-        return succeed(studentPreRegistrationService.queryPage(queryInfo));
+        return succeed(studentPreRegistrationService.queryListForPage(queryInfo));
     }
 
     @ApiOperation(value = "乐团添加学员")