Commit 02646b24 by 王能兵

Merge branch 'dev' into 'master'

openApi Dev MQ

See merge request !1
2 parents ec6a4094 882b8856
Showing 415 changed files with 4706 additions and 80 deletions
......@@ -10,20 +10,71 @@
<version>1.0.0-SNAPSHOT</version>
<name>open-platform-api</name>
<packaging>war</packaging>
<properties>
<org.projectlombok.version>1.18.12</org.projectlombok.version>
<Ice.version>3.5.1</Ice.version>
<jwt.version>3.8.1</jwt.version>
<jjwt.version>0.9.1</jjwt.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<!--ICE-->
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<groupId>Ice</groupId>
<artifactId>Ice</artifactId>
<version>${Ice.version}</version>
</dependency>
<!--jwt-->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</dependency>
<!--dubbo api 服务-->
<dependency>
<groupId>cn.com.glsx.openplatform</groupId>
<artifactId>rpc-openplatform-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--swagger2-->
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger2</artifactId>-->
<!-- <version>2.9.2</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger-ui</artifactId>-->
<!-- <version>2.9.2</version>-->
<!-- </dependency>-->
<!--aop日志 -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -4,6 +4,7 @@ import org.oreframework.boot.main.AbsOreBootStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
/**
* @Title: Main.java
......@@ -15,6 +16,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
*/
@SpringBootApplication
@ServletComponentScan
@EnableAspectJAutoProxy//启动自动代理
public class Main extends AbsOreBootStarter {
@Override
......
package com.glsx.base.aop;
import com.glsx.exception.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
@Component
@Aspect
@Slf4j
public class LogAspect {
/**
* 切点 注解拦截
*/
@Pointcut("@annotation(com.glsx.base.aop.SysLog)")
public void methodAspect() {
}
/**
* @param point
* @return
* @throws Throwable
* @Title:doAround
* @Description: 环绕触发
* @author fengzhi
* @date 2020年12月22日
*/
@Around("methodAspect()")
public Object doAround(ProceedingJoinPoint point) {
//获取类名
String className = point.getTarget().getClass().getName();
//获取方法名
MethodSignature signature = (MethodSignature) point.getSignature();
String methodName = signature.getMethod().getName();
//访问目标方法的参数名和参数值
Object[] paramVals = point.getArgs();
//todo 打印接口的入参
/*//stream转为List
String[] paramNames = ((CodeSignature) point.getSignature()).getParameterNames();
List<Object> listValues = Arrays.stream(paramVals).collect(Collectors.toList());
List<String> listNames = Arrays.stream(paramNames).collect(Collectors.toList());
//将2个分为为key,value的list转为map,打印参数对象
Map<String, Object> params = MapUtils.listToMap(listNames, listValues);*/
log.info(className + "===调用" + methodName + "开始===");
//用改变后的参数执行目标方法
Object returnValue = null;
try {
returnValue = point.proceed(paramVals);
} catch (Throwable throwable) {
throwable.printStackTrace();
throw new ApiException(className+"调用"+methodName+"失败,message:"+throwable.getMessage());
}
log.info(className + "===" + methodName + "返回===" + returnValue);
return returnValue;
}
}
package com.glsx.base.aop;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 日志注解
*
* @author fengzhi
*
*/
@Target(ElementType.METHOD) // 方法注解
@Retention(RetentionPolicy.RUNTIME) // 运行时可见
public @interface SysLog {
// String name();
}
package com.glsx.base.controller;
import com.glsx.model.BaseMapModel;
import com.glsx.service.CommonParam;
import com.glsx.utils.SystemProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description: service基类
* @author fengzhi
* @version V1.0
*/
@Slf4j
public class BaseService {
@Autowired
private SystemProperty systemProperty;
/*
* 获取配置中心属性
*/
protected String getProperty(String propertyName){
return systemProperty.getProperty(propertyName);
}
/*
* 日志方法
*/
protected void logd(String message){
log.debug(message);
}
protected void logi(String message){
log.info(message);
}
protected void loge(String message,Throwable e){
log.error(message,e);
}
/*
* 公共参数相关方法
*/
public Long getSn(CommonParam commonParam){
return Long.parseLong(commonParam.getLongSn());
}
public Integer getDeviceType(CommonParam commonParam){
return commonParam.getIntDeviceType();
}
public Float getLat(BaseMapModel mapModel){
return mapModel.getLat().floatValue();
}
public Float getLng(BaseMapModel mapModel){
return mapModel.getLng().floatValue();
}
}
package com.glsx.base.controller;
import com.glsx.model.Basemodel;
import com.glsx.utils.JwtUtil;
import io.jsonwebtoken.Claims;
import org.springframework.beans.factory.annotation.Autowired;
public class JwtService extends BaseService{
@Autowired
protected JwtUtil jwtUtil;
/*
* jwt方法
*/
private Claims getCustomerFromToken(Basemodel basemodel){
return jwtUtil.getClaimsFromToken(basemodel.getToken());
}
public String getCustomerStrProperty(Basemodel basemodel,String propertyName){
return (String) getCustomerFromToken(basemodel).get(propertyName);
}
public Integer getCustomerIntProperty(Basemodel basemodel,String propertyName){
return (Integer) getCustomerFromToken(basemodel).get(propertyName);
}
public Integer getCustomerID(Basemodel basemodel){
return (getCustomerIntProperty(basemodel,"appid"));
}
}
package com.glsx.base.enums;
public enum MapTypeEnum {
//0:原始坐标
NONE_TYPE(0, "原始坐标"),
//1:转换高德和百度坐标
DOUBLE_TYPE(1, "转换高德和百度坐标"),
//2:转换高德坐标
GAODE_TYPE(2, "转换高德坐标"),
//3:转换百度坐标
BAIDU_TYPE(3, "转换百度坐标");
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.config;
import cn.com.glsx.openplatform.service.OpenApiService;
import com.glsx.constant.OpenAPIConstant;
import com.glsx.utils.SystemProperty;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
......@@ -20,13 +23,16 @@ public class DubboConfig {
private ReferenceBuilderFactory factory;
/**
* 注册远程服务(示例)
* RpcRemote为需要调用的远程服务
* 注册远程服务OpenApiService
* @return
*/
/*@Bean
public RpcRemote rpcApiMethodRemote(){
return factory.builder(RpcRemote.class).check(false).timeout(30000).build();
}*/
@Bean
public OpenApiService rpcApiMethodRemote(){
return factory.builder(OpenApiService.class)
.check(false)
.timeout(30000)
.url(SystemProperty.getProperty(OpenAPIConstant.DUBBO_SERVICE_URL))
.build();
}
}
package com.glsx.config;
import com.glsx.intercepter.ReplaceStreamFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.Filter;
/**
* @Description: 过滤器配置类
* @author fengzhi
* @version V1.0
*/
@Configuration
public class FilterConfig {
/**
* 注册过滤器
*
* @return FilterRegistrationBean
*/
@Bean
public FilterRegistrationBean someFilterRegistration() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(replaceStreamFilter());
registration.addUrlPatterns("/*");
registration.setName("streamFilter");
return registration;
}
/**
* 实例化StreamFilter
*
* @return Filter
*/
@Bean(name = "replaceStreamFilter")
public Filter replaceStreamFilter() {
return new ReplaceStreamFilter();
}
}
package com.glsx.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @Title: SystemProperty.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Configuration
@ConfigurationProperties("system")
public class SystemProperty {
// 对应配置项:system.name
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.glsx.config;
import com.glsx.intercepter.AuthIntercepter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @Description: 拦截器配置类
* @author fengzhi
* @version V1.0
*/
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Autowired
AuthIntercepter authIntercepter;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authIntercepter)
.addPathPatterns("/**")
.excludePathPatterns("/openApi/v1.0/token");
}
}
package com.glsx.constant;
/**
* @Description: 全局变量
* @author fengzhi
* @version V1.0
*/
public class OpenAPIConstant {
public static final String TEST_PRIVATE_KEY = "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAj7MKbIEiAK2wOIrEhvJtYZDi3wLy4qUxMbbTd8L64R7JI/+U+zFo5Pg1VNQpObEnc74fhppSSvrVzHo3sHx5rQIDAQABAkBlCF7l1w0PKQ9jUb3Hm59oH7RDVBFtZPPnnkGkTISTzj2AQmssY0DPlcOVfz/4vRxUMWPWuLSATmqUGi2LxLKBAiEA5KO7GYrdrA5ixkd7VvmkvObCtiO0R9InDsMSdiIyFNECIQCg5TSmvHYcOgHPTguN4XA5ySn9xRmO/ozY5rug2s2+HQIgJq7M6PVlq8aDT6ioZX63MH6aUtaXmc8kbIr0hKgkcQECIDGlR8/DCza+d1x+GnaW/0f1WG2jabWDufYbi/2gRifJAiAmtkTizcgcdvPc8BUZeKlWRnBR0dFATzfw9V91GJFkkQ==";
//public static final String TEST_TOKEN = "hlnE2oQB3oTG1adSEVzvxk5ZotIQcNV5niSmQbxzNGYhKeVpXS2Sk6VsuSiqE/MJwwBgSH7CJht2ohvvoMOLGQ==";
public static final String TEST_PUBLIC_KEY = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAI+zCmyBIgCtsDiKxIbybWGQ4t8C8uKlMTG203fC+uEeySP/lPsxaOT4NVTUKTmxJ3O+H4aaUkr61cx6N7B8ea0CAwEAAQ==";
/**
* 拦截器中,过期时间格式展示
*/
public static final String TIME_FROMAT_NORMAL = "yyyy-MM-dd HH:mm:ss";
/**
* 签名参数名
*/
public static final String PARAM_SIGN = "sign";
/**
* 配置中心的dubbo服务提供者
*/
public static final String DUBBO_SERVICE_URL = "openapi.dubbo.service.url";
/**
* 围栏,碰撞接口相关
*/
public static final String HTTP_TIME_OUT = "openapi.http.timeout";
public static final String HTTP_OPENAPI_SERVER_1 = "openapi.http.server1";
public static final String METHOD_FENCE_RECORD = "openapi.fencereecords.name";
public static final String METHOD_RESCUE_RECORD = "openapi.rescuerecords.name";
/**
* 设备状态,下发指令接口相关
*/
public static final String HTTP_OPENAPI_SERVER_2 = "openapi.http.server2";
public static final String METHOD_DEVICE_STATUS = "openapi.devicestatus.name";
public static final String METHOD_POST_COMMANDS = "openapi.postcommands.name";
}
package com.glsx.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.ModelMap;
import com.glsx.config.SystemProperty;
/**
* @Title: IndexController.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Controller
public class IndexController {
@Autowired
private SystemProperty systemProperty;
@ResponseBody
@RequestMapping("home")
public String home(){
return "hello, welcome to home!";
}
@RequestMapping("index")
public String index(ModelMap map){
map.addAttribute("name", systemProperty.getName());
return "index";
}
}
package com.glsx.controller;
import com.glsx.model.BO.*;
import com.glsx.model.BaseMapModel;
import com.glsx.model.DTO.*;
import com.glsx.model.Result;
import com.glsx.service.IOpenApiHTTPService;
import com.glsx.service.IOpenApiICEService;
import com.glsx.service.IOpenApiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.Map;
/**
* @Description: 公共平台对外提供的api
* @author fengzhi
* @version V1.0
*/
@RestController
@RequestMapping("/openApi/v1.0")
@Slf4j
public class OpenApiController {
/*
* 开放平台接口(本服务实现)
*/
@Autowired
IOpenApiService openApiService;
/*
* ice接口
*/
@Autowired
IOpenApiICEService openApiICEService;
/*
* http协议的接口
*/
@Autowired
IOpenApiHTTPService openApiHTTPService;
/*
* =================================openApiService=====================================
*/
/*
* 授权管理
*/
@PostMapping("token")
public Result getToken(@Valid @RequestBody TokenBo tokenBo){
String jwtToken = openApiService.getToken(tokenBo);
return Result.ok().data(jwtToken);
}
/*
* 获取设备列表
*/
@PostMapping("deviceList")
public Result getDeviceList(@Valid @RequestBody DeviceListBo deviceListBo){
Map<String,Object> data = openApiService.getDeviceList(deviceListBo);
return Result.ok().data(data);
}
/*
* 获取商户下的数据概况信息
*/
@PostMapping("dataView")
public Result getDataView(@Valid @RequestBody DataViewBo deviceStatusBo){
Map<String, Integer> dataView = openApiService.getDataView(deviceStatusBo);
return Result.ok().data(dataView);
}
/*
* 消息订阅
*/
@PostMapping("subscribeMessage")
public Result subscribeMessage(@Valid @RequestBody subscribeMessageBo subscribeMessageBo){
openApiService.subscribeMessage(subscribeMessageBo);
return Result.ok();
}
/*
* =================================openApiICEService=====================================
*/
/*
* 查询最新位置点
*/
@PostMapping("latestGpsRecord")
public Result getLatestGpsRecord(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
LatestGpsRecordDto latestGpsRecordDto = openApiICEService.getLatestGPSRecord(deviceStatusBo);
return Result.ok().data(latestGpsRecordDto);
}
/*
* 查询最新基站信息
*/
@PostMapping("latestBsRecord")
public Result getLatestBsRecord(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
LatestBsRecordDto latestGpsRecordDto = openApiICEService.getLatestBsRecord(deviceStatusBo);
return Result.ok().data(latestGpsRecordDto);
}
/*
* 查询最新GPS和基站信息
*/
@PostMapping("latestGpsBsRecord")
public Result getLatestGpsBsRecord(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
LatestGpsBsRecordDto latestGpsBsRecordDto = openApiICEService.getLatestGpsBsRecord(deviceStatusBo);
return Result.ok().data(latestGpsBsRecordDto);
}
/*
* 查询某时间段轨迹信息
*/
@PostMapping("gpsRecords")
public Result getGpsRecords(@Valid @RequestBody GpsBsRecordsBo gpsRecordsBo){
GpsRecordsDto gpsRecordsDto = openApiICEService.getGpsRecords(gpsRecordsBo);
return Result.ok().data(gpsRecordsDto);
}
/*
* 查询某时间段基站信息
*/
@PostMapping("bsRecords")
public Result getBsRecords(@Valid @RequestBody GpsBsRecordsBo gpsRecordsBo){
BsRecordsDto bsRecordsDto = openApiICEService.getBsRecords(gpsRecordsBo);
return Result.ok().data(bsRecordsDto);
}
/*
* 查询首次GPS点
*/
@PostMapping("firstGpsRecord")
public Result getFirstGpsRecord(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
FirstGpsRecordDto firstGpsRecordDto = openApiICEService.getFirstGpsRecord(deviceStatusBo);
return Result.ok().data(firstGpsRecordDto);
}
/*
* 查询最近指定条数轨迹信息
*/
@PostMapping("recentGpsRecords")
public Result getRecentGpsRecords(@Valid @RequestBody DeviceStatusCountBo deviceStatusBo){
GpsRecordsDto recentGpsRecords = openApiICEService.getRecentGpsRecords(deviceStatusBo);
return Result.ok().data(recentGpsRecords);
}
/*
* 查询最近指定条数基站信息
*/
@PostMapping("recentBsRecords")
public Result getRecentBsRecords(@Valid @RequestBody DeviceStatusCountBo deviceStatusBo){
BsRecordsDto recentBsRecords = openApiICEService.getRecentBsRecords(deviceStatusBo);
return Result.ok().data(recentBsRecords);
}
/*
* 地图坐标校偏
*/
@PostMapping("coordTransForMap")
public Result getCoordTransForMap(@Valid @RequestBody CoordTransForMapBo coordTransForMapBo){
Map<String,Object> res = openApiICEService.getCoordTransForMap(coordTransForMapBo);
return Result.ok().data(res);
}
/*
* 通过经纬度查询所属行政区域
*/
@PostMapping("distInfoByPos")
public Result getDistInfoByPos(@Valid @RequestBody BaseMapModel mapModel){
Map<String, Object> map = openApiICEService.getDistInfoByPos(mapModel);
return Result.ok().data(map);
}
/*
* 通过经纬度查询所属省份城市区域
*/
@PostMapping("distDetailByPos")
public Result getDistDetailByPos(@Valid @RequestBody BaseMapModel mapModel){
Map<String, Object> map = openApiICEService.getDistDetailByPos(mapModel);
return Result.ok().data(map);
}
/*
* 通过地址解析经纬度
*/
@PostMapping("geocoding")
public Result getGeocoding(@Valid @RequestBody GeocodeBO geocodeBO){
Map<String, Object> map = openApiICEService.getGeocoding(geocodeBO);
return Result.ok().data(map);
}
/*
* 通过逆地址解析
*/
@PostMapping("reverseGeocoding")
public Result getReverseGeocoding(@Valid @RequestBody BaseMapModel mapModel){
Map<String,Object> map = openApiICEService.getReverseGeocoding(mapModel);
return Result.ok().data(map);
}
/*
* 根据某段时间轨迹计算行程
*/
@PostMapping("journeyByGpsRecords")
public Result getJourneyByGpsRecords(@Valid @RequestBody GpsBsRecordsBo gpsBsRecordsBo){
Map<String, Object> map = openApiICEService.getJourneyByGpsRecords(gpsBsRecordsBo);
return Result.ok().data(map);
}
/*
* 根据某段时间轨迹行程记录
*/
@PostMapping("journeyRecords")
public Result getJourneyRecords(@Valid @RequestBody GpsBsRecordsBo gpsBsRecordsBo){
Map<String, Object> map = openApiICEService.getJourneyRecords(gpsBsRecordsBo);
return Result.ok().data(map);
}
/*
* 根据某段时间日里程记录
*/
@PostMapping("dailyMileageRecords")
public Result getDailyMileageRecords(@Valid @RequestBody GpsBsRecordsBo gpsBsRecordsBo){
Map<String, Object> map = openApiICEService.getDailyMileageRecords(gpsBsRecordsBo);
return Result.ok().data(map);
}
/*
* 查询设备总里程记录
*/
@PostMapping("totalMileageRecords")
public Result getTotalMileageRecords(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
Map<String, Object> map = openApiICEService.getTotalMileageRecords(deviceStatusBo);
return Result.ok().data(map);
}
/*
* 按月获取常驻地信息
*/
@PostMapping("monthResideRecords")
public Result getMonthResideRecords(@Valid @RequestBody DeviceMonthBo deviceMonthBo){
Map<String, Object> map = openApiICEService.getMonthResideRecords(deviceMonthBo);
return Result.ok().data(map);
}
/*
* 查询设备停留点记录
*/
@PostMapping("deviceStayRecords")
public Result getDeviceStayRecords(@Valid @RequestBody DeviceStayBo deviceStayBo){
Map<String, Object> map = openApiICEService.getDeviceStayRecords(deviceStayBo);
return Result.ok().data(map);
}
/*
* =================================Http协议接口=====================================
*/
/*
* 根据某段时间围栏触发记录
*/
@PostMapping("fenceTriggerRecords")
public String getFenceTriggerRecords(@Valid @RequestBody DeviceDateBo deviceDateBo){
return openApiHTTPService.getFenceTriggerRecords(deviceDateBo);
}
/*
* 根据某段时间碰撞预警记录
*/
@PostMapping("rescueEventRecords")
public String getRescueEventRecords(@Valid @RequestBody DeviceSdeviceDateBo deviceDateBo){
return openApiHTTPService.getRescueEventRecords(deviceDateBo);
}
/*
* 下发指令
*/
@PostMapping("commands")
public Result postCommands(@Valid @RequestBody CommandsBo commandsBo){
openApiHTTPService.postCommands(commandsBo);
return Result.ok();
}
/*
* 查询设备状态
*/
@PostMapping("deviceStatus")
public Result getDeviceStatus(@Valid @RequestBody DeviceStatusBo deviceStatusBo){
Map<String,Integer> map = openApiHTTPService.getDeviceStatus(deviceStatusBo);
return Result.ok().data(map);
}
}
package com.glsx.exception;
/**
* @Description: 异常枚举类
* @author fengzhi
* @version V1.0
*/
public enum ApiErrorMessage {
TOKEN_ERROR(1001,"token有误: [%s]"),
ARGS_ERROR(1002,"参数错误: [%s]"),
ILLEGAL_DEVICE_SN(1003,"devicesn不存在"),
AUTH_ERROR(1004,"未授权(Ip与设定的IP不符)"),
ILLEGAL_DEVICE_TYPE(1005,"devicetype不存在"),
PARAM_ERROR(1006,"各项数据格式、长度不正确 : [%s]"),
TOKEN_TIME_OUT(1007,"超时"),
ARGS_NULL(1008,"参数错误,必传参数: %s");
private int code;
private String message;
public ApiException exception(Object ...args){
return new ApiException(this,args);
}
ApiErrorMessage(int code, String message){
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
}
package com.glsx.exception;
import com.glsx.model.Result;
/**
* @Description: api业务异常
* @author fengzhi
* @version V1.0
*/
public class ApiException extends BusinessException {
public ApiException(Result resultEntity) {
super(resultEntity);
}
public ApiException(ApiErrorMessage exception, Object... args) {
super(exception.getCode(), String.format(exception.getMessage(), args));
}
public ApiException(String message) {
super(message);
}
}
package com.glsx.exception;
import com.glsx.model.Result;
/**
* @Description: 业务异常
* @author fengzhi
* @version V1.0
*/
public class BusinessException extends RuntimeException{
private static final long serialVersionUID = 1L;
private Result resultEntity;
public BusinessException(String message) {
super(message);
this.resultEntity =Result.error(message);
}
public BusinessException(int errorCode, String message) {
super(message);
this.resultEntity =Result.error(errorCode,message);
}
public BusinessException(Result resultEntity) {
super(resultEntity.getMessage());
this.resultEntity = resultEntity;
}
public Result getResultEntity() {
return resultEntity;
}
}
package com.glsx.exception;
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
import com.glsx.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author fengzhi
* @version V1.0
* @Description: 全局异常处理
*/
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {
/**
* 业务异常处理
*
* @param req
* @param e
* @return
*/
@ExceptionHandler(value = BusinessException.class)
public Result businessExceptionHandler(HttpServletRequest req, Exception e) {
log.error("业务异常:" + e.getMessage());
ApiException businessException = (ApiException) e;
return businessException.getResultEntity();
}
@ExceptionHandler(MethodArgumentNotValidException.class)
public Result handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
//遍历参数异常的提示信息拼接返回
List<String> errs = e.getBindingResult()
.getFieldErrors()
.stream()
.map(FieldError::getDefaultMessage)
.collect(Collectors.toList());
return ApiErrorMessage.ARGS_NULL.exception(errs).getResultEntity();
}
/**
* 业务异常处理
*
* @param req
* @param e
* @return
*/
@ExceptionHandler(value = InvalidFormatException.class)
public Result InvalidFormatHandler(HttpServletRequest req, Exception e) {
String errMsg = "jackson反序列化失败:" + e.getMessage();
log.error(errMsg);
return new ApiException(errMsg).getResultEntity();
}
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public abstract class Callback_IDistrictFinder_get_distdetail_by_code extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, String strProvName, String strCityName, String strCountyName);
public final void __completed(Ice.AsyncResult __result)
{
IDistrictFinderPrx __proxy = (IDistrictFinderPrx)__result.getProxy();
boolean __ret = false;
Ice.StringHolder strProvName = new Ice.StringHolder();
Ice.StringHolder strCityName = new Ice.StringHolder();
Ice.StringHolder strCountyName = new Ice.StringHolder();
try
{
__ret = __proxy.end_get_distdetail_by_code(strProvName, strCityName, strCountyName, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, strProvName.value, strCityName.value, strCountyName.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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public abstract class Callback_IDistrictFinder_get_distdetail_by_pos extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, String strProvName, String strCityName, String strCountyName);
public final void __completed(Ice.AsyncResult __result)
{
IDistrictFinderPrx __proxy = (IDistrictFinderPrx)__result.getProxy();
boolean __ret = false;
Ice.StringHolder strProvName = new Ice.StringHolder();
Ice.StringHolder strCityName = new Ice.StringHolder();
Ice.StringHolder strCountyName = new Ice.StringHolder();
try
{
__ret = __proxy.end_get_distdetail_by_pos(strProvName, strCityName, strCountyName, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, strProvName.value, strCityName.value, strCountyName.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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public abstract class Callback_IDistrictFinder_get_distinfo_by_pos extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, int distCode, String strDistName);
public final void __completed(Ice.AsyncResult __result)
{
IDistrictFinderPrx __proxy = (IDistrictFinderPrx)__result.getProxy();
boolean __ret = false;
Ice.IntHolder distCode = new Ice.IntHolder();
Ice.StringHolder strDistName = new Ice.StringHolder();
try
{
__ret = __proxy.end_get_distinfo_by_pos(distCode, strDistName, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, distCode.value, strDistName.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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public interface IDistrictFinder extends Ice.Object,
_IDistrictFinderOperations, _IDistrictFinderOperationsNC
{
public static final long serialVersionUID = 254911430L;
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public final class IDistrictFinderHolder extends Ice.ObjectHolderBase<IDistrictFinder>
{
public
IDistrictFinderHolder()
{
}
public
IDistrictFinderHolder(IDistrictFinder value)
{
this.value = value;
}
public void
patch(Ice.Object v)
{
if(v == null || v instanceof IDistrictFinder)
{
value = (IDistrictFinder)v;
}
else
{
IceInternal.Ex.throwUOE(type(), v);
}
}
public String
type()
{
return _IDistrictFinderDisp.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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public interface IDistrictFinderPrx extends Ice.ObjectPrx
{
public boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName);
public boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat, java.util.Map<String, String> __ctx, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat, Callback_IDistrictFinder_get_distinfo_by_pos __cb);
public Ice.AsyncResult begin_get_distinfo_by_pos(float lng, float lat, java.util.Map<String, String> __ctx, Callback_IDistrictFinder_get_distinfo_by_pos __cb);
public boolean end_get_distinfo_by_pos(Ice.IntHolder distCode, Ice.StringHolder strDistName, Ice.AsyncResult __result);
public boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName);
public boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode, java.util.Map<String, String> __ctx, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode, Callback_IDistrictFinder_get_distdetail_by_code __cb);
public Ice.AsyncResult begin_get_distdetail_by_code(int distCode, java.util.Map<String, String> __ctx, Callback_IDistrictFinder_get_distdetail_by_code __cb);
public boolean end_get_distdetail_by_code(Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, Ice.AsyncResult __result);
public boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName);
public boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat, java.util.Map<String, String> __ctx);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat, java.util.Map<String, String> __ctx, Ice.Callback __cb);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat, Callback_IDistrictFinder_get_distdetail_by_pos __cb);
public Ice.AsyncResult begin_get_distdetail_by_pos(float lng, float lat, java.util.Map<String, String> __ctx, Callback_IDistrictFinder_get_distdetail_by_pos __cb);
public boolean end_get_distdetail_by_pos(Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public final class IDistrictFinderPrxHolder
{
public
IDistrictFinderPrxHolder()
{
}
public
IDistrictFinderPrxHolder(IDistrictFinderPrx value)
{
this.value = value;
}
public IDistrictFinderPrx 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public interface _IDistrictFinderDel extends Ice._ObjectDel
{
boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __obsv)
throws IceInternal.LocalExceptionWrapper;
boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __obsv)
throws IceInternal.LocalExceptionWrapper;
boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __obsv)
throws IceInternal.LocalExceptionWrapper;
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public final class _IDistrictFinderDelD extends Ice._ObjectDelD implements _IDistrictFinderDel
{
public boolean get_distdetail_by_code(final int distCode, final Ice.StringHolder strProvName, final Ice.StringHolder strCityName, final Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
final Ice.Current __current = new Ice.Current();
__initCurrent(__current, "get_distdetail_by_code", Ice.OperationMode.Normal, __ctx);
final Ice.BooleanHolder __result = new Ice.BooleanHolder();
IceInternal.Direct __direct = null;
try
{
__direct = new IceInternal.Direct(__current)
{
public Ice.DispatchStatus run(Ice.Object __obj)
{
IDistrictFinder __servant = null;
if(__obj == null || __obj instanceof IDistrictFinder)
{
__servant = (IDistrictFinder)__obj;
}
else
{
throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);
}
__result.value = __servant.get_distdetail_by_code(distCode, strProvName, strCityName, strCountyName, __current);
return Ice.DispatchStatus.DispatchOK;
}
};
try
{
Ice.DispatchStatus __status = __direct.getServant().__collocDispatch(__direct);
if(__status == Ice.DispatchStatus.DispatchUserException)
{
__direct.throwUserException();
}
assert __status == Ice.DispatchStatus.DispatchOK;
return __result.value;
}
finally
{
__direct.destroy();
}
}
catch(Ice.SystemException __ex)
{
throw __ex;
}
catch(Throwable __ex)
{
IceInternal.LocalExceptionWrapper.throwWrapper(__ex);
}
return __result.value;
}
public boolean get_distdetail_by_pos(final float lng, final float lat, final Ice.StringHolder strProvName, final Ice.StringHolder strCityName, final Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
final Ice.Current __current = new Ice.Current();
__initCurrent(__current, "get_distdetail_by_pos", Ice.OperationMode.Normal, __ctx);
final Ice.BooleanHolder __result = new Ice.BooleanHolder();
IceInternal.Direct __direct = null;
try
{
__direct = new IceInternal.Direct(__current)
{
public Ice.DispatchStatus run(Ice.Object __obj)
{
IDistrictFinder __servant = null;
if(__obj == null || __obj instanceof IDistrictFinder)
{
__servant = (IDistrictFinder)__obj;
}
else
{
throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);
}
__result.value = __servant.get_distdetail_by_pos(lng, lat, strProvName, strCityName, strCountyName, __current);
return Ice.DispatchStatus.DispatchOK;
}
};
try
{
Ice.DispatchStatus __status = __direct.getServant().__collocDispatch(__direct);
if(__status == Ice.DispatchStatus.DispatchUserException)
{
__direct.throwUserException();
}
assert __status == Ice.DispatchStatus.DispatchOK;
return __result.value;
}
finally
{
__direct.destroy();
}
}
catch(Ice.SystemException __ex)
{
throw __ex;
}
catch(Throwable __ex)
{
IceInternal.LocalExceptionWrapper.throwWrapper(__ex);
}
return __result.value;
}
public boolean get_distinfo_by_pos(final float lng, final float lat, final Ice.IntHolder distCode, final Ice.StringHolder strDistName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
final Ice.Current __current = new Ice.Current();
__initCurrent(__current, "get_distinfo_by_pos", Ice.OperationMode.Normal, __ctx);
final Ice.BooleanHolder __result = new Ice.BooleanHolder();
IceInternal.Direct __direct = null;
try
{
__direct = new IceInternal.Direct(__current)
{
public Ice.DispatchStatus run(Ice.Object __obj)
{
IDistrictFinder __servant = null;
if(__obj == null || __obj instanceof IDistrictFinder)
{
__servant = (IDistrictFinder)__obj;
}
else
{
throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);
}
__result.value = __servant.get_distinfo_by_pos(lng, lat, distCode, strDistName, __current);
return Ice.DispatchStatus.DispatchOK;
}
};
try
{
Ice.DispatchStatus __status = __direct.getServant().__collocDispatch(__direct);
if(__status == Ice.DispatchStatus.DispatchUserException)
{
__direct.throwUserException();
}
assert __status == Ice.DispatchStatus.DispatchOK;
return __result.value;
}
finally
{
__direct.destroy();
}
}
catch(Ice.SystemException __ex)
{
throw __ex;
}
catch(Throwable __ex)
{
IceInternal.LocalExceptionWrapper.throwWrapper(__ex);
}
return __result.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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public final class _IDistrictFinderDelM extends Ice._ObjectDelM implements _IDistrictFinderDel
{
public boolean
get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
IceInternal.Outgoing __og = __handler.getOutgoing("get_distdetail_by_code", Ice.OperationMode.Normal, __ctx, __observer);
try
{
try
{
IceInternal.BasicStream __os = __og.startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeInt(distCode);
__og.endWriteParams();
}
catch(Ice.LocalException __ex)
{
__og.abort(__ex);
}
boolean __ok = __og.invoke();
try
{
if(!__ok)
{
try
{
__og.throwUserException();
}
catch(Ice.UserException __ex)
{
throw new Ice.UnknownUserException(__ex.ice_name(), __ex);
}
}
IceInternal.BasicStream __is = __og.startReadParams();
strProvName.value = __is.readString();
strCityName.value = __is.readString();
strCountyName.value = __is.readString();
boolean __ret;
__ret = __is.readBool();
__og.endReadParams();
return __ret;
}
catch(Ice.LocalException __ex)
{
throw new IceInternal.LocalExceptionWrapper(__ex, false);
}
}
finally
{
__handler.reclaimOutgoing(__og);
}
}
public boolean
get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
IceInternal.Outgoing __og = __handler.getOutgoing("get_distdetail_by_pos", Ice.OperationMode.Normal, __ctx, __observer);
try
{
try
{
IceInternal.BasicStream __os = __og.startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeFloat(lng);
__os.writeFloat(lat);
__og.endWriteParams();
}
catch(Ice.LocalException __ex)
{
__og.abort(__ex);
}
boolean __ok = __og.invoke();
try
{
if(!__ok)
{
try
{
__og.throwUserException();
}
catch(Ice.UserException __ex)
{
throw new Ice.UnknownUserException(__ex.ice_name(), __ex);
}
}
IceInternal.BasicStream __is = __og.startReadParams();
strProvName.value = __is.readString();
strCityName.value = __is.readString();
strCountyName.value = __is.readString();
boolean __ret;
__ret = __is.readBool();
__og.endReadParams();
return __ret;
}
catch(Ice.LocalException __ex)
{
throw new IceInternal.LocalExceptionWrapper(__ex, false);
}
}
finally
{
__handler.reclaimOutgoing(__og);
}
}
public boolean
get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName, java.util.Map<String, String> __ctx, Ice.Instrumentation.InvocationObserver __observer)
throws IceInternal.LocalExceptionWrapper
{
IceInternal.Outgoing __og = __handler.getOutgoing("get_distinfo_by_pos", Ice.OperationMode.Normal, __ctx, __observer);
try
{
try
{
IceInternal.BasicStream __os = __og.startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeFloat(lng);
__os.writeFloat(lat);
__og.endWriteParams();
}
catch(Ice.LocalException __ex)
{
__og.abort(__ex);
}
boolean __ok = __og.invoke();
try
{
if(!__ok)
{
try
{
__og.throwUserException();
}
catch(Ice.UserException __ex)
{
throw new Ice.UnknownUserException(__ex.ice_name(), __ex);
}
}
IceInternal.BasicStream __is = __og.startReadParams();
distCode.value = __is.readInt();
strDistName.value = __is.readString();
boolean __ret;
__ret = __is.readBool();
__og.endReadParams();
return __ret;
}
catch(Ice.LocalException __ex)
{
throw new IceInternal.LocalExceptionWrapper(__ex, false);
}
}
finally
{
__handler.reclaimOutgoing(__og);
}
}
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public abstract class _IDistrictFinderDisp extends Ice.ObjectImpl implements IDistrictFinder
{
protected void
ice_copyStateFrom(Ice.Object __obj)
throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
}
public static final String[] __ids =
{
"::DISTRICT::IDistrictFinder",
"::Ice::Object"
};
public boolean ice_isA(String s)
{
return java.util.Arrays.binarySearch(__ids, s) >= 0;
}
public boolean ice_isA(String s, Ice.Current __current)
{
return java.util.Arrays.binarySearch(__ids, s) >= 0;
}
public String[] ice_ids()
{
return __ids;
}
public String[] ice_ids(Ice.Current __current)
{
return __ids;
}
public String ice_id()
{
return __ids[0];
}
public String ice_id(Ice.Current __current)
{
return __ids[0];
}
public static String ice_staticId()
{
return __ids[0];
}
public final boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName)
{
return get_distdetail_by_code(distCode, strProvName, strCityName, strCountyName, null);
}
public final boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName)
{
return get_distdetail_by_pos(lng, lat, strProvName, strCityName, strCountyName, null);
}
public final boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName)
{
return get_distinfo_by_pos(lng, lat, distCode, strDistName, null);
}
public static Ice.DispatchStatus ___get_distinfo_by_pos(IDistrictFinder __obj, IceInternal.Incoming __inS, Ice.Current __current)
{
__checkMode(Ice.OperationMode.Normal, __current.mode);
IceInternal.BasicStream __is = __inS.startReadParams();
float lng;
float lat;
lng = __is.readFloat();
lat = __is.readFloat();
__inS.endReadParams();
Ice.IntHolder distCode = new Ice.IntHolder();
Ice.StringHolder strDistName = new Ice.StringHolder();
boolean __ret = __obj.get_distinfo_by_pos(lng, lat, distCode, strDistName, __current);
IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeInt(distCode.value);
__os.writeString(strDistName.value);
__os.writeBool(__ret);
__inS.__endWriteParams(true);
return Ice.DispatchStatus.DispatchOK;
}
public static Ice.DispatchStatus ___get_distdetail_by_code(IDistrictFinder __obj, IceInternal.Incoming __inS, Ice.Current __current)
{
__checkMode(Ice.OperationMode.Normal, __current.mode);
IceInternal.BasicStream __is = __inS.startReadParams();
int distCode;
distCode = __is.readInt();
__inS.endReadParams();
Ice.StringHolder strProvName = new Ice.StringHolder();
Ice.StringHolder strCityName = new Ice.StringHolder();
Ice.StringHolder strCountyName = new Ice.StringHolder();
boolean __ret = __obj.get_distdetail_by_code(distCode, strProvName, strCityName, strCountyName, __current);
IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeString(strProvName.value);
__os.writeString(strCityName.value);
__os.writeString(strCountyName.value);
__os.writeBool(__ret);
__inS.__endWriteParams(true);
return Ice.DispatchStatus.DispatchOK;
}
public static Ice.DispatchStatus ___get_distdetail_by_pos(IDistrictFinder __obj, IceInternal.Incoming __inS, Ice.Current __current)
{
__checkMode(Ice.OperationMode.Normal, __current.mode);
IceInternal.BasicStream __is = __inS.startReadParams();
float lng;
float lat;
lng = __is.readFloat();
lat = __is.readFloat();
__inS.endReadParams();
Ice.StringHolder strProvName = new Ice.StringHolder();
Ice.StringHolder strCityName = new Ice.StringHolder();
Ice.StringHolder strCountyName = new Ice.StringHolder();
boolean __ret = __obj.get_distdetail_by_pos(lng, lat, strProvName, strCityName, strCountyName, __current);
IceInternal.BasicStream __os = __inS.__startWriteParams(Ice.FormatType.DefaultFormat);
__os.writeString(strProvName.value);
__os.writeString(strCityName.value);
__os.writeString(strCountyName.value);
__os.writeBool(__ret);
__inS.__endWriteParams(true);
return Ice.DispatchStatus.DispatchOK;
}
private final static String[] __all =
{
"get_distdetail_by_code",
"get_distdetail_by_pos",
"get_distinfo_by_pos",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping"
};
public Ice.DispatchStatus __dispatch(IceInternal.Incoming in, Ice.Current __current)
{
int pos = java.util.Arrays.binarySearch(__all, __current.operation);
if(pos < 0)
{
throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);
}
switch(pos)
{
case 0:
{
return ___get_distdetail_by_code(this, in, __current);
}
case 1:
{
return ___get_distdetail_by_pos(this, in, __current);
}
case 2:
{
return ___get_distinfo_by_pos(this, in, __current);
}
case 3:
{
return ___ice_id(this, in, __current);
}
case 4:
{
return ___ice_ids(this, in, __current);
}
case 5:
{
return ___ice_isA(this, in, __current);
}
case 6:
{
return ___ice_ping(this, in, __current);
}
}
assert(false);
throw new Ice.OperationNotExistException(__current.id, __current.facet, __current.operation);
}
protected void __writeImpl(IceInternal.BasicStream __os)
{
__os.startWriteSlice(ice_staticId(), -1, true);
__os.endWriteSlice();
}
protected void __readImpl(IceInternal.BasicStream __is)
{
__is.startReadSlice();
__is.endReadSlice();
}
public static final long serialVersionUID = 0L;
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public interface _IDistrictFinderOperations
{
boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName, Ice.Current __current);
boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, Ice.Current __current);
boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName, Ice.Current __current);
}
// **********************************************************************
//
// 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 `district.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.DISTRICT;
public interface _IDistrictFinderOperationsNC
{
boolean get_distinfo_by_pos(float lng, float lat, Ice.IntHolder distCode, Ice.StringHolder strDistName);
boolean get_distdetail_by_code(int distCode, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName);
boolean get_distdetail_by_pos(float lng, float lat, Ice.StringHolder strProvName, Ice.StringHolder strCityName, Ice.StringHolder strCountyName);
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class AlarmGetRequest implements Cloneable, java.io.Serializable
{
public long userID;
public int apType;
public int startTime;
public int endTime;
public int reqCount;
public AlarmGetRequest()
{
}
public AlarmGetRequest(long userID, int apType, int startTime, int endTime, int reqCount)
{
this.userID = userID;
this.apType = apType;
this.startTime = startTime;
this.endTime = endTime;
this.reqCount = reqCount;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
AlarmGetRequest _r = null;
if(rhs instanceof AlarmGetRequest)
{
_r = (AlarmGetRequest)rhs;
}
if(_r != null)
{
if(userID != _r.userID)
{
return false;
}
if(apType != _r.apType)
{
return false;
}
if(startTime != _r.startTime)
{
return false;
}
if(endTime != _r.endTime)
{
return false;
}
if(reqCount != _r.reqCount)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::AlarmGetRequest");
__h = IceInternal.HashUtil.hashAdd(__h, userID);
__h = IceInternal.HashUtil.hashAdd(__h, apType);
__h = IceInternal.HashUtil.hashAdd(__h, startTime);
__h = IceInternal.HashUtil.hashAdd(__h, endTime);
__h = IceInternal.HashUtil.hashAdd(__h, reqCount);
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(userID);
__os.writeInt(apType);
__os.writeInt(startTime);
__os.writeInt(endTime);
__os.writeInt(reqCount);
}
public void
__read(IceInternal.BasicStream __is)
{
userID = __is.readLong();
apType = __is.readInt();
startTime = __is.readInt();
endTime = __is.readInt();
reqCount = __is.readInt();
}
public static final long serialVersionUID = 1600214017L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class AlarmGetRequestHolder
{
public
AlarmGetRequestHolder()
{
}
public
AlarmGetRequestHolder(AlarmGetRequest value)
{
this.value = value;
}
public AlarmGetRequest 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class AlarmGetResponse implements Cloneable, java.io.Serializable
{
public int oprResult;
public AlarmRecord[] records;
public boolean fullFlag;
public int lastAlarmTime;
public AlarmGetResponse()
{
}
public AlarmGetResponse(int oprResult, AlarmRecord[] records, boolean fullFlag, int lastAlarmTime)
{
this.oprResult = oprResult;
this.records = records;
this.fullFlag = fullFlag;
this.lastAlarmTime = lastAlarmTime;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
AlarmGetResponse _r = null;
if(rhs instanceof AlarmGetResponse)
{
_r = (AlarmGetResponse)rhs;
}
if(_r != null)
{
if(oprResult != _r.oprResult)
{
return false;
}
if(!java.util.Arrays.equals(records, _r.records))
{
return false;
}
if(fullFlag != _r.fullFlag)
{
return false;
}
if(lastAlarmTime != _r.lastAlarmTime)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::AlarmGetResponse");
__h = IceInternal.HashUtil.hashAdd(__h, oprResult);
__h = IceInternal.HashUtil.hashAdd(__h, records);
__h = IceInternal.HashUtil.hashAdd(__h, fullFlag);
__h = IceInternal.HashUtil.hashAdd(__h, lastAlarmTime);
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(oprResult);
AlarmRecordsHelper.write(__os, records);
__os.writeBool(fullFlag);
__os.writeInt(lastAlarmTime);
}
public void
__read(IceInternal.BasicStream __is)
{
oprResult = __is.readInt();
records = AlarmRecordsHelper.read(__is);
fullFlag = __is.readBool();
lastAlarmTime = __is.readInt();
}
public static final long serialVersionUID = 1822376418L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class AlarmGetResponseHolder
{
public
AlarmGetResponseHolder()
{
}
public
AlarmGetResponseHolder(AlarmGetResponse value)
{
this.value = value;
}
public AlarmGetResponse 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class AlarmRecord implements Cloneable, java.io.Serializable
{
public int alarmTime;
public int alarmState;
public AlarmRecord()
{
}
public AlarmRecord(int alarmTime, int alarmState)
{
this.alarmTime = alarmTime;
this.alarmState = alarmState;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
AlarmRecord _r = null;
if(rhs instanceof AlarmRecord)
{
_r = (AlarmRecord)rhs;
}
if(_r != null)
{
if(alarmTime != _r.alarmTime)
{
return false;
}
if(alarmState != _r.alarmState)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::AlarmRecord");
__h = IceInternal.HashUtil.hashAdd(__h, alarmTime);
__h = IceInternal.HashUtil.hashAdd(__h, alarmState);
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(alarmTime);
__os.writeInt(alarmState);
}
public void
__read(IceInternal.BasicStream __is)
{
alarmTime = __is.readInt();
alarmState = __is.readInt();
}
public static final long serialVersionUID = 152049009L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class AlarmRecordHolder
{
public
AlarmRecordHolder()
{
}
public
AlarmRecordHolder(AlarmRecord value)
{
this.value = value;
}
public AlarmRecord 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class AlarmRecordsHelper
{
public static void
write(IceInternal.BasicStream __os, AlarmRecord[] __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 AlarmRecord[]
read(IceInternal.BasicStream __is)
{
AlarmRecord[] __v;
final int __len0 = __is.readAndCheckSeqSize(8);
__v = new AlarmRecord[__len0];
for(int __i0 = 0; __i0 < __len0; __i0++)
{
__v[__i0] = new AlarmRecord();
__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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class AlarmRecordsHolder
{
public
AlarmRecordsHolder()
{
}
public
AlarmRecordsHolder(AlarmRecord[] value)
{
this.value = value;
}
public AlarmRecord[] 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BatchGpsDevInfoRequest implements Cloneable, java.io.Serializable
{
public long[] userIds;
public int extraMapReq;
public int seqNo;
public BatchGpsDevInfoRequest()
{
}
public BatchGpsDevInfoRequest(long[] userIds, int extraMapReq, int seqNo)
{
this.userIds = userIds;
this.extraMapReq = extraMapReq;
this.seqNo = seqNo;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BatchGpsDevInfoRequest _r = null;
if(rhs instanceof BatchGpsDevInfoRequest)
{
_r = (BatchGpsDevInfoRequest)rhs;
}
if(_r != null)
{
if(!java.util.Arrays.equals(userIds, _r.userIds))
{
return false;
}
if(extraMapReq != _r.extraMapReq)
{
return false;
}
if(seqNo != _r.seqNo)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BatchGpsDevInfoRequest");
__h = IceInternal.HashUtil.hashAdd(__h, userIds);
__h = IceInternal.HashUtil.hashAdd(__h, extraMapReq);
__h = IceInternal.HashUtil.hashAdd(__h, seqNo);
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)
{
UserIdSeqHelper.write(__os, userIds);
__os.writeInt(extraMapReq);
__os.writeInt(seqNo);
}
public void
__read(IceInternal.BasicStream __is)
{
userIds = UserIdSeqHelper.read(__is);
extraMapReq = __is.readInt();
seqNo = __is.readInt();
}
public static final long serialVersionUID = 1256928819L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BatchGpsDevInfoRequestHolder
{
public
BatchGpsDevInfoRequestHolder()
{
}
public
BatchGpsDevInfoRequestHolder(BatchGpsDevInfoRequest value)
{
this.value = value;
}
public BatchGpsDevInfoRequest 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
/**
* batchResult:
* 0: ok for all users;
* 1: ok for part, the succesful part of device info is followed;
* -1: failed, the followed gpsDevInfo is meaningless.
**/
public class BatchGpsDevInfoResponse implements Cloneable, java.io.Serializable
{
public int batchResult;
public GpsDevInfo[] gpsDevInfos;
public BatchGpsDevInfoResponse()
{
}
public BatchGpsDevInfoResponse(int batchResult, GpsDevInfo[] gpsDevInfos)
{
this.batchResult = batchResult;
this.gpsDevInfos = gpsDevInfos;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BatchGpsDevInfoResponse _r = null;
if(rhs instanceof BatchGpsDevInfoResponse)
{
_r = (BatchGpsDevInfoResponse)rhs;
}
if(_r != null)
{
if(batchResult != _r.batchResult)
{
return false;
}
if(!java.util.Arrays.equals(gpsDevInfos, _r.gpsDevInfos))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BatchGpsDevInfoResponse");
__h = IceInternal.HashUtil.hashAdd(__h, batchResult);
__h = IceInternal.HashUtil.hashAdd(__h, gpsDevInfos);
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(batchResult);
GpsDevInfoSeqHelper.write(__os, gpsDevInfos);
}
public void
__read(IceInternal.BasicStream __is)
{
batchResult = __is.readInt();
gpsDevInfos = GpsDevInfoSeqHelper.read(__is);
}
public static final long serialVersionUID = -59754444L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BatchGpsDevInfoResponseHolder
{
public
BatchGpsDevInfoResponseHolder()
{
}
public
BatchGpsDevInfoResponseHolder(BatchGpsDevInfoResponse value)
{
this.value = value;
}
public BatchGpsDevInfoResponse 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BatteryRecord implements Cloneable, java.io.Serializable
{
public int gpsTime;
public int battery;
public int storeTime;
public BatteryRecord()
{
}
public BatteryRecord(int gpsTime, int battery, int storeTime)
{
this.gpsTime = gpsTime;
this.battery = battery;
this.storeTime = storeTime;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BatteryRecord _r = null;
if(rhs instanceof BatteryRecord)
{
_r = (BatteryRecord)rhs;
}
if(_r != null)
{
if(gpsTime != _r.gpsTime)
{
return false;
}
if(battery != _r.battery)
{
return false;
}
if(storeTime != _r.storeTime)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BatteryRecord");
__h = IceInternal.HashUtil.hashAdd(__h, gpsTime);
__h = IceInternal.HashUtil.hashAdd(__h, battery);
__h = IceInternal.HashUtil.hashAdd(__h, storeTime);
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(gpsTime);
__os.writeInt(battery);
__os.writeInt(storeTime);
}
public void
__read(IceInternal.BasicStream __is)
{
gpsTime = __is.readInt();
battery = __is.readInt();
storeTime = __is.readInt();
}
public static final long serialVersionUID = 1356062620L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BatteryRecordHolder
{
public
BatteryRecordHolder()
{
}
public
BatteryRecordHolder(BatteryRecord value)
{
this.value = value;
}
public BatteryRecord 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
/**
* history BaseStation record
**/
public class BsGetRequest implements Cloneable, java.io.Serializable
{
public long userID;
public int apType;
public int startTime;
public int endTime;
public int reqCount;
public BsGetRequest()
{
}
public BsGetRequest(long userID, int apType, int startTime, int endTime, int reqCount)
{
this.userID = userID;
this.apType = apType;
this.startTime = startTime;
this.endTime = endTime;
this.reqCount = reqCount;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsGetRequest _r = null;
if(rhs instanceof BsGetRequest)
{
_r = (BsGetRequest)rhs;
}
if(_r != null)
{
if(userID != _r.userID)
{
return false;
}
if(apType != _r.apType)
{
return false;
}
if(startTime != _r.startTime)
{
return false;
}
if(endTime != _r.endTime)
{
return false;
}
if(reqCount != _r.reqCount)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsGetRequest");
__h = IceInternal.HashUtil.hashAdd(__h, userID);
__h = IceInternal.HashUtil.hashAdd(__h, apType);
__h = IceInternal.HashUtil.hashAdd(__h, startTime);
__h = IceInternal.HashUtil.hashAdd(__h, endTime);
__h = IceInternal.HashUtil.hashAdd(__h, reqCount);
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(userID);
__os.writeInt(apType);
__os.writeInt(startTime);
__os.writeInt(endTime);
__os.writeInt(reqCount);
}
public void
__read(IceInternal.BasicStream __is)
{
userID = __is.readLong();
apType = __is.readInt();
startTime = __is.readInt();
endTime = __is.readInt();
reqCount = __is.readInt();
}
public static final long serialVersionUID = -1292840413L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsGetRequestHolder
{
public
BsGetRequestHolder()
{
}
public
BsGetRequestHolder(BsGetRequest value)
{
this.value = value;
}
public BsGetRequest 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsGetResponse implements Cloneable, java.io.Serializable
{
public int oprResult;
public BsRecord[] records;
public BsGetResponse()
{
}
public BsGetResponse(int oprResult, BsRecord[] records)
{
this.oprResult = oprResult;
this.records = records;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsGetResponse _r = null;
if(rhs instanceof BsGetResponse)
{
_r = (BsGetResponse)rhs;
}
if(_r != null)
{
if(oprResult != _r.oprResult)
{
return false;
}
if(!java.util.Arrays.equals(records, _r.records))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsGetResponse");
__h = IceInternal.HashUtil.hashAdd(__h, oprResult);
__h = IceInternal.HashUtil.hashAdd(__h, records);
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(oprResult);
BsRecordsHelper.write(__os, records);
}
public void
__read(IceInternal.BasicStream __is)
{
oprResult = __is.readInt();
records = BsRecordsHelper.read(__is);
}
public static final long serialVersionUID = 245359571L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsGetResponseHolder
{
public
BsGetResponseHolder()
{
}
public
BsGetResponseHolder(BsGetResponse value)
{
this.value = value;
}
public BsGetResponse 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsInfo implements Cloneable, java.io.Serializable
{
public int lac;
public int cellId;
public int signal;
public BsInfo()
{
}
public BsInfo(int lac, int cellId, int signal)
{
this.lac = lac;
this.cellId = cellId;
this.signal = signal;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsInfo _r = null;
if(rhs instanceof BsInfo)
{
_r = (BsInfo)rhs;
}
if(_r != null)
{
if(lac != _r.lac)
{
return false;
}
if(cellId != _r.cellId)
{
return false;
}
if(signal != _r.signal)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsInfo");
__h = IceInternal.HashUtil.hashAdd(__h, lac);
__h = IceInternal.HashUtil.hashAdd(__h, cellId);
__h = IceInternal.HashUtil.hashAdd(__h, signal);
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(lac);
__os.writeInt(cellId);
__os.writeInt(signal);
}
public void
__read(IceInternal.BasicStream __is)
{
lac = __is.readInt();
cellId = __is.readInt();
signal = __is.readInt();
}
public static final long serialVersionUID = 2029683662L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsInfoArrayHelper
{
public static void
write(IceInternal.BasicStream __os, BsInfo[] __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 BsInfo[]
read(IceInternal.BasicStream __is)
{
BsInfo[] __v;
final int __len0 = __is.readAndCheckSeqSize(12);
__v = new BsInfo[__len0];
for(int __i0 = 0; __i0 < __len0; __i0++)
{
__v[__i0] = new BsInfo();
__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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsInfoArrayHolder
{
public
BsInfoArrayHolder()
{
}
public
BsInfoArrayHolder(BsInfo[] value)
{
this.value = value;
}
public BsInfo[] 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsInfoHolder
{
public
BsInfoHolder()
{
}
public
BsInfoHolder(BsInfo value)
{
this.value = value;
}
public BsInfo 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsRecord implements Cloneable, java.io.Serializable
{
public int gpsTime;
public int storeTime;
public int mcc;
public int mnc;
public BsInfo[] bsInfos;
public BsRecord()
{
}
public BsRecord(int gpsTime, int storeTime, int mcc, int mnc, BsInfo[] bsInfos)
{
this.gpsTime = gpsTime;
this.storeTime = storeTime;
this.mcc = mcc;
this.mnc = mnc;
this.bsInfos = bsInfos;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsRecord _r = null;
if(rhs instanceof BsRecord)
{
_r = (BsRecord)rhs;
}
if(_r != null)
{
if(gpsTime != _r.gpsTime)
{
return false;
}
if(storeTime != _r.storeTime)
{
return false;
}
if(mcc != _r.mcc)
{
return false;
}
if(mnc != _r.mnc)
{
return false;
}
if(!java.util.Arrays.equals(bsInfos, _r.bsInfos))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsRecord");
__h = IceInternal.HashUtil.hashAdd(__h, gpsTime);
__h = IceInternal.HashUtil.hashAdd(__h, storeTime);
__h = IceInternal.HashUtil.hashAdd(__h, mcc);
__h = IceInternal.HashUtil.hashAdd(__h, mnc);
__h = IceInternal.HashUtil.hashAdd(__h, bsInfos);
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(gpsTime);
__os.writeInt(storeTime);
__os.writeInt(mcc);
__os.writeInt(mnc);
BsInfoArrayHelper.write(__os, bsInfos);
}
public void
__read(IceInternal.BasicStream __is)
{
gpsTime = __is.readInt();
storeTime = __is.readInt();
mcc = __is.readInt();
mnc = __is.readInt();
bsInfos = BsInfoArrayHelper.read(__is);
}
public static final long serialVersionUID = -842860500L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsRecordHolder
{
public
BsRecordHolder()
{
}
public
BsRecordHolder(BsRecord value)
{
this.value = value;
}
public BsRecord 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsRecordsHelper
{
public static void
write(IceInternal.BasicStream __os, BsRecord[] __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 BsRecord[]
read(IceInternal.BasicStream __is)
{
BsRecord[] __v;
final int __len0 = __is.readAndCheckSeqSize(17);
__v = new BsRecord[__len0];
for(int __i0 = 0; __i0 < __len0; __i0++)
{
__v[__i0] = new BsRecord();
__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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsRecordsHolder
{
public
BsRecordsHolder()
{
}
public
BsRecordsHolder(BsRecord[] value)
{
this.value = value;
}
public BsRecord[] 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsWorkModeGetRequest implements Cloneable, java.io.Serializable
{
public long userID;
public int apType;
public int startTime;
public int endTime;
public int reqCount;
public BsWorkModeGetRequest()
{
}
public BsWorkModeGetRequest(long userID, int apType, int startTime, int endTime, int reqCount)
{
this.userID = userID;
this.apType = apType;
this.startTime = startTime;
this.endTime = endTime;
this.reqCount = reqCount;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsWorkModeGetRequest _r = null;
if(rhs instanceof BsWorkModeGetRequest)
{
_r = (BsWorkModeGetRequest)rhs;
}
if(_r != null)
{
if(userID != _r.userID)
{
return false;
}
if(apType != _r.apType)
{
return false;
}
if(startTime != _r.startTime)
{
return false;
}
if(endTime != _r.endTime)
{
return false;
}
if(reqCount != _r.reqCount)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsWorkModeGetRequest");
__h = IceInternal.HashUtil.hashAdd(__h, userID);
__h = IceInternal.HashUtil.hashAdd(__h, apType);
__h = IceInternal.HashUtil.hashAdd(__h, startTime);
__h = IceInternal.HashUtil.hashAdd(__h, endTime);
__h = IceInternal.HashUtil.hashAdd(__h, reqCount);
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(userID);
__os.writeInt(apType);
__os.writeInt(startTime);
__os.writeInt(endTime);
__os.writeInt(reqCount);
}
public void
__read(IceInternal.BasicStream __is)
{
userID = __is.readLong();
apType = __is.readInt();
startTime = __is.readInt();
endTime = __is.readInt();
reqCount = __is.readInt();
}
public static final long serialVersionUID = -1922543583L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsWorkModeGetRequestHolder
{
public
BsWorkModeGetRequestHolder()
{
}
public
BsWorkModeGetRequestHolder(BsWorkModeGetRequest value)
{
this.value = value;
}
public BsWorkModeGetRequest 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsWorkModeGetResponse implements Cloneable, java.io.Serializable
{
public int oprResult;
public BsWorkModeRecord[] records;
public BsWorkModeGetResponse()
{
}
public BsWorkModeGetResponse(int oprResult, BsWorkModeRecord[] records)
{
this.oprResult = oprResult;
this.records = records;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsWorkModeGetResponse _r = null;
if(rhs instanceof BsWorkModeGetResponse)
{
_r = (BsWorkModeGetResponse)rhs;
}
if(_r != null)
{
if(oprResult != _r.oprResult)
{
return false;
}
if(!java.util.Arrays.equals(records, _r.records))
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsWorkModeGetResponse");
__h = IceInternal.HashUtil.hashAdd(__h, oprResult);
__h = IceInternal.HashUtil.hashAdd(__h, records);
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(oprResult);
BsWorkModeRecordsHelper.write(__os, records);
}
public void
__read(IceInternal.BasicStream __is)
{
oprResult = __is.readInt();
records = BsWorkModeRecordsHelper.read(__is);
}
public static final long serialVersionUID = -1520280175L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsWorkModeGetResponseHolder
{
public
BsWorkModeGetResponseHolder()
{
}
public
BsWorkModeGetResponseHolder(BsWorkModeGetResponse value)
{
this.value = value;
}
public BsWorkModeGetResponse 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public class BsWorkModeRecord implements Cloneable, java.io.Serializable
{
public int gpsTime;
public int storeTime;
public int mcc;
public int mnc;
public BsInfo[] bsInfos;
public int gsensor;
public int workmode;
public BsWorkModeRecord()
{
}
public BsWorkModeRecord(int gpsTime, int storeTime, int mcc, int mnc, BsInfo[] bsInfos, int gsensor, int workmode)
{
this.gpsTime = gpsTime;
this.storeTime = storeTime;
this.mcc = mcc;
this.mnc = mnc;
this.bsInfos = bsInfos;
this.gsensor = gsensor;
this.workmode = workmode;
}
public boolean
equals(Object rhs)
{
if(this == rhs)
{
return true;
}
BsWorkModeRecord _r = null;
if(rhs instanceof BsWorkModeRecord)
{
_r = (BsWorkModeRecord)rhs;
}
if(_r != null)
{
if(gpsTime != _r.gpsTime)
{
return false;
}
if(storeTime != _r.storeTime)
{
return false;
}
if(mcc != _r.mcc)
{
return false;
}
if(mnc != _r.mnc)
{
return false;
}
if(!java.util.Arrays.equals(bsInfos, _r.bsInfos))
{
return false;
}
if(gsensor != _r.gsensor)
{
return false;
}
if(workmode != _r.workmode)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int __h = 5381;
__h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::BsWorkModeRecord");
__h = IceInternal.HashUtil.hashAdd(__h, gpsTime);
__h = IceInternal.HashUtil.hashAdd(__h, storeTime);
__h = IceInternal.HashUtil.hashAdd(__h, mcc);
__h = IceInternal.HashUtil.hashAdd(__h, mnc);
__h = IceInternal.HashUtil.hashAdd(__h, bsInfos);
__h = IceInternal.HashUtil.hashAdd(__h, gsensor);
__h = IceInternal.HashUtil.hashAdd(__h, workmode);
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(gpsTime);
__os.writeInt(storeTime);
__os.writeInt(mcc);
__os.writeInt(mnc);
BsInfoArrayHelper.write(__os, bsInfos);
__os.writeInt(gsensor);
__os.writeInt(workmode);
}
public void
__read(IceInternal.BasicStream __is)
{
gpsTime = __is.readInt();
storeTime = __is.readInt();
mcc = __is.readInt();
mnc = __is.readInt();
bsInfos = BsInfoArrayHelper.read(__is);
gsensor = __is.readInt();
workmode = __is.readInt();
}
public static final long serialVersionUID = 893528285L;
}
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsWorkModeRecordHolder
{
public
BsWorkModeRecordHolder()
{
}
public
BsWorkModeRecordHolder(BsWorkModeRecord value)
{
this.value = value;
}
public BsWorkModeRecord 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsWorkModeRecordsHelper
{
public static void
write(IceInternal.BasicStream __os, BsWorkModeRecord[] __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 BsWorkModeRecord[]
read(IceInternal.BasicStream __is)
{
BsWorkModeRecord[] __v;
final int __len0 = __is.readAndCheckSeqSize(25);
__v = new BsWorkModeRecord[__len0];
for(int __i0 = 0; __i0 < __len0; __i0++)
{
__v[__i0] = new BsWorkModeRecord();
__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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public final class BsWorkModeRecordsHolder
{
public
BsWorkModeRecordsHolder()
{
}
public
BsWorkModeRecordsHolder(BsWorkModeRecord[] value)
{
this.value = value;
}
public BsWorkModeRecord[] 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_convGeoGps extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, ConvResponseResult rsp);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
ConvResponseResultHolder rsp = new ConvResponseResultHolder();
try
{
__ret = __proxy.end_convGeoGps(rsp, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, rsp.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getBsRecords extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, BsGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
BsGetResponseHolder res = new BsGetResponseHolder();
try
{
__ret = __proxy.end_getBsRecords(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getBsWorkModeRecords extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, BsWorkModeGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
BsWorkModeGetResponseHolder res = new BsWorkModeGetResponseHolder();
try
{
__ret = __proxy.end_getBsWorkModeRecords(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getDataCardInfo extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, DataCardGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
DataCardGetResponseHolder res = new DataCardGetResponseHolder();
try
{
__ret = __proxy.end_getDataCardInfo(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getDayLastGpsRecord extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, DayLastGpsGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
DayLastGpsGetResponseHolder res = new DayLastGpsGetResponseHolder();
try
{
__ret = __proxy.end_getDayLastGpsRecord(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getDevicesGpsInfo extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, BatchGpsDevInfoResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
BatchGpsDevInfoResponseHolder res = new BatchGpsDevInfoResponseHolder();
try
{
__ret = __proxy.end_getDevicesGpsInfo(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getFirstBsRecord extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, BsGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
BsGetResponseHolder res = new BsGetResponseHolder();
try
{
__ret = __proxy.end_getFirstBsRecord(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package com.glsx.ice.HDaoGps;
public abstract class Callback_DaoGpsService_getFirstGpsBsRecord extends Ice.TwowayCallback
{
public abstract void response(boolean __ret, GpsBsGetResponse res);
public final void __completed(Ice.AsyncResult __result)
{
DaoGpsServicePrx __proxy = (DaoGpsServicePrx)__result.getProxy();
boolean __ret = false;
GpsBsGetResponseHolder res = new GpsBsGetResponseHolder();
try
{
__ret = __proxy.end_getFirstGpsBsRecord(res, __result);
}
catch(Ice.LocalException __ex)
{
exception(__ex);
return;
}
response(__ret, res.value);
}
}
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!