Commit 07f9ec4c by chenjinjing

no message

parent acb7ac54
<config> <config>
<port>9098</port> <port>9098</port>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign> <sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<dbServer>http://127.0.0.1:9096</dbServer> <dbServer>http://192.168.0.105:9096</dbServer>
<imgUrl>http://127.0.0.1:9098</imgUrl> <imgUrl>http://192.168.0.105:9098</imgUrl>
<imgFileUrl>http://192.168.0.189:9097</imgFileUrl> <imgFileUrl>http://192.168.0.105:9097</imgFileUrl>
<qcc> <qcc>
<key>2b14555ce89346e8b96684e2e2a1c7c2</key> <key>2b14555ce89346e8b96684e2e2a1c7c2</key>
<SecretKey>452AAE887A1CDCAB8C9D730BA8B8FBF0</SecretKey> <SecretKey>452AAE887A1CDCAB8C9D730BA8B8FBF0</SecretKey>
......
...@@ -296,7 +296,6 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number ...@@ -296,7 +296,6 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number
selectParam.enterpriseName = {"%like%":enterpriseName} selectParam.enterpriseName = {"%like%":enterpriseName}
} }
let manyTableInfo:any = {}; let manyTableInfo:any = {};
manyTableInfo[TABLENAME.企业融资] = { manyTableInfo[TABLENAME.企业融资] = {
column:["rId", "financingAmount", "financingRounds", "investmentDate", "investmentInstitutionsName" ], column:["rId", "financingAmount", "financingRounds", "investmentDate", "investmentInstitutionsName" ],
...@@ -306,8 +305,8 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number ...@@ -306,8 +305,8 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number
if (year) { if (year) {
let selectStartTime = getMySqlMs(year); let selectStartTime = getMySqlMs(year);
let selectEndTime = getMySqlMs(moment(year).endOf('year').valueOf());//todo 框架问题不能同时查询一个字段 let selectEndTime = getMySqlMs(moment(year).endOf('year').valueOf());
manyTableInfo[TABLENAME.企业融资].where.investmentDate = {"%gt%":selectStartTime}; manyTableInfo[TABLENAME.企业融资].where = {"investmentDate": {"%gt%":selectStartTime, "%lt%":selectEndTime}};
} }
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page); let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
...@@ -318,16 +317,21 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number ...@@ -318,16 +317,21 @@ export async function enterpriseFinancingList(enterpriseName:string, year:number
let dataList = []; let dataList = [];
resInfo.forEach(info => { resInfo.forEach(info => {
let {eId, enterpriseName, uscc, enterprise_financings} = info; let {eId, enterpriseName, uscc, enterprise_financings} = info;
if (enterprise_financings.length > 0) {
enterprise_financings.forEach( item => {
let dataInfo = { let dataInfo = {
eId,//企业id eId,//企业id
enterpriseName, //企业名称 enterpriseName, //企业名称
uscc, //统一信用代码 uscc, //统一信用代码
financingAmount:enterprise_financings[0].financingAmount, //融资金额(万元) financingAmount:item.financingAmount, //融资金额(万元)
financingRounds:changeEnumValue(enumConfig.FINANCINGROUNDS, enterprise_financings[0].financingRounds), //融资轮次 financingRounds:changeEnumValue(enumConfig.FINANCINGROUNDS, item.financingRounds), //融资轮次
investmentDate:moment(enterprise_financings[0].investmentDate).format("YYYY-MM-DD"),//获得投资时间 investmentDate:moment(item.investmentDate).format("YYYY-MM-DD"),//获得投资时间
investmentInstitutionsName:enterprise_financings[0].investmentInstitutionsName,//投资机构名称 investmentInstitutionsName:item.investmentInstitutionsName,//投资机构名称
}; };
dataList.push(dataInfo); dataList.push(dataInfo);
})
}
}); });
return {dataList, dataCount}; return {dataList, dataCount};
......
...@@ -314,7 +314,8 @@ export async function enterpriseFinancingById(eId:string) { ...@@ -314,7 +314,8 @@ export async function enterpriseFinancingById(eId:string) {
let dataList = []; let dataList = [];
resData.forEach(info => { resData.forEach(info => {
let {enterpriseName, uscc, enterprise_financings} = info; let {enterpriseName, uscc, enterprise_financings} = info;
if (enterprise_financings.length != 0) {
enterprise_financings.forEach( item => {
let dataInfo = [ let dataInfo = [
{ {
key:"企业名称", key:"企业名称",
...@@ -326,22 +327,25 @@ export async function enterpriseFinancingById(eId:string) { ...@@ -326,22 +327,25 @@ export async function enterpriseFinancingById(eId:string) {
}, },
{ {
key:"融资金额(万元)", key:"融资金额(万元)",
value:enterprise_financings[0].financingAmount value:item.financingAmount
}, },
{ {
key:"融资轮次", key:"融资轮次",
value:changeEnumValue(enumConfig.FINANCINGROUNDS, enterprise_financings[0].financingRounds) value:changeEnumValue(enumConfig.FINANCINGROUNDS, item.financingRounds)
}, },
{ {
key:"获得投资时间", key:"获得投资时间",
value:moment(enterprise_financings[0].investmentDate).format("YYYY-MM-DD") value:moment(item.investmentDate).format("YYYY-MM-DD")
}, },
{ {
key:"投资机构名称", key:"投资机构名称",
value:enterprise_financings[0].investmentInstitutionsName value:item.investmentInstitutionsName
}, },
] ]
dataList.push(dataInfo); dataList.push(dataInfo);
})
}
}); });
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