Browse Source

feature:押金订单,线下

wuyongyi 2 years ago
parent
commit
4d396ea8a1

+ 23 - 13
src/main/java/com/ywt/mg/services/DepositService.java

@@ -375,7 +375,8 @@ public class DepositService {
             String col3 = "交易日期*";
             String col4 = "订单号";
             String col5 = "类型";
-            String[] columns = new String[]{col0, col1, col2, col3, col4, col5};
+            String col6 = "支付渠道";
+            String[] columns = new String[]{col0, col1, col2, col3, col4, col5, col6};
 
             PagedList<DepositOrderInfo> depositPageList = queryDepositPageList(request);
             ExcelDataMap map = new ExcelDataMap(columns);
@@ -391,7 +392,8 @@ public class DepositService {
                         col2,
                         col3,
                         col4,
-                        col5);
+                        col5,
+                        col6);
 
                 if (size > 1) {
                     for (int i = 2; i <= size; i++) {
@@ -404,7 +406,8 @@ public class DepositService {
                                 col2,
                                 col3,
                                 col4,
-                                col5);
+                                col5,
+                                col6);
                     }
                 }
 
@@ -419,16 +422,17 @@ public class DepositService {
     }
 
 
-        private ExcelDataMap setBillDeposit (QueryDepositListRequest
-        request, PagedList < DepositOrderInfo > depositPageList, List < OrderPayment > orderPaymentList, ExcelDataMap
-        map, Map<String, Integer> statisticalDataMap,
-                String col0,
-                String col1,
-                String col2,
-                String col3,
-                String col4,
-                String col5
-    ){
+        private ExcelDataMap setBillDeposit(QueryDepositListRequest
+                                                    request, PagedList<DepositOrderInfo> depositPageList, List<OrderPayment> orderPaymentList, ExcelDataMap
+                                                    map, Map<String, Integer> statisticalDataMap,
+                                            String col0,
+                                            String col1,
+                                            String col2,
+                                            String col3,
+                                            String col4,
+                                            String col5,
+                                            String col6
+        ){
             Date billStartTime = DateUtil.stringToDate(request.getBillStartTime() + ConstantDef.BILL_TIME_START_FORMAT);
             Date billEndTime = DateUtil.stringToDate(request.getBillEndTime() + ConstantDef.BILL_TIME_END_FORMAT);
             for (DepositOrderInfo p : depositPageList.getItems()) {
@@ -454,6 +458,10 @@ public class DepositService {
                         String orderNo = Checker.getStringValue(p.getOrderNo());
                         // 类型
                         String typeStr = "住院押金订单";
+
+                        int terminalId = Checker.getIntegerValue(p.getTerminal());
+                        String paymentChannel = PaymentChannelUtil.paymentChannel(terminalId);
+
 //                    String[] bodyStr = {type, transactionId, totalStr, paymentTimeStr, orderNo, typeStr};
                         map.getStringListSafely(col0).add(type);
                         map.getStringListSafely(col1).add(transactionId);
@@ -461,10 +469,12 @@ public class DepositService {
                         map.getStringListSafely(col3).add(paymentTimeStr);
                         map.getStringListSafely(col4).add(orderNo);
                         map.getStringListSafely(col5).add(typeStr);
+                        map.getStringListSafely(col6).add(paymentChannel);
 
 //                        OrderPayment orderPayment = orderPaymentList.stream().filter(o -> o.getOrderId().intValue() == p.getOrderId().intValue()).findFirst().orElse(null);
                         int paymentChannelInt = orderPaymentService.getPaymentChannelIntByOrderPayment(orderPayment);
 
+
                         String payKeyPrefix = "payTotal_", refundKeyPrefix = "refundTotal_";
                         String payKey = payKeyPrefix + paymentChannelInt;
                         String totalKey = "payTotal_" + 0;

+ 2 - 2
src/main/java/com/ywt/mg/services/OfflineNewService.java

@@ -380,8 +380,8 @@ public class OfflineNewService {
 
         List<ExcelCollectPojo> customExcelItemList = new ArrayList<>();
         customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows+ 1, new String[]{"支付总额", FormatUtil.intShrink100ToStr(payTotal)}));
-        customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows+ 1, new String[]{"退款总额", FormatUtil.intShrink100ToStr(refundTotal)}));
-        customExcelItemList.add(new ExcelCollectPojo(startColumn + 1, startRows+ 1, new String[]{"实际支付总额", FormatUtil.intShrink100ToStr(payTotal - refundTotal)}));
+        customExcelItemList.add(new ExcelCollectPojo(startColumn + 3, startRows+ 1, new String[]{"退款总额", FormatUtil.intShrink100ToStr(refundTotal)}));
+        customExcelItemList.add(new ExcelCollectPojo(startColumn + 5, startRows+ 1, new String[]{"实际支付总额", FormatUtil.intShrink100ToStr(payTotal - refundTotal)}));
         startRows++;
 
         PaymentChannelEnum[] paymentChannelList = PaymentChannelEnum.values();