zhaobing’ 2 years ago
parent
commit
3e9c3e55de
  1. 3
      api/app/lib/controllers/projectRegime/projectSituation.js
  2. 101
      script/2.0.0/data/1_reset_project_bind_point/index.js

3
api/app/lib/controllers/projectRegime/projectSituation.js

@ -51,13 +51,14 @@ async function projectList(ctx, next) {
async function postAddProject(ctx, next) {
let errMsg = ''
try {
const models = ctx.fs.dc.models;
let userInfo = ctx.fs.api.userInfo;
const data = ctx.request.body;
const { img, longitude, latitude, name, type, describe, subType } = data
let errMsg = data.id ? '结构物编辑失败' : '结构物新增失败'
errMsg = data.id ? '结构物编辑失败' : '结构物新增失败'
let project = { img, longitude, latitude, name, type, describe, userId: userInfo.id, subType }
const alikeProject = await models.Project.findOne({

101
script/2.0.0/data/1_reset_project_bind_point/index.js

@ -9,8 +9,8 @@ try {
//! points 是要归属到这个结构物下的点位 id
const resetBing = [
{
projectId: 12,
points: [187,196,
projectId: 17,
points: [192,187,196,
188,
189,
186,
@ -30,102 +30,9 @@ try {
]
},
{
projectId: 12,
projectId: 18,
points: [138]
},
{
projectId: 12,
points: [135]
},
{
projectId: 12,
points: [137]
},
{
projectId: 12,
points: [135]
},
{
projectId: 12,
points: [121,
122,
123,
124,
217,
125,
126,
127,
128,
130,
131,
132,
120,
119,
212,
213,
216,
208,
215
]
},
{
projectId: 12,
points: [159,
169,
165,
160,
161,
166,
162,
163,
164,
167,
168,
172,
170,
175,
171,
173,
174,
176,
177
]
},
{
projectId: 12,
points: [136]
},
{
projectId: 12,
points: [133]
},
{
projectId: 12,
points: [108,
106,
112,
142,
105,
145,
146,
148,
153,
149,
150,
151,
152,
156,
154,
155,
157,
158,
109
]
},
{
projectId: 12,
points: [139]
},
}
]
// 测试环境

Loading…
Cancel
Save