提交 3537c000 authored 作者: 董吉利's avatar 董吉利

Merge branch 'master' into dev

# Conflicts: # pom.xml
...@@ -100,16 +100,18 @@ ...@@ -100,16 +100,18 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.28</version>
</dependency>
<dependency> <dependency>
<groupId>org.elasticsearch.client</groupId> <groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId> <artifactId>transport</artifactId>
<version>6.0.0</version> <version>6.0.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.3.1</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId> <artifactId>poi-ooxml-schemas</artifactId>
...@@ -125,18 +127,105 @@ ...@@ -125,18 +127,105 @@
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.8</version> <version>3.8</version>
</dependency> </dependency>
<!--json三种包-->
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<version>2.8.2</version> <version>2.8.2</version>
</dependency> </dependency>
<!-- fastjson --> <!--&lt;!&ndash;log4j需要的2个包&ndash;&gt;
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>-->
<!--&lt;!&ndash; javacommonslogging到slf4j的动态转换&ndash;&gt;
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
&lt;!&ndash;slf4j和log4j的整合输出为log4j&ndash;&gt;
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.25</version>
</dependency>
&lt;!&ndash;不管是javautillogging还是log4j都会接收过来&ndash;&gt;
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.2.4.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>-->
<!--&lt;!&ndash;json三种包&ndash;&gt;
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.28</version> <version>1.2.47</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.1</version>
</dependency>
&lt;!&ndash; jsp/servlet/jstl的jar包 &ndash;&gt;
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0-alpha-1</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
&lt;!&ndash; 数据库驱动 &ndash;&gt;
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
&lt;!&ndash; 数据库连接池:druid &ndash;&gt;
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.18</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
&lt;!&ndash; mybatis 包 &ndash;&gt;
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.7</version>
</dependency>-->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId> <artifactId>commons-collections4</artifactId>
......
package com.elephant.framework.galaxy.aroad.bigdata;
public class BaseRoadToll {
private Integer id;
private String roadCode;
private String roadName;
private Double number;
private String code;
private String name;
private String shortName;
private String tecLevel;
private String locationType;
private String tollDirection;
private Integer entNum;
private Integer entEtcNum;
private Integer entMtcNum;
private Integer entMixNum;
private Integer expNum;
private Integer expEtcNum;
private Integer expMtcNum;
private Integer expMixNum;
private String managementUnit;
private String longitude;
private String latitude;
public BaseRoadToll() {
}
public BaseRoadToll(Integer id, String roadCode, String roadName, Double number, String code, String name, String shortName, String tecLevel, String locationType, String tollDirection, Integer entNum, Integer entEtcNum, Integer entMtcNum, Integer entMixNum, Integer expNum, Integer expEtcNum, Integer expMtcNum, Integer expMixNum, String managementUnit, String longitude, String latitude) {
this.id = id;
this.roadCode = roadCode;
this.roadName = roadName;
this.number = number;
this.code = code;
this.name = name;
this.shortName = shortName;
this.tecLevel = tecLevel;
this.locationType = locationType;
this.tollDirection = tollDirection;
this.entNum = entNum;
this.entEtcNum = entEtcNum;
this.entMtcNum = entMtcNum;
this.entMixNum = entMixNum;
this.expNum = expNum;
this.expEtcNum = expEtcNum;
this.expMtcNum = expMtcNum;
this.expMixNum = expMixNum;
this.managementUnit = managementUnit;
this.longitude = longitude;
this.latitude = latitude;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRoadCode() {
return roadCode;
}
public void setRoadCode(String roadCode) {
this.roadCode = roadCode == null ? null : roadCode.trim();
}
public String getRoadName() {
return roadName;
}
public void setRoadName(String roadName) {
this.roadName = roadName == null ? null : roadName.trim();
}
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName == null ? null : shortName.trim();
}
public String getTecLevel() {
return tecLevel;
}
public void setTecLevel(String tecLevel) {
this.tecLevel = tecLevel == null ? null : tecLevel.trim();
}
public String getLocationType() {
return locationType;
}
public void setLocationType(String locationType) {
this.locationType = locationType == null ? null : locationType.trim();
}
public String getTollDirection() {
return tollDirection;
}
public void setTollDirection(String tollDirection) {
this.tollDirection = tollDirection == null ? null : tollDirection.trim();
}
public Integer getEntNum() {
return entNum;
}
public void setEntNum(Integer entNum) {
this.entNum = entNum;
}
public Integer getEntEtcNum() {
return entEtcNum;
}
public void setEntEtcNum(Integer entEtcNum) {
this.entEtcNum = entEtcNum;
}
public Integer getEntMtcNum() {
return entMtcNum;
}
public void setEntMtcNum(Integer entMtcNum) {
this.entMtcNum = entMtcNum;
}
public Integer getEntMixNum() {
return entMixNum;
}
public void setEntMixNum(Integer entMixNum) {
this.entMixNum = entMixNum;
}
public Integer getExpNum() {
return expNum;
}
public void setExpNum(Integer expNum) {
this.expNum = expNum;
}
public Integer getExpEtcNum() {
return expEtcNum;
}
public void setExpEtcNum(Integer expEtcNum) {
this.expEtcNum = expEtcNum;
}
public Integer getExpMtcNum() {
return expMtcNum;
}
public void setExpMtcNum(Integer expMtcNum) {
this.expMtcNum = expMtcNum;
}
public Integer getExpMixNum() {
return expMixNum;
}
public void setExpMixNum(Integer expMixNum) {
this.expMixNum = expMixNum;
}
public String getManagementUnit() {
return managementUnit;
}
public void setManagementUnit(String managementUnit) {
this.managementUnit = managementUnit == null ? null : managementUnit.trim();
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude == null ? null : longitude.trim();
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude == null ? null : latitude.trim();
}
@Override
public String toString() {
return "BaseRoadToll{" +
"id=" + id +
", roadCode='" + roadCode + '\'' +
", roadName='" + roadName + '\'' +
", number=" + number +
", code='" + code + '\'' +
", name='" + name + '\'' +
", shortName='" + shortName + '\'' +
", tecLevel='" + tecLevel + '\'' +
", locationType='" + locationType + '\'' +
", tollDirection='" + tollDirection + '\'' +
", entNum=" + entNum +
", entEtcNum=" + entEtcNum +
", entMtcNum=" + entMtcNum +
", entMixNum=" + entMixNum +
", expNum=" + expNum +
", expEtcNum=" + expEtcNum +
", expMtcNum=" + expMtcNum +
", expMixNum=" + expMixNum +
", managementUnit='" + managementUnit + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
'}';
}
}
\ No newline at end of file
package com.elephant.framework.galaxy.aroad.bigdata;
import java.io.Serializable;
public class BaseRoadToll_String implements Serializable{
private String id;
private String roadCode;
private String roadName;
private String number;
private String code;
private String name;
private String shortName;
private String tecLevel;
private String locationType;
private String tollDirection;
private String entNum;
private String entEtcNum;
private String entMtcNum;
private String entMixNum;
private String expNum;
private String expEtcNum;
private String expMtcNum;
private String expMixNum;
private String managementUnit;
private String longitude;
private String latitude;
public BaseRoadToll_String() {
}
public BaseRoadToll_String(String id, String roadCode, String roadName, String number, String code, String name, String shortName, String tecLevel, String locationType, String tollDirection, String entNum, String entEtcNum, String entMtcNum, String entMixNum, String expNum, String expEtcNum, String expMtcNum, String expMixNum, String managementUnit, String longitude, String latitude) {
this.id = id;
this.roadCode = roadCode;
this.roadName = roadName;
this.number = number;
this.code = code;
this.name = name;
this.shortName = shortName;
this.tecLevel = tecLevel;
this.locationType = locationType;
this.tollDirection = tollDirection;
this.entNum = entNum;
this.entEtcNum = entEtcNum;
this.entMtcNum = entMtcNum;
this.entMixNum = entMixNum;
this.expNum = expNum;
this.expEtcNum = expEtcNum;
this.expMtcNum = expMtcNum;
this.expMixNum = expMixNum;
this.managementUnit = managementUnit;
this.longitude = longitude;
this.latitude = latitude;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getRoadCode() {
return roadCode;
}
public void setRoadCode(String roadCode) {
this.roadCode = roadCode;
}
public String getRoadName() {
return roadName;
}
public void setRoadName(String roadName) {
this.roadName = roadName;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getTecLevel() {
return tecLevel;
}
public void setTecLevel(String tecLevel) {
this.tecLevel = tecLevel;
}
public String getLocationType() {
return locationType;
}
public void setLocationType(String locationType) {
this.locationType = locationType;
}
public String getTollDirection() {
return tollDirection;
}
public void setTollDirection(String tollDirection) {
this.tollDirection = tollDirection;
}
public String getEntNum() {
return entNum;
}
public void setEntNum(String entNum) {
this.entNum = entNum;
}
public String getEntEtcNum() {
return entEtcNum;
}
public void setEntEtcNum(String entEtcNum) {
this.entEtcNum = entEtcNum;
}
public String getEntMtcNum() {
return entMtcNum;
}
public void setEntMtcNum(String entMtcNum) {
this.entMtcNum = entMtcNum;
}
public String getEntMixNum() {
return entMixNum;
}
public void setEntMixNum(String entMixNum) {
this.entMixNum = entMixNum;
}
public String getExpNum() {
return expNum;
}
public void setExpNum(String expNum) {
this.expNum = expNum;
}
public String getExpEtcNum() {
return expEtcNum;
}
public void setExpEtcNum(String expEtcNum) {
this.expEtcNum = expEtcNum;
}
public String getExpMtcNum() {
return expMtcNum;
}
public void setExpMtcNum(String expMtcNum) {
this.expMtcNum = expMtcNum;
}
public String getExpMixNum() {
return expMixNum;
}
public void setExpMixNum(String expMixNum) {
this.expMixNum = expMixNum;
}
public String getManagementUnit() {
return managementUnit;
}
public void setManagementUnit(String managementUnit) {
this.managementUnit = managementUnit;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
@Override
public String toString() {
return "BaseRoadToll_String{" +
"id='" + id + '\'' +
", roadCode='" + roadCode + '\'' +
", roadName='" + roadName + '\'' +
", number='" + number + '\'' +
", code='" + code + '\'' +
", name='" + name + '\'' +
", shortName='" + shortName + '\'' +
", tecLevel='" + tecLevel + '\'' +
", locationType='" + locationType + '\'' +
", tollDirection='" + tollDirection + '\'' +
", entNum='" + entNum + '\'' +
", entEtcNum='" + entEtcNum + '\'' +
", entMtcNum='" + entMtcNum + '\'' +
", entMixNum='" + entMixNum + '\'' +
", expNum='" + expNum + '\'' +
", expEtcNum='" + expEtcNum + '\'' +
", expMtcNum='" + expMtcNum + '\'' +
", expMixNum='" + expMixNum + '\'' +
", managementUnit='" + managementUnit + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
'}';
}
}
\ No newline at end of file
package com.elephant.framework.galaxy.aroad.bigdata;
import java.util.ArrayList;
/**
* @program: pingxiang_basedata
* @description: ${description}
* @author: dongjili
* @create: 2019-03-21 11:15
**/
public class ReadElasticsearch {
public static void main(String[] args) throws Exception {
createIndexAnd2Hbase();
}
public static void createIndexAnd2Hbase() throws Exception {
//分词查询桥梁数据返回list集合
//ArrayList<LuKeBridge> luKeBridges = EsUtil_fanshe.queryBridge("广州桥", "basicbridgedata", "2018", 0, 2000000000);
/* for (LuKeBridge luKeBridge : luKeBridges) {
System.out.println(luKeBridge.toString());
}*/
//分词查询路段数据返回list集合
//ArrayList<LuKeHighWay> lukehighways = EsUtil_fanshe.queryHighWay("广州桥", "basichighwaydata", "2018", 0, 2000000000);
/*for (LuKeHighWay lukehighway : lukehighways) {
System.out.println(lukehighway.toString());
}*/
//分词查询隧道数据返回list集合
//ArrayList<BasicTunnel> basicTunnels = EsUtil_fanshe.queryTunnel("广州桥", "basictunneldata", "2018", 0, 2000000000);
/*for (BasicTunnel basicTunnel : basicTunnels) {
System.out.println(basicTunnel.toString());
}*/
//分词查询收费站数据返回list集合
//ArrayList<BaseRoadToll_String> baseRoadTollStrings = EsUtil_fanshe.queryBaseRoadTollString("广州桥", "baseroadtolldata", "2018", 0, 2000000000);
/*for (BaseRoadToll_String baseRoadTollString : baseRoadTollStrings) {
System.out.println(baseRoadTollString.toString());
}*/
//封装查询匹配所有的名称
ArrayList<String> names = new ArrayList<>();
//查询匹配桥梁名称
String bridgeOne = EsUtil_fanshe.queryBridgeOne("桥", "basicbridgedata", "2018", 0, 2000000000);
names.add(bridgeOne);
//查询匹配路段名称
String highWayOne = EsUtil_fanshe.queryHighWayOne("桥", "basichighwaydata", "2018", 0, 2000000000);
names.add(highWayOne);
//查询匹配隧道名称
String tunnelOne = EsUtil_fanshe.queryTunnelOne("桥", "basictunneldata", "2018", 0, 2000000000);
names.add(tunnelOne);
//查询匹配收费站名称
String baseRoadTollOne = EsUtil_fanshe.queryBaseRoadTollOne("桥", "baseroadtolldata", "2018", 0, 2000000000);
names.add(baseRoadTollOne);
System.out.println(names.toString());
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论