|
@@ -7,6 +7,7 @@ import com.ywt.mg.domain.entities.OrderPayment;
|
|
import com.ywt.mg.domain.models.ConstantDef;
|
|
import com.ywt.mg.domain.models.ConstantDef;
|
|
import com.ywt.mg.domain.models.ExcelDataMap;
|
|
import com.ywt.mg.domain.models.ExcelDataMap;
|
|
import com.ywt.mg.domain.models.enums.*;
|
|
import com.ywt.mg.domain.models.enums.*;
|
|
|
|
+import com.ywt.mg.domain.models.pojo.ExcelCollectPojo;
|
|
import com.ywt.mg.domain.ywtDrugEntities.Pharmacy;
|
|
import com.ywt.mg.domain.ywtDrugEntities.Pharmacy;
|
|
import com.ywt.mg.domain.ywtDrugEntities.PrescriptionInfo;
|
|
import com.ywt.mg.domain.ywtDrugEntities.PrescriptionInfo;
|
|
import com.ywt.mg.params.prescription.QueryPrescriptionListRequest;
|
|
import com.ywt.mg.params.prescription.QueryPrescriptionListRequest;
|
|
@@ -38,6 +39,10 @@ public class PrescriptionServices {
|
|
@Autowired
|
|
@Autowired
|
|
private CommonServices commonServices;
|
|
private CommonServices commonServices;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private DownloadRecordService downloadRecordService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据条件查询用药记录
|
|
* 根据条件查询用药记录
|
|
@@ -394,9 +399,58 @@ public class PrescriptionServices {
|
|
map.getStringListSafely(col17).add(cancelStatusStr);
|
|
map.getStringListSafely(col17).add(cancelStatusStr);
|
|
map.getStringListSafely(col18).add(Checker.getStringValue(p.getCancelRemark()));
|
|
map.getStringListSafely(col18).add(Checker.getStringValue(p.getCancelRemark()));
|
|
|
|
|
|
|
|
+ //统计支付总额和退费总额
|
|
|
|
+ int paymentStatusInt = Checker.getIntegerValue(p.getPaymentStatus());
|
|
|
|
+ int presStatus = Checker.getIntegerValue(p.getStatus());
|
|
|
|
+ int payChanelInt = Checker.getIntegerValue(p.getPaymentChannel());
|
|
|
|
+
|
|
|
|
+ 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());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ 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());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ int size = prescriptionInfoList.size();
|
|
|
|
+// List<ExcelCollectPojo> itemList = getStatisticsData(size, payTotal);
|
|
|
|
+// downloadRecordService.createFileAndUploadOssAndSaveToDataBase(fileName, downloadRecordId, map, itemList);
|
|
|
|
+
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|