Browse Source

事件多发路段分析接口修改

develop
lau572 1 year ago
parent
commit
3402e1fc0f
  1. 2
      zc-business/src/main/java/com/zc/business/service/impl/DcTrafficIncidentsServiceImpl.java
  2. 4
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

2
zc-business/src/main/java/com/zc/business/service/impl/DcTrafficIncidentsServiceImpl.java

@ -435,7 +435,7 @@ public class DcTrafficIncidentsServiceImpl implements IDcTrafficIncidentsService
BigDecimal yearNumRatio = new BigDecimal(map.get("num").toString()).multiply(new BigDecimal("100")).divide(new BigDecimal(map.get("lastYearNum").toString()),2, RoundingMode.HALF_UP);
map.put("yearNumRatio",yearNumRatio);
} else {
map.put("ratio",0);
map.put("yearNumRatio",0);
}
//时长同比

4
zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

@ -257,7 +257,7 @@
LEFT JOIN
(select t2.section_id, count(*) num
from dc_event t1
left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction
left join dc_stake_mark t2 on t1.stake_mark = t2.stake_mark and t1.direction = t2.direction
where
t1.event_type = '1' and t1.direction = #{direction}
<if test="type != null and type == '1'.toString">
@ -277,7 +277,7 @@
LEFT JOIN
(select t2.section_id, count(*) lastNum
from dc_event t1
left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction
left join dc_stake_mark t2 on t1.stake_mark = t2.stake_mark and t1.direction = t2.direction
where
t1.event_type = '1' and t1.direction = #{direction}
<if test="type != null and type == '1'.toString">

Loading…
Cancel
Save