Commit 19338dd5 by chenjinjing

no message

parent 199d205f
...@@ -275,23 +275,24 @@ export async function enterpriseManagePass(mId:string) { ...@@ -275,23 +275,24 @@ export async function enterpriseManagePass(mId:string) {
//====融资 //====融资
export async function enterpriseFinancingList(enterpriseName:string,page:number) { export async function enterpriseFinancingList(enterpriseName:string, page:number) {
let selectParam:any = {state:enumConfig.STATE.}; let selectParam:any = {state:enumConfig.STATE.};
if (enterpriseName) { if (enterpriseName) {
selectParam.enterpriseName = {"%like%":enterpriseName} selectParam.enterpriseName = {"%like%":enterpriseName}
} }
let manyTableInfo:any = {}; let manyTableInfo:any = {};
manyTableInfo[TABLENAME.企业融资] = {column:["financingAmount", "financingRounds", "investmentDate", "investmentInstitutionsName" ], where:{} }; manyTableInfo[TABLENAME.企业融资] = {column:["rId", "financingAmount", "financingRounds", "investmentDate", "investmentInstitutionsName" ], where:{} };
let filesList = ["enterpriseName", "uscc"]; let filesList = ["enterpriseName", "uscc", "eId"];
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page); let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
let dataCountList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo); let dataCountList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
let dataCount = dataCountList.length; let dataCount = dataCountList.length;
let dataList = []; let dataList = [];
resInfo.forEach(info => { resInfo.forEach(info => {
let {enterpriseName, uscc, enterprise_financings} = info; let {eId, enterpriseName, uscc, enterprise_financings} = info;
let dataInfo = { let dataInfo = {
eId,
enterpriseName, //企业名称 enterpriseName, //企业名称
uscc, //统一信用代码 uscc, //统一信用代码
financingAmount:enterprise_financings[0].financingAmount, //融资金额(万元) financingAmount:enterprise_financings[0].financingAmount, //融资金额(万元)
...@@ -305,6 +306,31 @@ export async function enterpriseFinancingList(enterpriseName:string,page:number) ...@@ -305,6 +306,31 @@ export async function enterpriseFinancingList(enterpriseName:string,page:number)
return {dataList, dataCount}; return {dataList, dataCount};
} }
/**
* 融资情况 查询企业下所有融资信息
* @param eId
* @returns
*/
export async function enterpriseFinancingAllYear(eId:string) {
let filesList = ["rId", "financingAmount", "financingRounds", "investmentDate", "investmentInstitutionsName" ];
let resInfo = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业融资, {eId}, filesList);
let dataList = [];
resInfo.forEach(info => {
let dataInfo = {
investmentDate:moment(info.investmentDate).format("YYYY-MM-DD"),//获得投资时间
financingAmount:info.financingAmount, //融资金额(万元)
financingRounds:changeEnumValue(enumConfig.FINANCINGROUNDS, info.financingRounds), //融资轮次
investmentInstitutionsName:info.investmentInstitutionsName,//投资机构名称
};
dataList.push(dataInfo);
});
return {dataList};
}
export async function outPutEnterpriseFinancingList(enterpriseName:string, type:number, files) { export async function outPutEnterpriseFinancingList(enterpriseName:string, type:number, files) {
let selectParam:any = {state:enumConfig.STATE.}; let selectParam:any = {state:enumConfig.STATE.};
......
...@@ -54,6 +54,7 @@ export function setRouter(httpServer) { ...@@ -54,6 +54,7 @@ export function setRouter(httpServer) {
httpServer.post('/admin/library/manage/pass', checkUser, asyncHandler(managePass)); httpServer.post('/admin/library/manage/pass', checkUser, asyncHandler(managePass));
httpServer.post('/admin/library/financing/list', checkUser, asyncHandler(financingList)); httpServer.post('/admin/library/financing/list', checkUser, asyncHandler(financingList));
httpServer.post('/admin/library/financing/allyear', checkUser, asyncHandler(financingAllYear));
httpServer.post('/admin/library/dw/financing/list', checkUser, asyncHandler(outPutFinancingList)); httpServer.post('/admin/library/dw/financing/list', checkUser, asyncHandler(outPutFinancingList));
httpServer.post('/admin/library/talent/list', checkUser, asyncHandler(talentList)); httpServer.post('/admin/library/talent/list', checkUser, asyncHandler(talentList));
...@@ -435,6 +436,20 @@ async function financingList(req, res) { ...@@ -435,6 +436,20 @@ async function financingList(req, res) {
res.success(result); res.success(result);
} }
/**
*
* @param req
* @param res
*/
async function financingAllYear(req, res) {
const UserInfo = req.userInfo;
let {eId } = req.body
let result = await enterpriseInfoBiz.enterpriseFinancingAllYear(eId);
res.success(result);
}
/** /**
* *
* @param req * @param req
......
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