| 
														
															@@ -2019,14 +2019,7 @@ public class ExportController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             row.setLeaseFee(leaseFee); 
														 | 
														
														 | 
														
															             row.setLeaseFee(leaseFee); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             row.setMemo(goodsName); 
														 | 
														
														 | 
														
															             row.setMemo(goodsName); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             //专业 
														 | 
														
														 | 
														
															             //专业 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (row.getGroupType().equals(GroupType.MUSIC)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(row.getMusicGroupId(), row.getUserId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                if (studentRegistration != null) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    row.setSubjectName(studentRegistration.getSubjectName()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    row.setSchoolName(studentRegistration.getSchoolName()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    row.setCooperationOrganName(studentRegistration.getRemark()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            } else if (row.getGroupType().equals(GroupType.VIP)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (row.getGroupType().equals(GroupType.VIP)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 row.setCourseFee(row.getActualAmount()); 
														 | 
														
														 | 
														
															                 row.setCourseFee(row.getActualAmount()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId()); 
														 | 
														
														 | 
														
															                 VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if (vipGroupInfo != null) { 
														 | 
														
														 | 
														
															                 if (vipGroupInfo != null) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2039,27 +2032,9 @@ public class ExportController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 row.setMusicalFee(BigDecimal.ZERO); 
														 | 
														
														 | 
														
															                 row.setMusicalFee(BigDecimal.ZERO); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 row.setTeachingFee(BigDecimal.ZERO); 
														 | 
														
														 | 
														
															                 row.setTeachingFee(BigDecimal.ZERO); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if (row.getChargeType() != null) { 
														 | 
														
														 | 
														
															                 if (row.getChargeType() != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    if (row.getChargeType().equals(1)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("考级"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(2)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("声部更改"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(3)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("乐器更换"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(4)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("配件销售"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(5)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("维修费"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(6)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("福袋活动"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(7)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("上门费"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(9)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("账户充值"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(10)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("乐保服务"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } else if (row.getChargeType().equals(11)) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        row.setSporadicType("其他"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    for (SporadicChargeTypeEnum chargeType : SporadicChargeTypeEnum.values()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        if (!chargeType.getCode().equals(row.getChargeType())) continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        row.setSporadicType(chargeType.getMsg()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 School userSchool = musicGroupDao.findUserSchool(row.getUserId()); 
														 | 
														
														 | 
														
															                 School userSchool = musicGroupDao.findUserSchool(row.getUserId()); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2076,6 +2051,25 @@ public class ExportController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if (practiceGroup != null) { 
														 | 
														
														 | 
														
															                 if (practiceGroup != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     row.setSubjectName(practiceGroup.getSubjectName()); 
														 | 
														
														 | 
														
															                     row.setSubjectName(practiceGroup.getSubjectName()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                StudentPaymentOrderExportDto feeByType = sellOrderDao.getFeeByType(row.getId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                row.setMusicalFee(feeByType.getMusicalFee()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                row.setTeachingFee(feeByType.getTeachingFee()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (row.getGroupType().equals(GroupType.MUSIC)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(row.getMusicGroupId(), row.getUserId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    if (studentRegistration != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        row.setSubjectName(studentRegistration.getSubjectName()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        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())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } else if (row.getType().equals(OrderTypeEnum.REPAIR)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    row.setRepairFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } else if (row.getType().equals(OrderTypeEnum.OUTORDER)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    row.setCourseFee(feeByType.getExpectAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String paymentChannel = ""; 
														 | 
														
														 | 
														
															             String paymentChannel = ""; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (row.getPaymentChannel() == null) { 
														 | 
														
														 | 
														
															             if (row.getPaymentChannel() == null) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2093,9 +2087,9 @@ public class ExportController extends BaseController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         try { 
														 | 
														
														 | 
														
															         try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分润余额", "到账时间", 
														 | 
														
														 | 
														
															             String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分润余额", "到账时间", 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "减免费用", "押金", "乐器", "教辅费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "合作机构", "备注"}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "减免费用", "押金", "乐器", "教辅费用", "维修费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "合作机构", "备注"}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance", "payTime", "musicGroupId", 
														 | 
														
														 | 
														
															             String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance", "payTime", "musicGroupId", 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    "groupType.desc", "courseFee", "remitFee", "leaseFee", "musicalFee", "teachingFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"}; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    "groupType.desc", "courseFee", "remitFee", "leaseFee", "musicalFee", "teachingFee","repairFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"}; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos); 
														 | 
														
														 | 
														
															             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             response.setContentType("application/octet-stream"); 
														 | 
														
														 | 
														
															             response.setContentType("application/octet-stream"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); //    //收款账户 
														 | 
														
														 | 
														
															             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls"); //    //收款账户 
														 |