|
|
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
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.format.DateTimeFormatter;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -67,6 +69,26 @@ public class RemoteCallsController extends BaseController {
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "更新算法数据并推送")
|
|
|
|
|
|
|
|
@GetMapping("/pushDate")
|
|
|
|
|
|
|
|
public AjaxResult pushData() {
|
|
|
|
|
|
|
|
// 获取社会治理中心增量事件保存到events_import表
|
|
|
|
|
|
|
|
remoteCallsService.getEventDate();
|
|
|
|
|
|
|
|
// 获取昨天的数据
|
|
|
|
|
|
|
|
LocalDate localDate = LocalDate.now();
|
|
|
|
|
|
|
|
LocalDate yesterday = localDate.minusDays(1);
|
|
|
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
|
|
|
String yesterdayStr = yesterday.format(formatter);
|
|
|
|
|
|
|
|
// 紧急事件接口
|
|
|
|
|
|
|
|
remoteCallsService.urgentAlgorithm(yesterdayStr);
|
|
|
|
|
|
|
|
// 群体事件接口
|
|
|
|
|
|
|
|
remoteCallsService.groupAlgorithm();
|
|
|
|
|
|
|
|
// 同人事件接口
|
|
|
|
|
|
|
|
remoteCallsService.onepersonAlgorithm();
|
|
|
|
|
|
|
|
// 推送
|
|
|
|
|
|
|
|
remoteCallsService.imports();
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 算法处理所有数据
|
|
|
|
* 算法处理所有数据
|
|
|
|
*
|
|
|
|
*
|
|
|
|