xiahan 2 месяцев назад
Родитель
Сommit
d111d99f79

+ 1 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/importListener/MeterReadingRecordListener.java

@@ -76,7 +76,7 @@ public class MeterReadingRecordListener extends AnalysisEventListener<ImportMete
         if (importMeterReadingRecordVo.getReadingDate() == null) {
             throw new CustomException("第" + currentRowNum + "行抄表日期");
         }
-        if (importMeterReadingRecordVo.getConsumption() == null && importMeterReadingRecordVo.getConsumption().compareTo(BigDecimal.ZERO) <= 0) {
+        if (importMeterReadingRecordVo.getConsumption() == null || importMeterReadingRecordVo.getConsumption().compareTo(BigDecimal.ZERO) <= 0) {
             throw new CustomException("第" + currentRowNum + "行读数为空,抄表数小于0");
         }
         // 判断数据是否重复