diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index 417ab7100..84b60cb55 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -334,7 +334,7 @@ class MeterArchivesLine(models.Model): for record in self: if record.last_read is not None and record.current_read is not None and record.last_read > 0: if record.current_read < record.last_read: - if record.last_read - record.current_read >= 10000: + if record.current_meter>= 10000: raise ValidationError( f"输入错误:当前读数 {record.current_read} 必须大于上次读数 {record.last_read} " ) diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py index fea86bb15..38b77c384 100644 --- a/yuthon_property/models/property_meter_water.py +++ b/yuthon_property/models/property_meter_water.py @@ -268,7 +268,7 @@ class MeterWaterLine(models.Model): for record in self: if record.last_read is not None and record.current_read is not None and record.last_read > 0: if record.current_read < record.last_read: - if record.last_read - record.current_read >= 10000: + if record.current_meter>= 10000: raise ValidationError( f"输入错误:当前读数 {record.current_read} 必须大于上次读数 {record.last_read} " )