|
|
|
|
@ -11,12 +11,15 @@ import org.jeecg.modules.ocr.entity.OcrIdentify;
|
|
|
|
|
import org.jeecg.modules.ocr.model.TaskModel;
|
|
|
|
|
import org.jeecg.modules.ocr.service.IOcrIdentifyService;
|
|
|
|
|
import org.jeecg.modules.ocr.service.impl.TaskService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.boot.ApplicationArguments;
|
|
|
|
|
import org.springframework.boot.ApplicationRunner;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.net.InetAddress;
|
|
|
|
|
import java.net.UnknownHostException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@ -36,18 +39,19 @@ public class HandleTransInit implements ApplicationRunner {
|
|
|
|
|
TaskService taskService;
|
|
|
|
|
@Resource
|
|
|
|
|
IOcrIdentifyService ocrIdentifyService;
|
|
|
|
|
|
|
|
|
|
@Value("${enableHandleTask}")
|
|
|
|
|
private boolean enableHandleTask;
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 处理转账数据
|
|
|
|
|
*
|
|
|
|
|
* @param args
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Async
|
|
|
|
|
public void run(ApplicationArguments args) {
|
|
|
|
|
public void run(ApplicationArguments args) throws UnknownHostException {
|
|
|
|
|
if (enableHandleTask) {
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(5000l);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
@ -76,6 +80,8 @@ public class HandleTransInit implements ApplicationRunner {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 刷新任务状态
|
|
|
|
|
*
|
|
|
|
|
|