From 66d7c1424dd10f9204c4b14ace6ad5923a18a013 Mon Sep 17 00:00:00 2001 From: zhaobing Date: Fri, 4 Aug 2023 21:06:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=BB=9F=E8=AE=A1=E5=87=BA=E9=94=99?= =?UTF-8?q?=EF=BC=8Ccount=E6=94=B9=E6=88=90sum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/data/vehicle.js | 4 ++-- .../fillion/containers/maintenanceSpotCheck.js | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js index 4ba183a5..e27834f7 100644 --- a/api/app/lib/controllers/data/vehicle.js +++ b/api/app/lib/controllers/data/vehicle.js @@ -7,8 +7,8 @@ async function get(ctx) { const { type } = ctx.request.body; const { name } = ctx.query; const sequelize = ctx.fs.dc.orm - const sqlStr = `select count(p.road_marking) 标线,count(p.roadside_ditch) 边沟, - count(p.guardrail) 护栏, count(p.roadside_trees) 行道树,count(p.wrong_lane) 错车道 + const sqlStr = `select sum(p.road_marking) 标线,sum(p.roadside_ditch) 边沟, + sum(p.guardrail) 护栏, sum(p.roadside_trees) 行道树,sum(p.wrong_lane) 错车道 from ( select t.*,row_number() over (partition by t.luduan order by t.time desc ) rn from ( select code_road||'-'||road_section_start||'-'||road_section_end luduan, diff --git a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js index 28d119a7..01390aec 100644 --- a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js +++ b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js @@ -450,7 +450,7 @@ const MaintenanceSpotCheck = (props) => {
@@ -468,19 +468,18 @@ const MaintenanceSpotCheck = (props) => { > - % - + */} -
- -
+ +