5 Commits

16 changed files with 458 additions and 637 deletions

View File

@@ -64,6 +64,16 @@ public interface NDCAgvService {
*/
public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity);
/**
* 下发agv偏移指令
* @param phase
* @param index
* @param result
* @return
*/
public byte[] sendAgvTwoModeInstNewPoint(int phase, int index, int result,int offset,int quantity,int newStation);
public byte[] sendAgvTwoModeInst();

View File

@@ -48,6 +48,9 @@ public class NDCAgvServiceImpl implements NDCAgvService {
@Override
public void deleteAgvInstToNDC(Instruction inst) throws Exception {
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), CommonFinalParam.ONE)) {
if (StrUtil.isEmpty(inst.getAgv_jobno())){
return;
}
int index = Integer.parseInt(inst.getAgv_jobno());
byte indexhigh = (byte) IntToHexHigh(index);
@@ -349,18 +352,54 @@ public class NDCAgvServiceImpl implements NDCAgvService {
byte offsetlow = (byte) IntToHexLow(offset);
byte quantityhigh = (byte) IntToHexHigh(quantity);
byte quantitylow = (byte) IntToHexLow(quantity);
byte[] b = new byte[]{(byte) 0X87, (byte) 0XCD,
(byte) 0X00, (byte) 0X08,
(byte) 0X00, (byte) 0X0E,
(byte) 0X00, (byte) 0X10,
(byte) 0X00, (byte) 0X01,
(byte) 0X00, (byte) 0X6D,
(byte) 0X00, (byte) 0X0A,
(byte) 0X00, (byte) 0X0C,
(byte) indexhigh, (byte) indexlow,
(byte) 0X01, (byte) 0X12,
(byte) phasehigh, (byte) phaselow,
(byte) offsethigh, (byte) offsetlow,
(byte) quantityhigh, (byte) quantitylow
(byte) quantityhigh, (byte) quantitylow,
(byte) 0X00, (byte) 0X00
};
log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:"
+ hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF) + ",是否侧移: " + (offset == 1 ? "侧移" : "不测移") + ",偏离量: " + quantity);
System.out.println("反馈agv动作数据:" + Bytes2HexString(b));
return b;
}
@Override
public byte[] sendAgvTwoModeInstNewPoint(int phase, int index, int result, int offset, int quantity, int newStation) {
if (phase < 0 || index < 0)
return null;
byte indexhigh = (byte) IntToHexHigh(index);
byte indexlow = (byte) IntToHexLow(index);
byte phasehigh = (byte) IntToHexHigh(phase);
byte phaselow = (byte) IntToHexLow(phase);
byte offsethigh = (byte) IntToHexHigh(offset);
byte offsetlow = (byte) IntToHexLow(offset);
byte quantityhigh = (byte) IntToHexHigh(quantity);
byte quantitylow = (byte) IntToHexLow(quantity);
byte newStationhigh = (byte) IntToHexHigh(newStation);
byte newStationlow = (byte) IntToHexLow(newStation);
byte[] b = new byte[]{(byte) 0X87, (byte) 0XCD,
(byte) 0X00, (byte) 0X08,
(byte) 0X00, (byte) 0X10,
(byte) 0X00, (byte) 0X01,
(byte) 0X00, (byte) 0X6D,
(byte) 0X00, (byte) 0X0C,
(byte) indexhigh, (byte) indexlow,
(byte) 0X01, (byte) 0X12,
(byte) phasehigh, (byte) phaselow,
(byte) offsethigh, (byte) offsetlow,
(byte) quantityhigh, (byte) quantitylow,
(byte) newStationhigh, (byte) newStationlow,
};

View File

@@ -1083,7 +1083,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
private void updataTask(Instruction instructionDto, String newPoint) {
TaskDto taskUpdate = new TaskDto();
//TaskDto taskUpdate = new TaskDto();
TaskDto taskUpdate = taskserver.findByCodeFromCache(instructionDto.getTask_code());
if (AgvActionTypeEnum.IN_STOCK.getCode().equals(instructionDto.getAgv_action_type())) {
instructionDto.setStart_point_code(newPoint);
taskUpdate.setStart_point_code(newPoint);

View File

@@ -2,6 +2,8 @@ package org.nl.acs.auto.run;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.AcsConfig;
import org.nl.acs.agv.domain.TwoFloorAgvStatus;
@@ -20,6 +22,11 @@ import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.agv.service.impl.TwoFloorAgvStatusService;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.storage_cell.service.StorageCellService;
import org.nl.acs.storage_cell.service.dto.StorageCellDto;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.acs.task.service.impl.TaskServiceImpl;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
@@ -72,6 +79,12 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
private final ConcurrentHashMap<String, AtomicBoolean> CAR_PHASE = new ConcurrentHashMap<>();
@Autowired
StorageCellService storageCellService;
@Autowired
InstructionService instructionService;
@Autowired
TaskService taskService;
@Autowired
ISysParamService paramService;
@@ -345,6 +358,32 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} else {
log.info(device_code + "对应设备号为空!");
}
} //
else if (phase == 0x0B) {
//二次分配
if (ObjectUtil.isEmpty(inst)) {
log.info("未找到指令号{}对应的指令", ikey);
return;
}
//根据任务号直接请求上位分配新的点位
JSONObject apply = new JSONObject();
apply.put("task_code", inst.getTask_code());
String str = acsToWmsService.applySendOutTwo(apply);
JSONObject jo = JSON.parseObject(str);
if (jo != null && jo.getInteger("status") == 200) {
//申请成功以后更新指令和任务的终点
//反馈NDC
String newPoint = jo.getString("data");
updataTask(inst, newPoint);
StorageCellDto storageCellDto = storageCellService.findByCode(newPoint);
if (ObjectUtil.isNotEmpty(storageCellDto)) {
data = ndcAgvService.sendAgvTwoModeInstNewPoint(phase, index, 0, 0, 0, storageCellDto.getAddress());
} else {
LuceneLogDto logDto = LuceneLogDto.builder().device_code(device_code).content("未反馈NDC二次分配点位原因,货位表中未查询到该货位,对应的货位信息:" + newPoint).build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
} else {
//上报异常信息
//不需要WCS反馈
@@ -444,7 +483,16 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
}
}
private void updataTask(Instruction instructionDto, String newPoint) {
TaskDto taskUpdate = taskService.findByCodeFromCache(instructionDto.getTask_code());
instructionDto.setNext_point_code(newPoint);
taskUpdate.setNext_point_code(newPoint);
instructionDto.setNext_device_code(newPoint);
taskUpdate.setNext_device_code(newPoint);
taskUpdate.setTask_id(instructionDto.getTask_id());
instructionService.update(instructionDto);
taskService.update1(taskUpdate);
}
public static void write(byte[] b) {
try {
log.info("下发agv数据:" + Bytes2HexString(b));

View File

@@ -239,7 +239,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
case 2:
//申请任务
if (move > 0 && !requireSucess) {
instruction_require();
// instruction_require();
} else {
String remark = "";
;
@@ -370,10 +370,14 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
}
return;
}
if (StrUtil.isEmpty(material_barcode)){
this.message = "载具码为空不允许申请AGV任务";
return;
}
JSONObject apply = new JSONObject();
apply.put("device_code", device_code);
apply.put("vehicle_code", material_barcode);
apply.put("vehicle_code", material_barcode.replaceAll("\\s+", "")
.replaceAll(",+$", ""));
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)

View File

@@ -2,7 +2,9 @@ package org.nl.acs.device_driver.two_conveyor.hongxiang_device;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -14,6 +16,8 @@ import org.nl.acs.device_driver.FeedLmsRealFailed;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.one.ApplyLabelingAndBindingRequest;
import org.nl.acs.ext.wms.data.one.ApplyLabelingAndBindingResponse;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.history.ErrorUtil;
@@ -25,6 +29,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.storage_cell.domain.StorageCell;
import org.nl.acs.storage_cell.service.StorageCellService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
@@ -64,6 +70,9 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
@Autowired
private StorageCellService storageCellService = SpringContextHolder.getBean(StorageCellService.class);
private String error_type = "hx_error_type";
private Date instruction_require_time = new Date();
@@ -211,7 +220,7 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
if (finish == 1 && !requireSucess) {
//烘箱完成反馈LMS
// apply_finish();
apply_finish();
}
}
@@ -237,6 +246,39 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
last_currentC = currentC;
}
public synchronized boolean apply_finish() {
Date date = new Date();
if (date.getTime() - this.instruction_apply_time.getTime() < (long) this.instruction_require_time_out) {
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
return false;
} else {
this.instruction_apply_time = date;
message = "烘箱完成反馈LMS...";
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest = new ApplyLabelingAndBindingRequest();
//JSONObject device_json = WQLObject.getWQLObject("acs_storage_cell").query("storage_code ='" + this.device_code + "'").uniqueResult(0);
StorageCell storageCell = storageCellService.getOne(new LambdaQueryWrapper<StorageCell>()
.eq(StorageCell::getStorage_code, this.device_code));
String start_point_code = null;
if (!ObjectUtil.isEmpty(storageCell)) {
//start_point_code = (String) device_json.get("parent_storage_code") == null ? this.device_code : (String) device_json.get("parent_storage_code");
start_point_code = storageCell.getParent_storage_code() == null ? this.device_code : storageCell.getParent_storage_code();
}
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
applyLabelingAndBindingRequest.setType("3");
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
logServer.deviceExecuteLog(this.device_code, "", "", "烘拷完成,请求参数:" + JSON.toJSONString(applyLabelingAndBindingRequest));
if (applyLabelingAndBindingResponse.getstatus() == 200) {
requireSucess = true;
message = "烘箱完成反馈LMS成功...";
logServer.deviceExecuteLog(this.device_code, "", "", "烘拷完成请求成功,响应参数:" + JSON.toJSONString(applyLabelingAndBindingResponse));
} else {
requireSucess = true;
message = "烘箱完成反馈LMS失败" + String.valueOf(applyLabelingAndBindingResponse);
logServer.deviceExecuteLog(this.device_code, "", "", "烘拷完成请求失败,响应参数:" + JSON.toJSONString(applyLabelingAndBindingResponse));
}
return true;
}
}
protected void thingToNothing() {
//this.setRequireSucess(false);

View File

@@ -119,9 +119,9 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
iserror = this.itemProtocol.isError;
if (mode != last_mode) {
this.setRequireSucess(false);
}
// if (mode != last_mode) {
// this.setRequireSucess(false);
// }
} catch (Exception var17) {
this.message = "universal_message14";
LuceneLogDto logDto = LuceneLogDto.builder()
@@ -130,6 +130,12 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(device_code)
.content(this.device_code + "逻辑异常消息:" + var17.getMessage())
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);
}
if (!this.itemProtocol.getIsonline()) {

View File

@@ -60,6 +60,10 @@ public class ItemProtocol {
public static String item_to_empty_shaft_site = "to_empty_shaft_site";
//下发任务类型
public static String item_to_type = "to_type";
//下发分支任务1轴类型
public static String item_to_Task1_Axis_Type = "to_Task1_Axis_Type";
//下发分支任务2轴类型
public static String item_to_Task2_Axis_Type = "to_Task2_Axis_Type";
private SlitTwoManipulatorDeviceDriver driver;
@@ -185,6 +189,8 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target2, "下发目标站2", "DB16.W14"));
list.add(new ItemDto(item_to_empty_shaft_site, "下发空轴位", "DB16.W16"));
list.add(new ItemDto(item_to_type, "下发任务类型", "DB16.W20"));
list.add(new ItemDto(item_to_Task1_Axis_Type, "下发分支任务1轴类型", "DB16.W24"));
list.add(new ItemDto(item_to_Task2_Axis_Type, "下发分支任务2轴类型", "DB16.W28"));
return list;
}

