提交 f429e40a authored 作者: Phyday's avatar Phyday

综合监测,路况查询调整

上级 9175fb8b
...@@ -58,10 +58,10 @@ public class RoadConditionEventController extends BaseController { ...@@ -58,10 +58,10 @@ public class RoadConditionEventController extends BaseController {
* @param * @param
* @return : null * @return : null
*/ */
// @GetMapping("/location") // @GetMapping("/location")
// public R locatioinOnMap() { // public R locatioinOnMap() {
// return new R<>(roadConditionEventService.locatioinOnMap()); // return new R<>(roadConditionEventService.locatioinOnMap());
// } // }
/** /**
* @description : 根据影响程度统计 * @description : 根据影响程度统计
...@@ -133,6 +133,37 @@ public class RoadConditionEventController extends BaseController { ...@@ -133,6 +133,37 @@ public class RoadConditionEventController extends BaseController {
return new R<>(roadConditionEventService.getTree()); return new R<>(roadConditionEventService.getTree());
} }
/**
* 查询坐标
*
* @param
* @return R
*/
@GetMapping("/coordinates")
public R getCoordinates() {
return new R<>(roadConditionEventService.getCoordinates());
}
@GetMapping("/tqcoordinates")
public R getTQCoordinates() {
return new R<>(roadConditionEventService.getTQCoordinates());
}
@GetMapping("/yhcoordinates")
public R getYHCoordinates() {
return new R<>(roadConditionEventService.getYHCoordinates());
}
@GetMapping("/tfcoordinates")
public R getTFCoordinates() {
return new R<>(roadConditionEventService.getTFCoordinates());
}
@GetMapping("/sfzcoordinates")
public R getSFZCoordinates() {
return new R<>(roadConditionEventService.getSFZCoordinates());
}
/** /**
* 通过id查询路况事件统计 * 通过id查询路况事件统计
* *
...@@ -141,7 +172,7 @@ public class RoadConditionEventController extends BaseController { ...@@ -141,7 +172,7 @@ public class RoadConditionEventController extends BaseController {
*/ */
@GetMapping("/{id}") @GetMapping("/{id}")
public R getById(@PathVariable("id") Integer id) { public R getById(@PathVariable("id") Integer id) {
// Integer idi = Integer.parseInt(id); // Integer idi = Integer.parseInt(id);
return new R<>(roadConditionEventService.getById(id)); return new R<>(roadConditionEventService.getById(id));
} }
......
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;
/**
* @program:
* @description: 坐标类
* @author: songwenjie
* @create: 2019-04-02 10:55
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CoordinateDto implements Serializable {
/** 主键 */
private int id;
/** 事件类型 */
private String eventType;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
}
package com.elephant.framework.galaxy.aroad.module.roadcondition.dto;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @program:
* @description: 坐标类
* @author: songwenjie
* @create: 2019-04-02 10:55
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class YHCoordinateDto implements Serializable {
/** */
@TableId
private Integer id;
/** 路线编码 */
private String roadCode;
/** 路线名称 */
private String roadName;
/** 开始桩号 */
private String startm;
/** 结束桩号 */
private String endm;
/** 事件类型 */
private String eventType;
/** 事件标题 */
private String eventTitle;
/** 事件详情 */
private String eventContent;
/** 影响程度 */
private String influence;
/** 压车长度 */
private String carsLength;
/** 绕行方案 */
private String solution;
/** 发布时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
/** 发布单位 */
private String startUnit;
/** 发布人 */
private String startPerson;
/** 预撤时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date preEndTime;
/** 撤销时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
/** 撤销单位 */
private String endUnit;
/** 撤销原因 */
private String endReason;
private Long current;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}
...@@ -65,4 +65,12 @@ public class RoadConditionEvent extends Model<RoadConditionEvent> { ...@@ -65,4 +65,12 @@ public class RoadConditionEvent extends Model<RoadConditionEvent> {
private String endReason; private String endReason;
private Long current; private Long current;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
} }
...@@ -28,6 +28,16 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent> ...@@ -28,6 +28,16 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
List<staticByCityDto> staticByCity(); List<staticByCityDto> staticByCity();
List<CoordinateDto> getCoordinates();
List<CoordinateDto> getTQCoordinates();
List<YHCoordinateDto> getYHCoordinates();
List<CoordinateDto> getSFZCoordinates();
List<CoordinateDto> getTFCoordinates();
List<staticByYHCityDto> staticByYHCity(); List<staticByYHCityDto> staticByYHCity();
/** /**
* @Description: 查询树形 @Param: [] * @Description: 查询树形 @Param: []
......
...@@ -92,4 +92,14 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent> ...@@ -92,4 +92,14 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
BaseTreeDto getTree(); BaseTreeDto getTree();
RoadConditionEvent getById(Integer id); RoadConditionEvent getById(Integer id);
List<YHCoordinateDto> getYHCoordinates();
List<CoordinateDto> getSFZCoordinates();
List<CoordinateDto> getTFCoordinates();
List<CoordinateDto> getTQCoordinates();
List<CoordinateDto> getCoordinates();
} }
...@@ -8,6 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadCondi ...@@ -8,6 +8,7 @@ import com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadCondi
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 org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -91,6 +92,30 @@ public class RoadConditionEventServiceImpl ...@@ -91,6 +92,30 @@ public class RoadConditionEventServiceImpl
return baseMapper.staticByCity(); return baseMapper.staticByCity();
} }
@Cacheable(value = "roadConditionCoordinates")
public List<CoordinateDto> getCoordinates() {
return baseMapper.getCoordinates();
}
@Cacheable(value = "tqCoordinates")
public List<CoordinateDto> getTQCoordinates() {
return baseMapper.getTQCoordinates();
}
@Cacheable(value = "yhCoordinates")
public List<YHCoordinateDto> getYHCoordinates() {
return baseMapper.getYHCoordinates();
}
@Cacheable(value = "sfzCoordinates")
public List<CoordinateDto> getSFZCoordinates() {
return baseMapper.getSFZCoordinates();
}
@Cacheable(value = "tfCoordinates")
public List<CoordinateDto> getTFCoordinates() {
return baseMapper.getTFCoordinates();
}
/** /**
* @description : 根据城市查询 * @description : 根据城市查询
......
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.controller;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.service.roadNetZhjcService;
import com.elephant.framework.galaxy.aroad.response.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 智慧养护_综合展示
*
* @author wangjian
* @date 2019-04-26 11:51:59
*/
@RestController
@AllArgsConstructor
@RequestMapping("/roadnetzhjc")
public class roadNetZhjcController extends BaseController {
private final roadNetZhjcService roadNetZhjcService;
/**
* 智慧养护综合展示根据年份进行数据查询
* @param year 年份
* @return
*/
@GetMapping("/getroadnetzhjcdata")
public R getRoadNetZhjcData(String year) {
return new R<>(roadNetZhjcService.getRoadNetZhjcData(year));
}
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
/**
* 智慧养护_综合展示
*
* @author wangjian
* @date 2019-04-26 11:51:59
*/
@Data
@TableName("t_zhyh_zhzs")
@EqualsAndHashCode(callSuper = true)
public class ZhyhZhzs extends Model<ZhyhZhzs> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId
private String id;
/**
* 年份
*/
private String year;
/**
* 字段名称
*/
private String name;
/**
* 数值
*/
private String value;
/**
* 类别
*/
private String type;
/**
* 创建人
*/
private String creator;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新人
*/
private String updatePerson;
/**
* 更新时间
*/
private LocalDateTime updateTime;
/**
* 状态:根据具体需求定义
*/
private String status;
/**
* 是否删除 -1:已删除 0:正常
*/
private String delFlag;
/**
* 备注信息
*/
private String remarks;
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity;
import lombok.Data;
import java.util.List;
@Data
public class ZhyhZhzsData {
private List<ZhyhZhzsKeyValue> zhyhZhzsQlOne;
private List<ZhyhZhzsKeyValue> zhyhZhzsQlTwo;
private List<ZhyhZhzsKeyValue> zhyhZhzsQlThree;
private List<ZhyhZhzsKeyValue> zhyhZhzsSdOne;
private List<ZhyhZhzsKeyValue> zhyhZhzsSdTwo;
private List<ZhyhZhzsKeyValue> zhyhZhzsSdThree;
private List<ZhyhZhzsKeyValue> zhyhZhzsOne;
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity;
import lombok.Data;
@Data
public class ZhyhZhzsKeyValue {
private String key;
private String value;
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzs;
/**
* 智慧养护_综合展示
*
* @author wangjian
* @date 2019-04-26 11:51:59
*/
public interface roadNetZhjcMapper extends BaseMapper<ZhyhZhzs> {
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.service.roadNetZhjcService;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzs;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzsData;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzsKeyValue;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.mapper.roadNetZhjcMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 智慧养护_综合展示
*
* @author wangjian
* @date 2019-04-26 11:51:59
*/
@Service
@AllArgsConstructor
public class roadNetZhjcServiceImpl extends ServiceImpl<roadNetZhjcMapper, ZhyhZhzs> implements roadNetZhjcService {
private final roadNetZhjcMapper zhyhZhzsMapper;
/**
* 智慧养护综合展示根据年份进行数据查询
* @param year 年份
* @return
*/
public ZhyhZhzsData getRoadNetZhjcData(String year) {
ZhyhZhzsData zhyhZhzsData = new ZhyhZhzsData();
zhyhZhzsData.setZhyhZhzsQlOne(getZhyhZhzsQlListByYear("ql1",year));
zhyhZhzsData.setZhyhZhzsQlTwo(getZhyhZhzsQlListByYear("ql2",year));
zhyhZhzsData.setZhyhZhzsQlThree(getZhyhZhzsQlListByYear("ql3",year));
zhyhZhzsData.setZhyhZhzsSdOne(getZhyhZhzsQlListByYear("sd1",year));
zhyhZhzsData.setZhyhZhzsSdTwo(getZhyhZhzsQlListByYear("sd2",year));
zhyhZhzsData.setZhyhZhzsSdThree(getZhyhZhzsQlListByYear("sd3",year));
zhyhZhzsData.setZhyhZhzsOne(getZhyhZhzsQlListByYear("one",year));
return zhyhZhzsData;
}
public List<ZhyhZhzsKeyValue> getZhyhZhzsQlListByYear(String type, String year) {
List<ZhyhZhzsKeyValue> zhyhZhzsKeyValues = new ArrayList<ZhyhZhzsKeyValue>();
List<ZhyhZhzs> zhyhZhzss = zhyhZhzsMapper.selectList(Wrappers.<ZhyhZhzs>query().lambda().eq(ZhyhZhzs::getType,type).eq(ZhyhZhzs::getYear,year));
for(ZhyhZhzs zhyhZhzs : zhyhZhzss) {
ZhyhZhzsKeyValue zhyhZhzsKeyValue = new ZhyhZhzsKeyValue();
zhyhZhzsKeyValue.setKey(zhyhZhzs.getName());
zhyhZhzsKeyValue.setValue(zhyhZhzs.getValue());
zhyhZhzsKeyValues.add(zhyhZhzsKeyValue);
}
return zhyhZhzsKeyValues;
}
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzs;
import com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity.ZhyhZhzsData;
/**
* 智慧养护_综合展示
*
* @author wangjian
* @date 2019-04-26 11:51:59
*/
public interface roadNetZhjcService extends IService<ZhyhZhzs> {
/**
* 智慧养护综合展示根据年份进行数据查询
* @param year 年份
* @return
*/
public ZhyhZhzsData getRoadNetZhjcData(String year);
}
...@@ -34,6 +34,16 @@ public class TrafficSpotController extends BaseController { ...@@ -34,6 +34,16 @@ public class TrafficSpotController extends BaseController {
return new R<>(trafficSpotService.getTrafficSpotPage(page,trafficSpot)); return new R<>(trafficSpotService.getTrafficSpotPage(page,trafficSpot));
} }
/**
* 查询坐标
*
* @param
* @return R
*/
@GetMapping("/coordinates")
public R getCoordinates() {
return new R<>(trafficSpotService.getCoordinates());
}
/** /**
* 通过id查询观测站点表 * 通过id查询观测站点表
......
package com.elephant.framework.galaxy.aroad.module.traffic.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @program:
* @description: 坐标类
* @author: songwenjie
* @create: 2019-04-02 10:55
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CoordinateDto implements Serializable {
/** 主键 */
private int rowId;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
}
...@@ -60,4 +60,9 @@ public class TrafficSpot extends Model<TrafficSpot> { ...@@ -60,4 +60,9 @@ public class TrafficSpot extends Model<TrafficSpot> {
private String stopMonth; private String stopMonth;
/** 年份 */ /** 年份 */
private String year; private String year;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
} }
...@@ -3,8 +3,11 @@ package com.elephant.framework.galaxy.aroad.module.traffic.mapper; ...@@ -3,8 +3,11 @@ package com.elephant.framework.galaxy.aroad.module.traffic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.traffic.dto.CoordinateDto;
import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot; import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot;
import java.util.List;
/** /**
* 观测站点表 * 观测站点表
* *
...@@ -14,4 +17,5 @@ import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot; ...@@ -14,4 +17,5 @@ import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot;
public interface TrafficSpotMapper extends BaseMapper<TrafficSpot> { public interface TrafficSpotMapper extends BaseMapper<TrafficSpot> {
IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot); IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot);
List<CoordinateDto> getCoordinates();
} }
...@@ -3,8 +3,11 @@ package com.elephant.framework.galaxy.aroad.module.traffic.service; ...@@ -3,8 +3,11 @@ package com.elephant.framework.galaxy.aroad.module.traffic.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.traffic.dto.CoordinateDto;
import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot; import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot;
import java.util.List;
/** /**
* 观测站点表 * 观测站点表
* *
...@@ -14,4 +17,7 @@ import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot; ...@@ -14,4 +17,7 @@ import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot;
public interface TrafficSpotService extends IService<TrafficSpot> { public interface TrafficSpotService extends IService<TrafficSpot> {
IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot); IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot);
List<CoordinateDto> getCoordinates();
} }
...@@ -3,11 +3,15 @@ package com.elephant.framework.galaxy.aroad.module.traffic.service.impl; ...@@ -3,11 +3,15 @@ package com.elephant.framework.galaxy.aroad.module.traffic.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.traffic.dto.CoordinateDto;
import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot; import com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot;
import com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficSpotMapper; import com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficSpotMapper;
import com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficSpotService; import com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficSpotService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 观测站点表 * 观测站点表
* *
...@@ -20,4 +24,9 @@ public class TrafficSpotServiceImpl extends ServiceImpl<TrafficSpotMapper, Traff ...@@ -20,4 +24,9 @@ public class TrafficSpotServiceImpl extends ServiceImpl<TrafficSpotMapper, Traff
public IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot){ public IPage<TrafficSpot> getTrafficSpotPage(Page<TrafficSpot> page, TrafficSpot trafficSpot){
return baseMapper.getTrafficSpotPage(page, trafficSpot); return baseMapper.getTrafficSpotPage(page, trafficSpot);
} }
@Cacheable(value = "trafficSpotCoordinates")
public List<CoordinateDto> getCoordinates() {
return baseMapper.getCoordinates();
}
} }
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<result property="endTime" column="end_time"/> <result property="endTime" column="end_time"/>
<result property="endUnit" column="end_unit"/> <result property="endUnit" column="end_unit"/>
<result property="endReason" column="end_reason"/> <result property="endReason" column="end_reason"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
</resultMap> </resultMap>
<resultMap id="staticByEventTypeMap" <resultMap id="staticByEventTypeMap"
...@@ -69,11 +71,19 @@ ...@@ -69,11 +71,19 @@
<result property="organizeName" column="organize"/> <result property="organizeName" column="organize"/>
</resultMap> </resultMap>
<resultMap id="CoordinateDtoMap"
type="com.elephant.framework.galaxy.aroad.module.roadcondition.dto.CoordinateDto">
<id column="id" property="id"/>
<result property="eventType" column="event_type"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
</resultMap>
<select id="getRoadConditionEventPage" resultMap="roadConditionEventMap" <select id="getRoadConditionEventPage" resultMap="roadConditionEventMap"
parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"> parameterType="com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent">
SELECT SELECT
id,road_code,concat(road_code,'·',road_name) as id,road_code,concat(road_code,'·',road_name) as
road_name,startm,endm,event_type,event_title,event_content,influence,cars_length,solution,start_time,start_unit,start_person,pre_end_time,end_time,end_unit,end_reason road_name,startm,endm,event_type,event_title,event_content,influence,cars_length,solution,start_time,start_unit,start_person,pre_end_time,end_time,end_unit,end_reason,longitude,latitude
FROM road_condition_event FROM road_condition_event
<where> <where>
<if test="roadConditionEvent.startUnit != null">start_unit = #{roadConditionEvent.startUnit} and</if> <if test="roadConditionEvent.startUnit != null">start_unit = #{roadConditionEvent.startUnit} and</if>
...@@ -151,4 +161,32 @@ ...@@ -151,4 +161,32 @@
fullname fullname
</select> </select>
<select id="getCoordinates" resultMap="CoordinateDtoMap">
select id, longitude, latitude, event_type
from `road_condition_event`;
</select>
<select id="getTQCoordinates" resultMap="CoordinateDtoMap">
select id, longitude, latitude, event_type
from `road_condition_event`
where event_type = '异常天气';
</select>
<select id="getYHCoordinates" resultMap="roadConditionEventMap">
select *
from `road_condition_event`
where event_type = '养护施工';
</select>
<select id="getTFCoordinates" resultMap="CoordinateDtoMap">
select id, longitude, latitude, event_type
from `road_condition_event`
where event_type = '突发事件';
</select>
<select id="getSFZCoordinates" resultMap="CoordinateDtoMap">
select id, longitude, latitude, event_type
from `road_condition_event`
where event_type = '收费站异常';
</select>
</mapper> </mapper>
...@@ -26,6 +26,15 @@ ...@@ -26,6 +26,15 @@
<result property="landscape" column="landscape"/> <result property="landscape" column="landscape"/>
<result property="stopMonth" column="stop_month"/> <result property="stopMonth" column="stop_month"/>
<result property="year" column="year"/> <result property="year" column="year"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
</resultMap>
<resultMap id="CoordinateDtoMap"
type="com.elephant.framework.galaxy.aroad.module.traffic.dto.CoordinateDto">
<id column="rowId" property="row_id"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
</resultMap> </resultMap>
<select id="getTrafficSpotPage" resultMap="trafficSpotMap"> <select id="getTrafficSpotPage" resultMap="trafficSpotMap">
...@@ -38,4 +47,9 @@ ...@@ -38,4 +47,9 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getCoordinates" resultMap="CoordinateDtoMap">
select row_id, longitude, latitude
from `v_traffic_spot`;
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论