Browse Source

更改判断条件

hym 4 years ago
parent
commit
7fe04bad67

+ 2 - 2
src/main/java/com/zoniot/ccrc/service/impl/MongoMeterReadRecordServiceImpl.java

@@ -142,12 +142,12 @@ public class MongoMeterReadRecordServiceImpl implements MongoMeterReadRecordServ
                     小于等于: < 1 */
                 if(type==4){
                 BigDecimal bigDecimal=new BigDecimal("2");
-                   if(lastCost.compareTo(bigDecimal)==1){
+                   if(lastCost.compareTo(bigDecimal)>0){
                         flag=true;
                     }
                  }else if(type==3){
                     BigDecimal smallDecimal=new BigDecimal("0.01");
-                    if(lastCost.compareTo(smallDecimal)==-1){
+                    if(lastCost.compareTo(smallDecimal)<0){
                         flag=true;
                     }
                 }