|
@@ -3,7 +3,6 @@ package com.ywt.mg.services;
|
|
|
import com.ywt.mg.core.SqlHelper;
|
|
|
import com.ywt.mg.core.utils.Checker;
|
|
|
import com.ywt.mg.core.utils.DateUtil;
|
|
|
-import com.ywt.mg.core.utils.ExcelHelper;
|
|
|
import com.ywt.mg.core.utils.FormatUtil;
|
|
|
import com.ywt.mg.domain.entities.*;
|
|
|
import com.ywt.mg.domain.models.ConstantDef;
|
|
@@ -396,6 +395,9 @@ public class RegisteredOrderService {
|
|
|
}
|
|
|
String transactionId = orderPaymentService.getTransactionIdByOrderId(orderPaymentList, Checker.getIntegerValue(p.getOrderId()));
|
|
|
String paymentChannel = PaymentChannelEnum.getDisplayName(Checker.getIntegerValue(p.getPaymentChannel()));
|
|
|
+ if (p.getPaymentChannel() == PaymentChannelEnum.FREE.getValue()) {
|
|
|
+ paymentChannel = "";
|
|
|
+ }
|
|
|
if (hosp > 0) {
|
|
|
map.getStringListSafely(col0).add(p.getOrderNo());
|
|
|
map.getStringListSafely(col1).add(p.getPaymentNo());
|
|
@@ -590,15 +592,17 @@ public class RegisteredOrderService {
|
|
|
if (!Checker.isNone(paymentChannelList)) {
|
|
|
for (int i = 0, j = paymentChannelList.size(); i < j; i++) {
|
|
|
int paymentChannel = paymentChannelList.get(i).intValue();
|
|
|
- if (paymentChannel <= 0) continue;
|
|
|
- startRows += 1;
|
|
|
- String paymentChannelName = PaymentChannelEnum.getDisplayName(paymentChannel);
|
|
|
- // 按支付渠道统计
|
|
|
- int paymentAmount = paymentList.stream().filter(p -> Checker.getIntegerValue(p.getPaymentChannel()) == paymentChannel).mapToInt(RegisteredOrder::getTotal).sum();
|
|
|
- int refundAmount = refundList.stream().filter(p -> Checker.getIntegerValue(p.getPaymentChannel()) == paymentChannel).mapToInt(RegisteredOrder::getTotal).sum();
|
|
|
- customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows, new String[]{paymentChannelName + "支付总额", FormatUtil.intShrink100ToStr(paymentAmount)}));
|
|
|
- customExcelItemList.add(new ExcelCollectPojo(startColumn + 3, startRows, new String[]{paymentChannelName + "退款总额", FormatUtil.intShrink100ToStr(refundAmount)}));
|
|
|
- customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows, new String[]{paymentChannelName + "实际支付金额", FormatUtil.intShrink100ToStr(paymentAmount - refundAmount)}));
|
|
|
+ if (paymentChannel != PaymentChannelEnum.FREE.getValue()) {
|
|
|
+ if (paymentChannel <= 0) continue;
|
|
|
+ startRows += 1;
|
|
|
+ String paymentChannelName = PaymentChannelEnum.getDisplayName(paymentChannel);
|
|
|
+ // 按支付渠道统计
|
|
|
+ int paymentAmount = paymentList.stream().filter(p -> Checker.getIntegerValue(p.getPaymentChannel()) == paymentChannel).mapToInt(RegisteredOrder::getTotal).sum();
|
|
|
+ int refundAmount = refundList.stream().filter(p -> Checker.getIntegerValue(p.getPaymentChannel()) == paymentChannel).mapToInt(RegisteredOrder::getTotal).sum();
|
|
|
+ customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows, new String[]{paymentChannelName + "支付总额", FormatUtil.intShrink100ToStr(paymentAmount)}));
|
|
|
+ customExcelItemList.add(new ExcelCollectPojo(startColumn + 3, startRows, new String[]{paymentChannelName + "退款总额", FormatUtil.intShrink100ToStr(refundAmount)}));
|
|
|
+ customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows, new String[]{paymentChannelName + "实际支付金额", FormatUtil.intShrink100ToStr(paymentAmount - refundAmount)}));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -649,6 +653,9 @@ public class RegisteredOrderService {
|
|
|
// 支付渠道
|
|
|
int paymentChannelInt = Checker.getIntegerValue(p.getPaymentChannel());
|
|
|
String paymentChannel = PaymentChannelEnum.getDisplayName(paymentChannelInt);
|
|
|
+ if (p.getPaymentChannel() == PaymentChannelEnum.FREE.getValue()) {
|
|
|
+ paymentChannel = "";
|
|
|
+ }
|
|
|
|
|
|
map.getStringListSafely(col0).add(type);
|
|
|
map.getStringListSafely(col1).add(transactionId);
|
|
@@ -681,6 +688,10 @@ public class RegisteredOrderService {
|
|
|
// 支付渠道
|
|
|
int paymentChannelInt = Checker.getIntegerValue(p.getPaymentChannel());
|
|
|
String paymentChannel = PaymentChannelEnum.getDisplayName(paymentChannelInt);
|
|
|
+ if (p.getPaymentChannel() == PaymentChannelEnum.FREE.getValue()) {
|
|
|
+ paymentChannel = "";
|
|
|
+ }
|
|
|
+
|
|
|
map.getStringListSafely(col0).add(type);
|
|
|
map.getStringListSafely(col1).add(transactionId);
|
|
|
map.getStringListSafely(col2).add(totalStr);
|