View File

@@ -392,11 +392,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
}
if (!ObjectUtil.isEmpty(task)) {
this.executeReadyTask(task);
boolean flag = this.executeReadyTask(task);
return flag;
} else {
notCreateInstMessage = "universal_notCreateInstMessage";
return false;
}
return true;
}
}
@@ -448,11 +449,12 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
if (!ObjectUtil.isEmpty(task)) {
this.executeReadyTask(task);
boolean flag1 = this.executeReadyTask(task);
return flag1;
} else {
notCreateInstMessage = "universal_notCreateInstMessage";
return false;
}
return true;
}
}
@@ -491,6 +493,19 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
map.put("to_type", taskDto.getTruss_type());
map.put("to_empty_shaft_site", taskDto.getEmpty_site());
String interactionJson = taskDto.getInteraction_json();
if (StrUtil.isNotEmpty(interactionJson)){
JSONObject jsonObject = JSONObject.parseObject(interactionJson);
String to_Task1_Axis_Type = jsonObject.getString("to_Task1_Axis_Type");
if (StrUtil.isNotEmpty(to_Task1_Axis_Type)){
map.put("to_Task1_Axis_Type",to_Task1_Axis_Type);
}
String to_Task2_Axis_Type = jsonObject.getString("to_Task2_Axis_Type");
if (StrUtil.isNotEmpty(to_Task2_Axis_Type)){
map.put("to_Task2_Axis_Type",to_Task2_Axis_Type);
}
}
if (StrUtil.isNotEmpty(start_device_code2)) {
Device startDevice2 = deviceAppservice.findDeviceByCode(start_device_code2);
Device nextDevice2 = deviceAppservice.findDeviceByCode(next_device_code2);
@@ -593,10 +608,23 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
map.put("to_onset2", start_addr2);
map.put("to_target2", next_addr2);
}
String interactionJson = taskDto.getInteraction_json();
if (StrUtil.isNotEmpty(interactionJson)){
JSONObject jsonObject = JSONObject.parseObject(interactionJson);
String to_Task1_Axis_Type = jsonObject.getString("to_Task1_Axis_Type");
if (StrUtil.isNotEmpty(to_Task1_Axis_Type)){
map.put("to_Task1_Axis_Type",to_Task1_Axis_Type);
}
String to_Task2_Axis_Type = jsonObject.getString("to_Task2_Axis_Type");
if (StrUtil.isNotEmpty(to_Task2_Axis_Type)){
map.put("to_Task2_Axis_Type",to_Task2_Axis_Type);
}
}
try {
instructionService.create(instdto);
} catch (Exception e) {
logServer.deviceExecuteLog(device_code, "", instdto.getInstruction_code(), "->" + e.getMessage());
return false;
}
//创建指令后修改任务状态
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());

