|
@ -206,7 +206,8 @@ async function createNvrCamera (ctx) { |
|
|
serialNo: c.streamid, |
|
|
serialNo: c.streamid, |
|
|
name: c.name, |
|
|
name: c.name, |
|
|
sip: corCamera.sipip, |
|
|
sip: corCamera.sipip, |
|
|
cloudControl: c.cloudControl |
|
|
cloudControl: c.cloudControl, |
|
|
|
|
|
gbId: c.id, |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
createData.push({ |
|
|
createData.push({ |
|
@ -219,6 +220,7 @@ async function createNvrCamera (ctx) { |
|
|
createTime: moment().format(), |
|
|
createTime: moment().format(), |
|
|
createUserId: userId, |
|
|
createUserId: userId, |
|
|
forbidden: false, |
|
|
forbidden: false, |
|
|
|
|
|
gbId: c.id, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
@ -294,6 +296,7 @@ async function createIpcCamera (ctx) { |
|
|
const gbCameraRes = await verifyIpcInfo({ serialNo }) |
|
|
const gbCameraRes = await verifyIpcInfo({ serialNo }) |
|
|
|
|
|
|
|
|
storageData.sip = gbCameraRes.dataValues.sipip |
|
|
storageData.sip = gbCameraRes.dataValues.sipip |
|
|
|
|
|
storageData.gbId = gbCameraRes.dataValues.id |
|
|
|
|
|
|
|
|
if (handleCameraId) { |
|
|
if (handleCameraId) { |
|
|
await models.Camera.update(storageData, { |
|
|
await models.Camera.update(storageData, { |
|
@ -436,7 +439,8 @@ async function createCascadeCamera (ctx) { |
|
|
externalDomain, |
|
|
externalDomain, |
|
|
cascadeType, |
|
|
cascadeType, |
|
|
sip: c.sipip, |
|
|
sip: c.sipip, |
|
|
name: c.name |
|
|
name: c.name, |
|
|
|
|
|
gbId: c.id, |
|
|
} |
|
|
} |
|
|
const added = addedCmeraRes.find(ac => ac.serialNo == c.streamid) |
|
|
const added = addedCmeraRes.find(ac => ac.serialNo == c.streamid) |
|
|
if (added) { |
|
|
if (added) { |
|
|