浏览代码

更改判断条件

hym 4 年之前
父节点
当前提交
7fe04bad67
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/zoniot/ccrc/service/impl/MongoMeterReadRecordServiceImpl.java

+ 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;
                     }
                 }