明树Git Lab

Commit a646b618 authored by zfp1's avatar zfp1

update

parent c55cfb74
Pipeline #104448 passed with stage
in 3 seconds
......@@ -130,7 +130,6 @@ async function createProject(req, res, next) {
xgshcl = xgshcl.map(o => { return { fileId: o.id, projectId: project.id, proFieldKey: 'xgshcl' } });
// 处理文件
let proFiles = _.concat(lxzl, lxpfwj, xgshcl);
console.log(proFiles, "=================")
await DB.ProjectFile.bulkCreate(proFiles);
......@@ -159,7 +158,6 @@ async function createProject(req, res, next) {
// // });
// await DB.Project.update({ projectLzType: 3 }, { where: { id: project.id } });
// }
console.log(project)
return res.sendData(project);
} catch (error) {
next(error);
......@@ -395,7 +393,6 @@ async function xiangmujuecegengxin(body, projectLzType) {
// 处理 projectCwpjzb
let projectCwpjzbs = body.projectCwpjzbs || [];
console.log(body.projectCwpjzbs, "====================================================================")
let pnids10 = [], pns10 = [], newprojectCwpjzbs = [];
projectCwpjzbs.map(o => { if (!o.id) { if (!_.isEmpty(o)) { o.projectId = projectInfo.id; newprojectCwpjzbs.push(o); } } else { pnids10.push(o.id); pns10.push(o); } return o });
await DB.ProjectCwpjzb.destroy({ where: { projectId: projectInfo.id, id: { [Op.notIn]: pnids10 } } });
......
......@@ -11,7 +11,6 @@ async function createResource(req, res, next) {
const body = req.body;
let ret = await DB.Resources.create(body);
ret = ret.toJSON();
console.log(ret);
if (body.resourceInfos && body.resourceInfos.length && ret.id) {
if(body.type == 1){
let ris = [];
......
......@@ -47,16 +47,16 @@ async function handleProjectData(ret, queryAttrs) {
}
}
console.log(resouInfoIds, ",,,,,")
// console.log(resouInfoIds, ",,,,,")
let resMap = await getResourceInfoByIds(resouInfoIds);
console.log(resMap)
// console.log(resMap)
for (let index = 0; index < ret.rows.length; index++) {
const element = ret.rows[index];
for (const key in element) {
// console.log(element, element[key], rawAttributes[key].zjType);
if (_.isNumber(element[key]) && rawAttributes[key].zjType) {
if (rawAttributes[key].zjType == "danxuan") {
console.log(resMap[String(element[key])], String(element[key]), "=========================")
// console.log(resMap[String(element[key])], String(element[key]), "=========================")
element[key] = resMap[String(element[key])];
} else if (rawAttributes[key].zjType == "duoxuan") {
if(_.isArray(element[key]) && element[key].length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment