From ee14cc89b36f541f129c50d30fec290141ecc373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 13 Oct 2025 15:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_property/models/property_meter_archives.py | 2 +- yuthon_property/models/property_meter_water.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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} " )