Procházet zdrojové kódy

优化动态费用查询问题

java110 před 4 roky
rodič
revize
4fb9acf17e

+ 9 - 3
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java

@@ -167,7 +167,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
         feeDto.setDeadlineTime(targetEndDate);
 
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             //feeDto.setDeadlineTime(DateUtil.getCurrentDate()); 欠费日期不对先注释
         }
@@ -194,7 +196,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
         feeDto.setDeadlineTime(targetEndDate);
 
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             //feeDto.setDeadlineTime(DateUtil.getCurrentDate()); 欠费日期不对先注释
         }
@@ -220,7 +224,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
         feeDto.setDeadlineTime(targetEndDate);
 
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             //feeDto.setDeadlineTime(DateUtil.getCurrentDate()); 欠费日期不对先注释
         }

+ 9 - 3
service-api/src/main/java/com/java110/api/listener/fee/ListFeeListener.java

@@ -165,7 +165,9 @@ public class ListFeeListener extends AbstractServiceApiListener {
         curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth));
         feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + "");
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             feeDto.setDeadlineTime(DateUtil.getCurrentDate());
         }
@@ -185,7 +187,9 @@ public class ListFeeListener extends AbstractServiceApiListener {
         curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth));
         feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + "");
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             feeDto.setDeadlineTime(DateUtil.getCurrentDate());
         }
@@ -205,7 +209,9 @@ public class ListFeeListener extends AbstractServiceApiListener {
         curFeePrice = curFeePrice.multiply(new BigDecimal(oweMonth));
         feeDto.setAmountOwed(curFeePrice.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() + "");
         //动态费用
-        if ("4004".equals(computingFormula) && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+                && !FeeDto.STATE_FINISH.equals(feeDto.getState())) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             feeDto.setDeadlineTime(DateUtil.getCurrentDate());
         }

+ 3 - 1
service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java

@@ -433,7 +433,9 @@ public class QueryOweFeeImpl implements IQueryOweFee {
         feeDto.setAmountOwed(price.setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue() + "");
         feeDto.setDeadlineTime(targetEndDate);
         //动态费用
-        if ("4004".equals(computingFormula)) {
+        if ("4004".equals(computingFormula)
+                && FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())
+        ) {
             feeDto.setAmountOwed(feeDto.getFeePrice() + "");
             feeDto.setDeadlineTime(DateUtil.getCurrentDate());
         }