From e3aed650aa4e232f4583a00fc3de088276a2188b Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 15 一月 2022 13:41:18 +0800
Subject: [PATCH] 优化代码

---
 java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
index 36a6396..0918722 100755
--- a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
+++ b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
@@ -1,5 +1,7 @@
 package com.java110.core.smo.impl;
 
+import com.java110.config.properties.code.Java110Properties;
+import com.java110.core.context.Environment;
 import com.java110.core.smo.IComputeFeeSMO;
 import com.java110.dto.RoomDto;
 import com.java110.dto.community.CommunityDto;
@@ -84,6 +86,9 @@
 
     @Autowired(required = false)
     private ITempCarFeeConfigAttrInnerServiceSMO tempCarFeeConfigAttrInnerServiceSMOImpl;
+
+    @Autowired
+    private Java110Properties java110Properties;
 
     @Override
     public Date getFeeEndTime() {
@@ -904,6 +909,9 @@
         BigDecimal feePrice = new BigDecimal("0.0");
         BigDecimal feeTotalPrice = new BigDecimal(0.0);
         Map<String, Object> feeAmount = new HashMap<>();
+        if(Environment.isOwnerPhone(java110Properties)){
+            return getOwnerPhoneFee(feeAmount);
+        }
         if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) { //鎴垮眿鐩稿叧
             String computingFormula = feeDto.getComputingFormula();
             if (roomDto == null) {
@@ -1235,6 +1243,7 @@
                 throw new IllegalArgumentException("鏆備笉鏀寔璇ョ被鍏紡");
             }
         }
+
         feePrice.setScale(3, BigDecimal.ROUND_HALF_EVEN).doubleValue();
         feeAmount.put("feePrice", feePrice);
         feeAmount.put("feeTotalPrice", feeTotalPrice);
@@ -1525,6 +1534,16 @@
         return resMonth;
     }
 
+
+    public Map getOwnerPhoneFee(Map feeAmount){
+        if(Environment.testEnv()){
+            feeAmount.put("feePrice",new BigDecimal("0.01"));
+            feeAmount.put("feeTotalPrice", new BigDecimal("0.01"));
+        }
+        return feeAmount;
+    }
+
+
     /**
      * 銆�銆� *瀛楃涓茬殑鏃ユ湡鏍煎紡鐨勮绠�
      */

--
Gitblit v1.8.0