提交 51864f46 authored 作者: xuyanqi's avatar xuyanqi

路线--数字公路、养护评价、周边监控、交通流量、路况事件

上级 67c2cb3e
......@@ -115,4 +115,8 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
boolean deleteEvent();
List<RoadConditionEvent> getLksjForQS(String lxbh, Double zxzh);
/**
* 根据路线起点与止点路线编号查询路况事件
*/
List<RoadConditionEvent> getQzdzhEvent( String qdzh,String zdzh,String lxbh);
}
......@@ -186,4 +186,9 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
* @return
*/
List<RoadConditionEvent> getLksjForQS(String lxbh, Double valueOf);
/**
* 根据路线起点与止点路线编号查询路况事件
*/
List<RoadConditionEvent> getQzdzhEvent( String qdzh,String zdzh,String lxbh);
}
......@@ -407,4 +407,9 @@ public class RoadConditionEventServiceImpl
return list;
}
@Override
public List<RoadConditionEvent> getQzdzhEvent(String qdzh, String zdzh, String lxbh) {
return roadConditionEventMapper.getQzdzhEvent(qdzh,zdzh,lxbh);
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.bigdata.*;
import com.elephant.framework.galaxy.aroad.module.codegen.response.R;
import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata;
import com.elephant.framework.galaxy.aroad.module.indexES.service.BaseindexdataService;
import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent;
import com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.Line;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglService;
import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import java.util.ArrayList;
......@@ -269,4 +268,12 @@ public class SzglController {
public R getJYlsForQS(@PathVariable String lxbh, @PathVariable String zxzh){
return new R(szglService.getJYlsForQS(lxbh,Double.valueOf(zxzh)));
}
/**
* 根据路线起点桩号与止点桩号查询路况事件
*/
@GetMapping("/qzzhevent")
public R getQzZhEvent(@RequestParam("roadCode") String roadCode, @RequestParam("startM") String startM, @RequestParam("endM") String endM){
return new R<>(eventService.getQzdzhEvent(startM,endM,roadCode));
}
}
\ No newline at end of file
......@@ -8,11 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdGczService;
import com.elephant.framework.galaxy.aroad.response.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
......@@ -64,5 +60,12 @@ public class SzglGsdGczController extends BaseController {
public R getGczForQS(@PathVariable String lxbh,@PathVariable String zxzh){
return new R<>(szglGsdGczService.getGczForQS(lxbh,Double.valueOf(zxzh)));
}
/**
* 查询路线编号下的交通流量
*/
@GetMapping("/spotcode")
public R getSpotCode(@RequestParam("lxbh") String lxbh, @RequestParam("qdzh") String qdzh, @RequestParam("zdzh") String zdzh){
return new R<>(szglGsdGczService.querySpotCode(lxbh,qdzh, zdzh));
}
}
......@@ -8,6 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdSpdw;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdSpdwService;
import lombok.AllArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
......@@ -92,5 +93,12 @@ public class SzglGsdSpdwController extends BaseController {
List<SzglGsdSpdw> list = szglGsdSpdwService.list(queryWrapper);
return new R(list);
}
/**
* 根据路线起点桩号与止点桩号查询周边监控
*/
@GetMapping("/qzdzh")
public R getQdZh(@RequestParam("qdzh") String qdzh, @RequestParam("zdzh") String zdzh,@RequestParam("lxbh")String lxbh){
return new R<>(szglGsdSpdwService.list(Wrappers.<SzglGsdSpdw>lambdaQuery().eq(SzglGsdSpdw::getLxbh,lxbh).between(SzglGsdSpdw::getZh, qdzh,zdzh)));
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import java.util.List;
import java.util.Map;
/**
* 数字公路-观测站
......@@ -28,4 +30,6 @@ public interface SzglGsdGczMapper extends BaseMapper<SzglGsdGcz> {
* @return
*/
List<SzglGsdGcz> getAllGcz();
/*查询路线编号下的交通流量*/
List<Map<String,Object>> querySpotCode(@Param("lxbh") String lxbh,@Param("qdzh") String qdzh, @Param("zdzh") String zdzh);
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import java.util.List;
import java.util.Map;
/**
* 数字公路-观测站
......@@ -23,4 +25,5 @@ public interface SzglGsdGczService extends IService<SzglGsdGcz> {
* 全部观测站
*/
List<SzglGsdGcz> getAllkGcz(SzglGsdGcz szglGsdGcz);
List<Map<String,Object>> querySpotCode(String lxbh,String qdzh, String zdzh);
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxm;
import com.elephant.framework.galaxy.aroad.module.zhjs.entity.ZhjsGcxmShape;
......
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
import com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdGczMapper;
......@@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 数字公路-观测站
......@@ -38,4 +40,8 @@ public class SzglGsdGczServiceImpl extends ServiceImpl<SzglGsdGczMapper, SzglGsd
List<SzglGsdGcz> list = szglGsdGczMapper.getAllGcz();
return list;
}
@Override
public List<Map<String, Object>> querySpotCode(String lxbh, String qdzh, String zdzh) {
return baseMapper.querySpotCode(lxbh,qdzh,zdzh);
}
}
......@@ -4,6 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* 路段交通量
......@@ -13,5 +18,4 @@ import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsect
*/
public interface TrafficRoadsectionMapper extends BaseMapper<TrafficRoadsection> {
IPage<TrafficRoadsection> getTrafficRoadsectionPage(Page<TrafficRoadsection> page, TrafficRoadsection trafficRoadsection);
}
......@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection;
import java.util.List;
import java.util.Map;
/**
* 路段交通量
*
......
......@@ -8,6 +8,9 @@ import com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRoadsect
import com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficRoadsectionService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 路段交通量
*
......@@ -19,4 +22,6 @@ public class TrafficRoadsectionServiceImpl extends ServiceImpl<TrafficRoadsectio
public IPage<TrafficRoadsection> getTrafficRoadsectionPage(Page<TrafficRoadsection> page, TrafficRoadsection trafficRoadsection){
return baseMapper.getTrafficRoadsectionPage(page, trafficRoadsection);
}
}
......@@ -7,9 +7,13 @@ import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
import com.elephant.framework.galaxy.aroad.module.zhyh.service.ZhyhLkpdService;
import lombok.AllArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import java.util.HashMap;
import java.util.Map;
/**
* 智慧养护_路况评定
......@@ -79,4 +83,14 @@ public class ZhyhLkpdController extends BaseController {
return new R<>(zhyhLkpdService.removeById(id));
}
/**
* 查询起点桩号与止点桩号之间的路况评定
* @param qdzh
* @param zdzh
* @return
*/
@GetMapping("/qdzdzh")
public R getQdZdZhanghao(@RequestParam("lxbm") String lxbm ,@RequestParam("qdzh") String qdzh, @RequestParam("zdzh") String zdzh){
return new R<>(zhyhLkpdService.queryQdZdZhanghao(lxbm,qdzh,zdzh));
}
}
package com.elephant.framework.galaxy.aroad.module.zhyh.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* 智慧养护_路况评定
......@@ -10,5 +16,5 @@ import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
* @date 2019-04-22 17:45:59
*/
public interface ZhyhLkpdMapper extends BaseMapper<ZhyhLkpd> {
List<ZhyhLkpd> queryQdZdZhanghao(@Param("lxbm") String lxbm,@Param("qdzh") String qdzh,@Param("zdzh") String zdzh);
}
package com.elephant.framework.galaxy.aroad.module.zhyh.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
import java.util.List;
import java.util.Map;
/**
* 智慧养护_路况评定
*
......@@ -10,5 +14,8 @@ import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
* @date 2019-04-22 17:45:59
*/
public interface ZhyhLkpdService extends IService<ZhyhLkpd> {
/**
* 根据路线起点桩号与止点桩号及路线编号查询路况评定
*/
List<ZhyhLkpd> queryQdZdZhanghao(String lxbm,String qdzh,String zdzh);
}
package com.elephant.framework.galaxy.aroad.module.zhyh.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.zhyh.entity.ZhyhLkpd;
import com.elephant.framework.galaxy.aroad.module.zhyh.mapper.ZhyhLkpdMapper;
import com.elephant.framework.galaxy.aroad.module.zhyh.service.ZhyhLkpdService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 智慧养护_路况评定
*
......@@ -14,5 +18,8 @@ import org.springframework.stereotype.Service;
*/
@Service
public class ZhyhLkpdServiceImpl extends ServiceImpl<ZhyhLkpdMapper, ZhyhLkpd> implements ZhyhLkpdService {
@Override
public List<ZhyhLkpd> queryQdZdZhanghao(String lxbm, String qdzh, String zdzh) {
return baseMapper.queryQdZdZhanghao(lxbm,qdzh,zdzh);
}
}
......@@ -722,5 +722,7 @@
</where>
order by start_time
</select>
<select id="getQzdzhEvent" resultMap="roadConditionEventMap">
select * from road_condition_event where road_code = #{lxbh} and ((startM between #{qdzh} and #{zdzh}) or (endM between #{qdzh} and #{zdzh}))
</select>
</mapper>
......@@ -80,6 +80,12 @@
gcz.jsdj !='高速公路'
</select>
<select id="querySpotCode" resultMap="szglGsdGczMap">
SELECT tsgg.*,
vtr.spot_name as spotName,
vtr.JDC_current_amount as jdcCurrentAmount,
vtr.JDC_natural_amount as jdcNaturalAmount,
vtr.year FROM (SELECT tsgg.* FROM `t_szgl_gsd_gcz` as tsgg where lxbh = #{lxbh} and ((qdzh between #{qdzh} and #{zdzh}) or (zdzh between #{qdzh} and #{zdzh})) ) tsgg left join v_traffic_roadsection as vtr on tsgg.gczbh = vtr.spot_code
</select>
</mapper>
......@@ -41,4 +41,7 @@
<result property="dj" column="dj"/>
<result property="lxlx" column="lxlx"/>
</resultMap>
<select id="queryQdZdZhanghao" resultMap="zhyhLkpdMap">
select * from t_zhyh_lkpd where lxbm = #{lxbm} and ((qdzh between #{qdzh} and #{zdzh}) or (zdzh between #{qdzh} and #{zdzh}))
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论