Commit a9b34d4e by 王欣伟

行程项目迁移到gitlab

0 parents
Showing 527 changed files with 4856 additions and 0 deletions
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.glsx.biz</groupId>
<artifactId>biz-track</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>biz-track-common</artifactId>
<name>biz-track-common</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-core</artifactId>
<version>3.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.glsx.biz.track.common.entity;
import java.io.Serializable;
/**
* 基站信息
*/
public class BsRecord implements Serializable {
// 终端gps时间:yyyy-MM-dd HH:mm:ss
private String gpsTime;
// 存储时间:yyyy-MM-dd HH:mm:ss
private String storeTime;
// 移动国家码
public String mcc;
// 移动运营商码
public String mnc;
public String getGpsTime() {
return gpsTime;
}
public void setGpsTime(String gpsTime) {
this.gpsTime = gpsTime;
}
public String getStoreTime() {
return storeTime;
}
public void setStoreTime(String storeTime) {
this.storeTime = storeTime;
}
public String getMcc() {
return mcc;
}
public void setMcc(String mcc) {
this.mcc = mcc;
}
public String getMnc() {
return mnc;
}
public void setMnc(String mnc) {
this.mnc = mnc;
}
@Override
public String toString() {
return "BsRecord{" +
"gpsTime='" + gpsTime + '\'' +
", storeTime='" + storeTime + '\'' +
", mcc='" + mcc + '\'' +
", mnc='" + mnc + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity;
import java.io.Serializable;
/**
* 转换后的设备类型
*/
public class DeviceTypeConvert implements Serializable {
/** 转换后的用户/设备id */
private String objectId;
/** 转换后的设备类型 */
private Integer deviceTypeConvert;
public String getObjectId() {
return objectId;
}
public void setObjectId(String objectId) {
this.objectId = objectId;
}
public Integer getDeviceTypeConvert() {
return deviceTypeConvert;
}
public void setDeviceTypeConvert(Integer deviceTypeConvert) {
this.deviceTypeConvert = deviceTypeConvert;
}
@Override
public String toString() {
return "DeviceTypeConvert{" +
"objectId='" + objectId + '\'' +
", deviceTypeConvert=" + deviceTypeConvert +
'}';
}
}
package com.glsx.biz.track.common.entity;
import java.io.Serializable;
/**
* 轨迹
*/
public class GpsRecord implements Serializable {
/**
* 终端gps时间
* 1、单个位置信息获取时返回的是:yyyy-MM-dd HH:mm:ss
* 2、轨迹点列表获取时返回的是:秒数
*/
private String gpsTime;
private String lng;// 经度
private String lat;// 纬度
private String alt;// 高度(米)
private String speed;// 速度
private String dir;// 方向(度º)
private String gLng;// 谷歌经度
private String gLat;// 谷歌纬度
private String bLng;// 百度经度
private String bLat;// 百度纬度
/**
* 存储时间 (秒)
* 1、单个位置信息获取时返回的是:yyyy-MM-dd HH:mm:ss
* 2、轨迹点列表获取时返回的是:秒数
*/
private String storeTime;
/**
* 终端gps时间 Date
*/
private String gpsDate;
/**
* 存储时间 Date
*/
private String storeDate;
public String getGpsTime() {
return gpsTime;
}
public void setGpsTime(String gpsTime) {
this.gpsTime = gpsTime;
}
public String getLng() {
return lng;
}
public void setLng(String lng) {
this.lng = lng;
}
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
public String getAlt() {
return alt;
}
public void setAlt(String alt) {
this.alt = alt;
}
public String getSpeed() {
return speed;
}
public void setSpeed(String speed) {
this.speed = speed;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getgLng() {
return gLng;
}
public void setgLng(String gLng) {
this.gLng = gLng;
}
public String getgLat() {
return gLat;
}
public void setgLat(String gLat) {
this.gLat = gLat;
}
public String getbLng() {
return bLng;
}
public void setbLng(String bLng) {
this.bLng = bLng;
}
public String getbLat() {
return bLat;
}
public void setbLat(String bLat) {
this.bLat = bLat;
}
public String getStoreTime() {
return storeTime;
}
public void setStoreTime(String storeTime) {
this.storeTime = storeTime;
}
public String getGpsDate() {
return gpsDate;
}
public void setGpsDate(String gpsDate) {
this.gpsDate = gpsDate;
}
public String getStoreDate() {
return storeDate;
}
public void setStoreDate(String storeDate) {
this.storeDate = storeDate;
}
@Override
public String toString() {
return "GpsRecord{" +
"gpsTime='" + gpsTime + '\'' +
", lng='" + lng + '\'' +
", lat='" + lat + '\'' +
", alt='" + alt + '\'' +
", speed='" + speed + '\'' +
", dir='" + dir + '\'' +
", gLng='" + gLng + '\'' +
", gLat='" + gLat + '\'' +
", bLng='" + bLng + '\'' +
", bLat='" + bLat + '\'' +
", storeTime='" + storeTime + '\'' +
", gpsDate=" + gpsDate +
", storeDate=" + storeDate +
'}';
}
}
package com.glsx.biz.track.common.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 里程信息
* Created by Lenovo on 2016/5/6.
*/
public class Journey implements Serializable {
private Integer id;// 主键
private Integer userId;// 嘀嘀号
private String beginGpsLat;// 起始位置点纬度
private String beginGpsLon;// 起始位置点经度
private String beginAddress;// 行程起始地址
private String endGpsLat;// 结束位置点纬度
private String endGpsLon;// 结束位置点经度
private String endAddress;// 行程结束地址
private Date beginTime;// 行程开始时间
private Date endTime;// 行程结束时间
private Date gpsTime;// 终端gps时间
private Date gpsBeginTime;
private Date gpsEndTime;// 行程结束时间
private Integer gpsTotalTime;// 总时长(秒)
private Integer idleTime;// 怠速时长(秒)
private Double mileage;// 里程(米)
private Double oil;// 油耗(毫升)
private Integer overSpeedNo;// 高速次数
private Integer rushSlowNo;// 急减速次数
private Integer rushTurnNo;// 急转弯次数
private Integer rushUpNo;// 急加速次数
private String sn;// 设备sn
private Integer totalTime;// 总时长(秒)
private Integer delStatus;// 是否删除
private Date accessTime;// 接入接收数据时间
private Date receiveTime;// 数据接收时间
private Date createTime;// 创建时间
private List<GpsRecord> gpsList ;// 轨迹位置点集合
private Double middlePercent;//80~120速度所占全程的百分比
private Double highPercent;//120以上速度所占全程的百分比
private Double fastSpeed;//行程中最高速度
private String imei;// 设备的imei号
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getBeginGpsLat() {
return beginGpsLat;
}
public void setBeginGpsLat(String beginGpsLat) {
this.beginGpsLat = beginGpsLat;
}
public String getBeginGpsLon() {
return beginGpsLon;
}
public void setBeginGpsLon(String beginGpsLon) {
this.beginGpsLon = beginGpsLon;
}
public String getBeginAddress() {
return beginAddress;
}
public void setBeginAddress(String beginAddress) {
this.beginAddress = beginAddress;
}
public String getEndGpsLat() {
return endGpsLat;
}
public void setEndGpsLat(String endGpsLat) {
this.endGpsLat = endGpsLat;
}
public String getEndGpsLon() {
return endGpsLon;
}
public void setEndGpsLon(String endGpsLon) {
this.endGpsLon = endGpsLon;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getGpsTime() {
return gpsTime;
}
public void setGpsTime(Date gpsTime) {
this.gpsTime = gpsTime;
}
public Integer getIdleTime() {
return idleTime;
}
public void setIdleTime(Integer idleTime) {
this.idleTime = idleTime;
}
public Double getMileage() {
return mileage;
}
public void setMileage(Double mileage) {
this.mileage = mileage;
}
public Double getOil() {
return oil;
}
public void setOil(Double oil) {
this.oil = oil;
}
public Integer getOverSpeedNo() {
return overSpeedNo;
}
public void setOverSpeedNo(Integer overSpeedNo) {
this.overSpeedNo = overSpeedNo;
}
public Integer getRushSlowNo() {
return rushSlowNo;
}
public void setRushSlowNo(Integer rushSlowNo) {
this.rushSlowNo = rushSlowNo;
}
public Integer getRushTurnNo() {
return rushTurnNo;
}
public void setRushTurnNo(Integer rushTurnNo) {
this.rushTurnNo = rushTurnNo;
}
public Integer getRushUpNo() {
return rushUpNo;
}
public void setRushUpNo(Integer rushUpNo) {
this.rushUpNo = rushUpNo;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Integer getTotalTime() {
return totalTime;
}
public void setTotalTime(Integer totalTime) {
this.totalTime = totalTime;
}
public Integer getDelStatus() {
return delStatus;
}
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
}
public Date getAccessTime() {
return accessTime;
}
public void setAccessTime(Date accessTime) {
this.accessTime = accessTime;
}
public Date getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(Date receiveTime) {
this.receiveTime = receiveTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public List<GpsRecord> getGpsList() {
return gpsList;
}
public void setGpsList(List<GpsRecord> gpsList) {
this.gpsList = gpsList;
}
public Double getMiddlePercent() {
return middlePercent;
}
public void setMiddlePercent(Double middlePercent) {
this.middlePercent = middlePercent;
}
public Double getHighPercent() {
return highPercent;
}
public void setHighPercent(Double highPercent) {
this.highPercent = highPercent;
}
public Double getFastSpeed() {
return fastSpeed;
}
public void setFastSpeed(Double fastSpeed) {
this.fastSpeed = fastSpeed;
}
public Date getGpsBeginTime() {
return gpsBeginTime;
}
public void setGpsBeginTime(Date gpsBeginTime) {
this.gpsBeginTime = gpsBeginTime;
}
public Date getGpsEndTime() {
return gpsEndTime;
}
public void setGpsEndTime(Date gpsEndTime) {
this.gpsEndTime = gpsEndTime;
}
public Integer getGpsTotalTime() {
return gpsTotalTime;
}
public void setGpsTotalTime(Integer gpsTotalTime) {
this.gpsTotalTime = gpsTotalTime;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
@Override
public String toString() {
return "Journey{" +
"id=" + id +
", userId=" + userId +
", beginGpsLat='" + beginGpsLat + '\'' +
", beginGpsLon='" + beginGpsLon + '\'' +
", beginAddress='" + beginAddress + '\'' +
", endGpsLat='" + endGpsLat + '\'' +
", endGpsLon='" + endGpsLon + '\'' +
", endAddress='" + endAddress + '\'' +
", beginTime=" + beginTime +
", endTime=" + endTime +
", gpsTime=" + gpsTime +
", gpsBeginTime=" + gpsBeginTime +
", gpsEndTime=" + gpsEndTime +
", gpsTotalTime=" + gpsTotalTime +
", idleTime=" + idleTime +
", mileage=" + mileage +
", oil=" + oil +
", overSpeedNo=" + overSpeedNo +
", rushSlowNo=" + rushSlowNo +
", rushTurnNo=" + rushTurnNo +
", rushUpNo=" + rushUpNo +
", sn='" + sn + '\'' +
", totalTime=" + totalTime +
", delStatus=" + delStatus +
", accessTime=" + accessTime +
", receiveTime=" + receiveTime +
", createTime=" + createTime +
", gpsList=" + gpsList +
", middlePercent=" + middlePercent +
", highPercent=" + highPercent +
", fastSpeed=" + fastSpeed +
", imei='" + imei + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity;
import com.glsx.biz.track.common.entity.base.BaseEntity;
import java.util.Date;
/**
* 里程中间表
* Created by Lenovo on 2016/5/6.
*/
public class JourneyCurrent extends BaseEntity {
private Integer id;
private Integer userId; //嘀嘀号
private String sn;
/*private JourneyPrimaryKey compKey;*/
private Date beginTime; //里程开始时间
private Date endTime; //里程结束时间
private Integer beginType; //里程开始类型
private Integer endType; //里程结束类型
private Integer isPush; // 是否推送消息:1推送(默认),2不推送
private Integer deviceType; // 增加的字段:设备类型
public JourneyCurrent() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Integer getBeginType() {
return beginType;
}
public void setBeginType(Integer beginType) {
this.beginType = beginType;
}
public Integer getEndType() {
return endType;
}
public void setEndType(Integer endType) {
this.endType = endType;
}
public Integer getIsPush() {
return isPush;
}
public void setIsPush(Integer isPush) {
this.isPush = isPush;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
@Override
public String toString() {
return "JourneyCurrent{" +
"id=" + id +
", userId=" + userId +
", sn='" + sn + '\'' +
", beginTime=" + beginTime +
", endTime=" + endTime +
", beginType=" + beginType +
", endType=" + endType +
", isPush=" + isPush +
", deviceType=" + deviceType +
'}';
}
}
package com.glsx.biz.track.common.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 里程信息
* Created by Lenovo on 2016/5/6.
*/
public class JourneyObd implements Serializable {
private Integer id;// 主键
private Integer userId;// 嘀嘀号
private String beginGpsLat;// 起始位置点纬度
private String beginGpsLon;// 起始位置点经度
private String beginAddress;// 行程起始地址
private String endGpsLat;// 结束位置点纬度
private String endGpsLon;// 结束位置点经度
private String endAddress;// 行程结束地址
private Date beginTime;// 行程开始时间
private Date endTime;// 行程结束时间
private Date gpsTime;// 终端gps时间
private Integer idleTime;// 怠速时长(秒)
private Double mileage;// 里程(米)
private Double oil;// 油耗(毫升)
private Integer overSpeedNo;// 高速次数
private Integer rushSlowNo;// 急减速次数
private Integer rushTurnNo;// 急转弯次数
private Integer rushUpNo;// 急加速次数
private String sn;// 设备sn
private Integer totalTime;// 总时长(秒)
private Integer delStatus;// 是否删除
private Date accessTime;// 接入接收数据时间
private Date receiveTime;// 数据接收时间
private Date createTime;// 创建时间
private List<GpsRecord> gpsList ;// 轨迹位置点集合
private Double middlePercent;//80~120速度所占全程的百分比
private Double highPercent;//120以上速度所占全程的百分比
private Double fastSpeed;//行程中最高速度
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getBeginGpsLat() {
return beginGpsLat;
}
public void setBeginGpsLat(String beginGpsLat) {
this.beginGpsLat = beginGpsLat;
}
public String getBeginGpsLon() {
return beginGpsLon;
}
public void setBeginGpsLon(String beginGpsLon) {
this.beginGpsLon = beginGpsLon;
}
public String getBeginAddress() {
return beginAddress;
}
public void setBeginAddress(String beginAddress) {
this.beginAddress = beginAddress;
}
public String getEndGpsLat() {
return endGpsLat;
}
public void setEndGpsLat(String endGpsLat) {
this.endGpsLat = endGpsLat;
}
public String getEndGpsLon() {
return endGpsLon;
}
public void setEndGpsLon(String endGpsLon) {
this.endGpsLon = endGpsLon;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getGpsTime() {
return gpsTime;
}
public void setGpsTime(Date gpsTime) {
this.gpsTime = gpsTime;
}
public Integer getIdleTime() {
return idleTime;
}
public void setIdleTime(Integer idleTime) {
this.idleTime = idleTime;
}
public Double getMileage() {
return mileage;
}
public void setMileage(Double mileage) {
this.mileage = mileage;
}
public Double getOil() {
return oil;
}
public void setOil(Double oil) {
this.oil = oil;
}
public Integer getOverSpeedNo() {
return overSpeedNo;
}
public void setOverSpeedNo(Integer overSpeedNo) {
this.overSpeedNo = overSpeedNo;
}
public Integer getRushSlowNo() {
return rushSlowNo;
}
public void setRushSlowNo(Integer rushSlowNo) {
this.rushSlowNo = rushSlowNo;
}
public Integer getRushTurnNo() {
return rushTurnNo;
}
public void setRushTurnNo(Integer rushTurnNo) {
this.rushTurnNo = rushTurnNo;
}
public Integer getRushUpNo() {
return rushUpNo;
}
public void setRushUpNo(Integer rushUpNo) {
this.rushUpNo = rushUpNo;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Integer getTotalTime() {
return totalTime;
}
public void setTotalTime(Integer totalTime) {
this.totalTime = totalTime;
}
public Integer getDelStatus() {
return delStatus;
}
public void setDelStatus(Integer delStatus) {
this.delStatus = delStatus;
}
public Date getAccessTime() {
return accessTime;
}
public void setAccessTime(Date accessTime) {
this.accessTime = accessTime;
}
public Date getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(Date receiveTime) {
this.receiveTime = receiveTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public List<GpsRecord> getGpsList() {
return gpsList;
}
public void setGpsList(List<GpsRecord> gpsList) {
this.gpsList = gpsList;
}
public Double getMiddlePercent() {
return middlePercent;
}
public void setMiddlePercent(Double middlePercent) {
this.middlePercent = middlePercent;
}
public Double getHighPercent() {
return highPercent;
}
public void setHighPercent(Double highPercent) {
this.highPercent = highPercent;
}
public Double getFastSpeed() {
return fastSpeed;
}
public void setFastSpeed(Double fastSpeed) {
this.fastSpeed = fastSpeed;
}
@Override
public String toString() {
return "JourneyObd{" +
"id=" + id +
", userId=" + userId +
", beginGpsLat='" + beginGpsLat + '\'' +
", beginGpsLon='" + beginGpsLon + '\'' +
", beginAddress='" + beginAddress + '\'' +
", endGpsLat='" + endGpsLat + '\'' +
", endGpsLon='" + endGpsLon + '\'' +
", endAddress='" + endAddress + '\'' +
", beginTime=" + beginTime +
", endTime=" + endTime +
", gpsTime=" + gpsTime +
", idleTime=" + idleTime +
", mileage=" + mileage +
", oil=" + oil +
", overSpeedNo=" + overSpeedNo +
", rushSlowNo=" + rushSlowNo +
", rushTurnNo=" + rushTurnNo +
", rushUpNo=" + rushUpNo +
", sn='" + sn + '\'' +
", totalTime=" + totalTime +
", delStatus=" + delStatus +
", accessTime=" + accessTime +
", receiveTime=" + receiveTime +
", createTime=" + createTime +
", gpsList=" + gpsList +
", middlePercent=" + middlePercent +
", highPercent=" + highPercent +
", fastSpeed=" + fastSpeed +
'}';
}
}
package com.glsx.biz.track.common.entity;
import com.glsx.biz.track.common.entity.base.BaseEntity;
import java.util.Date;
/**
* Created by Lenovo on 2016/10/26.
*/
public class JourneyRepGPS extends BaseEntity {
private Integer id;
private Integer journeyId;
private Integer status;
private Integer userId;
private String sn;
private Date beginTime;
private Date endTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getJourneyId() {
return journeyId;
}
public void setJourneyId(Integer journeyId) {
this.journeyId = journeyId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Override
public String toString() {
return "JourneyRepGPS{" +
"id=" + id +
", journeyId=" + journeyId +
", status=" + status +
", userId=" + userId +
", sn='" + sn + '\'' +
", beginTime=" + beginTime +
", endTime=" + endTime +
'}';
}
}
package com.glsx.biz.track.common.entity.base;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
* 实体类 - 基类
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
@MappedSuperclass
public class BaseEntity implements Serializable {
private static final long serialVersionUID = -6718838800112233445L;
public static final String CREATE_TIME_PROPERTY_NAME = "createTime";// "创建日期"属性名称
public static final String UPDATE_TIME_PROPERTY_NAME = "updateTime";// "修改日期"属性名称
@XmlTransient
protected Date createTime;// 创建日期
@XmlTransient
protected Date updateTime;// 修改日期
@XmlTransient
protected Integer lastOperatorId;// 操作者ID
@XmlTransient
protected String lastOperatorName;// 操作者名称
@XmlTransient
protected Integer operatorType;// 操作者类型
@XmlTransient
protected int version;
@Column(name = "create_time", updatable = false)
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Column(name = "update_time")
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Column(name = "last_operator_id")
public Integer getLastOperatorId() {
return lastOperatorId;
}
public void setLastOperatorId(Integer lastOperatorId) {
this.lastOperatorId = lastOperatorId;
}
@Column(name = "last_operator_name")
public String getLastOperatorName() {
return lastOperatorName;
}
public void setLastOperatorName(String lastOperatorName) {
this.lastOperatorName = lastOperatorName;
}
@Column(name = "operator_type")
public Integer getOperatorType() {
return operatorType;
}
public void setOperatorType(Integer operatorType) {
this.operatorType = operatorType;
}
@Version
@Column(name = "ver", length = 11)
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.biz.track.common.entity.enums;
public enum EventTypeEnum {
LOGIN_TYPE(1, "login"),
LOGOUT_TYPE(2, "logout"),
IGINITION_TYPE(3, "iginition"),
FLAMEOUT_TYPE(4, "flameout");
private Integer id;
private String text;
private EventTypeEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static EventTypeEnum findById(Integer id) {
EventTypeEnum[] objs = EventTypeEnum.values();
for (EventTypeEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.enums;
/**
* gps座标转地址 地图类型
*/
public enum GeoSourceEnum {
MAP_ABC(1, "mapAbc"),
DATA_ICE(2, "数据部门ice服务"),
GAODE(3, "高德");
private Integer id;
private String text;
private GeoSourceEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static GeoSourceEnum findById(Integer id) {
GeoSourceEnum[] objs = GeoSourceEnum.values();
for (GeoSourceEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.enums;
public enum LocTypeEnum {
GPS(1, "gps"),
GPRS(2, "基站");
private Integer id;
private String text;
private LocTypeEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static LocTypeEnum findById(Integer id) {
LocTypeEnum[] objs = LocTypeEnum.values();
for (LocTypeEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.enums;
public enum MapTypeEnum {
NONE_TYPE(0, "NONE"),
DOUBLE_TYPE(1, "googlebaidu"),
GOOGLE_TYPE(2, "google"),
BAIDU_TYPE(3, "baidu");
private Integer id;
private String text;
private MapTypeEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static MapTypeEnum findById(Integer id) {
MapTypeEnum[] objs = MapTypeEnum.values();
for (MapTypeEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.enums;
public enum ResidentTimesEnum {
GPRS_DEFAULT(0, "基站查询时为0"),
AM(1, "上午"),
PM(2, "下午"),
NIGHT(3, "晚上"),
ALL_DAY(4, "全天");
private Integer id;
private String text;
private ResidentTimesEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static ResidentTimesEnum findById(Integer id) {
ResidentTimesEnum[] objs = ResidentTimesEnum.values();
for (ResidentTimesEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.enums;
/**
* 请求参数类型枚举:用户id(嘀嘀号);sn(设备号)
*/
public enum UserDeviceParamTypeEnum {
OBJECT_USERID(1, "userId"),
OBJECT_SN(2, "sn"),
OBJECT_REPORTSN(3, "sn"),
OBJECT_DOUBLE_SN(4, "snOrReportSn");
private Integer id;
private String text;
private UserDeviceParamTypeEnum(Integer id, String text){
this.id = id;
this.text = text;
}
public static UserDeviceParamTypeEnum findById(Integer id) {
UserDeviceParamTypeEnum[] objs = UserDeviceParamTypeEnum.values();
for (UserDeviceParamTypeEnum obj : objs) {
if (id.equals(obj.getId())) {
return obj;
}
}
return null;
}
public String getText() {
return this.text;
}
public Integer getId() {
return this.id;
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created with IntelliJ IDEA.
* User: Lenovo
* Date: 2017/10/31
* Time: 16:41
* <p>
* Description:
*/
public class ComEventRecord implements Serializable {
/**
* gps时间:格式 yyyy-MM-dd HH:mm:ss
*/
private String gpsTime;
/**
* 接入时间:格式 yyyy-MM-dd HH:mm:ss
*/
private String accessTime;
public ComEventRecord() {
}
public ComEventRecord(String gpsTime, String accessTime) {
this.gpsTime = gpsTime;
this.accessTime = accessTime;
}
public String getGpsTime() {
return gpsTime;
}
public void setGpsTime(String gpsTime) {
this.gpsTime = gpsTime;
}
public String getAccessTime() {
return accessTime;
}
public void setAccessTime(String accessTime) {
this.accessTime = accessTime;
}
@Override
public String toString() {
return "ComEventRecord{" +
"gpsTime=" + gpsTime +
", accessTime=" + accessTime +
'}';
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* @author wangxw
* @version 1.0.0
* @ClassName DeviceResident.java
* @description: 设备的常驻地信息
* @createTime 2020年07月24日 18:57:00
*/
public class DeviceResident implements Serializable {
/**
* 设备号
*/
private String sn;
/**
* 持续时长
*/
private Integer totalDuration;
/**
*
*/
private Integer totalTimes;
private String latitude;
private String longitude;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Integer getTotalDuration() {
return totalDuration;
}
public void setTotalDuration(Integer totalDuration) {
this.totalDuration = totalDuration;
}
public Integer getTotalTimes() {
return totalTimes;
}
public void setTotalTimes(Integer totalTimes) {
this.totalTimes = totalTimes;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
@Override
public String toString() {
return "DeviceResident{" +
"sn='" + sn + '\'' +
", totalDuration=" + totalDuration +
", totalTimes=" + totalTimes +
", latitude='" + latitude + '\'' +
", longitude='" + longitude + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import com.glsx.biz.track.common.entity.enums.LocTypeEnum;
import com.glsx.biz.track.common.entity.enums.ResidentTimesEnum;
import com.glsx.cloudframework.core.exception.ServiceException;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
/**
* @author wangxw
* @version 1.0.0
* @ClassName DeviceResidentRequest.java
* @description: 设备常驻地信息获取请求
* @createTime 2020年07月24日 19:07:00
*/
public class DeviceResidentRequest implements Serializable {
/**
* 设备号
*/
private String sn;
/**
* 开始时间
*/
private String beginTime;
/**
* 结束时间
*/
private String endTime;
/**
* 时间区间Scope(时间范围 1:上午(6:00~12:00)2:下午(12:00~21:00)3:夜晚(21:00~6:00)4:全天 当当前是基站查询时该字段为0)
*/
private ResidentTimesEnum residentTimesScope;
/**
* 1.gps 2.基站
*/
private LocTypeEnum locType;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public ResidentTimesEnum getResidentTimesScope() {
return residentTimesScope;
}
public void setResidentTimesScope(ResidentTimesEnum residentTimesScope) {
checkResidentTimes(residentTimesScope);
this.residentTimesScope = residentTimesScope;
}
public LocTypeEnum getLocType() {
return locType;
}
public void setLocType(LocTypeEnum locType) {
this.locType = locType;
modifyResidentTimes(this.locType);
}
/**
* 检查范围
* @param residentTimesScope
*/
private void checkResidentTimes(ResidentTimesEnum residentTimesScope) {
if (this.locType!=null && this.locType.equals(LocTypeEnum.GPRS) && residentTimesScope.getId().intValue()>0) {
throw new RuntimeException("获取基站数据时,这里必须为0");
}
}
/**
* 同步设置residenttimes
* @param locType
*/
private void modifyResidentTimes(LocTypeEnum locType) {
if (locType.equals(LocTypeEnum.GPRS)) {
this.residentTimesScope = ResidentTimesEnum.GPRS_DEFAULT;
}
}
@Override
public String toString() {
return "DeviceResidentRequest{" +
"sn='" + sn + '\'' +
", beginTime='" + beginTime + '\'' +
", endTime='" + endTime + '\'' +
", residentTimesScope=" + residentTimesScope +
", locType=" + locType +
'}';
}
/**
* 检查参数是否合法:不合法返回true
* @return
*/
public boolean checkParam() {
if (StringUtils.isEmpty(this.sn)) {
return true;
}
if (StringUtils.isEmpty(this.beginTime)) {
return true;
}
if (StringUtils.isEmpty(this.endTime)) {
return true;
}
if (this.residentTimesScope==null || this.locType==null) {
return true;
}
return false;
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
import java.util.Date;
/**
* @author wangxw
* @version 1.0.0
* @ClassName DeviceStateInfo.java
* @description: 大数据 设备状态信息
* @createTime 2020年07月14日 12:48:00
*/
public class DeviceStateInfo implements Serializable {
/**
* 设备号
*/
public Long sn;
/**
* 状态
*/
public Integer state;
/**
* 开始时间
*/
public Date startTime;
/**
* 持续时间
*/
public Integer duration;
public Long getSn() {
return sn;
}
public void setSn(Long sn) {
this.sn = sn;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Integer getDuration() {
return duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
@Override
public String toString() {
return "DeviceStateInfo{" +
"sn=" + sn +
", state=" + state +
", startTime=" + startTime +
", duration=" + duration +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* 设备类型转换结果类
*/
public class DeviceTypeConvertVo implements Serializable {
/// 业务上用到的参数
/** 转换后的用户/设备id */
private String objectId;
/** 转换后的设备类型 */
private Integer deviceTypeConvert;
/** 是否轨迹分离设备 */
private boolean userVersionFlag;
/// 备选参数
/** 原始设备类型 */
private Integer deviceType;
/** 用户id(嘀嘀号) */
private Integer userId;
/** 设备sn */
private String sn;
/** 原始的设备版本 */
private String softVersion;
/** 设备编码 */
private Integer deviceId;
public String getObjectId() {
return objectId;
}
public void setObjectId(String objectId) {
this.objectId = objectId;
}
public Integer getDeviceTypeConvert() {
return deviceTypeConvert;
}
public void setDeviceTypeConvert(Integer deviceTypeConvert) {
this.deviceTypeConvert = deviceTypeConvert;
}
public boolean isUserVersionFlag() {
return userVersionFlag;
}
public void setUserVersionFlag(boolean userVersionFlag) {
this.userVersionFlag = userVersionFlag;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getSoftVersion() {
return softVersion;
}
public void setSoftVersion(String softVersion) {
this.softVersion = softVersion;
}
public Integer getDeviceId() {
return deviceId;
}
public void setDeviceId(Integer deviceId) {
this.deviceId = deviceId;
}
@Override
public String toString() {
return "DeviceTypeConvertVo{" +
"objectId='" + objectId + '\'' +
", deviceTypeConvert=" + deviceTypeConvert +
", userVersionFlag=" + userVersionFlag +
", deviceType=" + deviceType +
", userId=" + userId +
", sn='" + sn + '\'' +
", softVersion='" + softVersion + '\'' +
", deviceId=" + deviceId +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* 发动机事件
* Created by Lenovo on 2016/5/12.
* @author wangxw
*/
public class Event implements Serializable{
private static final long serialVersionUID = -8941191960209465706L;
public static String TYPE_IGNITION = "1"; // 点火
public static String TYPE_FLAMEOUT = "2"; // 熄火
public static String TYPE_CLEANFAULT = "3"; // 清除故障
public static String TYPE_LOGIN = "4"; // 登录
public static String TYPE_LOGOUT = "5"; // 登出
private String userId;
private String sn;
private String type; // 类型:10点火事件,11熄火事件
private String time; // 终端报警时上带的GPS时间 (服务器 + 8 小时),格式 yyyy-MM-dd HH:mm:ss
private String deviceType;//
private String accessTime;
private String receiveTime;
public Event() {
}
public Event(String sn, String type, String time) {
this.sn = sn;
this.type = type;
this.time = time;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getAccessTime() {
return accessTime;
}
public void setAccessTime(String accessTime) {
this.accessTime = accessTime;
}
public String getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(String receiveTime) {
this.receiveTime = receiveTime;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
@Override
public String toString() {
return "Event{" +
"userId='" + userId + '\'' +
", sn='" + sn + '\'' +
", type='" + type + '\'' +
", time='" + time + '\'' +
", deviceType='" + deviceType + '\'' +
", accessTime='" + accessTime + '\'' +
", receiveTime='" + receiveTime + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
import java.util.List;
/**
* 发动机事件
* Created by Lenovo on 2016/5/12.
* @author wangxw
*/
public class GPSEvent implements Serializable{
private static final long serialVersionUID = -8941191960209465706L;
private String userId;
private String sn;
private String mncType; // 类型:运营商类型
private String time; // 终端上报的GPS时间 (服务器 + 8 小时),格式 yyyy-MM-dd HH:mm:ss
private String deviceType;//设备类型
private List<GPSRecordVo> gpsRecords;// GPS补传记录
private String accessTime;
private String receiveTime;
public GPSEvent() {
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getMncType() {
return mncType;
}
public void setMncType(String mncType) {
this.mncType = mncType;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getAccessTime() {
return accessTime;
}
public void setAccessTime(String accessTime) {
this.accessTime = accessTime;
}
public String getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(String receiveTime) {
this.receiveTime = receiveTime;
}
public List<GPSRecordVo> getGpsRecords() {
return gpsRecords;
}
public void setGpsRecords(List<GPSRecordVo> gpsRecords) {
this.gpsRecords = gpsRecords;
}
@Override
public String toString() {
return "GPSEvent{" +
"userId='" + userId + '\'' +
", sn='" + sn + '\'' +
", mncType='" + mncType + '\'' +
", time='" + time + '\'' +
", deviceType='" + deviceType + '\'' +
", gpsRecords=" + gpsRecords +
", accessTime='" + accessTime + '\'' +
", receiveTime='" + receiveTime + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created by Lenovo on 2016/10/25.
*/
public class GPSRecordVo implements Serializable {
private String clientTime;// 终端时间
private GPSVo gpsVo;// GPS信息
public String getClientTime() {
return clientTime;
}
public void setClientTime(String clientTime) {
this.clientTime = clientTime;
}
public GPSVo getGpsVo() {
return gpsVo;
}
public void setGpsVo(GPSVo gpsVo) {
this.gpsVo = gpsVo;
}
@Override
public String toString() {
return "GPSRecordVo{" +
"clientTime='" + clientTime + '\'' +
", gpsVo=" + gpsVo +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created by Lenovo on 2016/10/25.
*/
public class GPSVo implements Serializable {
private String longitude;// 经度
private String latitude;// 纬度
private String speed;// 速度
private String direction;// 方向
private String alt;// 海拔
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;
}
public String getSpeed() {
return speed;
}
public void setSpeed(String speed) {
this.speed = speed;
}
public String getDirection() {
return direction;
}
public void setDirection(String direction) {
this.direction = direction;
}
public String getAlt() {
return alt;
}
public void setAlt(String alt) {
this.alt = alt;
}
@Override
public String toString() {
return "GPSVo{" +
"longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
", speed='" + speed + '\'' +
", direction='" + direction + '\'' +
", alt='" + alt + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import com.glsx.biz.track.common.entity.BsRecord;
import com.glsx.biz.track.common.entity.GpsRecord;
import java.io.Serializable;
/**
* Created with IntelliJ IDEA.
* User: Lenovo
* Date: 2018/2/5
* Time: 17:14
* <p>
* Description: 最新位置点和最新基站点数据
*/
public class GpsBsRecord implements Serializable {
private GpsRecord gpsRecord;
private BsRecord bsRecord;
public GpsRecord getGpsRecord() {
return gpsRecord;
}
public void setGpsRecord(GpsRecord gpsRecord) {
this.gpsRecord = gpsRecord;
}
public BsRecord getBsRecord() {
return bsRecord;
}
public void setBsRecord(BsRecord bsRecord) {
this.bsRecord = bsRecord;
}
@Override
public String toString() {
return "GpsBsRecord{" +
"gpsRecord=" + gpsRecord +
", bsRecord=" + bsRecord +
'}';
}
/**
* 判断是否有最新位置点
* @return
*/
public boolean haveLatestRecord() {
if (gpsRecord!=null || bsRecord!=null) {
return true;
}
return false;
}
/**
* 获取最新GPS或者基站点的时间
* @return
*/
public String getRecordTime() {
String result = "";
if (gpsRecord!=null) {
result = gpsRecord.getGpsTime();
return result;
}
if (bsRecord!=null) {
result = bsRecord.getGpsTime();
}
return result;
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
import java.util.Date;
/**
* @author wangxw
* @version 1.0.0
* @ClassName JourneyCalcut.java
* @description: 计算行程 请求
* @createTime 2020年08月06日 20:03:00
*/
public class JourneyCalcut implements Serializable {
/**
* 设备号
*/
private String sn;
/**
* 开始时间
*/
private Date beginTime;
/**
* 结束时间
*/
private Date endTime;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Override
public String toString() {
return "JourneyCalcut{" +
"sn='" + sn + '\'' +
", beginTime=" + beginTime +
", endTime=" + endTime +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* JourneyCurrent 联合主键
* Created by Lenovo on 2016/7/1.
*/
public class JourneyPrimaryKey implements Serializable {
/*
private Integer userId;
private String sn;
public JourneyPrimaryKey() {
}
public JourneyPrimaryKey(Integer userId, String sn) {
this.userId = userId;
this.sn = sn;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
JourneyPrimaryKey that = (JourneyPrimaryKey) o;
if (!userId.equals(that.userId)) return false;
return sn.equals(that.sn);
}
@Override
public int hashCode() {
int result = userId.hashCode();
result = 31 * result + sn.hashCode();
return result;
}
@Override
public String toString() {
return "JourneyPrimaryKey{" +
"userId=" + userId +
", sn='" + sn + '\'' +
'}';
}*/
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
import java.util.Date;
/**
* 行程cache信息类
* Created by Lenovo on 2016/5/9.
* @author wangxw
*/
public class JourneyVo implements Serializable {
/**
* 嘀嘀号
*/
private Integer userId;
/**
* 行程开始类型:1 点火,4 登录
*/
private int startType;
/**
* 行程开始时间
*/
private Date startTime;
/**
* 行程结束类型:2 熄火,5 登出
*/
private int endType;
/**
* 行程结束时间
*/
private Date endTime;
/**
* 设备类型:2车机,12134后视镜
*/
private int deviceType;
/**
* 设备号
*/
private String sn;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public int getStartType() {
return startType;
}
public void setStartType(int startType) {
this.startType = startType;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public int getEndType() {
return endType;
}
public void setEndType(int endType) {
this.endType = endType;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public int getDeviceType() {
return deviceType;
}
public void setDeviceType(int deviceType) {
this.deviceType = deviceType;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
@Override
public String toString() {
return "JourneyVo{" +
"userId=" + userId +
", startType=" + startType +
", startTime=" + startTime +
", endType=" + endType +
", endTime=" + endTime +
", deviceType=" + deviceType +
", sn='" + sn + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created with GLSX_ACCOUNTS_GROUP.
* <p>
* User: Lenovo
* CreateTime: 2018-11-21 15:31
* <p>
* Description: 终端上报的行程信息
*/
public class MachineReportVo implements Serializable {
// 行程id(设备号+时间戳+随机数,随机数占7位)
private String trackId;
// 设备号
private String sn;
// 开始时间
private String startTime;
// 上报时间戳
private String reportTime;
// 累计里程(米,m)
private Double mileage;
// 设备类型:2车机,12134后视镜
private Integer deviceType;
// 系统版本号
private String softVersion;
// 服务器接收时间
private String reciverDate;
public String getTrackId() {
return trackId;
}
public void setTrackId(String trackId) {
this.trackId = trackId;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public Double getMileage() {
return mileage;
}
public void setMileage(Double mileage) {
this.mileage = mileage;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public String getSoftVersion() {
return softVersion;
}
public void setSoftVersion(String softVersion) {
this.softVersion = softVersion;
}
public String getReciverDate() {
return reciverDate;
}
public void setReciverDate(String reciverDate) {
this.reciverDate = reciverDate;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("MachineReportVo{");
sb.append("trackId='").append(trackId).append('\'');
sb.append(", sn='").append(sn).append('\'');
sb.append(", startTime='").append(startTime).append('\'');
sb.append(", reportTime='").append(reportTime).append('\'');
sb.append(", mileage=").append(mileage);
sb.append(", deviceType=").append(deviceType);
sb.append(", softVersion='").append(softVersion).append('\'');
sb.append(", reciverDate='").append(reciverDate).append('\'');
sb.append('}');
return sb.toString();
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.biz.track.common.entity.vo;
import com.glsx.biz.track.common.entity.enums.GeoSourceEnum;
import java.io.Serializable;
/**
* @author wangxw
* @version 1.0.0
* @ClassName MapGeoRequest.java
* @description: 经纬度 转地址 请求
* @createTime 2020年07月27日 10:55:00
*/
public class MapGeoRequest implements Serializable {
private GeoSourceEnum geoSource;
private String lat;
private String lng;
public GeoSourceEnum getGeoSource() {
return geoSource;
}
public void setGeoSource(GeoSourceEnum geoSource) {
this.geoSource = geoSource;
}
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
public String getLng() {
return lng;
}
public void setLng(String lng) {
this.lng = lng;
}
@Override
public String toString() {
return "MapGeoRequest{" +
"geoSource=" + geoSource +
", lat='" + lat + '\'' +
", lng='" + lng + '\'' +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* @author wangxw
* @version 1.0.0
* @ClassName MonthStatisticVo.java
* @description: ${description}
* @createTime 2020年02月21日 13:24:00
*/
public class MonthStatisticVo implements Serializable {
/**
* 月份
*/
private String theMonth;
/**
* 指定月份的总里程
*/
private Double monthMileage;
/**
* 存在里程的天数
*/
private Integer totalDays;
public String getTheMonth() {
return theMonth;
}
public void setTheMonth(String theMonth) {
this.theMonth = theMonth;
}
public Double getMonthMileage() {
return monthMileage;
}
public void setMonthMileage(Double monthMileage) {
this.monthMileage = monthMileage;
}
public Integer getTotalDays() {
return totalDays;
}
public void setTotalDays(Integer totalDays) {
this.totalDays = totalDays;
}
@Override
public String toString() {
return "MonthStatisticVo{" +
"theMonth='" + theMonth + '\'' +
", monthMileage=" + monthMileage +
", totalDays=" + totalDays +
'}';
}
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* @author wangxw
* @version 1.0.0
* @ClassName RectifyDeviationRequest.java
* @description: ${description}
* @createTime 2020年07月27日 11:08:00
*/
public class RectifyDeviationRequest implements Serializable {
}
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created with IntelliJ IDEA.
* User: Lenovo
* Date: 2017/11/8
* Time: 14:11
* <p>
* Description:
*/
public class TripRECRecord implements Serializable {
private Integer connStatus;
/**
* 事件 时间 秒
*/
private Long evtTimes;
private String evtDate;
public Integer getConnStatus() {
return connStatus;
}
public void setConnStatus(Integer connStatus) {
this.connStatus = connStatus;
}
public Long getEvtTimes() {
return evtTimes;
}
public void setEvtTimes(Long evtTimes) {
this.evtTimes = evtTimes;
}
public String getEvtDate() {
return evtDate;
}
public void setEvtDate(String evtDate) {
this.evtDate = evtDate;
}
@Override
public String toString() {
return "TripRECRecord{" +
"connStatus=" + connStatus +
", evtTimes=" + evtTimes +
", evtDate='" + evtDate + '\'' +
'}';
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.biz.track.common.entity.vo;
import java.io.Serializable;
/**
* Created with IntelliJ IDEA.
* User: Lenovo
* Date: 2018/5/7
* Time: 15:10
* <p>
* Description:
*/
public class UserTotalMileage implements Serializable {
private Double todayMileage;
private Double totalMileage;
public Double getTodayMileage() {
return todayMileage;
}
public void setTodayMileage(Double todayMileage) {
this.todayMileage = todayMileage;
}
public Double getTotalMileage() {
return totalMileage;
}
public void setTotalMileage(Double totalMileage) {
this.totalMileage = totalMileage;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("UserTotalMileage{");
sb.append("todayMileage=").append(todayMileage);
sb.append(", totalMileage=").append(totalMileage);
sb.append('}');
return sb.toString();
}
}
\ No newline at end of file \ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.glsx.biz</groupId>
<artifactId>biz-track</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>biz-track-container</artifactId>
<packaging>war</packaging>
<name>biz-track-container Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>4.3.13.RELEASE</spring.version>
<junit.version>4.12</junit.version>
<cloudframework.version>3.0.0.RELEASE</cloudframework.version>
<hibernate.core.version>5.1.0.Final</hibernate.core.version>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
<version>0.7.1.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-server</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-core</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-persistent</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-distributed</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-cache</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-config</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-starter</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.core.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.0.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.appleframework.cache</groupId>
<artifactId>apple-cache-redis</artifactId>
<version>0.0.4.RELEASE</version>
</dependency>
<!-- spring-redis -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-mq-kafka</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>Ice</groupId>
<artifactId>Ice</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>quartz-all</artifactId>
<version>1.6.3</version>
</dependency>
<dependency>
<groupId>com.glsx.biz</groupId>
<artifactId>biz-track-service</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-hadoop2</artifactId>
<version>${cloudframework.version}</version>
</dependency>
<dependency>
<groupId>com.glsx.biz</groupId>
<artifactId>biz-user-service</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<!--服务协议接口-->
<dependency>
<groupId>com.glsx</groupId>
<artifactId>platform-protocol-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- 微信模板消息-->
<dependency>
<groupId>cn.com.glsx</groupId>
<artifactId>ddh-wechat-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>biz-track-container</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
</plugin>
</plugins>
</build>
</project>
package com.glsx.biz.track.container.contants;
import com.glsx.cloudframework.core.context.config.PropertyConfigurer;
public class ServiceConstants {
/**
* 删除状态标识
*/
public final static Short COMMON_DELETE_FLAG = -9;
/**
* 新建状态标识
*/
public final static Short COMMON_NEW_FLAG = 1;
/**
* 物理设备已激活状态标识
*/
public final static Short DEVICE_ACTIVED_FLAG = 2;
/**
* 物理设备已拆出状态标识
*/
public final static Short DEVICE_OUT_FLAG = 3;
/**
* 物理设备已激活状态标识
*/
public final static Short DEVICE_REPORT_FLAG = 4;
/**
* 已解绑
*/
public final static Short DEVICE_UNBIND_FLAG = 5;
/**
* 嘀嘀号已启用标识
*/
public final static Short USER_USED_FLAG = 2;
/**
* 主绑嘀嘀号标识
*/
public final static Short BINDING_MAIN_FLAG = 1;
/**
* 同步接入平台成功
*/
public final static Short SYNC_LOG_SUCCESS_FLAG = 1;
/**
* 同步接入平台失败
*/
public final static Short SYNC_LOG_FAIL_FLAG = 2;
/**
* 套餐使用状态
*/
public final static Short PACKAGE_ON_LINE = 2;
/**
* 行程信息缓存key
*/
public static final String JOURNEY_OBJECT_KEY = "Journey_Cache";
/**
* 行程信息缓存key
*/
public static final String JOURNEY_BASE_CACHE = "journey_cache_";
/**
* 行程结束时间 - 信息缓存key
*/
public static final String JOURNEY_ENDTIME_OBJECT_KEY = "Journey_Endtime_Cache";
/**
* 行程结束时间 - 信息缓存key
*/
public static final String JOURNEY_ENDTIME_BASE_CACHE = "journey_Endtime_cache_";
/**
* 补传GPS行程缓存
*/
public static final String REPGPS_OBJECT_KEY = "repGPS_journey_cache";
/**
* 行程默认值:新建行程
*/
public static final int JOURNRY_DERAULT = 0;
/**
* 将时间靠前的事件时间更新到行程信息中
*/
public static final int JOURNRY_RECOVER_START = 1;
/**
* 结束上一个行程,开始一个新的行程
*/
public static final int JOURNRY_END_AND_START = 2;
/**
* 丢掉这个消息
*/
public static final int JOURNRY_THROW_EVENT = 3;
/**
* 丢掉这个消息并且清除登出记录
*/
public static final int JOURNRY_THROW_CLEAN_EVENT = 4;
/**
* 清除之前的行程数据,开始一个新的行程
*/
public static final int JOURNRY_CLEAN_AND_START = 5;
/**
* 查询轨迹的类型
*/
public static final int TRACK_OBD_TYPE = 2;
public static final int TRACK_DDBOX_TYPE = 4;
public static final int TRACK_TRACKER_TYPE = 5;
public static final int TRACK_REARMIRROR_TYPE = 6;
public static final int TRACK_CAR_TYPE = 7;
public static final int TRACK_GPS_TYPE = 5;
public static final int TRACK_YUNG_TYPE = 8;
public static final int TRACK_CHARGER_TYPE = 13;
//ttodo 新类型
public static final int TRACK_ANDROID_TYPE = 9;
public static final int TRACK_ANDROIDCAR_TYPE = 9;
public static final int TRACK_PUFD_DRIVERCAR_TYPE = 11;
/**
* 默认未删除记录
*/
public static final Integer JOURNEY_STATE_DEFAULT = 0;
/**
* 清除之前的行程数据,开始一个新的行程 -- 时间间隔
*/
public static final int cleanStartJourney = 86400;
/**
* 中间表新建记录
*/
public static final Integer REPGPS_JOURNEY_DEFAULT = 0;
/**
* gps补传行程 - 已计算标示
*/
public static final Integer REPGPS_JOURNEY_USERED = 1;
/**
* 与上一个行程的时间差
*/
public static final int JOURNEY_EXTEND_TIME = PropertyConfigurer.getInteger("journey.extend.last.time");
// 一公里等于1000米
public static final int MILEAGE_UNIT_VALUE = 1000;
// 一小时等于3600秒
public static final int HOUR_SECOND_UNIT_VALUE = 3600;
// 两位小数格式化
public static final String DECIMAL_DOUBLE_TWO_PATTEN = "#.##";
// gps提交的类型为行车记录仪
public static final String DEVICEIDS_GPS_CHANGED = "device.ids.gps.changed";
// 每次获取多少个轨迹点信息
public static final String DIAMOND_DEVICE_SEPARA_EVENT_COUNT = "device.separa.event.count";
// 每次获取多少个轨迹点信息
public static final String DIAMOND_TRACK_GPS_CYCLE_COUNT = "track.gps.cycle.count";
// gps轨迹分离版本
public static final String DIAMOND_DEVICE_GPS_SEPARA_SOFTVERSION = "device.gps.separa.softversion";
// 从数据平台获取用户总里程的类型:盗抢用户
public static final int DATA_MILEAGE_USER_TYPE_ROBBER = 0;
// 从数据平台获取用户总里程的类型:盗抢用户
public static final String DIAMOND_YUNG_DEVICE_ID = "yungou.device.id";
public static final String DATA_MILEAGE_ICE_URL = "ice.user.mileage.url";
// 安卓行车记录仪
public static final String DIAMOND_ANDROID_DEVICE_ID = "android.device.id";
// 小镜的设备类型
public static final String MIRROR_DEVICE_ID = "user.active.deviceid";
/**
* AIBOX deviceId
*/
public static final String DIAMOND_AIBOX_DEVICEID = "aibox.device.ids";
/**
* 普方达行车记录仪 设备编码 (小精灵APP)
*/
public static final String DEVICEID_PUFD_DRIVERCAR = "pufd.drivercar.device.ids";
// 设备类型匹配关系
public static int getTypeByDeviceType(Integer deviceType) {
int type = ServiceConstants.TRACK_TRACKER_TYPE;
if(deviceType==1){
type = ServiceConstants.TRACK_OBD_TYPE;
} else if(deviceType==2){
type = ServiceConstants.TRACK_DDBOX_TYPE;
} else if(deviceType==12134){
type = ServiceConstants.TRACK_REARMIRROR_TYPE;
} else if(deviceType==6){
type = ServiceConstants.TRACK_CAR_TYPE;
} else if(deviceType==8){
type = ServiceConstants.TRACK_GPS_TYPE;
} else if(deviceType==9){
type = ServiceConstants.TRACK_YUNG_TYPE;
}
return type;
}
//终端上报事件的kafka topic
public static final String REPORT_TERMINAL_EVENT = "report.terminal.event";
//终端上报行程的kafka topic
public static final String REPORT_PHY_JOURNEY = "report.phy.journey";
/**
* 海圳最新位置点api 地址
*/
public static final String DIAMOND_API_HAIZHEN_LASTGPS = "haizhen.lastgps.api.url";
/**
* 海圳 - 设备编码
*/
public static final String DEVICEID_LASTGPS_HAIZHEN = "haizhen.physical.device.ids";
/**
* 海圳静态信息
*/
public class HaiZhen {
/**
* API 调用成功状态
*/
public static final int API_SUCCESS = 0;
/**
* API 调用成功 jsonkey
*/
public static final String JSON_KEY_API_SUCCESS = "status";
/**
* API 返回数据 jsonkey
*/
public static final String JSON_KEY_API_DATA = "data";
/**
* 返回数据 GPS lng jsonkey
*/
public static final String JSON_KEY_DATA_LNG = "lng";
/**
* 返回数据 GPS lat jsonkey
*/
public static final String JSON_KEY_DATA_LAT = "lat";
}
/**
* 屏蔽不获取bsRecord 的设备类型(小类)
*/
public static final String FORBID_BS_RECORD_DEVICEIDS = "forbid.bsrecord.deviceids";
/**
* 里程获取 开始时间 钻石配置key
*/
public static final String TSP_TOTALMILEAGE_STARTDATE = "tsp.totalmileage.startdate";
}
package com.glsx.biz.track.container.dao;
import com.glsx.biz.track.common.entity.JourneyCurrent;
import com.glsx.biz.track.container.contants.ServiceConstants;
import com.glsx.biz.track.container.dao.base.BaseDAO;
import com.glsx.cloudframework.core.util.DateFormatUtil;
import com.glsx.cloudframework.core.util.DateUtil;
import com.glsx.cloudframework.core.util.StringUtils;
import com.glsx.cloudframework.persistent.types.Finder;
import org.springframework.stereotype.Repository;
import java.util.*;
@Repository
public class JourneyCurrentDao extends BaseDAO {
public JourneyCurrent getJourneyCurrentById(Integer userId, String sn) {
String hql = " from JourneyCurrent where userId=:userId and sn=:sn";
Map<String, Object> param = new HashMap<String, Object>();
param.put("userId", userId);
param.put("sn", sn);
return (JourneyCurrent) hibernateBaseDAO.findOne(hql, param);
}
public void updateCleanEndJourney(Integer userId, String sn) {
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyCurrent set beginType=:beginType,beginTime=:beginTime,endType=:endType,endTime=:endTime,updateTime=NOW() where userId=:userId and sn=:sn";
param.put("beginType", null);
param.put("beginTime", null);
param.put("endType", null);
param.put("endTime", null);
param.put("userId", userId);
param.put("sn", sn);
this.hibernateBaseDAO.update(hsql, param);
}
public void updateRecoverStartJourney(Integer userId, String sn, Date startTime, int eventType) {
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyCurrent set beginType=:beginType,beginTime=:beginTime,endTime=:endTime,endType=:endType,updateTime=NOW() where userId=:userId and sn=:sn";
param.put("beginType", eventType);
param.put("beginTime", startTime);
param.put("endTime", null);
param.put("endType", null);
param.put("userId", userId);
param.put("sn", sn);
this.hibernateBaseDAO.update(hsql, param);
}
/*public void updateEndJourney(Integer userId, String sn, int endType, Date endTime) {
JourneyPrimaryKey compKey = new JourneyPrimaryKey(userId, sn);
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyCurrent set endType=:endType,endTime=:endTime,updateTime=NOW() where compKey = :compKey";
param.put("endType", endType);
param.put("endTime", endTime);
param.put("compKey", compKey);
public void updateEndJourney(Integer userId, int endType, Date endTime) {
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyCurrent set endType=:endType,endTime=:endTime,updateTime=NOW() where userId=:idv";
param.put("endType", endType);
param.put("endTime", endTime);
param.put("idv", userId);*/
// public void updateEndJourney(Integer userId, int endType, Date endTime) {
// Map<String, Object> param = new HashMap<String, Object>();
// String hsql = "update JourneyCurrent set endType=:endType,endTime=:endTime,updateTime=NOW() where userId=:idv";
// param.put("endType", endType);
// param.put("endTime", endTime);
// param.put("idv", userId);
//
// this.hibernateBaseDAO.update(hsql, param);
// }
public boolean isExistById(Integer userId, String sn) {
String hql = " from JourneyCurrent where 1=1";
if (userId != null) {
hql += " and userId=" + userId;
}
if (!StringUtils.isEmpty(sn)) {
hql += " and sn=" + sn;
}
if (hibernateBaseDAO.countQueryResult(Finder.create(hql), null) > 0) {
return true;
} else {
return false;
}
}
public Integer saveJourneyCurrent(JourneyCurrent jouCur) {
jouCur.setLastOperatorId(1001);
jouCur.setLastOperatorName("JOURNEY_KAFKA");
jouCur.setOperatorType(1);
return (Integer) hibernateBaseDAO.save(jouCur);
}
public void saveOrUpdateJourneyCurrent(JourneyCurrent jouCur) {
jouCur.setLastOperatorId(1001);
jouCur.setLastOperatorName("JOURNEY_KAFKA");
jouCur.setOperatorType(1);
hibernateBaseDAO.saveOrUpdate(jouCur);
}
public Integer saveForCompKey(JourneyCurrent jouCur) {
jouCur.setLastOperatorId(1001);
jouCur.setLastOperatorName("JOURNEY_KAFKA");
jouCur.setOperatorType(1);
return (Integer) hibernateBaseDAO.save(jouCur);
}
public List<JourneyCurrent> getJourneyJobList() {
String startDate = DateFormatUtil.toString(DateUtil.addDayOfDate(new Date(), -2), DateFormatUtil.pattern19);
String endDate = DateFormatUtil.toString(new Date(), DateFormatUtil.pattern19);
int minuteConf = 0 - ServiceConstants.JOURNEY_EXTEND_TIME/60;
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.MINUTE, minuteConf);
String endUpDate = DateFormatUtil.toString(calendar.getTime(), DateFormatUtil.pattern19);
/*Calendar calendar2 = Calendar.getInstance();
calendar2.setTime(new Date());
calendar2.add(Calendar.MINUTE, -40);
String startUpDate = DateFormatUtil.toString(calendar2.getTime(), DateFormatUtil.pattern19);*/
/*String sql = "from JourneyCurrent where beginTime is not null and endTime is not null and " +
"TIMESTAMPDIFF(MINUTE,updateTime,now())>20 order by updateTime";*/
StringBuffer sqlBuffer = new StringBuffer("from JourneyCurrent where endTime < '");
/*sqlBuffer.append(startUpDate);
sqlBuffer.append("' and '");*/
sqlBuffer.append(endUpDate);
sqlBuffer.append("' and (beginTime between '");
sqlBuffer.append(startDate);
sqlBuffer.append("' and '");
sqlBuffer.append(endDate);
sqlBuffer.append("') and (endTime between '");
sqlBuffer.append(startDate);
sqlBuffer.append("' and '");
sqlBuffer.append(endDate);
sqlBuffer.append("') ");
List<JourneyCurrent> list = (List<JourneyCurrent>) hibernateBaseDAO.find(Finder.create(sqlBuffer.toString()), 1, 5000).getList();
return list;
}
public void updateBatchReadStatus(String userIds) {
/*Map<String, Object> param = new HashMap<String, Object>();
String hsql = "";
this.hibernateBaseDAO.update(hsql, param);*/
}
public void updateMSGPushStatus(Integer userId, String sn, int status) {
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyCurrent set isPush=:isPush,updateTime=NOW() where userId=:userId";
if (!StringUtils.isEmpty(sn)) {
hsql = hsql + " and sn=:sn";
param.put("sn", sn);
}
param.put("isPush", status);
param.put("userId", userId);
this.hibernateBaseDAO.update(hsql, param);
}
public JourneyCurrent getJourneyCurrentByUserId(Integer userId) {
String hql = " from JourneyCurrent joucur where ";
hql += " userId = :userId";
Map<String, Object> param = new HashMap<String, Object>();
param.put("userId", userId);
return (JourneyCurrent) hibernateBaseDAO.findOne(hql, param);
}
public List<JourneyCurrent> getNotEndJourneys(String dateValue) {
StringBuffer sqlBuffer = new StringBuffer("from JourneyCurrent where date_format(beginTime, '%Y-%m-%d')='");
sqlBuffer.append(dateValue);
sqlBuffer.append("' and beginTime is not null and (endTime is null or (endTime is not null and endType=2))");
return (List<JourneyCurrent>) hibernateBaseDAO.find(sqlBuffer.toString(), null);
}
}
package com.glsx.biz.track.container.dao;
import com.glsx.biz.track.common.entity.Journey;
import com.glsx.biz.track.common.entity.JourneyRepGPS;
import com.glsx.biz.track.container.dao.base.BaseDAO;
import com.glsx.cloudframework.core.context.config.PropertyConfigurer;
import com.glsx.cloudframework.core.util.DateFormatUtil;
import com.glsx.cloudframework.core.util.DateUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Repository;
import java.util.*;
@Repository
public class JourneyRepGPSDao extends BaseDAO {
private static final Log logger = LogFactory.getLog(JourneyRepGPSDao.class);
private static final double baseMileage = PropertyConfigurer.getInteger("journey.base.mileage");
public Journey getJourneyByEventTime(String eventTime) {
StringBuffer sql = new StringBuffer(" from Journey where delStatus=0 and ('");
sql.append(eventTime);
sql.append("' between beginTime and endTime) ");
return (Journey) this.hibernateBaseDAO.findOne(sql.toString(), null);
}
public List<JourneyRepGPS> getJourneyRepGPSList() {
Date freshDate = DateUtil.getYesterdayDate();
Calendar startCal = Calendar.getInstance();
startCal.setTime(freshDate);
startCal.set(Calendar.HOUR_OF_DAY, 0);// 将小时至0
startCal.set(Calendar.MINUTE, 0);// 将分钟至0
startCal.set(Calendar.SECOND, 0);// 将秒至0
String startTimes = DateFormatUtil.toString(startCal.getTime(), DateFormatUtil.pattern19);
Calendar endCal = Calendar.getInstance();
endCal.setTime(freshDate);
endCal.set(Calendar.HOUR_OF_DAY, 23);// 将小时至0
endCal.set(Calendar.MINUTE, 59);// 将分钟至0
endCal.set(Calendar.SECOND, 59);// 将秒至0
String endTimes = DateFormatUtil.toString(endCal.getTime(), DateFormatUtil.pattern19);
StringBuffer sql = new StringBuffer(" from JourneyRepGPS where status!=1 ");
sql.append(" and (createTime BETWEEN '");
sql.append(startTimes);
sql.append("' and '");
sql.append(endTimes);
sql.append("') ");
return this.hibernateBaseDAO.find(sql.toString(), null);
}
public void updateStatus(Integer id, Integer status) {
Map<String, Object> param = new HashMap<String, Object>();
String hsql = "update JourneyRepGPS set status=:status,updateTime=NOW() where id=:id";
param.put("status", status);
param.put("id", id);
this.hibernateBaseDAO.update(hsql, param);
}
public JourneyRepGPS getRepJourneyById(Integer id, String nowDate) {
StringBuffer sql = new StringBuffer(" from JourneyRepGPS where status=0 and journeyId=");
sql.append(id);
sql.append(" and DATE_FORMAT(createTime,'%Y-%m-%d') = '");
sql.append(nowDate);
sql.append("' order by id desc");
return (JourneyRepGPS) this.hibernateBaseDAO.findOne(sql.toString(), null);
}
}
package com.glsx.biz.track.container.dao.base;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class BaseDAO {
@Resource
protected HibernateBaseDAO hibernateBaseDAO;
@Resource
protected JdbcTemplate jdbcTemplate;
public Integer save(Object object) {
return (Integer)hibernateBaseDAO.save(object);
}
public void update(Object object) {
hibernateBaseDAO.update(object);
}
public void delete(Object object) {
hibernateBaseDAO.delete(object);
}
public Object load(Class<?> entityClass, Serializable id) {
if (id != null) {
return hibernateBaseDAO.load(entityClass, id);
} else {
return null;
}
}
public Object get(String className, String key, Integer value) {
String hql = " from " + className + " where " + key + "=:objId";
Map<String, Object> param = new HashMap<String, Object>();
param.put("objId", value);
return this.hibernateBaseDAO.findOne(hql, param);
}
public HibernateBaseDAO getHibernateBaseDAO() {
return hibernateBaseDAO;
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public abstract class Callback_DeviceStateService_GetDeviceStateInfo extends Ice.TwowayCallback
{
public abstract void response(int __ret, GetDeviceStateInfoResp resp);
public final void __completed(Ice.AsyncResult __result)
{
DeviceStateServicePrx __proxy = (DeviceStateServicePrx)__result.getProxy();
int __ret = 0;
GetDeviceStateInfoRespHolder resp = new GetDeviceStateInfoRespHolder();
try
{
__ret = __proxy.end_GetDeviceStateInfo(resp, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, resp.value);
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public abstract class Callback_DeviceStateService_GetDeviceStateOverview extends Ice.TwowayCallback
{
public abstract void response(int __ret, GetDeviceStateDescResp resp);
public final void __completed(Ice.AsyncResult __result)
{
DeviceStateServicePrx __proxy = (DeviceStateServicePrx)__result.getProxy();
int __ret = 0;
GetDeviceStateDescRespHolder resp = new GetDeviceStateDescRespHolder();
try
{
__ret = __proxy.end_GetDeviceStateOverview(resp, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, resp.value);
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class DeviceArrHelper
{
public static void
write(IceInternal.BasicStream __os, long[] __v)
{
__os.writeLongSeq(__v);
}
public static long[]
read(IceInternal.BasicStream __is)
{
long[] __v;
__v = __is.readLongSeq();
return __v;
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class DeviceArrHolder
{
public
DeviceArrHolder()
{
}
public
DeviceArrHolder(long[] value)
{
this.value = value;
}
public long[] value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public interface DeviceStateService extends Ice.Object,
_DeviceStateServiceOperations, _DeviceStateServiceOperationsNC
{
public static final long serialVersionUID = -817396940L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class DeviceStateServiceHolder extends Ice.ObjectHolderBase<DeviceStateService>
{
public
DeviceStateServiceHolder()
{
}
public
DeviceStateServiceHolder(DeviceStateService value)
{
this.value = value;
}
public void
patch(Ice.Object v)
{
if(v == null || v instanceof DeviceStateService)
{
value = (DeviceStateService)v;
}
else
{
IceInternal.Ex.throwUOE(type(), v);
}
}
public String
type()
{
return _DeviceStateServiceDisp.ice_staticId();
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public interface DeviceStateServicePrx extends Ice.ObjectPrx
{
public int GetDeviceStateOverview(GetDeviceStateDescRespHolder resp);
public int GetDeviceStateOverview(GetDeviceStateDescRespHolder resp, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_GetDeviceStateOverview();
public Ice.AsyncResult begin_GetDeviceStateOverview(java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_GetDeviceStateOverview(Ice.Callback __cb);
public Ice.AsyncResult begin_GetDeviceStateOverview(java.util.Map<String, String> __ctx, Ice.Callback __cb);
public Ice.AsyncResult begin_GetDeviceStateOverview(Callback_DeviceStateService_GetDeviceStateOverview __cb);
public Ice.AsyncResult begin_GetDeviceStateOverview(java.util.Map<String, String> __ctx, Callback_DeviceStateService_GetDeviceStateOverview __cb);
public int end_GetDeviceStateOverview(GetDeviceStateDescRespHolder resp, Ice.AsyncResult __result);
public int GetDeviceStateInfo(GetDeviceStateInfoReq req, GetDeviceStateInfoRespHolder resp);
public int GetDeviceStateInfo(GetDeviceStateInfoReq req, GetDeviceStateInfoRespHolder resp, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req, Ice.Callback __cb);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req, java.util.Map<String, String> __ctx, Ice.Callback __cb);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req, Callback_DeviceStateService_GetDeviceStateInfo __cb);
public Ice.AsyncResult begin_GetDeviceStateInfo(GetDeviceStateInfoReq req, java.util.Map<String, String> __ctx, Callback_DeviceStateService_GetDeviceStateInfo __cb);
public int end_GetDeviceStateInfo(GetDeviceStateInfoRespHolder resp, Ice.AsyncResult __result);
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class DeviceStateServicePrxHolder
{
public
DeviceStateServicePrxHolder()
{
}
public
DeviceStateServicePrxHolder(DeviceStateServicePrx value)
{
this.value = value;
}
public DeviceStateServicePrx value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public class GetDeviceStateDescResp implements Cloneable, java.io.Serializable
{
public int result;
public StateOverview stateOverviews;
public GetDeviceStateDescResp()
{
}
public GetDeviceStateDescResp(int result, StateOverview stateOverviews)
{
this.result = result;
this.stateOverviews = stateOverviews;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
GetDeviceStateDescResp _r = null;
if(rhs instanceof GetDeviceStateDescResp)
{
_r = (GetDeviceStateDescResp)rhs;
}
if(_r != null)
{
if(result != _r.result)
{
return false;
}
if(stateOverviews != _r.stateOverviews)
{
if(stateOverviews == null || _r.stateOverviews == null || !stateOverviews.equals(_r.stateOverviews))
{
return false;
}
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::DeviceStateSts::GetDeviceStateDescResp");
__h = IceInternal.HashUtil.hashAdd(__h, result);
__h = IceInternal.HashUtil.hashAdd(__h, stateOverviews);
return __h;
}
public Object
clone()
{
Object o = null;
try
{
o = super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return o;
}
public void
__write(IceInternal.BasicStream __os)
{
__os.writeInt(result);
stateOverviews.__write(__os);
}
public void
__read(IceInternal.BasicStream __is)
{
result = __is.readInt();
stateOverviews = new StateOverview();
stateOverviews.__read(__is);
}
public static final long serialVersionUID = -1113469438L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class GetDeviceStateDescRespHolder
{
public
GetDeviceStateDescRespHolder()
{
}
public
GetDeviceStateDescRespHolder(GetDeviceStateDescResp value)
{
this.value = value;
}
public GetDeviceStateDescResp value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public class GetDeviceStateInfoReq implements Cloneable, java.io.Serializable
{
public long[] devices;
public GetDeviceStateInfoReq()
{
}
public GetDeviceStateInfoReq(long[] devices)
{
this.devices = devices;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
GetDeviceStateInfoReq _r = null;
if(rhs instanceof GetDeviceStateInfoReq)
{
_r = (GetDeviceStateInfoReq)rhs;
}
if(_r != null)
{
if(!java.util.Arrays.equals(devices, _r.devices))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::DeviceStateSts::GetDeviceStateInfoReq");
__h = IceInternal.HashUtil.hashAdd(__h, devices);
return __h;
}
public Object
clone()
{
Object o = null;
try
{
o = super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return o;
}
public void
__write(IceInternal.BasicStream __os)
{
DeviceArrHelper.write(__os, devices);
}
public void
__read(IceInternal.BasicStream __is)
{
devices = DeviceArrHelper.read(__is);
}
public static final long serialVersionUID = -656818611L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class GetDeviceStateInfoReqHolder
{
public
GetDeviceStateInfoReqHolder()
{
}
public
GetDeviceStateInfoReqHolder(GetDeviceStateInfoReq value)
{
this.value = value;
}
public GetDeviceStateInfoReq value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public class GetDeviceStateInfoResp implements Cloneable, java.io.Serializable
{
public int result;
public StateInfo[] stateInfos;
public GetDeviceStateInfoResp()
{
}
public GetDeviceStateInfoResp(int result, StateInfo[] stateInfos)
{
this.result = result;
this.stateInfos = stateInfos;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
GetDeviceStateInfoResp _r = null;
if(rhs instanceof GetDeviceStateInfoResp)
{
_r = (GetDeviceStateInfoResp)rhs;
}
if(_r != null)
{
if(result != _r.result)
{
return false;
}
if(!java.util.Arrays.equals(stateInfos, _r.stateInfos))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::DeviceStateSts::GetDeviceStateInfoResp");
__h = IceInternal.HashUtil.hashAdd(__h, result);
__h = IceInternal.HashUtil.hashAdd(__h, stateInfos);
return __h;
}
public Object
clone()
{
Object o = null;
try
{
o = super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return o;
}
public void
__write(IceInternal.BasicStream __os)
{
__os.writeInt(result);
StateInfoArrHelper.write(__os, stateInfos);
}
public void
__read(IceInternal.BasicStream __is)
{
result = __is.readInt();
stateInfos = StateInfoArrHelper.read(__is);
}
public static final long serialVersionUID = 1295556176L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class GetDeviceStateInfoRespHolder
{
public
GetDeviceStateInfoRespHolder()
{
}
public
GetDeviceStateInfoRespHolder(GetDeviceStateInfoResp value)
{
this.value = value;
}
public GetDeviceStateInfoResp value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public class StateInfo implements Cloneable, java.io.Serializable
{
public long deviceSn;
public int state;
public int startTime;
public int duration;
public StateInfo()
{
}
public StateInfo(long deviceSn, int state, int startTime, int duration)
{
this.deviceSn = deviceSn;
this.state = state;
this.startTime = startTime;
this.duration = duration;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
StateInfo _r = null;
if(rhs instanceof StateInfo)
{
_r = (StateInfo)rhs;
}
if(_r != null)
{
if(deviceSn != _r.deviceSn)
{
return false;
}
if(state != _r.state)
{
return false;
}
if(startTime != _r.startTime)
{
return false;
}
if(duration != _r.duration)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::DeviceStateSts::StateInfo");
__h = IceInternal.HashUtil.hashAdd(__h, deviceSn);
__h = IceInternal.HashUtil.hashAdd(__h, state);
__h = IceInternal.HashUtil.hashAdd(__h, startTime);
__h = IceInternal.HashUtil.hashAdd(__h, duration);
return __h;
}
public Object
clone()
{
Object o = null;
try
{
o = super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return o;
}
public void
__write(IceInternal.BasicStream __os)
{
__os.writeLong(deviceSn);
__os.writeInt(state);
__os.writeInt(startTime);
__os.writeInt(duration);
}
public void
__read(IceInternal.BasicStream __is)
{
deviceSn = __is.readLong();
state = __is.readInt();
startTime = __is.readInt();
duration = __is.readInt();
}
public static final long serialVersionUID = 1522229008L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class StateInfoArrHelper
{
public static void
write(IceInternal.BasicStream __os, StateInfo[] __v)
{
if(__v == null)
{
__os.writeSize(0);
}
else
{
__os.writeSize(__v.length);
for(int __i0 = 0; __i0 < __v.length; __i0++)
{
__v[__i0].__write(__os);
}
}
}
public static StateInfo[]
read(IceInternal.BasicStream __is)
{
StateInfo[] __v;
final int __len0 = __is.readAndCheckSeqSize(20);
__v = new StateInfo[__len0];
for(int __i0 = 0; __i0 < __len0; __i0++)
{
__v[__i0] = new StateInfo();
__v[__i0].__read(__is);
}
return __v;
}
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class StateInfoArrHolder
{
public
StateInfoArrHolder()
{
}
public
StateInfoArrHolder(StateInfo[] value)
{
this.value = value;
}
public StateInfo[] value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class StateInfoHolder
{
public
StateInfoHolder()
{
}
public
StateInfoHolder(StateInfo value)
{
this.value = value;
}
public StateInfo value;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public class StateOverview implements Cloneable, java.io.Serializable
{
public int onlineDevices;
public int offlineDevices;
public int stayDevices;
public int runningDevices;
public StateOverview()
{
}
public StateOverview(int onlineDevices, int offlineDevices, int stayDevices, int runningDevices)
{
this.onlineDevices = onlineDevices;
this.offlineDevices = offlineDevices;
this.stayDevices = stayDevices;
this.runningDevices = runningDevices;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
StateOverview _r = null;
if(rhs instanceof StateOverview)
{
_r = (StateOverview)rhs;
}
if(_r != null)
{
if(onlineDevices != _r.onlineDevices)
{
return false;
}
if(offlineDevices != _r.offlineDevices)
{
return false;
}
if(stayDevices != _r.stayDevices)
{
return false;
}
if(runningDevices != _r.runningDevices)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::DeviceStateSts::StateOverview");
__h = IceInternal.HashUtil.hashAdd(__h, onlineDevices);
__h = IceInternal.HashUtil.hashAdd(__h, offlineDevices);
__h = IceInternal.HashUtil.hashAdd(__h, stayDevices);
__h = IceInternal.HashUtil.hashAdd(__h, runningDevices);
return __h;
}
public Object
clone()
{
Object o = null;
try
{
o = super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return o;
}
public void
__write(IceInternal.BasicStream __os)
{
__os.writeInt(onlineDevices);
__os.writeInt(offlineDevices);
__os.writeInt(stayDevices);
__os.writeInt(runningDevices);
}
public void
__read(IceInternal.BasicStream __is)
{
onlineDevices = __is.readInt();
offlineDevices = __is.readInt();
stayDevices = __is.readInt();
runningDevices = __is.readInt();
}
public static final long serialVersionUID = 2025146738L;
}
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `device_state.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.biz.track.container.ice.devicestate;
public final class StateOverviewHolder
{
public
StateOverviewHolder()
{
}
public
StateOverviewHolder(StateOverview value)
{
this.value = value;
}
public StateOverview value;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!