From 98ce961272c596468a4cb4b2498a3c70048e4aed Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期四, 24 九月 2026 15:57:31 +0800
Subject: [PATCH] bug修复

---
 src/modules/report/controller/admin/dailydepartment.ts |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/modules/report/controller/admin/dailydepartment.ts b/src/modules/report/controller/admin/dailydepartment.ts
index 1dbd914..054e7ad 100644
--- a/src/modules/report/controller/admin/dailydepartment.ts
+++ b/src/modules/report/controller/admin/dailydepartment.ts
@@ -14,7 +14,11 @@
     keyWordLikeFields: ['a.departmentName'],
     fieldEq: ['a.date', 'a.departmentId'],
     where: async (ctx) => {
+      const { startTime, endTime } = ctx.request.body;
       const conditions: any[][] = [];
+      if (startTime && endTime) {
+        conditions.push(['a.date BETWEEN :startTime AND :endTime', { startTime, endTime }]);
+      }
       conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' })));
       return conditions;
     }

--
Gitblit v1.9.1