Commit da91c519 by 孙香冬

no message

parent 7cdf762d
......@@ -7,11 +7,12 @@
import { MoveInEnterpriseParamConfig, RegisterEnterpriseParamConfig } from "../../config/checkParamConfig";
import { ERRORENUM } from "../../config/errorEnum";
import { EnterpriseInfoConfig } from "../../config/ojbectResultKeyConfig";
import { createEnterprise, deleteEnterprise,findEnterpriseCount, findEnterpriseByUscc, findEnterpriseList, groupFindEnterprise } from "../../data/enterprise/enterprise";
import { createEnterprise, deleteEnterprise,findEnterpriseCount, findEnterpriseByUscc, findEnterpriseList, groupFindEnterprise, findEnterpriseListByFuHuaQiUsccName } from "../../data/enterprise/enterprise";
import { EnterpriseListConfig } from "../../config/ojbectResultKeyConfig";
import { BizError } from "../../util/bizError";
import { checkChange, checkParamater, extractData, getTaskId } from "../../util/tools"
import { FUHUAQILV } from "../../config/enum";
import { findFuHuaQiByUSCC } from "../../data/fuHuaQi/fuhuaqi";
/**
......@@ -174,4 +175,21 @@ export async function enterpriseList(time:number, fuHuaQiUscc:string, industry:n
dataBaseList.lv = FUHUAQILV[dataBaseList.lv];
return {count, dataList};
}
\ No newline at end of file
}
export async function getAffiliationFuHuaQi(fuHuaQiUscc: string) {
let dataList = [];
if (fuHuaQiUscc.length > 0) {
let dataBaseInfo = await findEnterpriseListByFuHuaQiUsccName(fuHuaQiUscc);
let uscc;
dataBaseInfo.forEach( async info => {
uscc = info.fuHuaQiUscc;
})
let fuHuaQiInfo = await findFuHuaQiByUSCC(uscc);
dataList.push(fuHuaQiInfo.name)
}
return {dataList}
}
......@@ -22,6 +22,7 @@ export function setRouter(httpServer) {
/**企业 */
httpServer.post('/admin/enterprise/list', asyncHandler(getEnterpriseList));
httpServer.post('/admin/enterprise/financinglist', asyncHandler(getFinancingList));
httpServer.post('/admin/enterprise/affiliationfuhuaqi',asyncHandler(affiliationFuHuaQi));
}
......@@ -132,3 +133,12 @@ async function addUser(req, res) {
let result = await userBiz.addUser(form);
res.success(result);
}
async function affiliationFuHuaQi(req, res) {
let reqConf = {fuHuaQiUscc: 'String'};
let { fuHuaQiUscc } = checkParamaterType(reqConf, req.body);
let result = await enterpriseBiz.getAffiliationFuHuaQi(fuHuaQiUscc);
res.success(result);
}
\ No newline at end of file
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