|
@ -164,10 +164,10 @@ async function addPosition(ctx, next) { |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
let userInfo = ctx.fs.api.userInfo; |
|
|
let userInfo = ctx.fs.api.userInfo; |
|
|
const data = ctx.request.body; |
|
|
const data = ctx.request.body; |
|
|
const { longitude, latitude, name, describe, qrCode, projectId, img } = data; |
|
|
const { longitude, latitude, name, describe, qrCode, projectId, img, equipmentNo, equipmentModel } = data; |
|
|
|
|
|
|
|
|
let errMsg = data.id ? '点位编辑失败' : '点位新增失败' |
|
|
let errMsg = data.id ? '点位编辑失败' : '点位新增失败' |
|
|
let pointData = { longitude, latitude, name, describe, qrCode, projectId, img } |
|
|
let pointData = { longitude, latitude, name, describe, qrCode, projectId, img, equipmentNo, equipmentModel } |
|
|
|
|
|
|
|
|
const alikeProject = await models.Point.findOne({ |
|
|
const alikeProject = await models.Point.findOne({ |
|
|
where: { |
|
|
where: { |
|
|