From 708f980f0f351bfe47d7936151bf52ed4d4a7bc4 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期六, 18 七月 2026 18:00:56 +0800
Subject: [PATCH] 业务表支持部门数据权限

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

diff --git a/src/modules/report/controller/admin/dailydepartment.ts b/src/modules/report/controller/admin/dailydepartment.ts
index 0ffc292..1dbd914 100644
--- a/src/modules/report/controller/admin/dailydepartment.ts
+++ b/src/modules/report/controller/admin/dailydepartment.ts
@@ -1,6 +1,7 @@
 import { CoolController, BaseController } from '@cool-midway/core';
 import { ReportDailyDepartmentEntity } from '../../entity/dailydepartment';
 import { ReportDailyDepartmentService } from '../../service/dailydepartment';
+import { WithDeptFilterWhere } from '../../../base/middleware/with-dept-filter-where'
 
 /**
  * 姣忔棩閮ㄩ棬姹囨�绘帶鍒跺櫒
@@ -11,7 +12,12 @@
   service: ReportDailyDepartmentService,
   pageQueryOp: {
     keyWordLikeFields: ['a.departmentName'],
-    fieldEq: ['a.date', 'a.departmentId']
+    fieldEq: ['a.date', 'a.departmentId'],
+    where: async (ctx) => {
+      const conditions: any[][] = [];
+      conditions.push(...(await WithDeptFilterWhere(ctx, { alias: 'a', field: 'departmentId' })));
+      return conditions;
+    }
   }
 })
-export class AdminReportDailydepartmentController extends BaseController {}
\ No newline at end of file
+export class AdminReportDailydepartmentController extends BaseController { }
\ No newline at end of file

--
Gitblit v1.9.1