浏览代码

feature:处方

wuyongyi 2 年之前
父节点
当前提交
87b9a36ac4
共有 1 个文件被更改,包括 5 次插入44 次删除
  1. 5 44
      src/main/java/com/ywt/mg/services/PrescriptionServices.java

+ 5 - 44
src/main/java/com/ywt/mg/services/PrescriptionServices.java

@@ -927,15 +927,7 @@ public class PrescriptionServices {
             request.setPaymentChannel(PaymentChannelEnum.WeChat.getValue() + "");
             List<PrescriptionInfo> prescriptionInfoList = downloadPrescriptionlistNew(request);
             ExcelDataMap map = new ExcelDataMap(columns);
-            int payTotal = 0, refundTotal = 0, realTotal = 0,
-                    weChatPay = 0, weChatRefundTotal = 0, weChatRealTotal = 0,
-                    aliPay = 0, aliRefundTotal = 0, aliRealTotal = 0,
-                    cashPay = 0, cashRefundTotal = 0, cashRealTotal = 0,
-                    medicalCardPay = 0, medicalCardRefundTotal = 0, medicalCardRealTotal = 0,
-                    posPay = 0, posRefundTotal = 0, posRealTotal = 0,
-                    medicalInsurancePay = 0, medicalInsuranceRefundTotal = 0, medicalInsuranceRealTotal = 0,
-                    icbcPay = 0, icbcRefundTotal = 0, icbcRealTotal = 0,
-                    pharmacyPosPay = 0, pharmacyPosRefundTotal = 0, pharmacyPosTotal = 0;
+            int payTotal = 0, refundTotal = 0, rowSize = 0;
             if (!Checker.isNone(prescriptionInfoList)) {
 
                 // 得到支付的记录日志(需要从 order_payment 获取 transaction_id 字段)
@@ -973,6 +965,7 @@ public class PrescriptionServices {
                             map.getStringListSafely(col4).add(orderNo);
                             map.getStringListSafely(col5).add(typeStr);
                             map.getStringListSafely(col6).add(paymentChannel);
+                            rowSize++;
 
                         }
                     }
@@ -1010,6 +1003,7 @@ public class PrescriptionServices {
                             map.getStringListSafely(col4).add(orderNo);
                             map.getStringListSafely(col5).add(typeName);
                             map.getStringListSafely(col6).add(paymentChannel);
+                            rowSize++;
                         }
                     }
 
@@ -1021,49 +1015,16 @@ public class PrescriptionServices {
                     if (presStatus == PrescriptionInfoStatusEnum.HaveARefund.getValue()) {
                         refundTotal += Checker.getIntegerValue(p.getTotalPrice());
 
-                        if (payChanelInt == PresPaymentChannelEnum.WeChat.getValue()) {
-                            weChatRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.AliPay.getValue()) {
-                            aliRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.Cash.getValue()) {
-                            cashRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.MedicalCard.getValue()) {
-                            medicalCardRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.POS.getValue()) {
-                            posRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.MedicalInsurance.getValue()) {
-                            medicalInsuranceRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.ICBC.getValue()) {
-                            icbcRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.PharmacyPOS.getValue()) {
-                            pharmacyPosRefundTotal += Checker.getIntegerValue(p.getTotalPrice());
-                        }
                     }
                     if (paymentStatusInt == PaymentStatusEnum.Success.getValue()) {
                         payTotal += Checker.getIntegerValue(p.getTotalPrice());
 
-                        if (payChanelInt == PresPaymentChannelEnum.WeChat.getValue()) {
-                            weChatPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.AliPay.getValue()) {
-                            aliPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.Cash.getValue()) {
-                            cashPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.MedicalCard.getValue()) {
-                            medicalCardPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.POS.getValue()) {
-                            posPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.MedicalInsurance.getValue()) {
-                            medicalInsurancePay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.ICBC.getValue()) {
-                            icbcPay += Checker.getIntegerValue(p.getTotalPrice());
-                        } else if (payChanelInt == PresPaymentChannelEnum.PharmacyPOS.getValue()) {
-                            pharmacyPosPay += Checker.getIntegerValue(p.getTotalPrice());
-                        }
+
                     }
                 }
             }
             int size = prescriptionInfoList.size();
-            List<ExcelCollectPojo> itemList = getStatisticsData(size, payTotal, refundTotal, prescriptionInfoList);
+            List<ExcelCollectPojo> itemList = getStatisticsData(rowSize, payTotal, refundTotal, prescriptionInfoList);
             downloadRecordService.createFileAndUploadOssAndSaveToDataBase(fileName, downloadRecordId, map, itemList, size);
         } catch (Exception e) {
             e.printStackTrace();