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

综合监测界面逻辑修改

上级 e7c3d84a
......@@ -61,15 +61,7 @@ CREATE TABLE `road_condition_event`
SET FOREIGN_KEY_CHECKS = 1;
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 (70000, '路况管理', NULL, '/roadcondition', -1, NULL, NULL, 7, '0', '0', '2019-04-23 11:16:58',
'2019-04-23 11:17:22', '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 (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');
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');
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');
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');
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');
\ No newline at end of file
/*
MySQL Backup
Database: aroad
Backup Time: 2019-05-07 10:35:35
Backup Time: 2019-5-27 09:55:52
*/
SET FOREIGN_KEY_CHECKS=0;
DROP VIEW IF EXISTS `aroad`.`v_traffic_spot`;
SET FOREIGN_KEY_CHECKS = 0;
DROP VIEW IF EXISTS `aroad`.`v_traffic_route`;
DROP VIEW IF EXISTS `aroad`.`v_traffic_roadsection`;
DROP FUNCTION IF EXISTS `aroad`.`func_inc_var_session`;
CREATE DEFINER=`root`@`localhost` FUNCTION `func_inc_var_session`(reset BIT) RETURNS int(11)
CREATE
DEFINER = `root`@`localhost` FUNCTION `func_inc_var_session`(reset BIT) RETURNS int(11)
BEGIN
IF reset THEN
SET @var := 0;
ELSE
SET @var := IFNULL(@var,0) + 1;
END IF;
return @var;
IF reset THEN
SET @var := 0;
ELSE
SET @var := IFNULL(@var, 0) + 1;
END IF;
return @var;
END;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_traffic_spot` AS select `func_inc_var_session`(0) AS `row_id`,`aroad`.`t_lwjc_gdgczlk`.`guancezhanbianhao` AS `spot_code`,`aroad`.`t_lwjc_gdgczlk`.`guancezhanmingcheng` AS `spot_name`,`aroad`.`t_lwjc_gdgczlk`.`luxianbianhao` AS `road_code`,`aroad`.`t_lwjc_gdgczlk`.`luxianmingcheng` AS `road_name`,`aroad`.`t_lwjc_gdgczlk`.`xingzhengquhua` AS `XZQH`,`aroad`.`t_lwjc_gdgczlk`.`guancezhanleixing` AS `spot_type`,`aroad`.`t_lwjc_gdgczlk`.`guanchezhanzhuanghao` AS `spotM`,`aroad`.`t_lwjc_gdgczlk`.`qidianzhuanghao` AS `startM`,`aroad`.`t_lwjc_gdgczlk`.`zhongdianzhuanghao` AS `endM`,`aroad`.`t_lwjc_gdgczlk`.`guancelicheng` AS `length`,`aroad`.`t_lwjc_gdgczlk`.`qidianmingcheng` AS `start_name`,`aroad`.`t_lwjc_gdgczlk`.`zhongdianmingcheng` AS `end_name`,`aroad`.`t_lwjc_gdgczlk`.`jishudengji` AS `tech_level`,`aroad`.`t_lwjc_gdgczlk`.`xingchedaoshu` AS `car_rows`,`aroad`.`t_lwjc_gdgczlk`.`miancengleixing` AS `face_type`,`aroad`.`t_lwjc_gdgczlk`.`lumiankuandu` AS `width`,`aroad`.`t_lwjc_gdgczlk`.`shejishisu` AS `speed`,`aroad`.`t_lwjc_gdgczlk`.`dixing` AS `landscape`,`aroad`.`t_lwjc_gdgczlk`.`tingceyuefen` AS `stop_month`,`aroad`.`t_lwjc_gdgczlk`.`nian` AS `year` from (`aroad`.`t_lwjc_gdgczlk` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`) union all select `func_inc_var_session`(0) AS `row_id`,`aroad`.`t_lwjc_sdgczlk`.`guancezhanbianhao` AS `spot_code`,`aroad`.`t_lwjc_sdgczlk`.`guancezhanmingcheng` AS `spot_name`,`aroad`.`t_lwjc_sdgczlk`.`luxianbianhao` AS `road_code`,`aroad`.`t_lwjc_sdgczlk`.`luxianmingcheng` AS `road_name`,`aroad`.`t_lwjc_sdgczlk`.`xingzhengquhua` AS `XZQH`,`aroad`.`t_lwjc_sdgczlk`.`guancezhanleixing` AS `spot_type`,`aroad`.`t_lwjc_sdgczlk`.`guanchezhanzhuanghao` AS `spotM`,`aroad`.`t_lwjc_sdgczlk`.`qidianzhuanghao` AS `startM`,`aroad`.`t_lwjc_sdgczlk`.`zhongdianzhuanghao` AS `endM`,`aroad`.`t_lwjc_sdgczlk`.`guancelicheng` AS `length`,`aroad`.`t_lwjc_sdgczlk`.`qidianmingcheng` AS `start_name`,`aroad`.`t_lwjc_sdgczlk`.`zhongdianmingcheng` AS `end_name`,`aroad`.`t_lwjc_sdgczlk`.`jishudengji` AS `tech_level`,`aroad`.`t_lwjc_sdgczlk`.`xingchedaoshu` AS `car_rows`,`aroad`.`t_lwjc_sdgczlk`.`miancengleixing` AS `face_type`,`aroad`.`t_lwjc_sdgczlk`.`lumiankuandu` AS `width`,`aroad`.`t_lwjc_sdgczlk`.`shejishisu` AS `speed`,`aroad`.`t_lwjc_sdgczlk`.`dixing` AS `landscape`,`aroad`.`t_lwjc_sdgczlk`.`tingceyuefen` AS `stop_month`,`aroad`.`t_lwjc_sdgczlk`.`nian` AS `year` from (`aroad`.`t_lwjc_sdgczlk` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`);
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_traffic_route` AS select `func_inc_var_session`(0) AS `id`,`aroad`.`t_lwjc_sdlxjtl`.`luxianbianhao` AS `road_code`,`aroad`.`t_lwjc_sdlxjtl`.`luxianmingcheng` AS `road_name`,`aroad`.`t_lwjc_sdlxjtl`.`guancelicheng` AS `spot_length`,`aroad`.`t_lwjc_sdlxjtl`.`jidongche_dangliangheji` AS `JDC_current_amount`,`aroad`.`t_lwjc_sdlxjtl`.`jidongche_ziranheji` AS `JDC_natural_amount`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_dangliangheji` AS `QC_current_amount`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_ziranheji` AS `QC_natural_amount`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,`aroad`.`t_lwjc_sdlxjtl`.`qiche_dakeche` AS `QC_l_bus`,`aroad`.`t_lwjc_sdlxjtl`.`motuoche` AS `motor`,`aroad`.`t_lwjc_sdlxjtl`.`tuolaji_dangliangshu` AS `TLJ_current_amount`,`aroad`.`t_lwjc_sdlxjtl`.`tuolaji_ziranshu` AS `TLJ_natural_amount`,`aroad`.`t_lwjc_sdlxjtl`.`xingshiliang` AS `drive_amount`,`aroad`.`t_lwjc_sdlxjtl`.`shiyingjiaotongliang` AS `adapt_amount`,`aroad`.`t_lwjc_sdlxjtl`.`jiaotongyongjidu` AS `crowd`,`aroad`.`t_lwjc_sdlxjtl`.`nian` AS `year` from (`aroad`.`t_lwjc_sdlxjtl` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`) where (`aroad`.`t_lwjc_sdlxjtl`.`luxianmingcheng` <> '合计') union all select `func_inc_var_session`(0) AS `id`,`aroad`.`t_lwjc_gdlxjtl`.`luxianbianhao` AS `road_code`,`aroad`.`t_lwjc_gdlxjtl`.`luxianmingcheng` AS `road_name`,`aroad`.`t_lwjc_gdlxjtl`.`guancelicheng` AS `spot_length`,`aroad`.`t_lwjc_gdlxjtl`.`jidongche_dangliangheji` AS `JDC_current_amount`,`aroad`.`t_lwjc_gdlxjtl`.`jidongche_ziranheji` AS `JDC_natural_amount`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_dangliangheji` AS `QC_current_amount`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_ziranheji` AS `QC_natural_amount`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,`aroad`.`t_lwjc_gdlxjtl`.`qiche_dakeche` AS `QC_l_bus`,`aroad`.`t_lwjc_gdlxjtl`.`motuoche` AS `motor`,`aroad`.`t_lwjc_gdlxjtl`.`tuolaji_dangliangshu` AS `TLJ_current_amount`,`aroad`.`t_lwjc_gdlxjtl`.`tuolaji_ziranshu` AS `TLJ_natural_amount`,`aroad`.`t_lwjc_gdlxjtl`.`xingshiliang` AS `drive_amount`,`aroad`.`t_lwjc_gdlxjtl`.`shiyingjiaotongliang` AS `adapt_amount`,`aroad`.`t_lwjc_gdlxjtl`.`jiaotongyongjidu` AS `crowd`,`aroad`.`t_lwjc_gdlxjtl`.`nian` AS `year` from (`aroad`.`t_lwjc_gdlxjtl` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`) where (`aroad`.`t_lwjc_gdlxjtl`.`luxianmingcheng` <> '合计');
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_traffic_roadsection` AS select `func_inc_var_session`(0) AS `id`,`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanmingcheng` AS `spot_name`,`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanbianhao` AS `spot_code`,`aroad`.`t_lwjc_gdldnpjrjtl`.`guancelicheng` AS `spot_length`,`aroad`.`t_lwjc_gdldnpjrjtl`.`jishudengji` AS `tech_level`,`aroad`.`t_lwjc_gdldnpjrjtl`.`luxiankuandu` AS `road_width`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_dakeche` AS `QC_l_bus`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_qichexiaoji_ziranheji` AS `QC_natural_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_qichexiaoji_dangliangheji` AS `QC_current_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`motuocheziranshu` AS `motor`,`aroad`.`t_lwjc_gdldnpjrjtl`.`tuolajiheji_dangliangshu` AS `TLJ_current_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`tuolajiheji_ziranshu` AS `TLJ_natural_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`jidongcheheji_ziranheji` AS `JDC_current_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`jidongcheheji_dangliangheji` AS `JDC_natural_amount`,`aroad`.`t_lwjc_gdldnpjrjtl`.`nian` AS `year` from (`aroad`.`t_lwjc_gdldnpjrjtl` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`) where (`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanmingcheng` <> '全线平均') union all select `func_inc_var_session`(0) AS `id`,`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanmingcheng` AS `spot_name`,`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanbianhao` AS `spot_code`,`aroad`.`t_lwjc_sdldnpjrjtl`.`guancelicheng` AS `spot_length`,`aroad`.`t_lwjc_sdldnpjrjtl`.`jishudengji` AS `tech_level`,`aroad`.`t_lwjc_sdldnpjrjtl`.`luxiankuandu` AS `road_width`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_dakeche` AS `QC_l_bus`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_qichexiaoji_ziranheji` AS `QC_natural_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_qichexiaoji_dangliangheji` AS `QC_current_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`motuocheziranshu` AS `motor`,`aroad`.`t_lwjc_sdldnpjrjtl`.`tuolajiheji_dangliangshu` AS `TLJ_current_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`tuolajiheji_ziranshu` AS `TLJ_natural_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`jidongcheheji_ziranheji` AS `JDC_current_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`jidongcheheji_dangliangheji` AS `JDC_natural_amount`,`aroad`.`t_lwjc_sdldnpjrjtl`.`nian` AS `year` from (`aroad`.`t_lwjc_sdldnpjrjtl` join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`) where (`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanmingcheng` <> '全线平均');
CREATE ALGORITHM = UNDEFINED DEFINER =`root`@`localhost` SQL SECURITY DEFINER VIEW `v_traffic_route` AS select `func_inc_var_session`(0) AS `id`,
`aroad`.`t_lwjc_sdlxjtl`.`luxianbianhao` AS `road_code`,
`aroad`.`t_lwjc_sdlxjtl`.`luxianmingcheng` AS `road_name`,
`aroad`.`t_lwjc_sdlxjtl`.`guancelicheng` AS `spot_length`,
`aroad`.`t_lwjc_sdlxjtl`.`jidongche_dangliangheji` AS `JDC_current_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`jidongche_ziranheji` AS `JDC_natural_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_dangliangheji` AS `QC_current_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_ziranheji` AS `QC_natural_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,
`aroad`.`t_lwjc_sdlxjtl`.`qiche_dakeche` AS `QC_l_bus`,
`aroad`.`t_lwjc_sdlxjtl`.`motuoche` AS `motor`,
`aroad`.`t_lwjc_sdlxjtl`.`tuolaji_dangliangshu` AS `TLJ_current_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`tuolaji_ziranshu` AS `TLJ_natural_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`xingshiliang` AS `drive_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`shiyingjiaotongliang` AS `adapt_amount`,
`aroad`.`t_lwjc_sdlxjtl`.`jiaotongyongjidu` AS `crowd`,
`aroad`.`t_lwjc_sdlxjtl`.`nian` AS `year`
from (`aroad`.`t_lwjc_sdlxjtl`
join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`)
where ((`aroad`.`t_lwjc_sdlxjtl`.`luxianmingcheng` <> '合计') and
(length(`aroad`.`t_lwjc_sdlxjtl`.`luxianbianhao`) = 4))
union all
select `func_inc_var_session`(0) AS `id`,
`aroad`.`t_lwjc_gdlxjtl`.`luxianbianhao` AS `road_code`,
`aroad`.`t_lwjc_gdlxjtl`.`luxianmingcheng` AS `road_name`,
`aroad`.`t_lwjc_gdlxjtl`.`guancelicheng` AS `spot_length`,
`aroad`.`t_lwjc_gdlxjtl`.`jidongche_dangliangheji` AS `JDC_current_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`jidongche_ziranheji` AS `JDC_natural_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_dangliangheji` AS `QC_current_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_ziranheji` AS `QC_natural_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,
`aroad`.`t_lwjc_gdlxjtl`.`qiche_dakeche` AS `QC_l_bus`,
`aroad`.`t_lwjc_gdlxjtl`.`motuoche` AS `motor`,
`aroad`.`t_lwjc_gdlxjtl`.`tuolaji_dangliangshu` AS `TLJ_current_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`tuolaji_ziranshu` AS `TLJ_natural_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`xingshiliang` AS `drive_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`shiyingjiaotongliang` AS `adapt_amount`,
`aroad`.`t_lwjc_gdlxjtl`.`jiaotongyongjidu` AS `crowd`,
`aroad`.`t_lwjc_gdlxjtl`.`nian` AS `year`
from (`aroad`.`t_lwjc_gdlxjtl`
join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`)
where ((`aroad`.`t_lwjc_gdlxjtl`.`luxianmingcheng` <> '合计') and
(length(`aroad`.`t_lwjc_gdlxjtl`.`luxianbianhao`) = 4));
CREATE ALGORITHM = UNDEFINED DEFINER =`root`@`localhost` SQL SECURITY DEFINER VIEW `v_traffic_roadsection` AS select `func_inc_var_session`(0) AS `id`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanmingcheng` AS `spot_name`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanbianhao` AS `spot_code`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`guancelicheng` AS `spot_length`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`jishudengji` AS `tech_level`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`luxiankuandu` AS `road_width`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_dakeche` AS `QC_l_bus`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_qichexiaoji_ziranheji` AS `QC_natural_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`qiche_qichexiaoji_dangliangheji` AS `QC_current_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`motuocheziranshu` AS `motor`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`tuolajiheji_dangliangshu` AS `TLJ_current_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`tuolajiheji_ziranshu` AS `TLJ_natural_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`jidongcheheji_ziranheji` AS `JDC_current_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`jidongcheheji_dangliangheji` AS `JDC_natural_amount`,
`aroad`.`t_lwjc_gdldnpjrjtl`.`nian` AS `year`
from (`aroad`.`t_lwjc_gdldnpjrjtl`
join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`)
where ((`aroad`.`t_lwjc_gdldnpjrjtl`.`guanchazhanmingcheng` <> '全线平均') and
(`aroad`.`t_lwjc_gdldnpjrjtl`.`jishudengji` <> '高速公路'))
union all
select `func_inc_var_session`(0) AS `id`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanmingcheng` AS `spot_name`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanbianhao` AS `spot_code`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`guancelicheng` AS `spot_length`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`jishudengji` AS `tech_level`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`luxiankuandu` AS `road_width`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_xiaoxinghuoche` AS `QC_s_truck`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_zhongxinghuoche` AS `QC_m_truck`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_daxinghuoche` AS `QC_l_truck`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_tedahuoche` AS `QC_xl_truck`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_jizhuangxiangche` AS `QC_jzx_truck`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_zhongxiaokeche` AS `QC_sm_bus`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_dakeche` AS `QC_l_bus`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_qichexiaoji_ziranheji` AS `QC_natural_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`qiche_qichexiaoji_dangliangheji` AS `QC_current_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`motuocheziranshu` AS `motor`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`tuolajiheji_dangliangshu` AS `TLJ_current_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`tuolajiheji_ziranshu` AS `TLJ_natural_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`jidongcheheji_ziranheji` AS `JDC_current_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`jidongcheheji_dangliangheji` AS `JDC_natural_amount`,
`aroad`.`t_lwjc_sdldnpjrjtl`.`nian` AS `year`
from (`aroad`.`t_lwjc_sdldnpjrjtl`
join (select `func_inc_var_session`(1) AS `func_inc_var_session(1)`) `r`)
where ((`aroad`.`t_lwjc_sdldnpjrjtl`.`guanchazhanmingcheng` <> '全线平均') and
(`aroad`.`t_lwjc_sdldnpjrjtl`.`jishudengji` <> '高速公路'));
......@@ -195,6 +195,11 @@ public class RoadConditionEventController extends BaseController {
return new R<>(roadConditionEventService.getSFZCoordinates());
}
@GetMapping("/geteventamount")
public R getEventAmount() {
return new R<>(roadConditionEventService.getEventAmount());
}
/**
* @description : 部门和管理单位权限管理
* @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>
List<CoordinateDto> getCoordinates(@Param("units") List units);
EventAmountDto getLKAmount();
EventAmountDto getSPAmount();
EventAmountDto getJTLAmount();
List<CoordinateDto> getTQCoordinates();
List<CoordinateDto> getYHCoordinates();
......
......@@ -170,6 +170,8 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
List<DeptUnitDto> getUnitByDept(String deptId);
EventAmountDto getEventAmount();
boolean saveUnit();
boolean deleteUnit();
......
......@@ -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.mapper.RoadConditionEventMapper;
import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import lombok.AllArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
......@@ -248,6 +247,19 @@ public class RoadConditionEventServiceImpl
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")
public List<CoordinateDto> getCoordinates(@Param("deptId") String deptId) {
List<DeptUnitDto> unitList = baseMapper.getUnitByDept(deptId);
......
......@@ -110,6 +110,25 @@
<result property="emergencyEventId" column="emergency_event_id"/>
</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 INTO roadcondition_emergency ( event_id, emergency_event_id )-->
<!-- values (#{eventId},#{emergencyEventId})-->
......@@ -265,6 +284,19 @@
where event_title = '收费站异常';
</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"
parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
resultMap="roadConditionEventMap">
......
......@@ -44,18 +44,21 @@
lxmc like CONCAT('%',#{trafficSpot.roadName},'%')
or
lxbh like CONCAT('%',#{trafficSpot.roadName},'%')
and
</if>
LENGTH(lxbh)=4
</where>
</select>
<select id="getCoordinates" resultMap="CoordinateDtoMap">
select id, jd, wd
from `t_szgl_gsd_gcz`;
from `t_szgl_gsd_gcz`
where LENGTH(lxbh)=4;
</select>
<select id="getById" resultMap="trafficSpotMap">
select *
from `t_szgl_gsd_gcz`
where id=#{rowId};
where id=#{rowId} and LENGTH(lxbh)=4;
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论