diff --git a/api/app/lib/controllers/maintenancePlan/index.js b/api/app/lib/controllers/maintenancePlan/index.js index e08a9ce..f0117b1 100644 --- a/api/app/lib/controllers/maintenancePlan/index.js +++ b/api/app/lib/controllers/maintenancePlan/index.js @@ -3,10 +3,10 @@ //维护计划 async function getMaintenancePlan(ctx) { + const query = ctx.query try { const { models } = ctx.fs.dc const { clickHouse } = ctx.app.fs - const query = ctx.query //console.log('11121', query) let resCount = await models.MaintenancePlan.count({ where: { type: query.type } @@ -27,10 +27,10 @@ async function getMaintenancePlan(ctx) { const arrayUserId = [] res.rows.forEach((item) => { item.maintenancePlanExecuteUsers.forEach((item1) => { arrayUserId.push(item1.pepUserId) }) }) const arrayUserIdCopy = [...new Set(arrayUserId)] - const whereOption = '(' + arrayUserIdCopy.toString() + ')' + //(${ [...pepProjectIds].join(',') }, -1) const userRes = await clickHouse.pepEmis.query(` SELECT * FROM user - WHERE id in ${whereOption} + WHERE id IN (${[...arrayUserIdCopy].join(',')},-1) `).toPromise() //console.log('userRes', userRes) //console.log('res.rows', res.rows) diff --git a/web/client/src/sections/service/components/recordModal.jsx b/web/client/src/sections/service/components/recordModal.jsx index 6ebeabb..1adde9c 100644 --- a/web/client/src/sections/service/components/recordModal.jsx +++ b/web/client/src/sections/service/components/recordModal.jsx @@ -56,7 +56,7 @@ const okHandler=()=>{ >