diff --git a/api/app/lib/controllers/overview/building.js b/api/app/lib/controllers/overview/building.js index 2b413cd3..a68e32ae 100644 --- a/api/app/lib/controllers/overview/building.js +++ b/api/app/lib/controllers/overview/building.js @@ -54,13 +54,20 @@ async function roadState (ctx) { bridgeCount: bridgeRes.length, // 涵洞数量 culvertCount: 0, - // 施工统计 + // 施工统计 已建 construction: constructionYear.map(year => { return { year, count: 0, } }), + // 施工统计 改建 + constructionRebuild: constructionYear.map(year => { + return { + year, + count: 0, + } + }), // 乡镇统计 townRoad: { @@ -128,7 +135,7 @@ async function roadState (ctx) { if (corBuildConstruction) { corBuildConstruction.count += Number(r.chainageMileage) || 0 } - let corReBuildConstruction = roadState.construction.find(item => item.year === rebuildYear) + let corReBuildConstruction = roadState.constructionRebuild.find(item => item.year === rebuildYear) if (corReBuildConstruction) { corReBuildConstruction.count += Number(r.chainageMileage) || 0 } diff --git a/api/app/lib/controllers/overview/management.js b/api/app/lib/controllers/overview/management.js index c97d3a35..38623602 100644 --- a/api/app/lib/controllers/overview/management.js +++ b/api/app/lib/controllers/overview/management.js @@ -7,7 +7,7 @@ async function overSpeedList (ctx) { const { limit } = ctx.query; const overSpeedRes = await models.Overspeed.findAll({ - attributes: ['id', 'licensePlate', 'overrunRate', 'deductPoints', 'fine', 'processingTime', 'testTime'], + attributes: ['id', 'licensePlate', 'overrunRate', 'deductPoints', 'fine', 'processingTime', 'testTime', 'nameOfInspectionPoint'], order: [['testTime', 'DESC']], limit: limit || 120, where: {