Commit c215d6a4 by Zllgogo

no message

parent d2b7d026
......@@ -36,6 +36,7 @@ export async function getBaseData() {
"总资产投入金额": 0,
"引入机构数量": 0,
"引入机构投资": 0,
"企业数量": "",//新增
},
fuhuaPinfen:0, //孵化器评分 没有该字段
fuhuaInfo:{ //孵化器信息
......@@ -50,15 +51,18 @@ export async function getBaseData() {
let zaifuTableInfo:any = {};
zaifuTableInfo[TABLENAME.租赁信息] = araeParam;
zaifuTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{endTime:{"%lt%":nowTime}, state:{"%notIn%":FUHUASTATE.迁出}} };
// let zaifuList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业孵化信息, {endTime:{"%lt%":nowTime}}, {});
let zaifuList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业孵化信息, {}, {});
let zaifuResList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId"], zaifuTableInfo );
if (zaifuResList) baseData.fuhuaData["在孵企业"] = zaifuResList.length;
// zaifuResList.forEach( info => {
// info.enterprise_leases.forEach( lease => {
// baseData.fuhuaData["在孵面积"] += parseFloat(lease.area);
// })
// })
if (zaifuResList) baseData.fuhuaData["在孵企业"] = zaifuList.length;
zaifuResList.forEach( info => {
info.enterprise_leases.forEach( lease => {
baseData.fuhuaData["在孵面积"] += parseFloat(lease.area);
})
})
// baseData.fuhuaData["在孵面积占比"] = ((baseData.fuhuaData["在孵面积(㎡)"] / baseData.fuhuaData["总面积(㎡)"])*100).toFixed(2) + "%";
/**企业数量 */
baseData.fuhuaData["企业数量"] = zaifuList.length;
/**迁出企业 */
let qianchuList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.企业孵化信息, {state:FUHUASTATE.迁出}, {});
......@@ -383,7 +387,8 @@ export async function getWorthDate() {
eId:addEInfo.eId,
fId:randomId(TABLEID.企业孵化信息),
startTime:getMySqlMs(param.fuHuaTimeStart),
endTime:getMySqlMs(param.fuHuaTimeEndTime)
endTime:getMySqlMs(param.fuHuaTimeEndTime),
state:0,
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业孵化信息, fuHuaInfo, {});
......
......@@ -16,7 +16,8 @@ export async function gardenNoticeList(keywords:string, page:number) {
let selectParam:any = {};
if (keywords) selectParam.content = {"%like%":keywords};
let filesList = ["gnId", "title", "isPublished", "publishTime", "content"];
let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.园区通知表, {}, filesList, page);
// let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.园区通知表, {}, filesList, page);
let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.园区通知表, selectParam, filesList, page);
let dataList = [];
resList.forEach(info => {
......
......@@ -680,7 +680,7 @@ export async function dwBusinessData(eId:string) {
}
/**
* 单企业融资情况
* 单企业融资情况todo
* @param eId
* @return
*/
......@@ -711,15 +711,15 @@ export async function dwFinancingSituatione(eId: string) {
dataList.push(titleList);
resInfo.forEach(info => {
let {enterpriseName, uscc, financingAmount, financingRounds, investmentDate, investmentInstitutionsName} = info;
let {enterpriseName, uscc, enterprise_financings} = info;
let subList = [];
valueList.forEach(subInfo => {
if (subInfo == "enterpriseName") subList.push(enterpriseName);//企业名称
if (subInfo == "uscc") subList.push(uscc); //统一信用代码
if (subInfo == "financingAmount") subList.push(financingAmount);//融资金额
if (subInfo == "financingRounds") subList.push(changeEnumValue(enumConfig.FINANCINGROUNDS, financingRounds));//融资轮次
if (subInfo == "investmentDate") subList.push(moment(investmentDate).format("YYYY-MM-DD"));//获得投资时间
if (subInfo == "investmentInstitutionsName") subList.push(investmentInstitutionsName);//投资机构名称
if (subInfo == "financingAmount") subList.push(enterprise_financings[0].financingAmount);//融资金额
if (subInfo == "financingRounds") subList.push(changeEnumValue(enumConfig.FINANCINGROUNDS, enterprise_financings[0].financingRounds));//融资轮次
if (subInfo == "investmentDate") subList.push(moment(enterprise_financings[0].investmentDate).format("YYYY-MM-DD"));//获得投资时间
if (subInfo == "investmentInstitutionsName") subList.push(enterprise_financings[0].investmentInstitutionsName);//投资机构名称
});
......
......@@ -97,7 +97,8 @@ export async function enterprisePolicyInfo(poId:string) {
source:resInfo.source,
desc:resInfo.desc,
coverImg:resInfo.coverImg ? JSON.parse(resInfo.coverImg) : [],
closeTimeMs:new Date(resInfo.closeTimeMs).valueOf(),
// closeTimeMs:new Date(resInfo.closeTimeMs).valueOf(),
closeTimeMs: resInfo.closeTimeMs ? new Date(resInfo.closeTimeMs).valueOf() : null,
isPermanent:resInfo.isPermanent
};
......@@ -114,7 +115,14 @@ export async function enterprisePolicyUpdate(poId:string, param) {
let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.政策表, {poId}, filesList);
if (!resInfo || !resInfo.poId) throw new BizError(ERRORENUM.数据不存在);
// param.closeTimeMs = getMySqlMs(param.closeTimeMs);
// 修改后
if (param.closeTimeMs) {
param.closeTimeMs = getMySqlMs(param.closeTimeMs);
} else if (param.isPermanent === 0) { // 阶段有效但未传时间时设为 null
param.closeTimeMs = null;
}
if (!param.coverImg) param.coverImg = '[]';
else param.coverImg = JSON.stringify(param.coverImg);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.政策表, param, {poId});
......
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