feat: 输出报工归属摘要

This commit is contained in:
souplearn
2026-07-25 04:29:02 +08:00
parent ebb490590f
commit b0cb217ce3
5 changed files with 168 additions and 2 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ def _cleaning_device_nos(item: CleaningReportSubmitItem) -> list[str]:
def _report_query():
return select(ProductionReport).options(
selectinload(ProductionReport.items),
selectinload(ProductionReport.allocations),
selectinload(ProductionReport.items).selectinload(ProductionReportItem.allocations),
selectinload(ProductionReport.audit_logs),
selectinload(ProductionReport.employee),
selectinload(ProductionReport.reviewer),
+2 -1
View File
@@ -117,7 +117,8 @@ def _validate_normal_report_devices(db: Session, report: ProductionReport) -> No
def _report_query():
return select(ProductionReport).options(
selectinload(ProductionReport.items),
selectinload(ProductionReport.allocations),
selectinload(ProductionReport.items).selectinload(ProductionReportItem.allocations),
selectinload(ProductionReport.audit_logs),
selectinload(ProductionReport.employee),
selectinload(ProductionReport.reviewer),