|  | @@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.dto.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.GroupType;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 | 
	
	
		
			
				|  | @@ -193,9 +194,9 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                  for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
 | 
	
		
			
				|  |  |                      if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
 | 
	
		
			
				|  |  |                          musicalFee = musicalFee.add(orderDetail.getPrice());
 | 
	
		
			
				|  |  | -                    }else if(orderDetail.getType().equals(OrderDetailTypeEnum.COURSE)){
 | 
	
		
			
				|  |  | +                    } 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)) {
 | 
	
		
			
				|  |  | +                    } else if (orderDetail.getType().equals(OrderDetailTypeEnum.ACCESSORIES) || orderDetail.getType().equals(OrderDetailTypeEnum.TEACHING) || orderDetail.getType().equals(OrderDetailTypeEnum.OTHER)) {
 | 
	
		
			
				|  |  |                          teachingFee = teachingFee.add(orderDetail.getPrice());
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -209,12 +210,13 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                  if (studentRegistration != null) {
 | 
	
		
			
				|  |  |                      row.setSubjectName(studentRegistration.getSubjectName());
 | 
	
		
			
				|  |  |                      row.setSchoolName(studentRegistration.getSchoolName());
 | 
	
		
			
				|  |  | -                    if (studentRegistration.getKitType() != null && studentRegistration.getKitType().equals("LEASE")) {
 | 
	
		
			
				|  |  | +                    if (row.getType().equals(OrderTypeEnum.APPLY) && studentRegistration.getKitType() != null && studentRegistration.getKitType().equals("LEASE")) {
 | 
	
		
			
				|  |  |                          row.setLeaseFee(studentRegistration.getDepositFee());
 | 
	
		
			
				|  |  |                          row.setMusicalFee(BigDecimal.ZERO);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              } else if (row.getGroupType().equals(GroupType.VIP)) {
 | 
	
		
			
				|  |  | +                row.setCourseFee(row.getActualAmount());
 | 
	
		
			
				|  |  |                  VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
 | 
	
		
			
				|  |  |                  if (vipGroupInfo != null) {
 | 
	
		
			
				|  |  |                      row.setSchoolName(vipGroupInfo.getSchoolName());
 | 
	
	
		
			
				|  | @@ -254,9 +256,9 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "支付金额", "到账时间",
 | 
	
		
			
				|  |  | -                    "关联乐团ID/VIP课ID", "课程形态","课程费用", "押金", "乐器", "教辅费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "备注"};
 | 
	
		
			
				|  |  | +                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "押金", "乐器", "教辅费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "备注"};
 | 
	
		
			
				|  |  |              String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "actualAmount", "payTime", "musicGroupId",
 | 
	
		
			
				|  |  | -                    "groupType.desc", "courseFee","leaseFee", "musicalFee", "teachingFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "memo"};
 | 
	
		
			
				|  |  | +                    "groupType.desc", "courseFee", "leaseFee", "musicalFee", "teachingFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "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");
 | 
	
	
		
			
				|  | @@ -282,16 +284,18 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  |                      row.setGender("女");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (row.getPaymentStatus().equals("PAID_COMPLETED")) {
 | 
	
		
			
				|  |  | -                    row.setPaymentStatus("完成缴费");
 | 
	
		
			
				|  |  | -                } else if (row.getPaymentStatus().equals("NON_PAYMENT")) {
 | 
	
		
			
				|  |  | -                    row.setPaymentStatus("未缴费");
 | 
	
		
			
				|  |  | -                } else if (row.getPaymentStatus().equals("PROCESSING")) {
 | 
	
		
			
				|  |  | -                    row.setPaymentStatus("缴费中");
 | 
	
		
			
				|  |  | +                if (row.getPaymentStatus() != null) {
 | 
	
		
			
				|  |  | +                    if (row.getPaymentStatus().equals("PAID_COMPLETED")) {
 | 
	
		
			
				|  |  | +                        row.setPaymentStatus("完成缴费");
 | 
	
		
			
				|  |  | +                    } else if (row.getPaymentStatus().equals("NON_PAYMENT")) {
 | 
	
		
			
				|  |  | +                        row.setPaymentStatus("未缴费");
 | 
	
		
			
				|  |  | +                    } else if (row.getPaymentStatus().equals("PROCESSING")) {
 | 
	
		
			
				|  |  | +                        row.setPaymentStatus("缴费中");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if(row.getStudentStatus().equals("NORMAL")){
 | 
	
		
			
				|  |  | +                if (row.getStudentStatus().equals("NORMAL")) {
 | 
	
		
			
				|  |  |                      row.setStudentStatus("在读");
 | 
	
		
			
				|  |  | -                }else {
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  |                      row.setStudentStatus("退团");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (row.getIsActive()) {
 | 
	
	
		
			
				|  | @@ -299,18 +303,20 @@ public class ExportController extends BaseController {
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  |                      row.setActiveName("否");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if(row.getIsNewStudent().equals(1)){
 | 
	
		
			
				|  |  | +                if (row.getIsNewStudent().equals(1)) {
 | 
	
		
			
				|  |  |                      row.setIsNewStudentStr("是");
 | 
	
		
			
				|  |  | -                }else {
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  |                      row.setIsNewStudentStr("否");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                row.setNextPaymentDateStr(DateUtil.format(row.getNextPaymentDate(), DateUtil.DEFAULT_PATTERN));
 | 
	
		
			
				|  |  | +                if (row.getNextPaymentDate() != null) {
 | 
	
		
			
				|  |  | +                    row.setNextPaymentDateStr(DateUtil.format(row.getNextPaymentDate(), DateUtil.DEFAULT_PATTERN));
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |                  row.setCurrentGrade(row.getCurrentGrade() + row.getCurrentClass());
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            String[] header = {"学员编号","学员姓名", "性别", "联系电话", "年级班级", "专业", "学员状态", "新增学员", "缴费金额",
 | 
	
		
			
				|  |  | +            String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级班级", "专业", "学员状态", "新增学员", "缴费金额",
 | 
	
		
			
				|  |  |                      "下次缴费日期", "报名缴费", "是否激活"};
 | 
	
		
			
				|  |  | -            String[] body = {"userId","realName", "gender", "phone", "currentGrade", "subjectName", "studentStatus", "isNewStudentStr",
 | 
	
		
			
				|  |  | -                    "courseFee", "nextPaymentDateStr","paymentStatus", "activeName"};
 | 
	
		
			
				|  |  | +            String[] body = {"userId", "realName", "gender", "phone", "currentGrade", "subjectName", "studentStatus", "isNewStudentStr",
 | 
	
		
			
				|  |  | +                    "courseFee", "nextPaymentDateStr", "paymentStatus", "activeName"};
 | 
	
		
			
				|  |  |              HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
 | 
	
		
			
				|  |  |              response.setContentType("application/octet-stream");
 | 
	
		
			
				|  |  |              response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
 |