Commit 5785408d by Zllgogo

no message

parent 996c87f1
......@@ -122,6 +122,7 @@ export async function getQyszhx(eId) {
};
if (企业基础信息.logonTime) qyjbsj.注册时间 = moment(企业基础信息.logonTime).format("YYYY-MM-DD")
if (企业孵化信息[0].enterprise_fuhuas[0].startTime) qyjbsj.首次入孵时间 = moment(企业孵化信息[0].enterprise_fuhuas[0].startTime).format("YYYY-MM-DD")
if (企业基础信息.firstLoginTime) qyjbsj.迁入时间 = moment(企业基础信息.firstLoginTime).format("YYYY-MM-DD")
qyszhx.企业基本数据.dataList = getKeyValue(qyjbsj);
//企业标签 todo
......@@ -901,7 +902,7 @@ function get企业动态(data) {
honorsCount += enterprise_honors.length;
enterprise_honors.forEach(honors => {
let awardLevel = changeEnumValue(AWARDLEVEL, honors.awardLevel);
let awardTime = moment(honors.awardTime).format("YYYY-MM-DD");
let awardTime = moment(honors.awardTime).format("YYYY");
qydt.push([honorsCount, honors.awardName, awardTime, honors.awardingUnit, awardLevel]);
})
})
......
......@@ -420,25 +420,26 @@ export async function getZhyy() {
/**
* 计算在孵企业面积占比:在孵企业总面积/孵化器或者园区总面积 x 100%
*/
// 空数据保护
if (!孵化器dbList || 孵化器dbList.length === 0) {
孵化器dbList = [{ totalArea: "0" }]; // 临时兜底,根据业务调整
}
let zaifuAreaRatio = 0;
if (孵化器dbList?.length > 0) {
// 处理园区总面积
const parkArea = 孵化器dbList[0].parkArea;
let 园区总面积 = isNaN(parkArea) ? 0 : parseFloat(parkArea);
let 园区总面积 = parseFloat(孵化器dbList[0].totalArea);
// 计算在孵企业的总面积
// 计算在孵总面积
let 在孵企业总面积 = 0;
fhdbList.forEach(info => {
let { enterprise_leases } = info;
enterprise_leases.forEach(lease => {
let area = lease.area || 0;
在孵企业总面积 += parseFloat(area);
info.enterprise_leases?.forEach(lease => {
const area = Number(lease.area) || 0;
在孵企业总面积 += isNaN(area) ? 0 : area;
});
});
// 计算在孵企业面积占比
let zaifuAreaRatio = (在孵企业总面积 / 园区总面积) * 100;
// 安全计算百分比
zaifuAreaRatio = 园区总面积 > 0
? (在孵企业总面积 / 园区总面积) * 100
: 0;
}
let 园区概况 = [
// { key: "园区面积", value: "0㎡" },
......
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