fix: 联调修改
This commit is contained in:
@@ -51,6 +51,7 @@ import org.nl.config.lucene.service.dto.LuceneLogDto;
|
|||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static redis.clients.jedis.HostAndPort.localhost;
|
import static redis.clients.jedis.HostAndPort.localhost;
|
||||||
@@ -225,6 +226,8 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
System.out.println("in"+ LocalDateTime.now() +"开始时间"+this.getDeviceCode());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getHeartbeat();
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
@@ -248,7 +251,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
@@ -343,7 +346,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
last_to_task = to_task;
|
last_to_task = to_task;
|
||||||
last_to_container_no = to_container_no;
|
last_to_container_no = to_container_no;
|
||||||
last_to_container_type = to_container_type;
|
last_to_container_type = to_container_type;
|
||||||
|
System.out.println("out"+ LocalDateTime.now() +"结束时间"+this.getDeviceCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearWrite() {
|
public void clearWrite() {
|
||||||
|
|||||||
@@ -5,22 +5,22 @@ import org.nl.acs.device_driver.DeviceDriver;
|
|||||||
public interface ExecutableDeviceDriver extends DeviceDriver {
|
public interface ExecutableDeviceDriver extends DeviceDriver {
|
||||||
/**
|
/**
|
||||||
* executeAuto
|
* executeAuto
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
default void executeAuto() throws Exception {
|
default void executeAuto() throws Exception {
|
||||||
// try {
|
try {
|
||||||
// this.execute();
|
this.execute();
|
||||||
// } catch (Throwable var6) {
|
} catch (Throwable var6) {
|
||||||
// String message = "线程调用异常:" + var6.getMessage();
|
String message = "线程调用异常:" + var6.getMessage();
|
||||||
// Log.error(message);
|
}
|
||||||
// } finally {
|
// this.execute();
|
||||||
// }
|
|
||||||
this.execute();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
void execute() throws Exception;
|
void execute() throws Exception;
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 25:
|
||||||
//二楼到一楼输送线申请行架任务
|
//二楼到一楼输送线申请行架任务
|
||||||
if (move == 1 && !requireSucess) {
|
if (move == 1 && !requireSucess) {
|
||||||
applyManipulatorTask();
|
applyManipulatorTask();
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import org.nl.config.lucene.service.LuceneExecuteLogService;
|
|||||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -214,7 +215,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,4 +148,9 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB2.W8"));
|
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB2.W8"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,5 +58,8 @@ public class ItemProtocol {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import org.nl.config.lucene.service.dto.LuceneLogDto;
|
|||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,6 +211,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
System.out.println("in 开始时间"+ LocalDateTime.now() +this.getDeviceCode());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
@@ -247,7 +250,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (move != last_mode && move==0) {
|
if (move != last_move && move==0) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
clearWrite();
|
clearWrite();
|
||||||
}
|
}
|
||||||
@@ -374,6 +377,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
last_height = height;
|
last_height = height;
|
||||||
last_weight = weight;
|
last_weight = weight;
|
||||||
last_barcode = barcode;
|
last_barcode = barcode;
|
||||||
|
System.out.println("out 开始时间"+ LocalDateTime.now() +this.getDeviceCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyErrorHeight() {
|
private void applyErrorHeight() {
|
||||||
|
|||||||
@@ -221,5 +221,8 @@ public class ItemProtocol {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,4 +214,9 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_to_barcode, "下发木箱条码", "DB601.STRING1.50"));
|
list.add(new ItemDto(item_to_barcode, "下发木箱条码", "DB601.STRING1.50"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import org.nl.config.lucene.service.LuceneExecuteLogService;
|
|||||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -264,8 +265,8 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
String notCreateInstMessage = null;
|
String notCreateInstMessage = null;
|
||||||
|
|
||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 1000;
|
||||||
private int instruction_update_time_out = 3000;
|
private int instruction_update_time_out = 1000;
|
||||||
private Date instruction_require_time = new Date();
|
private Date instruction_require_time = new Date();
|
||||||
private Date instruction_update_time = new Date();
|
private Date instruction_update_time = new Date();
|
||||||
List<String> getDeviceCodeList = null;
|
List<String> getDeviceCodeList = null;
|
||||||
@@ -299,7 +300,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
public void execute() throws Exception {
|
public void execute() throws Exception {
|
||||||
|
System.out.println("in"+ LocalDateTime.now() +"开始时间"+this.getDeviceCode());
|
||||||
try {
|
try {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
@@ -330,7 +333,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
|
|
||||||
// 更新指令状态
|
// 更新指令状态
|
||||||
if (mode == 3 && task > 0) {
|
if (mode == 3 && task > 0 && command == 1) {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
||||||
@@ -484,7 +487,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inst = null;
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
@@ -541,6 +544,8 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
last_special1 = special1;
|
last_special1 = special1;
|
||||||
last_special2 = special2;
|
last_special2 = special2;
|
||||||
last_storage_cache = storage_cache;
|
last_storage_cache = storage_cache;
|
||||||
|
System.out.println("out"+ LocalDateTime.now() +"结束时间"+this.getDeviceCode());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,7 +827,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
String startDeviceCode = instructionErro.getStart_device_code();
|
String startDeviceCode = instructionErro.getStart_device_code();
|
||||||
Device startDeviceError = deviceAppService.findDeviceByCode(startDeviceCode);
|
Device startDeviceError = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
||||||
pakagePLCData(list, startDeviceError.getExtraValue().get("x").toString(), startDeviceError.getExtraValue().get("z").toString(), startDeviceError.getExtraValue().get("y").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
|
pakagePLCData(list, startDeviceError.getExtraValue().get("x").toString(), startDeviceError.getExtraValue().get("z").toString(), startDeviceError.getExtraValue().get("y").toString(), "1", instructionErro.getInstruction_code());
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -832,7 +837,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
if ("3".equals(instructionErro.getExecute_code()) && forkCargo == 2) {
|
if ("3".equals(instructionErro.getExecute_code()) && forkCargo == 2) {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
||||||
pakagePLCData(list, instructionErro.getTo_x(), instructionErro.getTo_y(), instructionErro.getTo_z(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
|
pakagePLCData(list, instructionErro.getTo_x(), instructionErro.getTo_y(), instructionErro.getTo_z(), "2", instructionErro.getInstruction_code());
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -844,7 +849,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
if ("1".equals(instructionErro.getExecute_code()) || "2".equals(instructionErro.getExecute_code())) {
|
if ("1".equals(instructionErro.getExecute_code()) || "2".equals(instructionErro.getExecute_code())) {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) {
|
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.storage.name())) {
|
||||||
pakagePLCData(list, instructionErro.getFrom_x(), instructionErro.getFrom_y(), instructionErro.getFrom_z(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
|
pakagePLCData(list, instructionErro.getFrom_x(), instructionErro.getFrom_y(), instructionErro.getFrom_z(), "1", instructionErro.getInstruction_code());
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -854,8 +859,8 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
String next_device_code = instructionErro.getNext_device_code();
|
String next_device_code = instructionErro.getNext_device_code();
|
||||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
if (StrUtil.equals(startDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
if (StrUtil.equals(nextDevice.getDevice_type(), DeviceType.conveyor.name())) {
|
||||||
pakagePLCData(list, nextDevice.getExtraValue().get("x").toString(), nextDevice.getExtraValue().get("z").toString(), nextDevice.getExtraValue().get("y").toString(), instructionErro.getExecute_code(), instructionErro.getInstruction_code());
|
pakagePLCData(list, nextDevice.getExtraValue().get("x").toString(), nextDevice.getExtraValue().get("z").toString(), nextDevice.getExtraValue().get("y").toString(), "2", instructionErro.getInstruction_code());
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1315,4 +1320,5 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,22 +2,25 @@ package org.nl.acs.opc;
|
|||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.auto.run.AbstractAutoRunnable;
|
import org.nl.acs.auto.run.AbstractAutoRunnable;
|
||||||
|
import org.nl.acs.auto.run.AutoRunService;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
|
import org.nl.acs.udw.UnifiedDataAccessor;
|
||||||
|
import org.nl.acs.udw.UnifiedDataAccessorFactory;
|
||||||
import org.nl.config.thread.TheadFactoryName;
|
import org.nl.config.thread.TheadFactoryName;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author 20220102CG\noblelift
|
|
||||||
*/
|
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
||||||
@Autowired
|
@Autowired
|
||||||
DeviceAppService deviceAppService;
|
DeviceAppService deviceAppService;
|
||||||
|
@Autowired
|
||||||
|
private AutoRunService autoRunService;
|
||||||
int cache_thread = 3;
|
int cache_thread = 3;
|
||||||
|
|
||||||
int corePoolSize = 50;
|
int corePoolSize = 50;
|
||||||
@@ -41,8 +44,8 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
|||||||
new TheadFactoryName()
|
new TheadFactoryName()
|
||||||
);*/
|
);*/
|
||||||
this.executorService = new ThreadPoolExecutor(
|
this.executorService = new ThreadPoolExecutor(
|
||||||
10,
|
50,
|
||||||
20,
|
100,
|
||||||
1L,
|
1L,
|
||||||
TimeUnit.SECONDS,
|
TimeUnit.SECONDS,
|
||||||
new ArrayBlockingQueue<>(queueLength),
|
new ArrayBlockingQueue<>(queueLength),
|
||||||
@@ -81,11 +84,16 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
|||||||
log.info("设备执行线程等待opc同步线程...");
|
log.info("设备执行线程等待opc同步线程...");
|
||||||
Thread.sleep(1000L);
|
Thread.sleep(1000L);
|
||||||
if (i > 60) {
|
if (i > 60) {
|
||||||
|
UnifiedDataAccessor accessor_value = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key);
|
||||||
|
if(accessor_value.getAllKey().size() < 1){
|
||||||
|
autoRunService.startThread("DeviceOpcSynchronizeAutoRun");
|
||||||
|
}
|
||||||
log.info("设备执行线程放弃等待opc同步线程...");
|
log.info("设备执行线程放弃等待opc同步线程...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Thread.sleep(10000L);
|
||||||
log.info("设备执行线程开始...");
|
log.info("设备执行线程开始...");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -98,8 +106,10 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
|||||||
//不包含正在执行的线程,则进行执行
|
//不包含正在执行的线程,则进行执行
|
||||||
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||||
BlockedRunable runnable = new BlockedRunable() {
|
BlockedRunable runnable = new BlockedRunable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void subRun() throws Exception {
|
public void subRun() throws Exception {
|
||||||
|
System.out.println("add 线程开始时间"+ LocalDateTime.now() + deviceDriver.getDeviceCode() );
|
||||||
deviceDriver.executeAuto();
|
deviceDriver.executeAuto();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,9 +121,10 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
|||||||
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||||
this.runs.put(deviceDriver.getDeviceCode(), runnable);
|
this.runs.put(deviceDriver.getDeviceCode(), runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
runnable.setIndex(this.runs);
|
runnable.setIndex(this.runs);
|
||||||
this.executorService.submit(runnable);
|
this.executorService.submit(runnable);
|
||||||
|
System.out.println("run 线程开始时间"+ LocalDateTime.now() + deviceDriver.getDeviceCode() );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<!--生产环境:打印控制台和输出到文件-->
|
<!--生产环境:打印控制台和输出到文件-->
|
||||||
<springProfile name="prod">
|
<springProfile name="prod">
|
||||||
<root level="info">
|
<root level="info">
|
||||||
|
<appender-ref ref="CONSOLE"/>
|
||||||
<appender-ref ref="asyncLuceneAppender"/>
|
<appender-ref ref="asyncLuceneAppender"/>
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
Reference in New Issue
Block a user