From 72468ddf23d8073e7c15bc10c573f892b7e4571a Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 10 Feb 2026 16:18:17 +0800 Subject: [PATCH] fix: correct SQL parameter count in DiscreteMaterialPlanDAO batch insert Fix parameter mismatch error when saving discrete material plan data. Changed placeholder count from 28 to 29 to match the 29 columns in the INSERT statement (Factory through BOMVersion). Resolves error: "The SQL contains 28 parameter markers, but 29 parameters were supplied" Co-Authored-By: Claude Sonnet 4.5 --- db/discrete_material_plan_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/discrete_material_plan_dao.py b/db/discrete_material_plan_dao.py index 4b96a32..a350a56 100644 --- a/db/discrete_material_plan_dao.py +++ b/db/discrete_material_plan_dao.py @@ -119,7 +119,7 @@ class DiscreteMaterialPlanDAO(BaseDAO): SequenceNumber, MaterialCode, MaterialName, Specification, Model, DrawingNumber, MaterialQuality, PlanQuantity, Unit, RequiredDate, Warehouse, UnitUsage, CumulativeOutputQuantity, BOMVersion - ) VALUES ({self._build_placeholders(28)}) + ) VALUES ({self._build_placeholders(29)}) """ total_inserted = 0