Commit 9e00446c by lixinming

Merge branch 'master' of http://123.207.147.179:8888/node_server/zjxcxServer

# Conflicts:
#	src/biz/enterprise/enterprise.ts
parents 938f2255 da91c519
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
import { MoveInEnterpriseParamConfig, RegisterEnterpriseParamConfig } from "../../config/checkParamConfig"; import { MoveInEnterpriseParamConfig, RegisterEnterpriseParamConfig } from "../../config/checkParamConfig";
import { ERRORENUM } from "../../config/errorEnum"; import { ERRORENUM } from "../../config/errorEnum";
import { EnterpriseInfoConfig } from "../../config/ojbectResultKeyConfig"; import { EnterpriseInfoConfig } from "../../config/ojbectResultKeyConfig";
import { createEnterprise, deleteEnterprise,findEnterpriseCount, findEnterpriseByUscc, findEnterpriseList } from "../../data/enterprise/enterprise";
import { EnterpriseListConfig } from "../../config/ojbectResultKeyConfig";
import { BizError } from "../../util/bizError"; import { BizError } from "../../util/bizError";
import { checkChange, checkParamater, extractData, getTaskId } from "../../util/tools" import { checkChange, checkParamater, extractData, getTaskId } from "../../util/tools"
import moment = require("moment"); import moment = require("moment");
import { createEnterprise, deleteEnterprise,findEnterpriseCount, findEnterpriseByUscc, findEnterpriseList, findEnterpriseListByFuHuaQiUsccName } from "../../data/enterprise/enterprise";
import { EnterpriseListConfig } from "../../config/ojbectResultKeyConfig";
import { findFuHuaQiByUSCC } from "../../data/fuHuaQi/fuhuaqi";
/** /**
...@@ -182,3 +183,20 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry, ...@@ -182,3 +183,20 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
return {count, dataList}; return {count, dataList};
} }
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) { ...@@ -22,6 +22,7 @@ export function setRouter(httpServer) {
/**企业 */ /**企业 */
httpServer.post('/admin/enterprise/list', asyncHandler(getEnterpriseList)); httpServer.post('/admin/enterprise/list', asyncHandler(getEnterpriseList));
httpServer.post('/admin/enterprise/financinglist', asyncHandler(getFinancingList)); httpServer.post('/admin/enterprise/financinglist', asyncHandler(getFinancingList));
httpServer.post('/admin/enterprise/affiliationfuhuaqi',asyncHandler(affiliationFuHuaQi));
} }
...@@ -132,3 +133,12 @@ async function addUser(req, res) { ...@@ -132,3 +133,12 @@ async function addUser(req, res) {
let result = await userBiz.addUser(form); let result = await userBiz.addUser(form);
res.success(result); 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