1234567891011121314151617181920212223242526272829303132333435363738 |
- package cn.cslg.pas.service.upLoadPatent;
- import cn.cslg.pas.common.model.vo.ProjectImportPatentVO;
- import cn.cslg.pas.domain.Task;
- import lombok.RequiredArgsConstructor;
- import org.springframework.context.annotation.Lazy;
- import org.springframework.stereotype.Service;
- import java.io.IOException;
- /**
- * 执行人物类
- *
- * @Author 李仁杰
- */
- @Service
- @RequiredArgsConstructor(onConstructor_ = {@Lazy})
- public class ExcuteTaskService {
- private final PantentQueueService pantentQueueService;
- //执行Excel导入任务
- public void executeExcelTask(Task task, ProjectImportPatentVO projectImportPatentVO) throws IOException {
- //一个线程执行入队列
- Thread thread1 = new Thread(() -> {
- pantentQueueService.addPatnetToQueue(task, projectImportPatentVO);
- });
- //一个线程执行出队列
- Thread thread2 = new Thread(() -> {
- });
- }
- }
|