소스 검색

更改判断条件

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