From 54f5fc239bc7d2ad0396cdab3ec4320a0faa816c Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 13 Jul 2023 17:46:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=B0=8F=E7=A8=8B=E5=BA=8F-=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=A0=87=E8=AE=B0=E4=B8=BA=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=9A=84=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=BC=82=E5=B8=B8=E5=8F=8D=E9=A6=88=E7=9C=8B=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E9=83=A8=E9=97=A8=E5=85=B6=E4=BB=96=E4=BA=BA=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E7=9A=84=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/report/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index 33344585..1f8e8c43 100644 --- a/api/app/lib/controllers/report/index.js +++ b/api/app/lib/controllers/report/index.js @@ -1,7 +1,7 @@ 'use strict'; const { QueryTypes } = require('sequelize'); -async function reportList(ctx) { +async function reportList (ctx) { try { const models = ctx.fs.dc.models; const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc, projectType, handleState = '', performerId = '' } = ctx.query @@ -20,7 +20,7 @@ async function reportList(ctx) { WITH RECURSIVE sub_departments AS ( SELECT id, dependence FROM department - WHERE id = 1 + WHERE id = ${userInfo.departmentId} UNION ALL SELECT d.id, d.dependence FROM sub_departments sd @@ -114,7 +114,7 @@ async function reportList(ctx) { } } -async function reportPosition(ctx) { +async function reportPosition (ctx) { try { const models = ctx.fs.dc.models; const { startTime, endTime, userId, reportType } = ctx.query @@ -164,7 +164,7 @@ async function reportPosition(ctx) { } } -async function reportDetail(ctx) { +async function reportDetail (ctx) { try { const models = ctx.fs.dc.models; const { reportId } = ctx.params @@ -186,7 +186,7 @@ async function reportDetail(ctx) { } } -async function reportHandle(ctx) { +async function reportHandle (ctx) { try { const { models } = ctx.fs.dc; @@ -216,7 +216,7 @@ async function reportHandle(ctx) { } } -async function createReport(ctx) { +async function createReport (ctx) { try { const { userId } = ctx.fs.api const models = ctx.fs.dc.models; @@ -238,7 +238,7 @@ async function createReport(ctx) { } } -async function deleteReport(ctx) { +async function deleteReport (ctx) { try { const models = ctx.fs.dc.models; const { reportId } = ctx.params;