View File

@@ -154,7 +154,34 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Override
public ApplyLabelingAndBindingResponse applyLabelingAndBindingRequest(ApplyLabelingAndBindingRequest param) {
return null;
try {
MDC.put(log_file_type, log_type);
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = new ApplyLabelingAndBindingResponse();
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("applyLabelingAndBinding");
String methods_url = addressDto.getMethods_url();
String url = wmsUrl + methods_url;
log.info("ApplyLabelingAndBindingRequest----请求参数{}", param);
try {
// String result = "";
String result = HttpRequest.post(url)
.body(JSON.toJSONString(param))
.execute().body();
JSONObject jsonObject = JSONObject.parseObject(result);
log.info("ApplyLabelingAndBindingResponse----返回参数{}", result);
applyLabelingAndBindingResponse = JSONObject.toJavaObject(jsonObject, ApplyLabelingAndBindingResponse.class);
} catch (Exception e) {
JSONObject map = new JSONObject();
map.put("status", 400);
map.put("message", e.getMessage());
return JSONObject.toJavaObject(map, ApplyLabelingAndBindingResponse.class);
}
}
return applyLabelingAndBindingResponse;
} finally {
MDC.remove(log_file_type);
}
}
@Override

View File

@@ -1075,11 +1075,14 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
removeByCodeFromCache(dto.getInstruction_code());
String instnextdevice = dto.getNext_device_code();
String insttaskid = dto.getTask_id();
// String insttaskid = dto.getTask_id();
//
// Task task = new LambdaQueryChainWrapper<>(taskMapper)
// .eq(Task::getTask_id, insttaskid)
// .one();
TaskDto task = taskService.findByCodeFromCache(dto.getTask_code());
Task task = new LambdaQueryChainWrapper<>(taskMapper)
.eq(Task::getTask_id, insttaskid)
.one();
// =0 则不用再次请求
if (StrUtil.equals(task.getRequest_again(), "0")) {
if (StrUtil.equals(task.getTask_type(), "8")) {
@@ -1133,10 +1136,11 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
@Transactional(rollbackFor = Exception.class)
public void finishAndCreateNextInst(Instruction dto) {
dto = foramte(dto);
String device_code = dto.getNext_device_code();
Task acsTask = new LambdaQueryChainWrapper<>(taskMapper)
.eq(Task::getTask_id, dto.getTask_id())
.one();
// String device_code = dto.getNext_device_code();
// Task acsTask = new LambdaQueryChainWrapper<>(taskMapper)
// .eq(Task::getTask_id, dto.getTask_id())
// .one();
TaskDto acsTask = taskService.findByCodeFromCache(dto.getTask_code());
RouteLineService routeLineService = SpringContextHolder.getBean(RouteLineServiceImpl.class);
List<RouteLineDto> list =
@@ -1191,7 +1195,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
instdto.setRoute_plan_code(acsTask.getRoute_plan_code());
instdto.setRemark(acsTask.getRemark());
instdto.setMaterial(acsTask.getMaterial());
instdto.setQuantity(acsTask.getQuantity().toPlainString());
instdto.setQuantity(acsTask.getQuantity());
instdto.setTask_id(acsTask.getTask_id());
instdto.setTask_code(acsTask.getTask_code());
instdto.setVehicle_code(acsTask.getVehicle_code());

View File

@@ -54,6 +54,8 @@ public interface StorageCellService extends CommonService<StorageCell> {
*/
StorageCellDto findById(String id);
StorageCellDto findByCode(String code);
/**
* 新增数据
*

View File

@@ -178,6 +178,17 @@ public class StorageCellServiceImpl extends CommonServiceImpl<StorageCellMapper,
return null;
}
@Override
public StorageCellDto findByCode(String code) {
StorageCell storageCell = this.getOne(new LambdaQueryWrapper<StorageCell>().eq(StorageCell::getStorage_code, code));
if (ObjectUtil.isNotEmpty(storageCell)) {
final StorageCellDto obj = ConvertUtil.convert(storageCell, StorageCellDto.class);
return obj;
}
return null;
}
// @Override
// public StorageCellDto findByCode(String code) {
// WQLObject wo = WQLObject.getWQLObject("acs_storage_cell");
@@ -190,7 +201,6 @@ public class StorageCellServiceImpl extends CommonServiceImpl<StorageCellMapper,
// }
@Override
@Transactional(rollbackFor = Exception.class)
public void create(StorageCellDto dto) {

View File

@@ -67,12 +67,12 @@ spring:
rejectedHandlerType: CallerRunsPolicy # 拒绝策略查看RejectedTypeEnum枚举类默认AbortPolicy
keepAliveTime: 30 # 空闲线程等待超时时间默认60
threadNamePrefix: core_thread # 线程名前缀默认dtp
tryInterrupt: true
tryInterrupt: false
allowCoreThreadTimeOut: true # 是否允许核心线程池超时默认false
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计优雅关闭线程池默认true
awaitTerminationSeconds: 5 # 优雅关闭线程池时阻塞等待线程池中任务执行时间默认3单位s
preStartAllCoreThreads: false # 是否预热所有核心线程默认false
runTimeout: 2000 # 任务执行超时阈值单位ms默认0不统计
runTimeout: 8000 # 任务执行超时阈值单位ms默认0不统计
queueTimeout: 1000 # 任务在队列等待超时阈值单位ms默认0不统计
- threadPoolName: scheduled_pool # 线程池名称,必填
threadPoolAliasName: scheduled_thread # 线程池别名,可选
@@ -84,12 +84,12 @@ spring:
rejectedHandlerType: CallerRunsPolicy # 拒绝策略查看RejectedTypeEnum枚举类默认AbortPolicy
keepAliveTime: 30 # 空闲线程等待超时时间默认60
threadNamePrefix: scheduled_thread # 线程名前缀默认dtp
tryInterrupt: true
tryInterrupt: false
allowCoreThreadTimeOut: true # 是否允许核心线程池超时默认false
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计优雅关闭线程池默认true
awaitTerminationSeconds: 5 # 优雅关闭线程池时阻塞等待线程池中任务执行时间默认3单位s
preStartAllCoreThreads: false # 是否预热所有核心线程默认false
runTimeout: 2000 # 任务执行超时阈值单位ms默认0不统计
runTimeout: 8000 # 任务执行超时阈值单位ms默认0不统计
queueTimeout: 1000 # 任务在队列等待超时阈值单位ms默认0不统计
task:
pool:

View File

@@ -169,6 +169,7 @@ export default {
})
},
updateAgvData(agvDataList) {
this.agvList = agvDataList
// 更新AGV数据
agvDataList.forEach(data => {
const agvIndex = this.agvList.findIndex(agv => agv.vehicle_code === data.vehicle_code)