新增查询当天根据事件名称查询事件

This commit is contained in:
wuweida 2022-05-31 16:12:43 +08:00
parent d42a066172
commit 7d380dd36b
3 changed files with 67 additions and 10 deletions

View File

@ -181,4 +181,20 @@ public class EventController {
return success;
}
/**
* 查询当天根据事件名称查询事件
* @param eventCnName
* @return
*/
@GetMapping("selectByTimeAndName")
@ApiOperation("查询当天根据事件名称查询事件")
@ApiImplicitParam(name = "eventCnName",value = "事件名称",required = true,dataType = "String")
public Result selectByTimeAndName(String eventCnName){
List<Event> byName = eventMapper.selectByTimeAndName(eventCnName);
Result success = Result.success(byName);
return success;
}
}

View File

@ -16,4 +16,7 @@ public interface EventMapper extends BaseMapper<Event> {
@Select("select * from t_event where event_cn_name = #{eventCnName} and track_event = 'START'")
List<Event> selectByName(@Param("eventCnName") String eventCnName);
@Select("SELECT * FROM t_event where TO_DAYS(capture_time) = TO_DAYS(NOW()) AND event_cn_name = #{eventCnName} AND track_event = 'START'")
List<Event> selectByTimeAndName(@Param("eventCnName") String eventCnName);
}

View File

@ -212,8 +212,11 @@ public class MonitorService {
}
}
/**
* 特定摊点8:20抓图
*/
@Scheduled(cron = "0 20 8 * * ? ")
public void screenShot3() {
public void boothEight() {
try {
log.info("[monitor-capture]: start capture1");
@ -251,8 +254,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点8:50抓图
*/
@Scheduled(cron = "0 50 8 * * ? ")
public void screenShot4() {
public void boothEights() {
try {
log.info("[monitor-capture]: start capture1");
@ -290,8 +296,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点9:50抓图
*/
@Scheduled(cron = "0 50 9 * * ? ")
public void screenShot5() {
public void boothNine() {
try {
log.info("[monitor-capture]: start capture1");
@ -329,8 +338,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点9:20抓图
*/
@Scheduled(cron = "0 20 9 * * ? ")
public void screenShot6() {
public void boothNines() {
try {
log.info("[monitor-capture]: start capture1");
@ -368,8 +380,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点11:20抓图
*/
@Scheduled(cron = "0 20 11 * * ? ")
public void screenShot7() {
public void boothEleven() {
try {
log.info("[monitor-capture]: start capture1");
@ -407,8 +422,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点12:20抓图
*/
@Scheduled(cron = "0 20 12 * * ? ")
public void screenShot8() {
public void boothTwelve() {
try {
log.info("[monitor-capture]: start capture1");
@ -446,8 +464,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点19:20抓图
*/
@Scheduled(cron = "0 20 19 * * ? ")
public void screenShot9() {
public void boothNineteen() {
try {
log.info("[monitor-capture]: start capture1");
@ -485,8 +506,11 @@ public class MonitorService {
exception.printStackTrace();
}
}
/**
* 特定摊点20:20抓图
*/
@Scheduled(cron = "0 20 20 * * ? ")
public void screenShot10() {
public void boothTwenty() {
try {
log.info("[monitor-capture]: start capture1");
@ -525,7 +549,7 @@ public class MonitorService {
}
}
@Scheduled(cron = "0 0 8 1/1 * ?")
public void screenShot1() {
public void construction() {
try {
@ -567,7 +591,7 @@ public class MonitorService {
}
@Scheduled(cron = "0 0 8/1 * * ?")
public void screenShot2() {
public void scenicSpotAndBathing() {
try {
@ -712,6 +736,13 @@ public class MonitorService {
}
}
/**
* 获取路径返回给前端
* @param code
* @return
* @throws IOException
*/
public String fileCode(String code)throws IOException{
String url = monitorDomain + "/videoService/realmonitor/uri?scheme=HLS&channelId=" + code;
@ -733,6 +764,13 @@ public class MonitorService {
static public List cameras = new LinkedList<Map>();
/**
* 调用接口获取摄像头和组织
* @param parentId
* @param path
* @throws IOException
* @throws InterruptedException
*/
public void videoService(String parentId, String path) throws IOException, InterruptedException {
String url = monitorDomain + "/videoService/devicesManager/deviceTree?nodeType=1&typeCode=01;0;ALL;ALL&id=" + parentId;