|
|
@ -1,6 +1,5 @@
|
|
|
|
package com.ruoyi.pt.controller;
|
|
|
|
package com.ruoyi.pt.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.pt.service.CasesImportService;
|
|
|
|
import com.ruoyi.pt.service.CasesImportService;
|
|
|
@ -11,13 +10,13 @@ import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
@ -64,18 +63,6 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 事件进度临时推送接口copy表
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return 响应类
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@ApiOperation(value = "事件进度临时推送接口copy表")
|
|
|
|
|
|
|
|
@PostMapping("/temporaryImports")
|
|
|
|
|
|
|
|
public AjaxResult temporaryImports() {
|
|
|
|
|
|
|
|
remoteCallsService.temporaryImports();
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取社会治理中心增量事件保存到events_import表
|
|
|
|
* 获取社会治理中心增量事件保存到events_import表
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -96,10 +83,16 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
@ApiOperation(value = "过滤审核不通过的事件列表")
|
|
|
|
@ApiOperation(value = "过滤审核不通过的事件列表")
|
|
|
|
@GetMapping("/noPassEventList")
|
|
|
|
@GetMapping("/noPassEventList")
|
|
|
|
public AjaxResult noPassEventList() {
|
|
|
|
public AjaxResult noPassEventList() {
|
|
|
|
|
|
|
|
// 获取当前时间
|
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
|
|
// 获取当前时间的上一个小时
|
|
|
|
|
|
|
|
LocalDateTime lastHour = now.minusHours(1);
|
|
|
|
// 获取上个小时
|
|
|
|
// 获取上个小时
|
|
|
|
String lastHourStr = DateUtil.offsetHour(DateUtil.date(), -1).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime lastHourWholeHour = lastHour.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String lastHourStr = lastHourWholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
// 获取当前时间
|
|
|
|
// 获取当前时间
|
|
|
|
String localDateStr = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime wholeHour = now.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String localDateStr = wholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
remoteCallsService.noPassEventList(lastHourStr, localDateStr);
|
|
|
|
remoteCallsService.noPassEventList(lastHourStr, localDateStr);
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -112,10 +105,16 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
@ApiOperation(value = "过滤已办结的事件列表")
|
|
|
|
@ApiOperation(value = "过滤已办结的事件列表")
|
|
|
|
@GetMapping("/completionEventList")
|
|
|
|
@GetMapping("/completionEventList")
|
|
|
|
public AjaxResult completionEventList() {
|
|
|
|
public AjaxResult completionEventList() {
|
|
|
|
|
|
|
|
// 获取当前时间
|
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
|
|
// 获取当前时间的上一个小时
|
|
|
|
|
|
|
|
LocalDateTime lastHour = now.minusHours(1);
|
|
|
|
// 获取上个小时
|
|
|
|
// 获取上个小时
|
|
|
|
String lastHourStr = DateUtil.offsetHour(DateUtil.date(), -1).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime lastHourWholeHour = lastHour.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String lastHourStr = lastHourWholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
// 获取当前时间
|
|
|
|
// 获取当前时间
|
|
|
|
String localDateStr = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime wholeHour = now.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String localDateStr = wholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
remoteCallsService.completionEventList(lastHourStr, localDateStr);
|
|
|
|
remoteCallsService.completionEventList(lastHourStr, localDateStr);
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -129,10 +128,16 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
@ApiOperation(value = "更新算法数据并推送")
|
|
|
|
@ApiOperation(value = "更新算法数据并推送")
|
|
|
|
@GetMapping("/pushDate")
|
|
|
|
@GetMapping("/pushDate")
|
|
|
|
public AjaxResult pushData(@RequestParam("type") Integer type) {
|
|
|
|
public AjaxResult pushData(@RequestParam("type") Integer type) {
|
|
|
|
|
|
|
|
// 获取当前时间
|
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
|
|
// 获取当前时间的上一个小时
|
|
|
|
|
|
|
|
LocalDateTime lastHour = now.minusHours(1);
|
|
|
|
// 获取上个小时
|
|
|
|
// 获取上个小时
|
|
|
|
String lastHourStr = DateUtil.offsetHour(DateUtil.date(), -1).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime lastHourWholeHour = lastHour.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String lastHourStr = lastHourWholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
// 获取当前时间
|
|
|
|
// 获取当前时间
|
|
|
|
String localDateStr = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime wholeHour = now.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
String localDateStr = wholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
// 过滤审核不通过的事件列表
|
|
|
|
// 过滤审核不通过的事件列表
|
|
|
|
remoteCallsService.noPassEventList(lastHourStr, localDateStr);
|
|
|
|
remoteCallsService.noPassEventList(lastHourStr, localDateStr);
|
|
|
|
// 过滤已办结的事件列表
|
|
|
|
// 过滤已办结的事件列表
|
|
|
@ -183,10 +188,16 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
String lastHourStr = null;
|
|
|
|
String lastHourStr = null;
|
|
|
|
String localDateStr = null;
|
|
|
|
String localDateStr = null;
|
|
|
|
if (type == 1) {
|
|
|
|
if (type == 1) {
|
|
|
|
|
|
|
|
// 获取当前时间
|
|
|
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
|
|
// 获取当前时间的上一个小时
|
|
|
|
|
|
|
|
LocalDateTime lastHour = now.minusHours(1);
|
|
|
|
// 获取上个小时
|
|
|
|
// 获取上个小时
|
|
|
|
lastHourStr = DateUtil.offsetHour(DateUtil.date(), -1).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime lastHourWholeHour = lastHour.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
lastHourStr = lastHourWholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
// 获取当前时间
|
|
|
|
// 获取当前时间
|
|
|
|
localDateStr = DateUtil.beginOfDay(DateUtil.date()).toString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
LocalDateTime wholeHour = now.withMinute(0).withSecond(0);
|
|
|
|
|
|
|
|
localDateStr = wholeHour.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.info("==============开始调用" + localDateStr + "============");
|
|
|
|
log.info("==============开始调用" + localDateStr + "============");
|
|
|
@ -196,4 +207,17 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
remoteCallsService.completionEventList(lastHourStr, localDateStr);
|
|
|
|
remoteCallsService.completionEventList(lastHourStr, localDateStr);
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 根据事件id推送接口
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param innerEventId 事件id
|
|
|
|
|
|
|
|
* @return 响应类
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@ApiOperation(value = "事件进度推送接口")
|
|
|
|
|
|
|
|
@GetMapping("/pushByInnerEventId/{innerEventId}")
|
|
|
|
|
|
|
|
public AjaxResult pushById(@PathVariable("innerEventId") String innerEventId) {
|
|
|
|
|
|
|
|
remoteCallsService.pushByInnerEventId(innerEventId);
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|