Merge branch 'master' of https://git.njzscloud.com/lzq/njzscloud
commit
52896ebdd6
|
|
@ -13,7 +13,7 @@ import java.time.Duration;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@ConfigurationProperties("okhttp-client")
|
@ConfigurationProperties("http-client")
|
||||||
public class HttpClientProperties {
|
public class HttpClientProperties {
|
||||||
|
|
||||||
public static final HttpClientProperties DEFAULT = new HttpClientProperties();
|
public static final HttpClientProperties DEFAULT = new HttpClientProperties();
|
||||||
|
|
|
||||||
|
|
@ -25,22 +25,20 @@ public class CompositeInterceptor implements RequestInterceptor, ResponseInterce
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object process(RequestInfo requestInfo, ResponseInfo responseInfo, Type responseType) {
|
public Object process(RequestInfo requestInfo, ResponseInfo responseInfo, Type responseType) {
|
||||||
System.out.println(Jackson.toJsonStr(requestInfo));
|
log.info("响应拦截器: {}、{}、{}", Jackson.toJsonStr(requestInfo), new String(responseInfo.body), responseType);
|
||||||
System.out.println(new String(requestInfo.body));
|
Object data = null;
|
||||||
|
|
||||||
Object data = new String(responseInfo.body);
|
if (responseInfo.success) {
|
||||||
|
|
||||||
/* if (responseInfo.success) {
|
|
||||||
if (responseInfo.body != null) {
|
if (responseInfo.body != null) {
|
||||||
data = Jackson.toBean(responseInfo.body, responseType);
|
if (responseType == String.class) {
|
||||||
log.info("Jackson: {}", JSON.toJSONString(data));
|
data = new String(responseInfo.body);
|
||||||
data = JSON.parseObject(responseInfo.body, responseType);
|
} else {
|
||||||
log.info("Fastjson: {}", JSON.toJSONString(data));
|
data = Jackson.toBean(responseInfo.body, responseType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.error("HTTP请求失败");
|
log.error("HTTP请求失败");
|
||||||
} */
|
}
|
||||||
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties(AppProperties.class)
|
@EnableConfigurationProperties({AppProperties.class, JimiProperties.class})
|
||||||
public class AppConfiguration {
|
public class AppConfiguration {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
package com.njzscloud.common.core.http;
|
package com.njzscloud.supervisory.config;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import com.njzscloud.common.core.http.HttpClient;
|
||||||
|
import com.njzscloud.common.core.http.HttpClientDecorator;
|
||||||
|
import com.njzscloud.common.core.http.HttpClientProperties;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* http客户端自动配置
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties(HttpClientProperties.class)
|
@EnableConfigurationProperties(HttpClientProperties.class)
|
||||||
public class HttpClientAutoConfiguration {
|
public class HttpClientAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
|
||||||
public HttpClient httpClient(HttpClientProperties httpClientProperties) {
|
public HttpClient httpClient(HttpClientProperties httpClientProperties) {
|
||||||
return new HttpClient(httpClientProperties);
|
return new HttpClient(httpClientProperties);
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.njzscloud.supervisory.config;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.http.HttpClientDecorator;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiApi;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@ConditionalOnBean(HttpClientDecorator.class)
|
||||||
|
public class JimiApiAutoConfiguration {
|
||||||
|
@Bean
|
||||||
|
public JimiApi jimiApi(HttpClientDecorator httpClientDecorator) {
|
||||||
|
return httpClientDecorator.decorate(JimiApi.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.njzscloud.supervisory.config;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ConfigurationProperties("app.jimi")
|
||||||
|
public class JimiProperties {
|
||||||
|
/**
|
||||||
|
* 应用ID
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* 应用密钥
|
||||||
|
*/
|
||||||
|
private String appSecret;
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String pwd;
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
*/
|
||||||
|
private Integer expires = 7200;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.njzscloud.supervisory.geo.controller;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.utils.R;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.supervisory.geo.pojo.entity.GeoFenceConfigEntity;
|
||||||
|
import com.njzscloud.supervisory.geo.service.GeoFenceConfigService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图栅栏配置
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/geo_fence_config")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class GeoFenceConfigController {
|
||||||
|
|
||||||
|
private final GeoFenceConfigService geoFenceConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> add(@RequestBody GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
geoFenceConfigService.add(geoFenceConfigEntity);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/modify")
|
||||||
|
public R<?> modify(@RequestBody GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
geoFenceConfigService.modify(geoFenceConfigEntity);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/del")
|
||||||
|
public R<?> del(@RequestBody List<Long> ids) {
|
||||||
|
geoFenceConfigService.del(ids);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public R<GeoFenceConfigEntity> detail(@RequestParam Long id) {
|
||||||
|
return R.success(geoFenceConfigService.detail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public R<PageResult<GeoFenceConfigEntity>> paging(PageParam pageParam, GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
return R.success(geoFenceConfigService.paging(pageParam, geoFenceConfigEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.njzscloud.supervisory.geo.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njzscloud.supervisory.geo.pojo.entity.GeoFenceConfigEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图栅栏配置
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface GeoFenceConfigMapper extends BaseMapper<GeoFenceConfigEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.njzscloud.supervisory.geo.pojo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图栅栏配置
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("geo_fence_config")
|
||||||
|
public class GeoFenceConfigEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图配置
|
||||||
|
*/
|
||||||
|
private String config;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.njzscloud.supervisory.geo.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.supervisory.geo.mapper.GeoFenceConfigMapper;
|
||||||
|
import com.njzscloud.supervisory.geo.pojo.entity.GeoFenceConfigEntity;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图栅栏配置
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class GeoFenceConfigService extends ServiceImpl<GeoFenceConfigMapper, GeoFenceConfigEntity> implements IService<GeoFenceConfigEntity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
public void add(GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
this.save(geoFenceConfigEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
public void modify(GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
this.updateById(geoFenceConfigEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void del(List<Long> ids) {
|
||||||
|
this.removeBatchByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
public GeoFenceConfigEntity detail(Long id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
public PageResult<GeoFenceConfigEntity> paging(PageParam pageParam, GeoFenceConfigEntity geoFenceConfigEntity) {
|
||||||
|
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<GeoFenceConfigEntity>query(geoFenceConfigEntity)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.njzscloud.supervisory.gps.controller;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.utils.R;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.DeviceLocationGetParam;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.DeviceLocationGetResult;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.DeviceTrackListParam;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.DeviceTrackListResult;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.util.JimiUtil;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GPS
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/gps")
|
||||||
|
public class GPSController {
|
||||||
|
/**
|
||||||
|
* 实时定位
|
||||||
|
*/
|
||||||
|
@RequestMapping("/obtain_location")
|
||||||
|
public R<?> obtainLocation(DeviceLocationGetParam param) {
|
||||||
|
DeviceLocationGetResult result = JimiUtil.request(param);
|
||||||
|
if (result.isSucc()) {
|
||||||
|
return R.success(result.getResult());
|
||||||
|
}
|
||||||
|
return R.failed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轨迹查询
|
||||||
|
*/
|
||||||
|
@RequestMapping("/track_list")
|
||||||
|
public R<?> trackList(DeviceTrackListParam param) {
|
||||||
|
DeviceTrackListResult result = JimiUtil.request(param);
|
||||||
|
if (result.isSucc()) {
|
||||||
|
return R.success(result.getResult());
|
||||||
|
}
|
||||||
|
return R.failed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据IMEI获取最新定位数据
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DeviceLocationGetParam extends JimiParam<DeviceLocationGetResult> {
|
||||||
|
/**
|
||||||
|
* 设备imei号,多个中间用英文逗号隔开。 如果设备过多,建议采用POST方式(一次最多100个IMEI)
|
||||||
|
*/
|
||||||
|
private String imeis;
|
||||||
|
/**
|
||||||
|
* 如果要显示在百度地图上,map_type=BAIDU此时返回的经纬度将经过baidu校准方式校准
|
||||||
|
* 如果要显示在google地图上,map_type=GOOGLE,此时返回的经纬度将经过google校准方式校准
|
||||||
|
* map_type如果不填,则返回原始经纬度
|
||||||
|
*/
|
||||||
|
private String map_type;
|
||||||
|
|
||||||
|
public DeviceLocationGetParam() {
|
||||||
|
super("jimi.device.location.get");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<DeviceLocationGetResult> resultType() {
|
||||||
|
return DeviceLocationGetResult.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DeviceLocationGetResult extends JimiResult {
|
||||||
|
private List<Result> result;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class Result {
|
||||||
|
/**
|
||||||
|
* 设备IMEI
|
||||||
|
*/
|
||||||
|
private String imei;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆图标
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备状态 0-离线; 1-在线
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度 (如果设备过期,值为0)
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度 (如果设备过期,值为0)
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否过期 1-未过期 0-过期
|
||||||
|
*/
|
||||||
|
private String expireFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否激活 1-激活 0-未激活
|
||||||
|
*/
|
||||||
|
private String activationFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位类型 卫星定位-GPS, 基站定位-LBS, WIFI定位-WIFI, 蓝牙定位-BEACON
|
||||||
|
*/
|
||||||
|
private String posType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GPS定位时间
|
||||||
|
*/
|
||||||
|
private String gpsTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心跳时间 UTC秒数(如果设备过期,值为0)
|
||||||
|
*/
|
||||||
|
private String hbTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 速度 (单位:km/h)
|
||||||
|
*/
|
||||||
|
private String speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Acc状态 0:关闭 1:打开
|
||||||
|
*/
|
||||||
|
private String accStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备电量(0-100),部分设备型号不支持
|
||||||
|
*/
|
||||||
|
private String electQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外电电压(0-100),部分设备支持
|
||||||
|
*/
|
||||||
|
private String powerValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与定位卫星数
|
||||||
|
*/
|
||||||
|
private String gpsNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移动的方向角度0~360
|
||||||
|
*/
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 里程统计
|
||||||
|
*/
|
||||||
|
private String mileage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据IMEI获取轨迹数据
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DeviceTrackListParam extends JimiParam<DeviceTrackListResult> {
|
||||||
|
/**
|
||||||
|
* 设备imei号(一次只能一个IMEI)
|
||||||
|
*/
|
||||||
|
private String imei;
|
||||||
|
/**
|
||||||
|
* 开始时间,格式为yyyy-MM-dd HH:mm:ss
|
||||||
|
*/
|
||||||
|
private String begin_time;
|
||||||
|
/**
|
||||||
|
* 结束时间,格式为yyyy-MM-dd HH:mm:ss
|
||||||
|
* end_time不应大于当前时间。
|
||||||
|
*/
|
||||||
|
private String end_time;
|
||||||
|
/**
|
||||||
|
* 如果要显示在百度地图上,map_type=BAIDU此时返回的经纬度将经过baidu校准方式校准
|
||||||
|
* 如果要显示在google地图上,map_type=GOOGLE,此时返回的经纬度将经过google校准方式校准
|
||||||
|
* map_type如果不填,则返回原始经纬度
|
||||||
|
*/
|
||||||
|
private String map_type;
|
||||||
|
|
||||||
|
public DeviceTrackListParam() {
|
||||||
|
super("jimi.device.track.list");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<DeviceTrackListResult> resultType() {
|
||||||
|
return DeviceTrackListResult.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DeviceTrackListResult extends JimiResult {
|
||||||
|
private List<Result> result;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class Result {
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String lng;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Integer lat;
|
||||||
|
/**
|
||||||
|
* gps定位时间 格式yyyy-MM-dd HH:mm:ss
|
||||||
|
*/
|
||||||
|
private String gpsTime;
|
||||||
|
/**
|
||||||
|
* 方位,正北开始的一个360度的极坐标方向
|
||||||
|
*/
|
||||||
|
private String direction;
|
||||||
|
/**
|
||||||
|
* GPS速度
|
||||||
|
*/
|
||||||
|
private String gpsSpeed;
|
||||||
|
/**
|
||||||
|
* 定位类型1是卫星定位 2是基站定位 3是wifi定位
|
||||||
|
*/
|
||||||
|
private String posType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.digest.DigestUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njzscloud.supervisory.config.JimiProperties;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取access_token
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OauthTokenGetParam extends JimiParam<OauthTokenGetResult> {
|
||||||
|
private String user_id;
|
||||||
|
private String user_pwd_md5;
|
||||||
|
private String expires_in;
|
||||||
|
|
||||||
|
public OauthTokenGetParam() {
|
||||||
|
super("jimi.oauth.token.get");
|
||||||
|
JimiProperties jimiProperties = SpringUtil.getBean(JimiProperties.class);
|
||||||
|
this.user_id = jimiProperties.getUserId();
|
||||||
|
this.user_pwd_md5 = DigestUtil.md5Hex(jimiProperties.getPwd());
|
||||||
|
this.expires_in = jimiProperties.getExpires().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<OauthTokenGetResult> resultType() {
|
||||||
|
return OauthTokenGetResult.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OauthTokenGetResult extends JimiResult {
|
||||||
|
private Result result;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class Result {
|
||||||
|
/**
|
||||||
|
* 后续接口访问的访问令牌,对应到公司下的帐号
|
||||||
|
*/
|
||||||
|
private String accessToken;
|
||||||
|
/**
|
||||||
|
* 有效期
|
||||||
|
*/
|
||||||
|
private Integer expiresIn;
|
||||||
|
/**
|
||||||
|
* 请求的账号
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
/**
|
||||||
|
* 几米分给给客户的APP_KEY
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* 刷新令牌,用于更新accessToken
|
||||||
|
*/
|
||||||
|
private String refreshToken;
|
||||||
|
/**
|
||||||
|
* 令牌生成的时间
|
||||||
|
*/
|
||||||
|
private String time;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njzscloud.supervisory.config.JimiProperties;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新access_token
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OauthTokenRefreshParam extends JimiParam<OauthTokenRefreshResult> {
|
||||||
|
private String access_token;
|
||||||
|
private String refresh_token;
|
||||||
|
private String expires_in;
|
||||||
|
|
||||||
|
public OauthTokenRefreshParam() {
|
||||||
|
super("jimi.oauth.token.refresh");
|
||||||
|
JimiProperties jimiProperties = SpringUtil.getBean(JimiProperties.class);
|
||||||
|
this.expires_in = jimiProperties.getExpires().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<OauthTokenRefreshResult> resultType() {
|
||||||
|
return OauthTokenRefreshResult.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OauthTokenRefreshResult extends JimiResult {
|
||||||
|
|
||||||
|
private Result result;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class Result {
|
||||||
|
/**
|
||||||
|
* 后续接口访问的访问令牌,对应到公司下的帐号
|
||||||
|
*/
|
||||||
|
private String accessToken;
|
||||||
|
/**
|
||||||
|
* 有效期
|
||||||
|
*/
|
||||||
|
private Integer expiresIn;
|
||||||
|
/**
|
||||||
|
* 请求的账号
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
/**
|
||||||
|
* 几米分给给客户的APP_KEY
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
/**
|
||||||
|
* 刷新令牌,用于更新accessToken
|
||||||
|
*/
|
||||||
|
private String refreshToken;
|
||||||
|
/**
|
||||||
|
* 令牌生成的时间
|
||||||
|
*/
|
||||||
|
private String time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个或多个设备的详细信息
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OpenDeviceGetDetailsParam extends JimiParam<OpenDeviceGetDetailsResult> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备imei号,多个中间用英文逗号隔开; 如果设备过多,建议采用POST方式(一次最多100个IMEI)
|
||||||
|
*/
|
||||||
|
private String imeis;
|
||||||
|
|
||||||
|
public OpenDeviceGetDetailsParam() {
|
||||||
|
super("jimi.open.device.getDetails");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<OpenDeviceGetDetailsResult> resultType() {
|
||||||
|
return OpenDeviceGetDetailsResult.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OpenDeviceGetDetailsResult extends JimiResult {
|
||||||
|
private List<Result> result;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class Result {
|
||||||
|
/**
|
||||||
|
* 设备IMEI
|
||||||
|
*/
|
||||||
|
private String imei;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属用户账号
|
||||||
|
*/
|
||||||
|
private String account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激活时间
|
||||||
|
*/
|
||||||
|
private String activationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
*/
|
||||||
|
private String expiration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机型
|
||||||
|
*/
|
||||||
|
private String mcType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡号
|
||||||
|
*/
|
||||||
|
private String sim;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定用户账号
|
||||||
|
*/
|
||||||
|
private String bindUserAccount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 NORMAL-开机 DISABLE-停机
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String driverPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆图标
|
||||||
|
*/
|
||||||
|
private String vehicleIcon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型(WIRED:有线 WIRELESS:无线)
|
||||||
|
*/
|
||||||
|
private String equipType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机型使用范围(aotomobile:汽车 electromobile:电动车 personal:个人 pet:宠物 plane:飞机 others:其他)
|
||||||
|
*/
|
||||||
|
private String mcTypeUseScope;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String reMark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 箱号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆名称
|
||||||
|
*/
|
||||||
|
private String vehicleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String vehicleNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆品牌
|
||||||
|
*/
|
||||||
|
private String vehicleModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车架号
|
||||||
|
*/
|
||||||
|
private String carFrame;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机名
|
||||||
|
*/
|
||||||
|
private String driverName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发动机号
|
||||||
|
*/
|
||||||
|
private String engineNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装时间
|
||||||
|
*/
|
||||||
|
private String installTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装地址
|
||||||
|
*/
|
||||||
|
private String installAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装公司
|
||||||
|
*/
|
||||||
|
private String installCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装位置
|
||||||
|
*/
|
||||||
|
private String installPosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装人员
|
||||||
|
*/
|
||||||
|
private String installPersonnel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安装图片
|
||||||
|
*/
|
||||||
|
private String installImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务员
|
||||||
|
*/
|
||||||
|
private String salesMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供通过设备imei号更改车辆信息。
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OpenDeviceUpdateParam extends JimiParam<DeviceLocationGetResult> {
|
||||||
|
/**
|
||||||
|
* 设备imei号
|
||||||
|
*/
|
||||||
|
private String imei;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String device_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆名称
|
||||||
|
*/
|
||||||
|
private String vehicle_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆图标
|
||||||
|
*/
|
||||||
|
private String vehicle_icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String vehicle_number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆品牌
|
||||||
|
*/
|
||||||
|
private String vehicle_models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机名称
|
||||||
|
*/
|
||||||
|
private String driver_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机电话
|
||||||
|
*/
|
||||||
|
private String driver_phone;
|
||||||
|
|
||||||
|
public OpenDeviceUpdateParam() {
|
||||||
|
super("jimi.open.device.update");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<DeviceLocationGetResult> resultType() {
|
||||||
|
return DeviceLocationGetResult.class;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi;
|
||||||
|
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiResult;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OpenDeviceUpdateResult extends JimiResult {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.support;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.http.annotation.FormBodyParam;
|
||||||
|
import com.njzscloud.common.core.http.annotation.PostEndpoint;
|
||||||
|
import com.njzscloud.common.core.http.annotation.RemoteServer;
|
||||||
|
|
||||||
|
@RemoteServer(value = "http://open.aichezaixian.com/route/rest", requestInterceptor = JimiRequestInterceptor.class)
|
||||||
|
public interface JimiApi {
|
||||||
|
|
||||||
|
@PostEndpoint
|
||||||
|
<T> T doRequest(@FormBodyParam JimiParam<T> jimiParam);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.support;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public abstract class JimiParam<T> {
|
||||||
|
private String method;
|
||||||
|
private String timestamp;
|
||||||
|
private String app_key;
|
||||||
|
private String sign;
|
||||||
|
private String sign_method;
|
||||||
|
private String v;
|
||||||
|
private String format;
|
||||||
|
private String access_token;
|
||||||
|
|
||||||
|
public JimiParam(String method) {
|
||||||
|
this.method = method;
|
||||||
|
this.timestamp = DateUtil.now();
|
||||||
|
this.sign_method = "md5";
|
||||||
|
this.v = "1.0";
|
||||||
|
this.format = "json";
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract Class<T> resultType();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.support;
|
||||||
|
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njzscloud.common.core.http.constant.HttpMethod;
|
||||||
|
import com.njzscloud.common.core.http.interceptor.RequestInterceptor;
|
||||||
|
import com.njzscloud.supervisory.config.JimiProperties;
|
||||||
|
|
||||||
|
public class JimiRequestInterceptor implements RequestInterceptor {
|
||||||
|
private final String appKey;
|
||||||
|
private final String appSecret;
|
||||||
|
|
||||||
|
public JimiRequestInterceptor() {
|
||||||
|
JimiProperties jimiProperties = SpringUtil.getBean(JimiProperties.class);
|
||||||
|
this.appSecret = jimiProperties.getAppSecret();
|
||||||
|
this.appKey = jimiProperties.getAppKey();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] process(HttpMethod method, String url, Object[] args) {
|
||||||
|
if (args == null || args.length == 0) {
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
if (JimiParam.class.isAssignableFrom(args[0].getClass())) {
|
||||||
|
JimiParam jimiParam = (JimiParam) args[0];
|
||||||
|
jimiParam.setApp_key(appKey);
|
||||||
|
String sign = JimiSignUtil.sign(jimiParam, appSecret, jimiParam.getSign_method());
|
||||||
|
jimiParam.setSign(sign);
|
||||||
|
}
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.support;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class JimiResult {
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public boolean isSucc() {
|
||||||
|
return code == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.support;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.crypto.Mac;
|
||||||
|
import javax.crypto.SecretKey;
|
||||||
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class JimiSignUtil {
|
||||||
|
public static String sign(Object data, String secret, String signMethod) {
|
||||||
|
Map<String, String> params = MapUtil.newHashMap();
|
||||||
|
|
||||||
|
Field[] fields = ReflectUtil.getFields(data.getClass());
|
||||||
|
for (Field field : fields) {
|
||||||
|
field.setAccessible(true);
|
||||||
|
try {
|
||||||
|
Object o = field.get(data);
|
||||||
|
params.put(field.getName(), o == null ? null : o.toString());
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
log.error("sign error", e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 第一步:检查参数是否已经排序
|
||||||
|
String[] keys = params.keySet().toArray(new String[0]);
|
||||||
|
Arrays.sort(keys);
|
||||||
|
|
||||||
|
// 第二步:把所有参数名和参数值串在一起
|
||||||
|
StringBuilder query = new StringBuilder();
|
||||||
|
if ("md5".equals(signMethod)) {
|
||||||
|
query.append(secret);
|
||||||
|
}
|
||||||
|
for (String key : keys) {
|
||||||
|
String value = params.get(key);
|
||||||
|
if (StrUtil.isNotBlank(key) && StrUtil.isNotBlank(value)) {
|
||||||
|
query.append(key).append(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第三步:使用MD5/HMAC加密
|
||||||
|
byte[] bytes;
|
||||||
|
if ("hmac".equals(signMethod)) {
|
||||||
|
bytes = encryptHMAC(query.toString(), secret);
|
||||||
|
} else {
|
||||||
|
query.append(secret);
|
||||||
|
bytes = encryptMD5(query.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第四步:把二进制转化为大写的十六进制
|
||||||
|
return byte2hex(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] encryptHMAC(String data, String secret) {
|
||||||
|
byte[] bytes = null;
|
||||||
|
try {
|
||||||
|
SecretKey secretKey = new SecretKeySpec(secret.getBytes("UTF-8"), "HmacMD5");
|
||||||
|
Mac mac = Mac.getInstance(secretKey.getAlgorithm());
|
||||||
|
mac.init(secretKey);
|
||||||
|
bytes = mac.doFinal(data.getBytes("UTF-8"));
|
||||||
|
} catch (Exception gse) {
|
||||||
|
log.error("encrypt HMAC error", gse);
|
||||||
|
throw new RuntimeException(gse);
|
||||||
|
}
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] encryptMD5(String data) {
|
||||||
|
try {
|
||||||
|
return encryptMD5(data.getBytes("UTF-8"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] encryptMD5(byte[] bytes) {
|
||||||
|
MessageDigest md = null;
|
||||||
|
try {
|
||||||
|
md = MessageDigest.getInstance("MD5");
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
return md.digest(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String byte2hex(byte[] bytes) {
|
||||||
|
StringBuilder sign = new StringBuilder();
|
||||||
|
for (int i = 0; i < bytes.length; i++) {
|
||||||
|
String hex = Integer.toHexString(bytes[i] & 0xFF);
|
||||||
|
if (hex.length() == 1) {
|
||||||
|
sign.append("0");
|
||||||
|
}
|
||||||
|
sign.append(hex.toUpperCase());
|
||||||
|
}
|
||||||
|
return sign.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.njzscloud.supervisory.gps.tuqiang.jimi.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.OauthTokenGetParam;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.OauthTokenGetResult;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.OauthTokenRefreshParam;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.OauthTokenRefreshResult;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiApi;
|
||||||
|
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class JimiUtil {
|
||||||
|
private static final JimiApi API = SpringUtil.getBean(JimiApi.class);
|
||||||
|
|
||||||
|
private static String accessToken = "";
|
||||||
|
private static String refreshToken = "";
|
||||||
|
private static long tokenCreateTime = 0;
|
||||||
|
|
||||||
|
public static <T> T request(JimiParam<T> jimiParam) {
|
||||||
|
auth();
|
||||||
|
jimiParam.setAccess_token(accessToken);
|
||||||
|
return API.doRequest(jimiParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void auth() {
|
||||||
|
if (tokenCreateTime == 0) {
|
||||||
|
OauthTokenGetResult oauthTokenGetResult = API.doRequest(new OauthTokenGetParam());
|
||||||
|
if (!oauthTokenGetResult.isSucc()) {
|
||||||
|
accessToken = "";
|
||||||
|
refreshToken = "";
|
||||||
|
tokenCreateTime = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
accessToken = oauthTokenGetResult.getResult().getAccessToken();
|
||||||
|
refreshToken = oauthTokenGetResult.getResult().getRefreshToken();
|
||||||
|
tokenCreateTime = DateUtil.parse(oauthTokenGetResult.getResult().getTime()).getTime() / 1000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tokenCreateTime < new Date().getTime() / 1000 + 60) {
|
||||||
|
OauthTokenRefreshResult oauthTokenRefreshResult = API.doRequest(new OauthTokenRefreshParam()
|
||||||
|
.setAccess_token(accessToken)
|
||||||
|
.setRefresh_token(refreshToken)
|
||||||
|
);
|
||||||
|
if (!oauthTokenRefreshResult.isSucc()) {
|
||||||
|
accessToken = "";
|
||||||
|
refreshToken = "";
|
||||||
|
tokenCreateTime = 0;
|
||||||
|
}
|
||||||
|
accessToken = oauthTokenRefreshResult.getResult().getAccessToken();
|
||||||
|
refreshToken = oauthTokenRefreshResult.getResult().getRefreshToken();
|
||||||
|
tokenCreateTime = DateUtil.parse(oauthTokenRefreshResult.getResult().getTime()).getTime() / 1000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ spring:
|
||||||
- /oss/**
|
- /oss/**
|
||||||
- /district/tree
|
- /district/tree
|
||||||
- /sys_sn_config/add
|
- /sys_sn_config/add
|
||||||
|
- /test/**
|
||||||
|
|
||||||
app:
|
app:
|
||||||
default-place:
|
default-place:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.njzscloud.supervisory.geo.mapper.GeoFenceConfigMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAEAYAAAD6+a2dAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAAASAAAAEgARslrPgAACv9JREFUeNrtnHtUVNUex7+/M+ADNBgkynfKDIiEmsrN11UhUYsB35ilBWoODBY+1l2+uHot8uYbCwZGE9EUn3nVQUEx8xFmoiGhYszgVdPsijJoXeR1zr5/4LC8oJnMwMHmfP5hLdj795ove++zZ+8DSEhISEhISNgiJHYAjYVWe9cvvfR5y5ZCaFkKlzdwIPIpn9vfurWgYCuRmp19965Go1CcPSt2nNbG5gTwXLJOZ5ju7s7FVI7ALpUKodSOOgQGUgnccHbQICQgml1q0qRmP7YIDGznzuIZrq7l8ydOBELGe+8qLxc7H0v5EwpgEfua2dk5xzy/pe3Ffv3QjUviClUqtMRcvK1S0WgY2VEvrzqbVwBYM3euKUujUcYtXSp2tpbyzArguT6fz7ww1sVF5lDWyX7osGEslVvN3Q4KotFMhtxhw/AdZrEPXVys7ngFDuKwwWCaotmrjPDwELsOlmIndgBPwiUj/sf8T7y82EnqiCEqFb6iv3KTVSq8WL4Ypf36IYM2Mz87O2rL/sbMncY9hYM38Aq9eecOCiGwXWlpCIOKzqWmMo7dYP8dPZrCKRmvhoRUtz+BYbRIJgOwV+zaWINGIIAdOxiTyeTOhTsuF/Tty66QP3tXpUI2FLgSHMxG4ys25uEhm4WxLwHkYvNTuRkBUP/LlzEMC6BLTSVvxAg79PqibrKcu4nHjgHq8N6dKipwqKq5c7iWM1wPCAAA3Be7RvVHgwmgxRld4o+Jrq5NAnie8/fzYyOxDGeCgrDndoYxIzgYIH90cnKiT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-13 11:53:52",
|
||||||
"updatedTime": "2025-9-13 11:23:04",
|
"updatedTime": "2025-9-13 22:32:18",
|
||||||
"dbConns": [],
|
"dbConns": [],
|
||||||
"profile": {
|
"profile": {
|
||||||
"default": {
|
"default": {
|
||||||
|
|
@ -16261,6 +16261,189 @@
|
||||||
"correlations": [],
|
"correlations": [],
|
||||||
"indexes": [],
|
"indexes": [],
|
||||||
"type": "P"
|
"type": "P"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "3C28D385-EEAC-4EEF-B2B5-F46099D85775",
|
||||||
|
"env": {
|
||||||
|
"base": {
|
||||||
|
"nameSpace": "",
|
||||||
|
"codeRoot": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defKey": "geo_fence_config",
|
||||||
|
"defName": "地图栅栏配置",
|
||||||
|
"comment": "",
|
||||||
|
"properties": {},
|
||||||
|
"sysProps": {
|
||||||
|
"nameTemplate": "{defKey}[{defName}]"
|
||||||
|
},
|
||||||
|
"notes": {},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"refKey": "hideInGraph",
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "defKey",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "type",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "len",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "scale",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "defaultValue",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "defName",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "comment",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "notNull",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "primaryKey",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "autoIncrement",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "refDict",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "domain",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "isStandard",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "uiHint",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "extProps",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr1",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr2",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr3",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr4",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr5",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr6",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr7",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr8",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refKey": "attr9",
|
||||||
|
"freeze": false,
|
||||||
|
"hideInGraph": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"defKey": "id",
|
||||||
|
"defName": "Id",
|
||||||
|
"comment": "",
|
||||||
|
"type": "BIGINT",
|
||||||
|
"len": "",
|
||||||
|
"scale": "",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"autoIncrement": false,
|
||||||
|
"defaultValue": "",
|
||||||
|
"hideInGraph": false,
|
||||||
|
"refDict": "",
|
||||||
|
"extProps": {},
|
||||||
|
"domain": "",
|
||||||
|
"id": "AE842A1B-A9AC-4A20-A856-D7A726460E7B",
|
||||||
|
"baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defKey": "config",
|
||||||
|
"defName": "地图配置",
|
||||||
|
"comment": "",
|
||||||
|
"type": "LONGTEXT",
|
||||||
|
"len": "",
|
||||||
|
"scale": "",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true,
|
||||||
|
"autoIncrement": false,
|
||||||
|
"defaultValue": "",
|
||||||
|
"hideInGraph": false,
|
||||||
|
"refDict": "",
|
||||||
|
"baseType": "AA06E282-7729-4258-A918-7AC2A6DF8AA9",
|
||||||
|
"extProps": {},
|
||||||
|
"id": "CFC7F717-B575-4C5E-A69B-7F4701BC88FC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"correlations": [],
|
||||||
|
"indexes": [],
|
||||||
|
"type": "P"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"views": [],
|
"views": [],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue