Commit 98e19e2e by zhangzhencai

no message

parent 848a2b0d
...@@ -171,11 +171,10 @@ export async function getEnterpriseDetails(name, type) { ...@@ -171,11 +171,10 @@ export async function getEnterpriseDetails(name, type) {
let selectParam = {}; let selectParam = {};
if (name) selectParam["enterpriseName"] = {"%like%":name}; if (name) selectParam["enterpriseName"] = {"%like%":name};
let manyTableInfo:any = {}
let dbList = []; let dbList = [];
if (type.length != 0) { if (type.length != 0) {
for(let i=0;i<type.length;i++){ for(let i=0;i<type.length;i++){
let manyTableInfo:any = {};
let info = type[i]; let info = type[i];
switch (info) { switch (info) {
case SELECTPARAM.在孵企业: case SELECTPARAM.在孵企业:
...@@ -206,19 +205,24 @@ export async function getEnterpriseDetails(name, type) { ...@@ -206,19 +205,24 @@ export async function getEnterpriseDetails(name, type) {
manyTableInfo[TABLENAME.企业资质] = {column:[], where:{"gaoXinJiShuTime":{"%ne%":null}} }; manyTableInfo[TABLENAME.企业资质] = {column:[], where:{"gaoXinJiShuTime":{"%ne%":null}} };
break; break;
} }
let enterpriseData = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId","enterpriseName"], manyTableInfo); let enterpriseData = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId","enterpriseName"], manyTableInfo);
enterpriseData.forEach(item=>{ enterpriseData.forEach(item=>{
dbList.push(item); dbList.push(item);
}); });
} }
} else {
dbList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId","enterpriseName"], {});
} }
let dataList = []; let dataChange = [];
dbList.forEach( item => { dbList.forEach( item => {
let {eId, enterpriseName} = item; let {eId, enterpriseName} = item;
dataList.push({eId, enterpriseName}); dataChange.push({eId, enterpriseName});
}) })
let dataList = [...new Map(dataChange.map(item => [item.eId, item])).values()];
return dataList; return dataList;
} }
......
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