From 96b5724025d3ed9181ebdbb2acdb0d8eddf5282a Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 9 Nov 2022 16:06:45 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=97=A0=E7=B1=BB=E5=9E=8B=E6=88=96?= =?UTF-8?q?=E6=9C=AA=E5=A1=AB=E5=86=99=EF=BC=8C=E5=88=99=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=85=B6=E4=BB=96=EF=BC=8C=E7=9B=B8=E5=85=B3=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/video.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/api/app/lib/controllers/alarm/video.js b/api/app/lib/controllers/alarm/video.js index 323c456..3c7a959 100644 --- a/api/app/lib/controllers/alarm/video.js +++ b/api/app/lib/controllers/alarm/video.js @@ -1,7 +1,7 @@ 'use strict'; const moment = require('moment') const { alarmConfirmLog } = require('./alarmConfirmLog'); -async function deviceType(ctx) { +async function deviceType (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -21,7 +21,7 @@ async function deviceType(ctx) { } } -async function alarmList(ctx) { +async function alarmList (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -46,7 +46,11 @@ async function alarmList(ctx) { } } if (kindId) { - cameraWhereOption.push(`camera.kind_id = ${kindId}`) + let sql = `camera.kind_id = ${kindId}` + if (kindId == 1314) { + sql = `(camera.kind_id = ${kindId} OR camera.kind_id IS null)` + } + cameraWhereOption.push(sql) } let statusAlarmWhereOption = [] @@ -262,7 +266,7 @@ async function alarmList(ctx) { } } -async function confirm(ctx) { +async function confirm (ctx) { try { const { alarmId, content, confirmPost } = ctx.request.body; // TODO: 以视频·应用的秘钥进行鉴权 @@ -288,7 +292,7 @@ let structsAche = { dataList: [], expireTime: null//10分钟更新一次结构物列表 } -async function getStructsAche(ctx) { +async function getStructsAche (ctx) { const { utils: { getAxyStructs } } = ctx.app.fs try { if (!structsAche.dataList.length || moment() > moment(structsAche.expireTime)) { @@ -302,7 +306,7 @@ async function getStructsAche(ctx) { } } -async function alarmAdded(ctx) { +async function alarmAdded (ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -362,7 +366,7 @@ async function alarmAdded(ctx) { } } -async function vcmpAppAuthToken(ctx) { +async function vcmpAppAuthToken (ctx) { try { const { models } = ctx.fs.dc; const { utils: { vcmpAuth } } = ctx.app.fs From 351849bfd17f6276ef7d07f29fcd88c5eb62a5db Mon Sep 17 00:00:00 2001 From: wuqun Date: Wed, 9 Nov 2022 16:24:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?(*)=E5=91=8A=E8=AD=A6=E5=A4=84=E7=BD=AE?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=97=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/schedule/alarms_handle_statistics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/schedule/alarms_handle_statistics.js b/api/app/lib/schedule/alarms_handle_statistics.js index 7facab0..64b5a60 100644 --- a/api/app/lib/schedule/alarms_handle_statistics.js +++ b/api/app/lib/schedule/alarms_handle_statistics.js @@ -7,7 +7,7 @@ module.exports = function (app, opts) { const { database: anxinyun } = clickHouse.anxinyun.opts.config const alarmHandleStatistics = app.fs.scheduleInit( { - interval: '0 18 1 ? * 3',//每周一1点18触发 + interval: '0 18 1 ? * 4',//每周一1点18触发 // immediate: true, proRun: true, }, From 520d998be6d041063447b1829c7cf59fa56da482 Mon Sep 17 00:00:00 2001 From: wuqun Date: Wed, 9 Nov 2022 16:30:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?(*)=E6=81=A2=E5=A4=8D=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E7=8E=87=E7=BB=9F=E8=AE=A1=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=A6=E5=8F=91=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/schedule/alarms_handle_statistics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/schedule/alarms_handle_statistics.js b/api/app/lib/schedule/alarms_handle_statistics.js index 64b5a60..c22fb65 100644 --- a/api/app/lib/schedule/alarms_handle_statistics.js +++ b/api/app/lib/schedule/alarms_handle_statistics.js @@ -7,7 +7,7 @@ module.exports = function (app, opts) { const { database: anxinyun } = clickHouse.anxinyun.opts.config const alarmHandleStatistics = app.fs.scheduleInit( { - interval: '0 18 1 ? * 4',//每周一1点18触发 + interval: '0 18 1 ? * 1',//每周一1点18触发 // immediate: true, proRun: true, }, From c0f5ee9932e323fbc8e4662c91b87164fd9c460e Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 9 Nov 2022 17:09:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?ProjectCorrelation=20=E5=B7=B2=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E7=9B=B8=E5=85=B3=E9=A1=B9=E4=BC=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/lib/controllers/project/index.js b/api/app/lib/controllers/project/index.js index b40dbe0..19acbd8 100644 --- a/api/app/lib/controllers/project/index.js +++ b/api/app/lib/controllers/project/index.js @@ -137,7 +137,8 @@ async function projectPManage (ctx) { const bindedPRes = await models.ProjectCorrelation.findAll({ where: { - pepProjectId: { $ne: null } + pepProjectId: { $ne: null }, + del: false } })