Commit a2fe17fe by chenjinjing
parents a8373a09 e2a26362
...@@ -45,6 +45,7 @@ export async function getZhyy() { ...@@ -45,6 +45,7 @@ export async function getZhyy() {
let areaCount = 0; let areaCount = 0;
let enterpriseCount = 0; let enterpriseCount = 0;
let 面积变化Map = {}; let 面积变化Map = {};
let thisYear = new Date().getFullYear();
let firstDayMsOfMonth = moment().startOf('month').valueOf(); let firstDayMsOfMonth = moment().startOf('month').valueOf();
let checlTimeMs = moment(firstDayMsOfMonth).subtract(8, 'months').valueOf(); let checlTimeMs = moment(firstDayMsOfMonth).subtract(8, 'months').valueOf();
...@@ -75,6 +76,7 @@ export async function getZhyy() { ...@@ -75,6 +76,7 @@ export async function getZhyy() {
if (enterprise_leases[0].startTime && enterprise_leases[0].endTime ) { if (enterprise_leases[0].startTime && enterprise_leases[0].endTime ) {
let leasesYearList = getStartAndEndTimeYearList(enterprise_leases[0].startTime , enterprise_leases[0].endTime); let leasesYearList = getStartAndEndTimeYearList(enterprise_leases[0].startTime , enterprise_leases[0].endTime);
leasesYearList.forEach(itemYear => { leasesYearList.forEach(itemYear => {
if (itemYear > thisYear) return;
if (!面积变化Map[itemYear] ) 面积变化Map[itemYear] = {key:itemYear, value:0}; if (!面积变化Map[itemYear] ) 面积变化Map[itemYear] = {key:itemYear, value:0};
面积变化Map[itemYear].value += parseFloat(area); 面积变化Map[itemYear].value += parseFloat(area);
}); });
...@@ -258,14 +260,15 @@ export async function getZhyy() { ...@@ -258,14 +260,15 @@ export async function getZhyy() {
jiuYeList.forEach(info => { jiuYeList.forEach(info => {
let {eId, annual} = info; let {eId, annual} = info;
let itemCount = 0; let itemCount = 0;
let itemYear = new Date(annual).getFullYear();
if (info.zhuanKe) itemCount += info.zhuanKe; if (info.zhuanKe) itemCount += info.zhuanKe;
if (info.benKe) itemCount += info.benKe; if (info.benKe) itemCount += info.benKe;
if (info.shuoshi) itemCount += info.shuoshi; if (info.shuoshi) itemCount += info.shuoshi;
if (info.boShi) itemCount += info.boShi; if (info.boShi) itemCount += info.boShi;
if (info.boshiyishang) itemCount += info.boshiyishang; if (info.boshiyishang) itemCount += info.boshiyishang;
if (!年度就业人数趋势分析Map[annual]) 年度就业人数趋势分析Map[annual] = {key:annual, value:0}; if (!年度就业人数趋势分析Map[itemYear]) 年度就业人数趋势分析Map[itemYear] = {key:itemYear, value:0};
年度就业人数趋势分析Map[annual].value += itemCount; 年度就业人数趋势分析Map[itemYear].value += itemCount;
}); });
let 年度就业人数趋势分析 = Object.values(年度就业人数趋势分析Map); let 年度就业人数趋势分析 = Object.values(年度就业人数趋势分析Map);
......
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