!5627 添加功能

Merge pull request !5627 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-10-13 07:39:22 +00:00
committed by Gitee
2 changed files with 2 additions and 2 deletions
@@ -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} "
)
@@ -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} "
)