明树Git Lab

Commit c359a449 authored by zfp1's avatar zfp1

1

parent 6d937589
Pipeline #106465 passed with stage
in 3 seconds
...@@ -414,10 +414,12 @@ async function getTzhpjInfo(req, res, next) { ...@@ -414,10 +414,12 @@ async function getTzhpjInfo(req, res, next) {
if (_.isEmpty(search)) { if (_.isEmpty(search)) {
return res.sendError(errorMessage.paramsError); return res.sendError(errorMessage.paramsError);
} }
let tzhpj = await DB.ThTzhpj.findOne({ where: search, raw: true }); let tzhpj = await DB.ThTzhpj.findOne({ where: search});
if (!(tzhpj && tzhpj.id)) { if (!(tzhpj && tzhpj.id)) {
return res.sendError(errorMessage.resourceNotFound); return res.sendError(errorMessage.resourceNotFound);
} }
console.log(tzhpj, "===")
tzhpj = tzhpj.toJSON()
let fileIds = [].concat(tzhpj.xmgszcbg).concat(tzhpj.hpjbg).concat(tzhpj.qsmzqpj); let fileIds = [].concat(tzhpj.xmgszcbg).concat(tzhpj.hpjbg).concat(tzhpj.qsmzqpj);
let files = await DB.File.findAll({ where: { id: { [Op.in]: fileIds } }, raw: true }); let files = await DB.File.findAll({ where: { id: { [Op.in]: fileIds } }, raw: true });
let fileMap = []; let fileMap = [];
......
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