|
@@ -11,7 +11,9 @@ import com.ym.mec.biz.dal.dto.musicalListDetailDto;
|
|
|
import com.ym.mec.biz.dal.entity.Employee;
|
|
|
import com.ym.mec.biz.dal.entity.Goods;
|
|
|
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
|
|
|
+import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
+import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
|
import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
|
|
@@ -180,11 +182,27 @@ public class ExportController extends BaseController {
|
|
|
row.setExpectAmount(perAmount.add(balancePaymentAmount));
|
|
|
row.setActualAmount(perAmount.add(balancePaymentAmount));
|
|
|
}
|
|
|
+ BigDecimal transferFee = (row.getActualAmount().subtract(balancePaymentAmount).multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ row.setTransferFee(transferFee);
|
|
|
if(row.getGroupType().equals(GroupType.SPORADIC)){
|
|
|
row.setSporadicAmount(row.getActualAmount());
|
|
|
row.setExpectAmount(BigDecimal.ZERO);
|
|
|
row.setActualAmount(BigDecimal.ZERO);
|
|
|
}
|
|
|
+ List<StudentPaymentOrderDetail> orderDetails = studentPaymentOrderDetailDao.findApplyOrderGoods(row.getId());
|
|
|
+ BigDecimal musicalFee = BigDecimal.ZERO;
|
|
|
+ BigDecimal teachingFee = BigDecimal.ZERO;
|
|
|
+ if(orderDetails.size() > 0) {
|
|
|
+ for (StudentPaymentOrderDetail orderDetail : orderDetails) {
|
|
|
+ if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
|
|
|
+ musicalFee = musicalFee.add(orderDetail.getPrice());
|
|
|
+ } else if (orderDetail.getType().equals(OrderDetailTypeEnum.ACCESSORIES) || orderDetail.getType().equals(OrderDetailTypeEnum.TEACHING)) {
|
|
|
+ teachingFee = teachingFee.add(orderDetail.getPrice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ row.setMusicalFee(musicalFee);
|
|
|
+ row.setTeachingFee(teachingFee);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -192,7 +210,7 @@ public class ExportController extends BaseController {
|
|
|
String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "支付金额", "到账时间",
|
|
|
"关联乐团ID/VIP课ID","课程形态","押金","乐器","教辅费用","零星收款费用","零星收款类别","手续费","专业","分部","单位/学校","备注"};
|
|
|
String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "actualAmount", "payTime", "musicGroupId",
|
|
|
- "groupType", "groupType","groupType","groupType","SporadicAmount","SporadicAmount","groupType","groupType","groupType","groupType","memo"};
|
|
|
+ "groupType","musicalFee","musicalFee","teachingFee","SporadicAmount","SporadicAmount","transferFee","groupType","groupType","groupType","memo"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderPageInfo.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|