|
@@ -47,6 +47,7 @@ import java.util.concurrent.Executors;
|
|
|
import java.util.function.BiFunction;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
import static com.ym.mec.biz.dal.enums.OrderTypeEnum.OUTORDER;
|
|
|
|
|
@@ -339,7 +340,7 @@ public class ExportServiceImpl implements ExportService {
|
|
|
exportManageFuncMap.put(ExportEnum.ROUTE_ORDER_LIST2, (info,headColumns) -> routeOrderList(info,headColumns));
|
|
|
exportManageFuncMap.put(ExportEnum.ORDER_LIST1, (info,headColumns) -> orderList(info,headColumns));
|
|
|
exportManageFuncMap.put(ExportEnum.ORDER_LIST2, (info,headColumns) -> orderList(info,headColumns));
|
|
|
- exportManageFuncMap.put(ExportEnum.ORDER_LIST_SUM, (info,headColumns) -> orderList(info,headColumns));
|
|
|
+ exportManageFuncMap.put(ExportEnum.ORDER_LIST_SUM, (info,headColumns) -> orderListSum(info,headColumns));
|
|
|
exportManageFuncMap.put(ExportEnum.STUDENT_VIP_PRACTICE, (info,headColumns) -> exportStudentVipPractice(info,headColumns));
|
|
|
exportManageFuncMap.put(ExportEnum.STUDENT_VIP_COURSE_INFO, (info,headColumns) -> exportStudentVipCourseInfo(info,headColumns));
|
|
|
exportManageFuncMap.put(ExportEnum.STUDENT_MUSIC_THEORY_COURSE_INFO, (info,headColumns) -> exportStudentMusicTheoryCourseInfo(info,headColumns));
|
|
@@ -1982,46 +1983,15 @@ public class ExportServiceImpl implements ExportService {
|
|
|
@Override
|
|
|
public void orderListSum(Map<String, Object> params, ManagerDownload managerDownload,List<String> headColumns) throws FileNotFoundException {
|
|
|
List<StudentPaymentOrderExportDto> studentPaymentOrderExportDtos = studentPaymentOrderService.ExportQueryPage(params);
|
|
|
- long i = 1;
|
|
|
- Map<Integer, String> cooperationOrganMap = new HashMap<>();
|
|
|
- List<Integer> cooperationOrganIds = studentPaymentOrderExportDtos.stream()
|
|
|
- .filter(e -> OUTORDER.equals(e.getType()))
|
|
|
- .filter(e -> e.getMusicGroupId() != null)
|
|
|
- .map(e -> Integer.valueOf(e.getMusicGroupId()))
|
|
|
- .distinct()
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (cooperationOrganIds.size() > 0) {
|
|
|
- List<CooperationOrgan> cooperationOrgans = cooperationOrganDao.getCooperationOrganByIds(cooperationOrganIds);
|
|
|
- cooperationOrganMap = cooperationOrgans.stream().collect(Collectors.toMap(CooperationOrgan::getId, CooperationOrgan::getName));
|
|
|
- }
|
|
|
-
|
|
|
//获取机构费率
|
|
|
Integer tenantId = (Integer) params.get("tenantId");
|
|
|
TenantConfig tenantConfig = tenantConfigService.queryByTenantId(tenantId);
|
|
|
- //获取缴费项目编号
|
|
|
- List<Long> calenderIds = studentPaymentOrderExportDtos.stream().map(e -> e.getCalenderId()).filter(e -> e != null).distinct().collect(Collectors.toList());
|
|
|
- Map<Long, Integer> calenderCooperationMap = new HashMap<>();
|
|
|
- Map<Integer, String> firstMusicMap = new HashMap<>();
|
|
|
- if(calenderIds != null && calenderIds.size() > 0){
|
|
|
- //获取缴费项目关联的合作单位
|
|
|
- calenderCooperationMap = musicGroupPaymentCalenderService.findCooperationByIds(calenderIds);
|
|
|
- //获取合作单位第一个乐团
|
|
|
- firstMusicMap = MapUtil.convertMybatisMap(cooperationOrganDao.findFirstMusic());
|
|
|
- }
|
|
|
- List<Integer> studentIds = studentPaymentOrderExportDtos.stream().map(e -> e.getUserId()).distinct().collect(Collectors.toList());
|
|
|
- //获取学员第一个课程组编号
|
|
|
- Map<Integer, String> userFirstVipMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.findUserFirstVipMap("VIP",studentIds));
|
|
|
- //获取学员第一个网管课课程组编号
|
|
|
- Map<Integer, String> userFirstPracticeMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.findUserFirstVipMap("PRACTICE",studentIds));
|
|
|
- //获取学员最近加入的一个乐团编号
|
|
|
- Map<Integer, String> userLastMusicIdMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupId(studentIds));
|
|
|
- Map<Integer, String> userLastMusicNameMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupName(studentIds));
|
|
|
- Set<String> musicGroupIds = studentPaymentOrderExportDtos.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toSet());
|
|
|
- Map<String, String> musicGroupNameMap = new HashMap<>();
|
|
|
- if(musicGroupIds != null && musicGroupIds.size() > 0){
|
|
|
- musicGroupNameMap = MapUtil.convertIntegerMap(musicGroupDao.queryMusicGroupNameMap(musicGroupIds));
|
|
|
+ //获取外部订单的商品销售金额
|
|
|
+ List<Long> outOrderList = studentPaymentOrderExportDtos.stream().filter(e -> e.getType() == OUTORDER).map(e -> e.getId()).collect(Collectors.toList());
|
|
|
+ Map<Long,BigDecimal> outOrderAmountMap = new HashMap<>();
|
|
|
+ if(org.apache.commons.collections.CollectionUtils.isNotEmpty(outOrderList)){
|
|
|
+ outOrderAmountMap = MapUtil.convertIntegerMap(sellOrderDao.sumOutOrderAmount(outOrderList));
|
|
|
}
|
|
|
-
|
|
|
for (StudentPaymentOrderExportDto row : studentPaymentOrderExportDtos) {
|
|
|
if (row.getActualAmount() == null) {
|
|
|
row.setActualAmount(BigDecimal.ZERO);
|
|
@@ -2029,43 +1999,12 @@ public class ExportServiceImpl implements ExportService {
|
|
|
if (row.getBalancePaymentAmount() == null) {
|
|
|
row.setBalancePaymentAmount(BigDecimal.ZERO);
|
|
|
}
|
|
|
- if (row.getMemo() == null) {
|
|
|
- row.setMemo("");
|
|
|
- }
|
|
|
BigDecimal transferFee = BigDecimal.ZERO;
|
|
|
if (row.getPaymentChannel() != null && row.getPaymentChannel().equals("ADAPAY")) {
|
|
|
transferFee = row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
|
|
|
}
|
|
|
row.setTransferFee(transferFee);
|
|
|
row.setPlatformFee(row.getActualAmount().multiply(tenantConfig.getChargeRate()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP));
|
|
|
-
|
|
|
- Long calenderId = row.getCalenderId();
|
|
|
- if(calenderId != null){
|
|
|
- row.setFeeMusicGroupId(row.getMusicGroupId());
|
|
|
- row.setFeeMusicGroupName(musicGroupNameMap.get(row.getMusicGroupId()));
|
|
|
- OrderTypeEnum orderTypeEnum = row.getType();
|
|
|
- if(orderTypeEnum == OrderTypeEnum.APPLY || orderTypeEnum == OrderTypeEnum.ADD_STUDENT){
|
|
|
- Integer cooperationId = calenderCooperationMap.get(calenderId);
|
|
|
- if(cooperationId != null){
|
|
|
- String firstMusicId = firstMusicMap.get(cooperationId);
|
|
|
- if(StringUtils.isEmpty(firstMusicId)){
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
|
|
|
- }else {
|
|
|
- if(Objects.equals(firstMusicId,row.getMusicGroupId())){
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
|
|
|
- }else {
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.ADD_MUSIC);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }else {
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RENEW_MUSIC);
|
|
|
- }
|
|
|
- }else {
|
|
|
- row.setFeeMusicGroupId(userLastMusicIdMap.get(row.getUserId()));
|
|
|
- row.setFeeMusicGroupName(userLastMusicNameMap.get(row.getUserId()));
|
|
|
- }
|
|
|
- String goodsName = "";
|
|
|
if (row.getOrderDetailList() != null) {
|
|
|
for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
|
|
|
switch (orderDetail.getType()) {
|
|
@@ -2129,15 +2068,6 @@ public class ExportServiceImpl implements ExportService {
|
|
|
vipCourseFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
|
|
|
}
|
|
|
row.setVipCourseFee(vipCourseFee);
|
|
|
- if(row.getTypeDesc() == null){
|
|
|
- //学员没有历史VIP课程则导出为【VIP课新增】
|
|
|
- //学员有历史VIP课程到导出为【VIP课续费]
|
|
|
- if(Objects.equals(userFirstVipMap.get(row.getUserId()),row.getMusicGroupId())){
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_VIP);
|
|
|
- }else {
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RENEW_VIP);
|
|
|
- }
|
|
|
- }
|
|
|
break;
|
|
|
case THEORY_COURSE:
|
|
|
BigDecimal theoryCourseFee = BigDecimal.ZERO;
|
|
@@ -2151,30 +2081,9 @@ public class ExportServiceImpl implements ExportService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (row.getGoodsList() != null) {
|
|
|
- goodsName = row.getGoodsList().stream().map(Goods::getName).collect(Collectors.joining("|"));
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(goodsName)) {
|
|
|
- row.setMemo(goodsName);
|
|
|
- }
|
|
|
//专业
|
|
|
if (row.getGroupType().equals(GroupType.VIP)) {
|
|
|
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());
|
|
|
- row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
|
|
|
- }
|
|
|
- if(row.getTypeDesc() == null){
|
|
|
- //学员没有历史VIP课程则导出为【VIP课新增】
|
|
|
- //学员有历史VIP课程到导出为【VIP课续费]
|
|
|
- if(Objects.equals(userFirstVipMap.get(row.getUserId()),row.getMusicGroupId())){
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_VIP);
|
|
|
- }else {
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RENEW_VIP);
|
|
|
- }
|
|
|
- }
|
|
|
}else if(row.getGroupType() == GroupType.ACTIVITY){
|
|
|
row.setVipCourseFee(row.getActualAmount());
|
|
|
}else if(row.getGroupType() == GroupType.MEMBER){
|
|
@@ -2220,44 +2129,18 @@ public class ExportServiceImpl implements ExportService {
|
|
|
row.setOtherFee(row.getActualAmount());
|
|
|
}
|
|
|
}
|
|
|
- if (row.getChargeType() != null) {
|
|
|
- for (SporadicChargeTypeEnum chargeType : SporadicChargeTypeEnum.values()) {
|
|
|
- if (!chargeType.getCode().equals(row.getChargeType())) continue;
|
|
|
- row.setSporadicType(chargeType.getMsg());
|
|
|
- }
|
|
|
- }
|
|
|
} else if (row.getGroupType().equals(GroupType.PRACTICE)) {
|
|
|
row.setPracticeCourseFee(row.getActualAmount());
|
|
|
- PracticeCourseDto practiceGroup = practiceGroupDao.findByGroupId(Integer.parseInt(row.getMusicGroupId()));
|
|
|
- if (practiceGroup != null) {
|
|
|
- row.setSubjectName(practiceGroup.getSubjectName());
|
|
|
- row.setEduTeacher(practiceGroup.getEduTeacherName());
|
|
|
- }
|
|
|
- if(row.getTypeDesc() == null){
|
|
|
- if(Objects.equals(userFirstPracticeMap.get(row.getUserId()),row.getMusicGroupId())){
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_PRACTICE);
|
|
|
- }else {
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RENEW_PRACTICE);
|
|
|
- }
|
|
|
- }
|
|
|
} else if (row.getGroupType().equals(GroupType.REPLACEMENT)) {
|
|
|
row.setMusicalFee(row.getActualAmount());
|
|
|
- ReplacementInstrumentActivityStatDto info = replacementInstrumentActivityDao.getInfo(Integer.parseInt(row.getMusicGroupId()));
|
|
|
- if (info != null) {
|
|
|
- row.setSubjectName(info.getSubjectName());
|
|
|
- row.setCooperationOrganName(info.getCooperationOrganName());
|
|
|
- row.setMemo(info.getBrand() + "(" + info.getSpecification() + ")");
|
|
|
- CooperationOrgan cooperationOrganEduTeacher = musicGroupDao.findCooperationOrganEduTeacher(info.getCooperationOrganId());
|
|
|
- if (cooperationOrganEduTeacher != null) {
|
|
|
- row.setEduTeacher(cooperationOrganEduTeacher.getLinkman());
|
|
|
- }
|
|
|
- }
|
|
|
} else if (row.getGroupType().equals(GroupType.GOODS_SELL)) {
|
|
|
row.setRetailGoodsFee(row.getActualAmount());
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RETAIL_GOODS);
|
|
|
} else if (row.getGroupType().equals(GroupType.OUTORDER)) {
|
|
|
- row.setLargeMusicalFee(row.getActualAmount());
|
|
|
- row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.LARGE_MUSICAL);
|
|
|
+ if(outOrderAmountMap.get(row.getId()) == null){
|
|
|
+ row.setCourseSchoolBuyAmount(row.getActualAmount());
|
|
|
+ }else {
|
|
|
+ row.setLargeMusicalFee(row.getActualAmount());
|
|
|
+ }
|
|
|
} else {
|
|
|
StudentPaymentOrderExportDto feeByType = sellOrderDao.getFeeByType(row.getId());
|
|
|
BigDecimal childRepairFee = sellOrderDao.getChildRepair(row.getId());
|
|
@@ -2266,56 +2149,45 @@ public class ExportServiceImpl implements ExportService {
|
|
|
row.setMaintenanceProductFee(feeByType.getRepairFee().add(childRepairFee));
|
|
|
row.setOtherFee(feeByType.getOtherFee());
|
|
|
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());
|
|
|
- row.setEduTeacher(studentRegistration.getName());
|
|
|
- }
|
|
|
row.setMusicGroupCourseFee(feeByType.getActualAmount().subtract(feeByType.getMusicalFee()).subtract(row.getTeachingFee()).subtract(row.getMaintenanceFee()).subtract(row.getMaintenanceProductFee()).subtract(feeByType.getOtherFee()).subtract(row.getLeaseFee()).subtract(row.getCloudTeacherFee()));
|
|
|
} else if (row.getType().equals(OrderTypeEnum.REPAIR)) {
|
|
|
row.setRepairFee(feeByType.getActualAmount().subtract(feeByType.getMusicalFee()).subtract(feeByType.getTeachingFee()).subtract(feeByType.getOtherFee()));
|
|
|
} else if (row.getType().equals(OUTORDER)) {
|
|
|
row.setMusicGroupCourseFee(feeByType.getActualAmount().subtract(feeByType.getMusicalFee()).subtract(row.getTeachingFee()).subtract(row.getMaintenanceProductFee()).subtract(feeByType.getOtherFee()));
|
|
|
- row.setTransferFee(BigDecimal.ZERO);
|
|
|
- row.setPlatformFee(BigDecimal.ZERO);
|
|
|
}
|
|
|
}
|
|
|
- //如果合作单位不存在取学员的第一个乐团的合作单位,乐团主管
|
|
|
- if (row.getCooperationOrganName() == null) {
|
|
|
- CooperationOrgan cooperationOrgan = studentService.getStudentEduTeacher(row.getUserId());
|
|
|
- if (cooperationOrgan != null) {
|
|
|
- row.setCooperationOrganName(cooperationOrgan.getName());
|
|
|
- row.setEduTeacher(cooperationOrgan.getLinkman() != null ? cooperationOrgan.getLinkman() : row.getEduTeacher());
|
|
|
- }
|
|
|
- }
|
|
|
- if (row.getType().equals(OUTORDER) && row.getMusicGroupId() != null) {
|
|
|
- if (cooperationOrganMap.containsKey(Integer.valueOf(row.getMusicGroupId()))) {
|
|
|
- row.setCooperationOrganName(cooperationOrganMap.get(Integer.valueOf(row.getMusicGroupId())));
|
|
|
- CooperationOrgan cooperationOrganEduTeacher = musicGroupDao.findCooperationOrganEduTeacher(Integer.valueOf(row.getMusicGroupId()));
|
|
|
- if (cooperationOrganEduTeacher != null) {
|
|
|
- row.setEduTeacher(cooperationOrganEduTeacher.getLinkman());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (row.getMusicGroupId() != null && row.getMusicGroupId().equals("null")) {
|
|
|
- row.setMusicGroupId("");
|
|
|
- }
|
|
|
- String paymentChannel = "";
|
|
|
- if (row.getPaymentChannel() == null) {
|
|
|
- } else if (row.getPaymentChannel().equals("YQPAY")) {
|
|
|
- paymentChannel = "双乾";
|
|
|
- } else if (row.getPaymentChannel().equals("ADAPAY")) {
|
|
|
- paymentChannel = "汇付";
|
|
|
- } else if (row.getPaymentChannel().equals("BALANCE")) {
|
|
|
- paymentChannel = "余额";
|
|
|
- }
|
|
|
- row.setPaymentChannel(paymentChannel);
|
|
|
- row.setId(i);
|
|
|
row.setRepairFee(row.getRepairFee().add(row.getMaintenanceProductFee()));
|
|
|
row.setOrderAmount(row.getExpectAmount().add(row.getCouponRemitFee()));
|
|
|
- i++;
|
|
|
+ }
|
|
|
+ List<StudentPaymentOrderExportDto> exportDtoList = new ArrayList<>();
|
|
|
+ Map<Integer, List<StudentPaymentOrderExportDto>> collect = studentPaymentOrderExportDtos.stream().collect(Collectors.groupingBy(StudentPaymentOrderExportDto::getOrganId));
|
|
|
+ for (Integer organId : collect.keySet()) {
|
|
|
+ StudentPaymentOrderExportDto exportDto = new StudentPaymentOrderExportDto();
|
|
|
+ List<StudentPaymentOrderExportDto> orderExportDtos = collect.get(organId);
|
|
|
+ exportDto.setOrganName(orderExportDtos.stream().map(e->e.getOrganName()).findAny().get());
|
|
|
+ exportDto.setOrderAmount(orderExportDtos.stream().map(e -> e.getOrderAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setExpectAmount(orderExportDtos.stream().map(e -> e.getExpectAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setActualAmount(orderExportDtos.stream().map(e -> e.getActualAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setBalancePaymentAmount(orderExportDtos.stream().map(e -> e.getBalancePaymentAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setCouponRemitFee(orderExportDtos.stream().map(e -> e.getCouponRemitFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setMusicGroupCourseFee(orderExportDtos.stream().map(e -> e.getMusicGroupCourseFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setCourseSchoolBuyAmount(orderExportDtos.stream().map(e -> e.getCourseSchoolBuyAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setVipCourseFee(orderExportDtos.stream().map(e -> e.getVipCourseFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setPracticeCourseFee(orderExportDtos.stream().map(e -> e.getPracticeCourseFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setTheoryCourseFee(orderExportDtos.stream().map(e -> e.getTheoryCourseFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setDegreeFee(orderExportDtos.stream().map(e -> e.getDegreeFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setRepairFee(orderExportDtos.stream().map(e -> e.getRepairFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setMaintenanceFee(orderExportDtos.stream().map(e -> e.getMaintenanceFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setCloudTeacherFee(orderExportDtos.stream().map(e -> e.getCloudTeacherFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setLeaseFee(orderExportDtos.stream().map(e -> e.getLeaseFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setMusicalFee(orderExportDtos.stream().map(e -> e.getMusicalFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setTeachingFee(orderExportDtos.stream().map(e -> e.getTeachingFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setVisitFee(orderExportDtos.stream().map(e -> e.getVisitFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setRechargeFee(orderExportDtos.stream().map(e -> e.getRechargeFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setRetailGoodsFee(orderExportDtos.stream().map(e -> e.getRetailGoodsFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setLargeMusicalFee(orderExportDtos.stream().map(e -> e.getLargeMusicalFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDto.setOtherFee(orderExportDtos.stream().map(e -> e.getOtherFee()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
+ exportDtoList.add(exportDto);
|
|
|
}
|
|
|
|
|
|
String basePath = new ApplicationHome(this.getClass()).getSource().getParentFile().getPath();
|
|
@@ -2324,10 +2196,10 @@ public class ExportServiceImpl implements ExportService {
|
|
|
|
|
|
HSSFWorkbook workbook = null;
|
|
|
try {
|
|
|
- Map<String, String> headMap = getExportMap(new ExportDto(ExportEnum.ORDER_LIST1, headColumns));
|
|
|
+ Map<String, String> headMap = getExportMap(new ExportDto(ExportEnum.ORDER_LIST_SUM, headColumns));
|
|
|
String[] header = headMap.keySet().toArray(new String[headMap.keySet().size()]);
|
|
|
String[] body = headMap.values().toArray(new String[headMap.keySet().size()]);
|
|
|
- workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
|
|
|
+ workbook = POIUtil.exportExcel(header, body, exportDtoList);
|
|
|
workbook.write(fileOutputStream);
|
|
|
fileOutputStream.getFD().sync();
|
|
|
fileOutputStream.close();
|