bug修复
This commit is contained in:
parent
212e3aba4a
commit
4a55dbf38a
@ -16,16 +16,6 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AsyncHikvision {
|
||||
@Autowired
|
||||
private WorkerInfoMapper workerInfoMapper;
|
||||
@Autowired
|
||||
private HousingDataCall housingDataCall;
|
||||
@Autowired
|
||||
private INoticeService noticeService;
|
||||
@Autowired
|
||||
private IProjectUfaceConfigService projectUfaceConfigService;
|
||||
@Autowired
|
||||
private WkServiceuCall wkServiceuCall;
|
||||
@Autowired
|
||||
HikvisionCall hikvisionCall;
|
||||
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
package com.zhgd.xmgl.async;
|
||||
|
||||
import com.zhgd.xmgl.call.HikvisionCall;
|
||||
import com.zhgd.xmgl.call.HousingDataCall;
|
||||
import com.zhgd.xmgl.call.WkServiceuCall;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Notice;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.car.entity.CarInfo;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
|
||||
import com.zhgd.xmgl.modules.project.service.IProjectUfaceConfigService;
|
||||
import com.zhgd.xmgl.modules.worker.entity.*;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -40,8 +38,6 @@ public class AsyncWorker {
|
||||
private IProjectUfaceConfigService projectUfaceConfigService;
|
||||
@Autowired
|
||||
private WkServiceuCall wkServiceuCall;
|
||||
@Autowired
|
||||
HikvisionCall hikvisionCall;
|
||||
|
||||
/**
|
||||
* 批量数据发送任务
|
||||
@ -93,10 +89,8 @@ public class AsyncWorker {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个人员数据发送任务
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Async("sendWorkerExecutor")
|
||||
@ -155,7 +149,6 @@ public class AsyncWorker {
|
||||
|
||||
/**
|
||||
* 向外部上传设备
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
@Async("sendWorkerExecutor")
|
||||
@ -170,7 +163,6 @@ public class AsyncWorker {
|
||||
|
||||
/**
|
||||
* 单个人员数据发送任务
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Async("sendWorkerExecutor")
|
||||
@ -185,7 +177,6 @@ public class AsyncWorker {
|
||||
|
||||
/**
|
||||
* 添加企业
|
||||
*
|
||||
* @param enterpriseInfo
|
||||
*/
|
||||
@Async("sendWorkerExecutor")
|
||||
@ -199,7 +190,6 @@ public class AsyncWorker {
|
||||
|
||||
/**
|
||||
* 解除企业绑定
|
||||
*
|
||||
* @param projectEnterprise
|
||||
*/
|
||||
@Async("sendWorkerExecutor")
|
||||
@ -210,5 +200,4 @@ public class AsyncWorker {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
26
src/main/java/com/zhgd/xmgl/base/SubscribeEventQo.java
Normal file
26
src/main/java/com/zhgd/xmgl/base/SubscribeEventQo.java
Normal file
@ -0,0 +1,26 @@
|
||||
package com.zhgd.xmgl.base;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SubscribeEventQo {
|
||||
@ApiModelProperty(value = "海康host")
|
||||
private String artemisConfigHost;
|
||||
@ApiModelProperty(value = "海康appKey")
|
||||
private String artemisConfigAppKey;
|
||||
@ApiModelProperty(value = "海康appSecret")
|
||||
private String artemisConfigAppSecret;
|
||||
@JsonProperty("eventTypes")
|
||||
private List<Long> eventTypes;
|
||||
@JsonProperty("eventDest")
|
||||
private String eventDest;
|
||||
@JsonProperty("subType")
|
||||
private Long subType;
|
||||
@JsonProperty("eventLvl")
|
||||
private List<Long> eventLvl;
|
||||
}
|
||||
@ -10,6 +10,7 @@ import com.google.gson.JsonObject;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.base.HikvisionCarInfo;
|
||||
import com.zhgd.xmgl.base.HikvisionEventsPictureRq;
|
||||
import com.zhgd.xmgl.base.SubscribeEventQo;
|
||||
import com.zhgd.xmgl.modules.car.entity.CarInfo;
|
||||
import com.zhgd.xmgl.modules.car.entity.CarPassRecord;
|
||||
import com.zhgd.xmgl.modules.car.mapper.CarPassRecordMapper;
|
||||
@ -318,4 +319,15 @@ public class HikvisionCall {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "按事件类型订阅事件", notes = "按事件类型订阅事件", httpMethod = "POST")
|
||||
@PostMapping(value = "/subscribeEvent")
|
||||
public Result subscribeEvent(@ApiIgnore @RequestBody SubscribeEventQo qo) {
|
||||
final String ARTEMIS_PATH = "/artemis";
|
||||
final String path = ARTEMIS_PATH + "/api/eventService/v1/eventSubscriptionByEventTypes";
|
||||
String host = "https://" + qo.getArtemisConfigHost();
|
||||
JSONObject jo = new JSONObject();
|
||||
String rs = HikvisionUtil.doPost(host, path, jo.toJSONString(), null, qo.getArtemisConfigAppKey(), qo.getArtemisConfigAppSecret());
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user