From 2a0bda76e5a33ef20e4a47885cf5c02a0668aa81 Mon Sep 17 00:00:00 2001 From: liyxie Date: Sat, 10 Jan 2026 19:13:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8F=96=E6=B6=88daily=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E6=9F=A5=E9=87=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/daily.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/app/services/daily.py b/app/services/daily.py index b41f577..6a763b1 100644 --- a/app/services/daily.py +++ b/app/services/daily.py @@ -38,7 +38,7 @@ class DailyDataService(BaseService[DailyData]): 批量创建记录,支持两种输入格式: - List[DailyData]:模型实例列表 - List[dict]:字典列表(自动转换为实例) - 通过 (account_id, NYID) 联合判断是否已存在,存在则忽略 + 通过 (account_id, NYID) 联合判断是否已存在,存在则忽略 --(暂时取消查重) """ try: data_list = self._ensure_instances(data) @@ -56,23 +56,26 @@ class DailyDataService(BaseService[DailyData]): logger.warning("批量创建失败:所有记录缺少 account_id 或 NYID") return [] - existing_pairs: Set[Tuple[int, int]] = { - (item.account_id, item.NYID) - for item in db.query(DailyData.account_id, DailyData.NYID) - .filter(DailyData.account_id.in_([p[0] for p in target_pairs]), - DailyData.NYID.in_([p[1] for p in target_pairs])) - .all() - } + + # 取消查重处理 + # existing_pairs: Set[Tuple[int, int]] = { + # (item.account_id, item.NYID) + # for item in db.query(DailyData.account_id, DailyData.NYID) + # .filter(DailyData.account_id.in_([p[0] for p in target_pairs]), + # DailyData.NYID.in_([p[1] for p in target_pairs])) + # .all() + # } to_create = [ item for item in data_list - if (item.account_id, item.NYID) not in existing_pairs + # if (item.account_id, item.NYID) not in existing_pairs ] - ignored_count = len(data_list) - len(to_create) - if ignored_count > 0: - logger.info(f"批量创建时忽略{ignored_count}条已存在记录(account_id和NYID已存在)") + # ignored_count = len(data_list) - len(to_create) + # if ignored_count > 0: + # logger.info(f"批量创建时忽略{ignored_count}条已存在记录(account_id和NYID已存在)") + logger.info(f"批量创建 {to_create}") if not to_create: return [] From c0dafded1c697169807858d3f578aa0a50d3b32c Mon Sep 17 00:00:00 2001 From: liyxie Date: Sun, 11 Jan 2026 19:55:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=87=E4=BB=BD=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 99a1356..814a7ed 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ upload_app/data/ upload_app/output/ upload_app/*.json +backups/ From 7091c63be9352d597c03e0a2bf2a858cbfb91a56 Mon Sep 17 00:00:00 2001 From: whm <973418690@qq.com> Date: Tue, 20 Jan 2026 07:59:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1.=E8=A1=A5=E5=85=85=E5=B7=A5=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/construction_monitor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/utils/construction_monitor.py b/app/utils/construction_monitor.py index c2d0cba..ea61261 100644 --- a/app/utils/construction_monitor.py +++ b/app/utils/construction_monitor.py @@ -11,6 +11,9 @@ class ConstructionMonitorUtils: def __init__(self): # 原始工况周期映射表(保持不变) self.base_periods = { + "仰拱(底板)施工完成后,第1个月": 7, + "仰拱(底板)施工完成后,第2至3个月": 14, + "仰拱(底板)施工完成后,3个月以后": 30, "仰拱(底板)施工完成后,第1个月": 7, # 原:仰拱(底板)施工完成后,第1个月 "仰拱(底板)施工完成后,第2至3个月": 14, # 原:仰拱(底板)施工完成后,第2至3个月 "仰拱(底板)施工完成后,3个月以后": 30, # 原:仰拱(底板)施工完成后,3个月以后 @@ -39,7 +42,7 @@ class ConstructionMonitorUtils: "铺路或堆载,沉降量突变情况": 1, "填筑或堆载,两次填筑间隔时间较长情况":3, "铺路或堆载,两次铺路间隔时间较长情况": 3, - "堆载预压或路基填筑完成, 第1至3个月":7, # 原:堆载预压或路基铺路完成,第1至3个月 + "堆载预压或路基填筑完成,第1至3个月":7, # 原:堆载预压或路基铺路完成,第1至3个月 "堆载预压或路基填筑完成,第4至6个月": 14, # 原:堆载预压或路基铺路完成,第4至6个月 "堆载预压或路基填筑完成,6个月以后": 30, # 原:堆载预压或路基铺路完成,6个月以后 "架桥机(运梁车) 首次通过前": 1, # 原:架桥机(运梁车)首次通过前(仅加空格)