提交 81215e96 authored 作者: 宋文杰's avatar 宋文杰

Merge remote-tracking branch 'origin/dev' into dev

...@@ -15,7 +15,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -15,7 +15,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public class ARoadApplication { public class ARoadApplication {
public static void main(String[] args) { public static void main(String[] args) {
System.setProperty("es.set.netty.runtime.available.processors","false"); System.setProperty("es.set.netty.runtime.available.processors", "false");
SpringApplication.run(ARoadApplication.class, args); SpringApplication.run(ARoadApplication.class, args);
} }
......
...@@ -12,9 +12,9 @@ public class Basehighwayalldata { ...@@ -12,9 +12,9 @@ public class Basehighwayalldata {
private String zhidianmingcheng;//止点名称 private String zhidianmingcheng;//止点名称
private String qidianzhuanghaoa;//起点桩号 private Double qidianzhuanghaoa;//起点桩号
private String zhidianzhuanghao;//止点桩号 private Double zhidianzhuanghao;//止点桩号
private String licheng;//里程 private String licheng;//里程
...@@ -228,19 +228,19 @@ public class Basehighwayalldata { ...@@ -228,19 +228,19 @@ public class Basehighwayalldata {
this.zhidianmingcheng = zhidianmingcheng; this.zhidianmingcheng = zhidianmingcheng;
} }
public String getQidianzhuanghaoa() { public Double getQidianzhuanghaoa() {
return qidianzhuanghaoa; return qidianzhuanghaoa;
} }
public void setQidianzhuanghaoa(String qidianzhuanghaoa) { public void setQidianzhuanghaoa(Double qidianzhuanghaoa) {
this.qidianzhuanghaoa = qidianzhuanghaoa; this.qidianzhuanghaoa = qidianzhuanghaoa;
} }
public String getZhidianzhuanghao() { public Double getZhidianzhuanghao() {
return zhidianzhuanghao; return zhidianzhuanghao;
} }
public void setZhidianzhuanghao(String zhidianzhuanghao) { public void setZhidianzhuanghao(Double zhidianzhuanghao) {
this.zhidianzhuanghao = zhidianzhuanghao; this.zhidianzhuanghao = zhidianzhuanghao;
} }
......
...@@ -17,31 +17,49 @@ public class ReadElasticsearch { ...@@ -17,31 +17,49 @@ public class ReadElasticsearch {
//分词查询桥梁数据返回list集合 //分词查询桥梁数据返回list集合
//List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridge("广州桥", "basebridgealldata", "2018", 0, 2000000000); //List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridge("广州桥", "basebridgealldata", "2018", 0, 2000000000);
//词条查询桥梁代码数据返回list集合 //词条查询桥梁代码数据返回list集合
// List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridgeQLDM("G3W371726L0012", "basebridgealldata", "2018", 0, 2000000000); //List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridgeQLDM("G3W371726L0012", "basebridgealldata", "2018", 0, 2000000000);
// for (Basebridgealldata basebridgealldata : basebridgealldataList) { //查询桥梁所有数据
// System.out.println(basebridgealldata); //List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridgeAll("basebridgealldata", "2018", 0, 2000000000);
// } /* for (Basebridgealldata basebridgealldata : basebridgealldataList) {
System.out.println(basebridgealldata);
}
*/
//List<Basebridgealldata> basebridgealldataList = EsUtil_fanshe.queryBridge("广州桥", "basebridgealldata", "2018", 0, 2000000000);
//分词查询路段数据返回list集合 //分词查询路段数据返回list集合
//ArrayList<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWay("广州桥", "basehighwayalldata", "2018", 0, 2000000000); //List<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWay("S226", "basehighwayalldata", "2018", 0, 2000000000);
//词条查询路线编号数据返回list集合 //词条查询路线编号数据返回list集合
List<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWayLXBH("S226", "basehighwayalldata", "2018", 0, 2000000000); //List<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWayLXBH("S226", "basehighwayalldata", "2018", 0, 2000000000);
for (Basehighwayalldata basehighwayalldata : basehighwayalldataList) { //路段查询所有数据返回
//List<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWayAll("basehighwayalldata", "2018", 0, 2000000000);
/*for (Basehighwayalldata basehighwayalldata : basehighwayalldataList) {
System.out.println(basehighwayalldata);
}*/
//通过路线编号匹配,查询字段在起点桩号和止点桩号之间范围查询
List<Basehighwayalldata> basehighwayalldataArrayList = EsUtil_fanshe.queryHighWayFiler("G342", 405, "basehighwayalldata", "2018", 0, 2000000000);
for (Basehighwayalldata basehighwayalldata : basehighwayalldataArrayList) {
System.out.println(basehighwayalldata); System.out.println(basehighwayalldata);
} }
//分词查询隧道数据返回list集合 //分词查询隧道数据返回list集合
//List<Basetunnelalldata> basetunnelalldataList = EsUtil_fanshe.queryTunnel("港沟", "basetunnelalldata", "2018", 0, 2000000000); //List<Basetunnelalldata> basetunnelalldataList = EsUtil_fanshe.queryTunnel("港沟", "basetunnelalldata", "2018", 0, 2000000000);
//termquery()隧道代码词条查询返回list集合 //termquery()隧道代码词条查询返回list集合
//List<Basetunnelalldata> basetunnelalldataList = EsUtil_fanshe.queryTunnelSDDM("S89370112U0010", "basetunnelalldata", "2018", 0, 2000000000); //List<Basetunnelalldata> basetunnelalldataList = EsUtil_fanshe.queryTunnelSDDM("S89370112U0010", "basetunnelalldata", "2018", 0, 2000000000);
/* for (Basetunnelalldata basetunnelalldata : basetunnelalldataList) { //查询隧道所有数据返回
//List<Basetunnelalldata> basetunnelalldataList = EsUtil_fanshe.queryTunnelAll("basetunnelalldata", "2018", 0, 2000000000);
/*for (Basetunnelalldata basetunnelalldata : basetunnelalldataList) {
System.out.println(basetunnelalldata); System.out.println(basetunnelalldata);
}*/ }*/
//分词查询收费站数据返回list集合 //分词查询收费站数据返回list集合
//ArrayList<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString("广州桥", "baseroadtolldata", "2018", 0, 2000000000); //List<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString("广州桥", "baseroadtolldata", "2018", 0, 2000000000);
/* for (BaseRoadToll_String baseRoadTollString : baseRoadTollStrings) { //查询收费站所有数据返回
//List<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollStringAll("baseroadtolldata", "2018", 0, 2000000000);
/* for (BaseRoadToll_String baseRoadTollString : baseRoadTollStrings) {
System.out.println(baseRoadTollString.toString()); System.out.println(baseRoadTollString.toString());
}*/ }*/
//分词查询服务区数据返回list集合 //分词查询服务区数据返回list集合
//ArrayList<BaseHighWayService> baseHighWayServices = EsUtil_fanshe.queryBaseHighWayService("京岚线", "basehighwayservice", "2018", 0, 2000000000); //List<BaseHighWayService> baseHighWayServices = EsUtil_fanshe.queryBaseHighWayService("京岚线", "basehighwayservice", "2018", 0, 2000000000);
//查询服务区所有数据返回
//List<BaseHighWayService> baseHighWayServices = EsUtil_fanshe.queryBaseHighWayServiceAll("basehighwayservice", "2018", 0, 2000000000);
/*for (BaseHighWayService baseHighWayService : baseHighWayServices) { /*for (BaseHighWayService baseHighWayService : baseHighWayServices) {
System.out.println(baseHighWayService); System.out.println(baseHighWayService);
}*/ }*/
......
package com.elephant.framework.galaxy.aroad.module.indexES.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.io.Serializable;
import java.time.LocalDateTime;
/**
* elasticsearch索引表
*
* @author wangjian
* @date 2019-05-14 10:24:55
*/
@Data
@TableName("baseindexdata")
@EqualsAndHashCode(callSuper = true)
public class Baseindexdata extends Model<Baseindexdata> {
private static final long serialVersionUID = 1L;
/**
* 序号
*/
@TableId
private Integer id;
/**
* elasticsearch索引的名称
*/
private String indexName;
/**
* elasticsearch类型名称
*/
private String indexType;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 备注
*/
private String beizhu;
}
package com.elephant.framework.galaxy.aroad.module.indexES.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata;
import org.apache.ibatis.annotations.Param;
/**
* elasticsearch索引表
*
* @author wangjian
* @date 2019-05-14 10:24:55
*/
public interface BaseindexdataMapper extends BaseMapper<Baseindexdata> {
/**
* 根据表名查询最新数据
* @param tableName
* @return
*/
Baseindexdata selectLatesByTableName(@Param("name") String tableName);
}
package com.elephant.framework.galaxy.aroad.module.indexES.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata;
/**
* elasticsearch索引表
*
* @author wangjian
* @date 2019-05-14 10:24:55
*/
public interface BaseindexdataService extends IService<Baseindexdata> {
Baseindexdata selectLatesByTableName(String tableName);
}
package com.elephant.framework.galaxy.aroad.module.indexES.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata;
import com.elephant.framework.galaxy.aroad.module.indexES.mapper.BaseindexdataMapper;
import com.elephant.framework.galaxy.aroad.module.indexES.service.BaseindexdataService;
import com.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcGhjhGhxmMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
/**
* elasticsearch索引表
*
* @author wangjian
* @date 2019-05-14 10:24:55
*/
@Service
@AllArgsConstructor
public class BaseindexdataServiceImpl extends ServiceImpl<BaseindexdataMapper, Baseindexdata> implements BaseindexdataService {
private final BaseindexdataMapper baseindexdataMapper;
@Override
public Baseindexdata selectLatesByTableName(String tableName) {
return baseindexdataMapper.selectLatesByTableName(tableName);
}
}
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;
}
...@@ -32,7 +32,7 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent> ...@@ -32,7 +32,7 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
List<CoordinateDto> getTQCoordinates(); List<CoordinateDto> getTQCoordinates();
List<YHCoordinateDto> getYHCoordinates(); List<CoordinateDto> getYHCoordinates();
List<CoordinateDto> getSFZCoordinates(); List<CoordinateDto> getSFZCoordinates();
......
...@@ -93,7 +93,7 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent> ...@@ -93,7 +93,7 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
RoadConditionEvent getById(Integer id); RoadConditionEvent getById(Integer id);
List<YHCoordinateDto> getYHCoordinates(); List<CoordinateDto> getYHCoordinates();
List<CoordinateDto> getSFZCoordinates(); List<CoordinateDto> getSFZCoordinates();
......
...@@ -103,7 +103,7 @@ public class RoadConditionEventServiceImpl ...@@ -103,7 +103,7 @@ public class RoadConditionEventServiceImpl
} }
@Cacheable(value = "yhCoordinates") @Cacheable(value = "yhCoordinates")
public List<YHCoordinateDto> getYHCoordinates() { public List<CoordinateDto> getYHCoordinates() {
return baseMapper.getYHCoordinates(); return baseMapper.getYHCoordinates();
} }
......
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 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);
}
...@@ -3,6 +3,10 @@ package com.elephant.framework.galaxy.aroad.module.szgl.controller; ...@@ -3,6 +3,10 @@ package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.bigdata.*; import com.elephant.framework.galaxy.aroad.bigdata.*;
import com.elephant.framework.galaxy.aroad.module.codegen.response.R; 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.mapper.BaseindexdataMapper;
import com.elephant.framework.galaxy.aroad.module.indexES.service.BaseindexdataService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -15,7 +19,10 @@ import java.util.Map; ...@@ -15,7 +19,10 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/szgl") @RequestMapping("/szgl")
@AllArgsConstructor
public class SzglController { public class SzglController {
private final BaseindexdataService baseindexdataService;
/** /**
* 全局搜索路段、收费站、桥梁、隧道 * 全局搜索路段、收费站、桥梁、隧道
* @Param keyword 搜索条件 * @Param keyword 搜索条件
...@@ -23,21 +30,14 @@ public class SzglController { ...@@ -23,21 +30,14 @@ public class SzglController {
@GetMapping("/bigdata") @GetMapping("/bigdata")
public R getBigData(String keyword, Page page) throws Exception { public R getBigData(String keyword, Page page) throws Exception {
List<Map<String,Object>> responseList = new ArrayList<>(); List<Map<String,Object>> responseList = new ArrayList<>();
Baseindexdata ql = baseindexdataService.selectLatesByTableName("basebridgealldata");
Baseindexdata lx = baseindexdataService.selectLatesByTableName("basehighwayalldata");
Baseindexdata sd = baseindexdataService.selectLatesByTableName("basetunnelalldata");
long total = 0; long total = 0;
// 桥梁
Map<String,Object> luKeBridges = EsUtil_fanshe.queryBridge(keyword, "basebridgealldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(Basebridgealldata lnKeBridge : (List<Basebridgealldata>)luKeBridges.get("list")){
responseList.add(new HashMap<String,Object>(){{
put("name",lnKeBridge.getQiaoliangmingcheng());
put("iden","qiaoliang");
put("idenVal", "桥梁");
put("data", lnKeBridge);
}});
}
total+=(long)luKeBridges.get("total");
// 路线 // 路线
// ArrayList<Basehighwayalldata> basehighwayalldataList = EsUtil_fanshe.queryHighWayLXBH(keyword, "basehighwayalldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
Map<String,Object> lukehighways = EsUtil_fanshe.queryHighWay(keyword, "basehighwayalldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize()); Map<String,Object> lukehighways = EsUtil_fanshe.queryHighWay(keyword, "basehighwayalldata", lx.getIndexType(), (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(Basehighwayalldata basehighwayalldata : (List<Basehighwayalldata>)lukehighways.get("list")){ for(Basehighwayalldata basehighwayalldata : (List<Basehighwayalldata>)lukehighways.get("list")){
responseList.add(new HashMap<String,Object>(){{ responseList.add(new HashMap<String,Object>(){{
put("name",basehighwayalldata.getLuxianmingcheng()); put("name",basehighwayalldata.getLuxianmingcheng());
...@@ -48,8 +48,20 @@ public class SzglController { ...@@ -48,8 +48,20 @@ public class SzglController {
}}); }});
} }
total+=(long)lukehighways.get("total"); total+=(long)lukehighways.get("total");
// 桥梁
Map<String,Object> luKeBridges = EsUtil_fanshe.queryBridge(keyword, "basebridgealldata", ql.getIndexType(), (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(Basebridgealldata lnKeBridge : (List<Basebridgealldata>)luKeBridges.get("list")){
responseList.add(new HashMap<String,Object>(){{
put("name",lnKeBridge.getQiaoliangmingcheng());
put("iden","qiaoliang");
put("idenVal", "桥梁");
put("data", lnKeBridge);
}});
}
total+=(long)luKeBridges.get("total");
// 隧道 // 隧道
Map<String,Object> basicTunnels = EsUtil_fanshe.queryTunnel(keyword, "basetunnelalldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize()); Map<String,Object> basicTunnels = EsUtil_fanshe.queryTunnel(keyword, "basetunnelalldata", sd.getIndexType(), (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(Basetunnelalldata basicTunnel : (List<Basetunnelalldata>)basicTunnels.get("list")){ for(Basetunnelalldata basicTunnel : (List<Basetunnelalldata>)basicTunnels.get("list")){
responseList.add(new HashMap<String,Object>(){{ responseList.add(new HashMap<String,Object>(){{
put("name",basicTunnel.getSuidaomingcheng()); put("name",basicTunnel.getSuidaomingcheng());
...@@ -60,29 +72,29 @@ public class SzglController { ...@@ -60,29 +72,29 @@ public class SzglController {
}}); }});
} }
total+=(long)basicTunnels.get("total"); total+=(long)basicTunnels.get("total");
// 收费站 // // 收费站
Map<String,Object> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString(keyword, "baseroadtolldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize()); // Map<String,Object> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString(keyword, "baseroadtolldata", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(BaseRoadToll_String baseRoadToll_String : (List<BaseRoadToll_String>)baseRoadTollStrings.get("list")){ // for(BaseRoadToll_String baseRoadToll_String : (List<BaseRoadToll_String>)baseRoadTollStrings.get("list")){
responseList.add(new HashMap<String,Object>(){{ // responseList.add(new HashMap<String,Object>(){{
put("name",baseRoadToll_String.getShortName()); // put("name",baseRoadToll_String.getShortName());
put("iden","shoufeizhan"); // put("iden","shoufeizhan");
put("idenVal", "收费站"); // put("idenVal", "收费站");
put("data", baseRoadToll_String); // put("data", baseRoadToll_String);
put("total", baseRoadTollStrings.get("total")); // put("total", baseRoadTollStrings.get("total"));
}}); // }});
} // }
total+=(long)baseRoadTollStrings.get("total"); // total+=(long)baseRoadTollStrings.get("total");
// 服务区 // // 服务区
Map<String,Object> baseHighWayServices = EsUtil_fanshe.queryBaseHighWayService(keyword, "basehighwayservice", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize()); // Map<String,Object> baseHighWayServices = EsUtil_fanshe.queryBaseHighWayService(keyword, "basehighwayservice", "2018", (int)((page.getCurrent()-1)*page.getSize()), (int)page.getSize());
for(BaseHighWayService baseHighWayService : (List<BaseHighWayService>)baseHighWayServices.get("list")){ // for(BaseHighWayService baseHighWayService : (List<BaseHighWayService>)baseHighWayServices.get("list")){
responseList.add(new HashMap<String,Object>(){{ // responseList.add(new HashMap<String,Object>(){{
put("name",baseHighWayService.getFwssmc()); // put("name",baseHighWayService.getFwssmc());
put("iden","fuwuqu"); // put("iden","fuwuqu");
put("idenVal", "服务区"); // put("idenVal", "服务区");
put("data", baseHighWayService); // put("data", baseHighWayService);
}}); // }});
} // }
total+=(long)baseHighWayServices.get("total"); // total+=(long)baseHighWayServices.get("total");
Map<String,Object> responseMap = new HashMap<>(); Map<String,Object> responseMap = new HashMap<>();
responseMap.put("result",responseList); responseMap.put("result",responseList);
responseMap.put("total",total); responseMap.put("total",total);
...@@ -124,4 +136,59 @@ public class SzglController { ...@@ -124,4 +136,59 @@ public class SzglController {
// ArrayList<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString(keyword, "baseroadtolldata", "2018", 0, 2000000000); // ArrayList<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString(keyword, "baseroadtolldata", "2018", 0, 2000000000);
// return new R<>(baseRoadTollStrings); // return new R<>(baseRoadTollStrings);
// } // }
/**
* 获取普通国省道隧道
* @return
*/
@GetMapping("/getSdList")
public R getSdList(Page page) throws Exception {
int start =0;
int row =10000000;
if (page!=null){
start = (int)((page.getCurrent()-1)*page.getSize());
row = (int)(page.getSize());
}
Baseindexdata data = baseindexdataService.selectLatesByTableName("basetunnelalldata");
List<Basetunnelalldata> sdList = EsUtil_fanshe.queryTunnelAll("basetunnelalldata",data.getIndexType(),start,row);
return new R(sdList);
}
/**
* 获取普通国省道收费站
* @return
*/
@GetMapping("/getFwqList")
public R getFwqList(Page page) throws Exception {
int start =0;
int row =10000000;
if (page!=null){
start = (int)((page.getCurrent()-1)*page.getSize());
row = (int)(page.getSize());
}
Baseindexdata data = baseindexdataService.selectLatesByTableName("basehighwayservice");
List<BaseHighWayService> fwqList = EsUtil_fanshe.queryBaseHighWayServiceAll("basehighwayservice",data.getIndexType(),start,row);
return new R(fwqList);
}
/**
* 获取普通国省道收费站
* @return
*/
@GetMapping("/getSfzList")
public R getSfzList(Page page) throws Exception {
int start =0;
int row =10000000;
if (page!=null){
start = (int)((page.getCurrent()-1)*page.getSize());
row = (int)(page.getSize());
}
Baseindexdata data = baseindexdataService.selectLatesByTableName("baseroadtolldata");
List<BaseRoadToll_String> sfzList = EsUtil_fanshe.queryBaseRoadTollStringAll("baseroadtolldata",data.getIndexType(),start,row);
return new R(sfzList);
}
} }
package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
@RestController
@AllArgsConstructor
@RequestMapping("/szgl/szglgsdgcz")
public class SzglGsdGczController extends BaseController {
private final SzglGsdGczService szglGsdGczService;
/**
* 查询全部观测站
*
* @param page
* @return
*/
@GetMapping("/page")
public R getSzglGsdGczPage(Page page) {
QueryWrapper<SzglGsdGcz> queryWrapper = new QueryWrapper<>();
queryWrapper.ne("jsdj","高速公路");
return new R<>(szglGsdGczService.page(page,queryWrapper));
}
/**
* 查询全部观测站
*
* @param szglGsdGcz 数字公路-观测站
* @return
*/
@GetMapping("/all")
public R getGczList(SzglGsdGcz szglGsdGcz) {
QueryWrapper<SzglGsdGcz> queryWrapper = new QueryWrapper<>();
queryWrapper.ne("jsdj","高速公路");
return new R<>(szglGsdGczService.list(queryWrapper));
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.response.R;
import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdLxjj;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdLxjjService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
/**
* 数字公路-路线简介
*
* @author zyw
* @date 2019-05-13 11:10:24
*/
@RestController
@AllArgsConstructor
@RequestMapping("/szgl/szglgsdlxjj")
public class SzglGsdLxjjController extends BaseController {
private final SzglGsdLxjjService szglGsdLxjjService;
/**
* 通过id查询数字公路-路线简介
* @param szglGsdLxjj szglGsdLxjj
* @return R
*/
@GetMapping("/getLxjj")
public R getLxjjByLxbh( SzglGsdLxjj szglGsdLxjj){
return new R<>(szglGsdLxjjService.getOne(Wrappers.query(szglGsdLxjj)));
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.response.R;
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.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
/**
* 数字公路-视频点
*
* @author zyw
* @date 2019-05-13 11:10:42
*/
@RestController
@AllArgsConstructor
@RequestMapping("/szgl/szglgsdspdw")
public class SzglGsdSpdwController extends BaseController {
private final SzglGsdSpdwService szglGsdSpdwService;
/**
* 分页查询
* @param page 数字公路-视频点
* @return
*/
@GetMapping("/page")
public R getSzglGsdSpdwPage(Page page,SzglGsdSpdw szglGsdSpdw) {
return new R<>(szglGsdSpdwService.page(page,Wrappers.query(szglGsdSpdw)));
}
/**
* 分页查询
* @param szglGsdSpdw 数字公路-视频点
* @return
*/
@GetMapping("/all")
public R getSpdAll(SzglGsdSpdw szglGsdSpdw) {
return new R<>(szglGsdSpdwService.list(Wrappers.query(szglGsdSpdw)));
}
/**
* 通过id查询数字公路-视频点
* @param id id
* @return R
*/
@GetMapping("/{id}")
public R getById(@PathVariable("id") Integer id){
return new R<>(szglGsdSpdwService.getById(id));
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.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.io.Serializable;
import java.time.LocalDateTime;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
@Data
@TableName("t_szgl_gsd_gcz")
@EqualsAndHashCode(callSuper = true)
public class SzglGsdGcz extends Model<SzglGsdGcz> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Integer id;
/**
* 观测站编号
*/
private String gczbh;
/**
* 观测站名称
*/
private String gczmc;
/**
* 路线编号
*/
private String lxbh;
/**
* 路线名称
*/
private String lxmc;
/**
* 行政区划
*/
private String xzqh;
/**
* 观测站类型
*/
private String gczlx;
/**
* 观测站桩号(KM)
*/
private Double gczzh;
/**
* 起点粧号(KM)
*/
private Double qdzh;
/**
* 终点桩号(KM)
*/
private Double zdzh;
/**
* 观测里程(KM)
*/
private Double gclc;
/**
* 起点名称
*/
private String qdmc;
/**
* 终点名称
*/
private String zdmc;
/**
* 技术等级
*/
private String jsdj;
/**
* 行车道数
*/
private Integer xcds;
/**
* 面层类型
*/
private String mclx;
/**
* 路面宽度(M)
*/
private Double lmkd;
/**
* 设计时速(KM/H)
*/
private Integer sjss;
/**
* 地形
*/
private String dx;
/**
* 停测月份
*/
private String tcyf;
/**
* 路线编码
*/
private String lxbm;
/**
* 桩号
*/
private Double zh;
/**
* 经度
*/
private Double jd;
/**
* 纬度
*/
private Double wd;
/**
* 国道或省道
*/
private String gs;
/**
*
*/
private Integer nian;
}
package com.elephant.framework.galaxy.aroad.module.szgl.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.io.Serializable;
import java.time.LocalDateTime;
/**
* 数字公路-路线简介
*
* @author zyw
* @date 2019-05-13 11:10:24
*/
@Data
@TableName("t_szgl_gsd_lxjj")
@EqualsAndHashCode(callSuper = true)
public class SzglGsdLxjj extends Model<SzglGsdLxjj> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private Integer id;
/**
* 路线编号
*/
private String lxbh;
/**
* 路线名称
*/
private String lxmc;
/**
* 起点名称
*/
private String qdmc;
/**
* 止点名称
*/
private String zdmc;
/**
* 起点桩号
*/
private Double qdzh;
/**
* 止点桩号
*/
private Double zdzh;
/**
* 里程
*/
private Double lc;
/**
* 途径地市
*/
private String tjcs;
}
package com.elephant.framework.galaxy.aroad.module.roadnet_zhjc.entity; package com.elephant.framework.galaxy.aroad.module.szgl.entity;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
* 智慧养护_综合展示 * 数字公路-视频点
* *
* @author wangjian * @author zyw
* @date 2019-04-26 11:51:59 * @date 2019-05-13 11:10:42
*/ */
@Data @Data
@TableName("t_zhyh_zhzs") @TableName("t_szgl_gsd_spdw")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ZhyhZhzs extends Model<ZhyhZhzs> { public class SzglGsdSpdw extends Model<SzglGsdSpdw> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 *
*/ */
@TableId @TableId
private String id; private Integer id;
/**
* 地区名称
*/
private String dqmc;
/** /**
* 年份 * 路线编号
*/ */
private String year; private String lxbh;
/** /**
* 字段名称 * 桩号1
*/ */
private String name; private String zh1;
/** /**
* 数值 * 名称
*/ */
private String value; private String mc;
/** /**
* 类别 * 管理单位
*/ */
private String type; private String gldw;
/** /**
* 创建人 * 是否通畅
*/ */
private String creator; private String sftc;
/** /**
* 创建时间 * 清晰度
*/ */
private LocalDateTime createTime; private String qxd;
/** /**
* 更新人 * 备注
*/ */
private String updatePerson; private String bz;
/** /**
* 更新时间 * 路线编码
*/ */
private LocalDateTime updateTime; private String lxbm;
/** /**
* 状态:根据具体需求定义 * 桩号
*/ */
private String status; private Double zh;
/** /**
* 是否删除 -1:已删除 0:正常 * 经度
*/ */
private String delFlag; private Double jd;
/** /**
* 备注信息 * 纬度
*/ */
private String remarks; private Double wd;
} }
package com.elephant.framework.galaxy.aroad.module.szgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
public interface SzglGsdGczMapper extends BaseMapper<SzglGsdGcz> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdLxjj;
/**
* 数字公路-路线简介
*
* @author zyw
* @date 2019-05-13 11:10:24
*/
public interface SzglGsdLxjjMapper extends BaseMapper<SzglGsdLxjj> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdSpdw;
/**
* 数字公路-视频点
*
* @author zyw
* @date 2019-05-13 11:10:42
*/
public interface SzglGsdSpdwMapper extends BaseMapper<SzglGsdSpdw> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
public interface SzglGsdGczService extends IService<SzglGsdGcz> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdLxjj;
/**
* 数字公路-路线简介
*
* @author zyw
* @date 2019-05-13 11:10:24
*/
public interface SzglGsdLxjjService extends IService<SzglGsdLxjj> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdSpdw;
/**
* 数字公路-视频点
*
* @author zyw
* @date 2019-05-13 11:10:42
*/
public interface SzglGsdSpdwService extends IService<SzglGsdSpdw> {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
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;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdGczService;
import org.springframework.stereotype.Service;
/**
* 数字公路-观测站
*
* @author zyw
* @date 2019-05-13 11:08:50
*/
@Service
public class SzglGsdGczServiceImpl extends ServiceImpl<SzglGsdGczMapper, SzglGsdGcz> implements SzglGsdGczService {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdLxjj;
import com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdLxjjMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdLxjjService;
import org.springframework.stereotype.Service;
/**
* 数字公路-路线简介
*
* @author zyw
* @date 2019-05-13 11:10:24
*/
@Service
public class SzglGsdLxjjServiceImpl extends ServiceImpl<SzglGsdLxjjMapper, SzglGsdLxjj> implements SzglGsdLxjjService {
}
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdSpdw;
import com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdSpdwMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SzglGsdSpdwService;
import org.springframework.stereotype.Service;
/**
* 数字公路-视频点
*
* @author zyw
* @date 2019-05-13 11:10:42
*/
@Service
public class SzglGsdSpdwServiceImpl extends ServiceImpl<SzglGsdSpdwMapper, SzglGsdSpdw> implements SzglGsdSpdwService {
}
...@@ -2,6 +2,8 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.controller; ...@@ -2,6 +2,8 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.bigdata.Basehighwayalldata;
import com.elephant.framework.galaxy.aroad.bigdata.EsUtil_fanshe;
import com.elephant.framework.galaxy.aroad.response.R; import com.elephant.framework.galaxy.aroad.response.R;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs;
import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcPtgsdLwzsService; import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcPtgsdLwzsService;
...@@ -9,6 +11,9 @@ import lombok.AllArgsConstructor; ...@@ -9,6 +11,9 @@ import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController; import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import java.util.ArrayList;
import java.util.List;
/** /**
* 普通国道路线平均行程车速 * 普通国道路线平均行程车速
...@@ -38,4 +43,12 @@ public class ZhjcPtgsdLwzsController extends BaseController { ...@@ -38,4 +43,12 @@ public class ZhjcPtgsdLwzsController extends BaseController {
} }
/**
* 按路线编号查询
* @Param keyword 搜索条件
*/
@GetMapping("/getLines/{lxbh}")
public R getLines(@PathVariable String lxbh) throws Exception {
return new R<>(zhjcPtgsdLwzsService.getLinesByLxbh(lxbh));
}
} }
package com.elephant.framework.galaxy.aroad.module.zhjc.controller; package com.elephant.framework.galaxy.aroad.module.zhjc.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.response.R;
import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog; import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm;
import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcXmjcGhxmService; import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcXmjcGhxmService;
import com.elephant.framework.galaxy.aroad.response.R;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
...@@ -40,6 +32,11 @@ public class ZhjcXmjcGhxmController extends BaseController { ...@@ -40,6 +32,11 @@ public class ZhjcXmjcGhxmController extends BaseController {
return new R<>(zhjcXmjcGhxmService.getList(zhjcXmjcGhxm)); return new R<>(zhjcXmjcGhxmService.getList(zhjcXmjcGhxm));
} }
@GetMapping("/gclist")
public R getGCList() {
return new R<>(zhjcXmjcGhxmService.getGCList());
}
/** /**
* 通过id查询规划项目 * 通过id查询规划项目
......
...@@ -33,7 +33,7 @@ private static final long serialVersionUID = 1L; ...@@ -33,7 +33,7 @@ private static final long serialVersionUID = 1L;
/** /**
* 观测里程 (公里) * 观测里程 (公里)
*/ */
private Double gcsl; private Double gclc;
/** /**
* 平均行驶速度 (公里/小时) * 平均行驶速度 (公里/小时)
*/ */
......
...@@ -16,4 +16,5 @@ public interface ZhjcXmjcGhxmMapper extends BaseMapper<ZhjcXmjcGhxm> { ...@@ -16,4 +16,5 @@ public interface ZhjcXmjcGhxmMapper extends BaseMapper<ZhjcXmjcGhxm> {
List<ZhjcXmjcGhxm> selectGhxm(@Param("ghxm") ZhjcXmjcGhxm zhjcXmjcGhxm); List<ZhjcXmjcGhxm> selectGhxm(@Param("ghxm") ZhjcXmjcGhxm zhjcXmjcGhxm);
List<ZhjcXmjcGhxm> selectGCGhxm();
} }
package com.elephant.framework.galaxy.aroad.module.zhjc.service; package com.elephant.framework.galaxy.aroad.module.zhjc.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.bigdata.Basehighwayalldata;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs;
import java.util.List; import java.util.List;
...@@ -15,4 +16,6 @@ import java.util.Map; ...@@ -15,4 +16,6 @@ import java.util.Map;
public interface ZhjcPtgsdLwzsService extends IService<ZhjcPtgsdLwzs> { public interface ZhjcPtgsdLwzsService extends IService<ZhjcPtgsdLwzs> {
Map<String, List<ZhjcPtgsdLwzs>> selectLwzs(ZhjcPtgsdLwzs lwjcPtgdlxpjxscs); Map<String, List<ZhjcPtgsdLwzs>> selectLwzs(ZhjcPtgsdLwzs lwjcPtgdlxpjxscs);
List<Basehighwayalldata> getLinesByLxbh(String lxbh);
} }
...@@ -2,7 +2,6 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.service; ...@@ -2,7 +2,6 @@ package com.elephant.framework.galaxy.aroad.module.zhjc.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm;
import com.elephant.framework.galaxy.aroad.response.R;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -21,4 +20,6 @@ public interface ZhjcXmjcGhxmService extends IService<ZhjcXmjcGhxm> { ...@@ -21,4 +20,6 @@ public interface ZhjcXmjcGhxmService extends IService<ZhjcXmjcGhxm> {
* @return * @return
*/ */
Map<String, List<ZhjcXmjcGhxm>> getList(ZhjcXmjcGhxm zhjcXmjcGhxm); Map<String, List<ZhjcXmjcGhxm>> getList(ZhjcXmjcGhxm zhjcXmjcGhxm);
Map<String, List<ZhjcXmjcGhxm>> getGCList();
} }
package com.elephant.framework.galaxy.aroad.module.zhjc.service.impl; package com.elephant.framework.galaxy.aroad.module.zhjc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.bigdata.Basehighwayalldata;
import com.elephant.framework.galaxy.aroad.bigdata.EsUtil_fanshe;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcPtgsdLwzs;
import com.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcPtgsdLwzsMapper; import com.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcPtgsdLwzsMapper;
import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcPtgsdLwzsService; import com.elephant.framework.galaxy.aroad.module.zhjc.service.ZhjcPtgsdLwzsService;
...@@ -44,4 +46,24 @@ public class ZhjcPtgsdLwzsServiceImpl extends ServiceImpl<ZhjcPtgsdLwzsMapper, c ...@@ -44,4 +46,24 @@ public class ZhjcPtgsdLwzsServiceImpl extends ServiceImpl<ZhjcPtgsdLwzsMapper, c
return map; return map;
} }
/**
* 根据路线编号查询所有路段
* @param lxbh
* @return
*/
@Override
public List<Basehighwayalldata> getLinesByLxbh(String lxbh) {
List<Basehighwayalldata> lukehighways =null;
try {
lukehighways = EsUtil_fanshe.queryHighWayLXBH(lxbh, "basehighwayalldata", "2018", 0, 2000000000);
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(Arrays.toString(lukehighways.toArray()));
return lukehighways;
}
} }
package com.elephant.framework.galaxy.aroad.module.zhjc.service.impl; package com.elephant.framework.galaxy.aroad.module.zhjc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm; import com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm;
import com.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcXmjcGhxmMapper; import com.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcXmjcGhxmMapper;
...@@ -40,4 +38,17 @@ public class ZhjcXmjcGhxmServiceImpl extends ServiceImpl<ZhjcXmjcGhxmMapper, Zhj ...@@ -40,4 +38,17 @@ public class ZhjcXmjcGhxmServiceImpl extends ServiceImpl<ZhjcXmjcGhxmMapper, Zhj
map.put("dzx",dzxList); map.put("dzx",dzxList);
return map; return map;
} }
@Override
public Map<String, List<ZhjcXmjcGhxm>> getGCList() {
List<ZhjcXmjcGhxm> list =zhjcXmjcGhxmMapper.selectGCGhxm();
Map<String,List<ZhjcXmjcGhxm>> map = new HashMap<>();
List<ZhjcXmjcGhxm> dzxList = list.stream().filter(a->"大中修项目".equals(a.getXmlx())).collect(Collectors.toList());
List<ZhjcXmjcGhxm> xgjList = list.stream().filter(a->"新改建项目".equals(a.getXmlx())).collect(Collectors.toList());
map.put("xgj",xgjList);
map.put("dzx",dzxList);
return map;
}
} }
server: server:
port: 9997 port: 9999
spring: spring:
mvc: mvc:
static-path-pattern: /images/* static-path-pattern: /images/*
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elephant.framework.galaxy.aroad.module.indexES.mapper.BaseindexdataMapper">
<resultMap id="baseindexdataMap" type="com.elephant.framework.galaxy.aroad.module.indexES.entity.Baseindexdata">
<id property="id" column="id"/>
<result property="indexName" column="index_name"/>
<result property="indexType" column="index_type"/>
<result property="createTime" column="create_time"/>
<result property="beizhu" column="beizhu"/>
</resultMap>
<select id="selectLatesByTableName" resultMap="baseindexdataMap">
select index_name,index_type,create_time from baseindexdata
where create_time =(select max(create_time) from baseindexdata where index_name =#{name})
</select>
</mapper>
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
</select> </select>
<select id="getYHCoordinates" resultMap="roadConditionEventMap"> <select id="getYHCoordinates" resultMap="roadConditionEventMap">
select * select id, longitude, latitude, event_type
from `road_condition_event` from `road_condition_event`
where event_type = '养护施工'; where event_type = '养护施工';
</select> </select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdGczMapper">
<resultMap id="szglGsdGczMap" type="com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdGcz">
<id property="id" column="id"/>
<result property="gczbh" column="gczbh"/>
<result property="gczmc" column="gczmc"/>
<result property="lxbh" column="lxbh"/>
<result property="lxmc" column="lxmc"/>
<result property="xzqh" column="xzqh"/>
<result property="gczlx" column="gczlx"/>
<result property="gczzh" column="gczzh"/>
<result property="qdzh" column="qdzh"/>
<result property="zdzh" column="zdzh"/>
<result property="gclc" column="gclc"/>
<result property="qdmc" column="qdmc"/>
<result property="zdmc" column="zdmc"/>
<result property="jsdj" column="jsdj"/>
<result property="xcds" column="xcds"/>
<result property="mclx" column="mclx"/>
<result property="lmkd" column="lmkd"/>
<result property="sjss" column="sjss"/>
<result property="dx" column="dx"/>
<result property="tcyf" column="tcyf"/>
<result property="lxbm" column="lxbm"/>
<result property="zh" column="zh"/>
<result property="jd" column="jd"/>
<result property="wd" column="wd"/>
<result property="gs" column="gs"/>
<result property="nian" column="nian"/>
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdLxjjMapper">
<resultMap id="szglGsdLxjjMap" type="com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdLxjj">
<id property="id" column="id"/>
<result property="lxbh" column="lxbh"/>
<result property="lxmc" column="lxmc"/>
<result property="qdmc" column="qdmc"/>
<result property="zdmc" column="zdmc"/>
<result property="qdzh" column="qdzh"/>
<result property="zdzh" column="zdzh"/>
<result property="lc" column="lc"/>
<result property="tjcs" column="tjcs"/>
</resultMap>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elephant.framework.galaxy.aroad.module.szgl.mapper.SzglGsdSpdwMapper">
<resultMap id="szglGsdSpdwMap" type="com.elephant.framework.galaxy.aroad.module.szgl.entity.SzglGsdSpdw">
<id property="id" column="id"/>
<result property="dqmc" column="dqmc"/>
<result property="lxbh" column="lxbh"/>
<result property="zh1" column="zh1"/>
<result property="mc" column="mc"/>
<result property="gldw" column="gldw"/>
<result property="sftc" column="sftc"/>
<result property="qxd" column="qxd"/>
<result property="bz" column="bz"/>
<result property="lxbm" column="lxbm"/>
<result property="zh" column="zh"/>
<result property="jd" column="jd"/>
<result property="wd" column="wd"/>
</resultMap>
</mapper>
...@@ -64,4 +64,11 @@ ...@@ -64,4 +64,11 @@
order by xm.id order by xm.id
</select> </select>
<select id="selectGCGhxm" parameterType="com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcGhxm" resultMap="zhjcXmjcGhxmMap">
select xm.*,shape.code,shape.shape
from t_zhjc_xmjc_ghxm xm
left join t_zhjc_xmjc_ghxm_shape shape on xm.xmmc = shape.name
where xm.jzqk = '在建'
order by xm.id
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论