修改字符串格式的数字为“”的时候接口报错的问题和装表的时候未过滤已装电表的问题

This commit is contained in:
2025-11-18 10:52:02 +08:00
parent 3a1b7f5a2a
commit c03d70b221
6 changed files with 30 additions and 24 deletions

View File

@@ -70,11 +70,11 @@ Component({
tenement,
{
code: meter,
overall:overall? Number(overall) : overall,
critical : critical ? Number(critical) : critical,
peak: peak ? Number(peak) : peak,
valley : valley ? Number(valley) : valley,
deepValley : deepValley ? Number(deepValley) : deepValley,
overall:overall? Number(overall) : (overall === "" ? null : overall),
critical : critical ? Number(critical) : (critical === "" ? null : critical),
peak: peak ? Number(peak) : (peak === "" ? null : peak),
valley : valley ? Number(valley) : (valley === "" ? null : valley),
deepValley : deepValley ? Number(deepValley) : (deepValley === "" ? null : deepValley),
readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss')
}
)

View File

@@ -75,11 +75,11 @@ Component({
tenement,
meterId,
{
overall:overall? Number(overall) : overall,
critical : critical ? Number(critical) : critical,
peak: peak ? Number(peak) : peak,
valley : valley ? Number(valley) : valley,
deepValley: deepValley ? Number(deepValley) : deepValley,
overall:overall? Number(overall) : (overall === "" ? null : overall),
critical : critical ? Number(critical) : (critical === "" ? null : critical),
peak: peak ? Number(peak) : (peak === "" ? null : peak),
valley : valley ? Number(valley) : (valley === "" ? null : valley),
deepValley: deepValley ? Number(deepValley) : (deepValley === "" ? null : deepValley),
readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss')
});
if (code !== OK) {