提交 2fcb6e13 authored 作者: Phyday's avatar Phyday

综合监测界面逻辑修改

上级 e7c3d84a
...@@ -61,15 +61,7 @@ CREATE TABLE `road_condition_event` ...@@ -61,15 +61,7 @@ CREATE TABLE `road_condition_event`
SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;
INSERT INTO `aroad`.`sys_menu`(`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `component`, `sort`, INSERT INTO `aroad`.`sys_menu` VALUES (70000, '路况管理', NULL, '/roadcondition', -1, NULL, NULL, 7, '0', '0', '2019-04-23 11:16:58', '2019-04-23 11:17:22', '0');
`keep_alive`, `type`, `create_time`, `update_time`, `del_flag`) INSERT INTO `aroad`.`sys_menu` VALUES (71000, '路况事件统计', NULL, '/roadConditionShow', 70000, NULL, 'views/roadcondition/roadConditionShow/index', 1, '0','0', '2019-04-23 11:19:38', NULL, '0');
VALUES (70000, '路况管理', NULL, '/roadcondition', -1, NULL, NULL, 7, '0', '0', '2019-04-23 11:16:58', INSERT INTO `aroad`.`sys_menu` VALUES (72000, '路况事件查询', NULL, '/roadConditionManage', 70000, NULL, 'views/roadcondition/roadConditionManage/index', 2,'0', '0', '2019-04-24 17:18:24', NULL, '0');
'2019-04-23 11:17:22', '0'); INSERT INTO `aroad`.`sys_menu` VALUES (73000, '路况权限管理', NULL, '/userPermissionManage', 70000, NULL, 'views/roadcondition/userPermissionManage/index', 3, '0', '0', '2019-05-20 09:19:35', NULL, '0');
INSERT INTO `aroad`.`sys_menu`(`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `component`, `sort`, \ No newline at end of file
`keep_alive`, `type`, `create_time`, `update_time`, `del_flag`)
VALUES (71000, '路况事件统计', NULL, '/roadConditionShow', 70000, NULL, 'views/roadcondition/roadConditionShow/index', 1, '0',
'0', '2019-04-23 11:19:38', NULL, '0');
INSERT INTO `aroad`.`sys_menu`(`menu_id`, `name`, `permission`, `path`, `parent_id`, `icon`, `component`, `sort`,
`keep_alive`, `type`, `create_time`, `update_time`, `del_flag`)
VALUES (72000, '路况事件查询', NULL, '/roadConditionManage', 70000, NULL, 'views/roadcondition/roadConditionManage/index', 2,
'0', '0', '2019-04-24 17:18:24', NULL, '0');
...@@ -195,6 +195,11 @@ public class RoadConditionEventController extends BaseController { ...@@ -195,6 +195,11 @@ public class RoadConditionEventController extends BaseController {
return new R<>(roadConditionEventService.getSFZCoordinates()); return new R<>(roadConditionEventService.getSFZCoordinates());
} }
@GetMapping("/geteventamount")
public R getEventAmount() {
return new R<>(roadConditionEventService.getEventAmount());
}
/** /**
* @description : 部门和管理单位权限管理 * @description : 部门和管理单位权限管理
* @author : Xingyuyang * @author : Xingyuyang
......
package com.elephant.framework.galaxy.aroad.module.roadcondition.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author: XingYuyang
* @Description:
* @Date: Created in 2019/4/23 0023 1832
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EventAmountDto implements Serializable {
/**
* 视频数量
*/
public String spAmount;
/**
* 路况事件数量
*/
public String lkAmount;
/**
* 交通量数量
*/
public String jtlAmount;
}
...@@ -38,6 +38,10 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent> ...@@ -38,6 +38,10 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
List<CoordinateDto> getCoordinates(@Param("units") List units); List<CoordinateDto> getCoordinates(@Param("units") List units);
EventAmountDto getLKAmount();
EventAmountDto getSPAmount();
EventAmountDto getJTLAmount();
List<CoordinateDto> getTQCoordinates(); List<CoordinateDto> getTQCoordinates();
List<CoordinateDto> getYHCoordinates(); List<CoordinateDto> getYHCoordinates();
......
...@@ -170,6 +170,8 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent> ...@@ -170,6 +170,8 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
List<DeptUnitDto> getUnitByDept(String deptId); List<DeptUnitDto> getUnitByDept(String deptId);
EventAmountDto getEventAmount();
boolean saveUnit(); boolean saveUnit();
boolean deleteUnit(); boolean deleteUnit();
......
...@@ -8,7 +8,6 @@ import com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*; ...@@ -8,7 +8,6 @@ import com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*;
import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent; import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent;
import com.elephant.framework.galaxy.aroad.module.roadcondition.mapper.RoadConditionEventMapper; import com.elephant.framework.galaxy.aroad.module.roadcondition.mapper.RoadConditionEventMapper;
import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService; import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
...@@ -248,6 +247,19 @@ public class RoadConditionEventServiceImpl ...@@ -248,6 +247,19 @@ public class RoadConditionEventServiceImpl
return baseMapper.getUnitByDept(deptId); return baseMapper.getUnitByDept(deptId);
} }
public EventAmountDto getEventAmount(){
List<EventAmountDto> amountList = new ArrayList<>();
amountList.add(baseMapper.getLKAmount());
amountList.add(baseMapper.getSPAmount());
amountList.add(baseMapper.getJTLAmount());
//System.out.println(amountList);
EventAmountDto eventAmountDto = new EventAmountDto();
eventAmountDto.setLkAmount(amountList.get(0).lkAmount);
eventAmountDto.setSpAmount(amountList.get(1).spAmount);
eventAmountDto.setJtlAmount(amountList.get(2).jtlAmount);
return eventAmountDto;
}
// @Cacheable(value = "roadConditionCoordinates") // @Cacheable(value = "roadConditionCoordinates")
public List<CoordinateDto> getCoordinates(@Param("deptId") String deptId) { public List<CoordinateDto> getCoordinates(@Param("deptId") String deptId) {
List<DeptUnitDto> unitList = baseMapper.getUnitByDept(deptId); List<DeptUnitDto> unitList = baseMapper.getUnitByDept(deptId);
......
...@@ -110,6 +110,25 @@ ...@@ -110,6 +110,25 @@
<result property="emergencyEventId" column="emergency_event_id"/> <result property="emergencyEventId" column="emergency_event_id"/>
</resultMap> </resultMap>
<resultMap id="EventAmountMap"
type="com.elephant.framework.galaxy.aroad.module.roadcondition.dto.EventAmountDto">
<result property="lkAmount" column="lkAmount"/>
<result property="jtlAmount" column="jtlAmount"/>
<result property="spAmount" column="spAmount"/>
</resultMap>
<resultMap id="LKAmountMap"
type="com.elephant.framework.galaxy.aroad.module.roadcondition.dto.LKAmountDto">
<result property="lkAmount" column="lkAmount"/>
</resultMap>
<resultMap id="JTLAmountMap"
type="com.elephant.framework.galaxy.aroad.module.roadcondition.dto.JTLAmountDto">
<result property="jtlAmount" column="jtlAmount"/>
</resultMap>
<resultMap id="SPAmountMap"
type="com.elephant.framework.galaxy.aroad.module.roadcondition.dto.SPAmountDto">
<result property="spAmount" column="spAmount"/>
</resultMap>
<!-- <insert id="saveEmergencyUnit">--> <!-- <insert id="saveEmergencyUnit">-->
<!-- INSERT INTO roadcondition_emergency ( event_id, emergency_event_id )--> <!-- INSERT INTO roadcondition_emergency ( event_id, emergency_event_id )-->
<!-- values (#{eventId},#{emergencyEventId})--> <!-- values (#{eventId},#{emergencyEventId})-->
...@@ -265,6 +284,19 @@ ...@@ -265,6 +284,19 @@
where event_title = '收费站异常'; where event_title = '收费站异常';
</select> </select>
<select id="getLKAmount" resultMap="EventAmountMap">
select count(0) as lkAmount
from `road_condition_event`
</select>
<select id="getSPAmount" resultMap="EventAmountMap">
select count(0) as spAmount
from `t_szgl_gsd_spdw`
</select>
<select id="getJTLAmount" resultMap="EventAmountMap">
select count(0) as jtlAmount
from `t_szgl_gsd_gcz`
</select>
<select id="selectRoadMaintainEvent" <select id="selectRoadMaintainEvent"
parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent" parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
resultMap="roadConditionEventMap"> resultMap="roadConditionEventMap">
......
...@@ -44,18 +44,21 @@ ...@@ -44,18 +44,21 @@
lxmc like CONCAT('%',#{trafficSpot.roadName},'%') lxmc like CONCAT('%',#{trafficSpot.roadName},'%')
or or
lxbh like CONCAT('%',#{trafficSpot.roadName},'%') lxbh like CONCAT('%',#{trafficSpot.roadName},'%')
and
</if> </if>
LENGTH(lxbh)=4
</where> </where>
</select> </select>
<select id="getCoordinates" resultMap="CoordinateDtoMap"> <select id="getCoordinates" resultMap="CoordinateDtoMap">
select id, jd, wd select id, jd, wd
from `t_szgl_gsd_gcz`; from `t_szgl_gsd_gcz`
where LENGTH(lxbh)=4;
</select> </select>
<select id="getById" resultMap="trafficSpotMap"> <select id="getById" resultMap="trafficSpotMap">
select * select *
from `t_szgl_gsd_gcz` from `t_szgl_gsd_gcz`
where id=#{rowId}; where id=#{rowId} and LENGTH(lxbh)=4;
</select> </select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论