fix: 出库大批量测试、入库测试

This commit is contained in:
2024-06-03 18:35:07 +08:00
parent 12b38767a5
commit 32f2a07c91
14 changed files with 198 additions and 94 deletions

View File

@@ -25,6 +25,7 @@ import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.one_conveyor.fold_disc_site.FoldDiscSiteDeviceDriver; import org.nl.acs.device_driver.one_conveyor.fold_disc_site.FoldDiscSiteDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO; import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.AcsToLmsApplyTaskTypeEnum; import org.nl.acs.enums.AcsToLmsApplyTaskTypeEnum;
import org.nl.acs.enums.StorageTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService; import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.history.ErrorUtil; import org.nl.acs.history.ErrorUtil;
@@ -226,8 +227,6 @@ 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();
@@ -242,7 +241,6 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
to_target = this.itemProtocol.getTotarget(); to_target = this.itemProtocol.getTotarget();
to_task = this.itemProtocol.getTo_task(); to_task = this.itemProtocol.getTo_task();
to_container_no = this.itemProtocol.getContainer_direction(); to_container_no = this.itemProtocol.getContainer_direction();
material_barcode = this.itemProtocol.getMaterialBarcode();
if (mode != last_mode) { if (mode != last_mode) {
@@ -266,6 +264,16 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
} }
//申请空托盘出库
if (mode == 8 && !requireSucess) {
if (container_type==0){
message = "universal_notCreateInstMessage7";
}
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType(), mode);
}
if (mode == 0) { if (mode == 0) {
this.setIsonline(false); this.setIsonline(false);
message = "universal_off-line"; message = "universal_off-line";
@@ -319,13 +327,8 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
//request_for_shipment(String.valueOf(mode), item_out_seq_arr, item_out_qty_arr); //request_for_shipment(String.valueOf(mode), item_out_seq_arr, item_out_qty_arr);
} }
break; break;
case 19:
//申请AGV任务
if (move == 1 && !requireSucess) {
applyAgvTask();
}
break;
default: default:
@@ -346,7 +349,6 @@ 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() {
@@ -389,86 +391,58 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
private void applyEmptyTask(String type, int mode) {
public synchronized void applyAgvTask() {
Date date = new Date(); Date date = new Date();
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) { if (date.getTime() - this.require_apply_strangulation_time.getTime()
< (long) this.instruction_require_time_out) {
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out); log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
return; return;
} else { } else {
String hand_barcode = null; try {
this.instruction_require_time = date; JSONObject param = new JSONObject();
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) { param.put("device_code", device_code);
//判断是否有手动补码 如果有就申请补码agv任务 param.put("container_type", container_type);
if (StrUtil.isNotEmpty(hand_barcode)) { param.put("type", type);
JSONObject apply = new JSONObject(); LuceneLogDto logDto = LuceneLogDto.builder()
apply.put("device_code", device_code); .device_code(device_code)
apply.put("vehicle_code", hand_barcode); .content("申请空托盘出入库,参数:" + param)
.build();
String str = acsToWmsService.applyTaskToWms(apply); logDto.setLog_level(4);
JSONObject jo = JSON.parseObject(str); luceneExecuteLogService.deviceExecuteLog(logDto);
String response = acsToWmsService.applyTwo(param);
JSONObject jo = JSON.parseObject(response);
if (jo.getInteger("status") == 200) {
LuceneLogDto logDto2 = LuceneLogDto.builder() LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
.content("申请AGV任务,参数,接口返回:" + jo) .content("申请空托盘出入库,参数,接口返回:" + jo)
.build(); .build();
logDto2.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto2); luceneExecuteLogService.deviceExecuteLog(logDto2);
if (ObjectUtil.isEmpty(jo)) { List list1 = new ArrayList();
message = "one_message15"; Map map = new HashMap();
} else { map.put("code", "to_command");
if (jo.getInteger("status") == 200) { map.put("value", mode);
message = "one_message16"; list1.add(map);
List list1 = new ArrayList(); this.writing(list1);
Map map = new HashMap(); this.requireSucess = true;
map.put("code", "to_command");
map.put("value", 19);
list1.add(map);
this.writing(list1);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("申请AGV任务,返回参数:" + jo.getString("body"))
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
requireSucess = true;
} else {
message = "one_message17";
}
}
return;
}
JSONObject apply = new JSONObject();
apply.put("device_code", device_code);
apply.put("vehicle_code", material_barcode);
String str = acsToWmsService.applySendOutTwo(apply);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数");
JSONObject jo = JSON.parseObject(str);
if (ObjectUtil.isEmpty(jo)) {
message = "one_message15";
// requireSucess = true;
} else { } else {
if (jo.getInteger("status") == 200) { LuceneLogDto logDto2 = LuceneLogDto.builder()
message = "one_message16"; .device_code(device_code)
List list = new ArrayList(); .content("申请空托盘出入库,返回参数:" + jo.getString("body"))
Map map = new HashMap(); .build();
map.put("code", "to_command"); logDto2.setLog_level(4);
map.put("value", 19); luceneExecuteLogService.deviceExecuteLog(logDto2);
list.add(map);
this.writing(list);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,返回参数:" + jo);
requireSucess = true;
} else {
message = "one_message17";
}
} }
} catch (Exception e) {
e.printStackTrace();
} }
} }
} }
/** /**
* 申请任务 * 申请任务
*/ */

View File

@@ -63,10 +63,7 @@ public class ItemProtocol {
*/ */
public static String item_to_target = "to_target"; public static String item_to_target = "to_target";
/**
* 子卷条码
*/
public static String item_material_barcode = "material_barcode";
@@ -79,9 +76,6 @@ public class ItemProtocol {
this.driver = driver; this.driver = driver;
} }
public String getMaterialBarcode() {
return this.getOpcStringValue(item_material_barcode);
}
public int getHeartbeat() { public int getHeartbeat() {
return this.getOpcIntegerValue(item_heartbeat); return this.getOpcIntegerValue(item_heartbeat);
@@ -182,7 +176,6 @@ public class ItemProtocol {
list.add(new ItemDto(item_action, "动作类型", "DB101.B6")); list.add(new ItemDto(item_action, "动作类型", "DB101.B6"));
list.add(new ItemDto(item_error, "报警", "DB101.B58")); list.add(new ItemDto(item_error, "报警", "DB101.B58"));
list.add(new ItemDto(item_task, "任务号", "DB101.D68")); list.add(new ItemDto(item_task, "任务号", "DB101.D68"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));
return list; return list;
} }

View File

@@ -4,11 +4,13 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.nl.acs.AcsConfig;
import org.nl.acs.agv.server.NDCAgvService; import org.nl.acs.agv.server.NDCAgvService;
import org.nl.acs.common.base.CommonFinalParam; import org.nl.acs.common.base.CommonFinalParam;
import org.nl.acs.device.domain.Device; import org.nl.acs.device.domain.Device;
@@ -38,6 +40,7 @@ import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService; 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.nl.config.thread.ThreadPoolExecutorUtil; import org.nl.config.thread.ThreadPoolExecutorUtil;
import org.nl.system.service.param.ISysParamService;
import org.openscada.opc.lib.da.Server; import org.openscada.opc.lib.da.Server;
import java.util.*; import java.util.*;
@@ -74,6 +77,9 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class); DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl"); LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
//当前指令 //当前指令
Instruction inst = null; Instruction inst = null;
@@ -170,7 +176,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
device_code = this.getDeviceCode(); device_code = this.getDeviceCode();
mode = this.itemProtocol.getMode(); mode = this.itemProtocol.getMode();
move = this.itemProtocol.getMove(); move = this.itemProtocol.getMove();
carrier_direction = this.itemProtocol.getCarrier_direction(); carrier_direction = this.itemProtocol.getContainer_direction();
error = this.itemProtocol.getError(); error = this.itemProtocol.getError();
task = this.itemProtocol.getTask(); task = this.itemProtocol.getTask();
to_command = this.itemProtocol.getTo_command(); to_command = this.itemProtocol.getTo_command();
@@ -228,6 +234,16 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
case 1: case 1:
log.debug("设备运转模式:等待工作"); log.debug("设备运转模式:等待工作");
break; break;
case 19:
//申请AGV任务
if (move == 1 && !requireSucess) {
if (StrUtil.isEmpty(material_barcode)){
message = "universal_notCreateInstMessage8";
}
applyAgvTask();
}
break;
case 2: case 2:
//申请任务 //申请任务
if (move > 0 && !requireSucess) { if (move > 0 && !requireSucess) {
@@ -305,6 +321,84 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
} }
} }
public synchronized void applyAgvTask() {
Date date = new Date();
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
return;
} else {
String hand_barcode = null;
this.instruction_require_time = date;
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
//判断是否有手动补码 如果有就申请补码agv任务
if (StrUtil.isNotEmpty(hand_barcode)) {
JSONObject apply = new JSONObject();
apply.put("device_code", device_code);
apply.put("vehicle_code", hand_barcode);
String str = acsToWmsService.applyTaskToWms(apply);
JSONObject jo = JSON.parseObject(str);
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请AGV任务,参数,接口返回:" + jo)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto2);
if (ObjectUtil.isEmpty(jo)) {
message = "one_message15";
} else {
if (jo.getInteger("status") == 200) {
message = "one_message16";
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "to_command");
map.put("value", 19);
list1.add(map);
this.writing(list1);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("申请AGV任务,返回参数:" + jo.getString("body"))
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
requireSucess = true;
} else {
message = "one_message17";
}
}
return;
}
JSONObject apply = new JSONObject();
apply.put("device_code", device_code);
apply.put("vehicle_code", material_barcode);
String str = acsToWmsService.applySendOutTwo(apply);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数");
JSONObject jo = JSON.parseObject(str);
if (ObjectUtil.isEmpty(jo)) {
message = "one_message15";
// requireSucess = true;
} else {
if (jo.getInteger("status") == 200) {
message = "one_message16";
List list = new ArrayList();
Map map = new HashMap();
map.put("code", "to_command");
map.put("value", 19);
list.add(map);
this.writing(list);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,返回参数:" + jo);
requireSucess = true;
} else {
message = "one_message17";
}
}
}
}
}
public boolean exe_business() { public boolean exe_business() {
return true; return true;

View File

@@ -27,7 +27,7 @@ public class ItemProtocol {
/** /**
* 托盘方向 * 托盘方向
*/ */
public static String item_carrier_direction = "carrier_direction"; public static String item_container_direction = "container_direction";
/** /**
* 载具类型 * 载具类型
@@ -95,8 +95,8 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_move); return this.getOpcIntegerValue(item_move);
} }
public int getCarrier_direction() { public int getContainer_direction() {
return this.getOpcIntegerValue(item_carrier_direction); return this.getOpcIntegerValue(item_container_direction);
} }
public int getError() { public int getError() {
@@ -161,7 +161,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0")); list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
list.add(new ItemDto(item_mode, "工作模式", "DB600.B2")); list.add(new ItemDto(item_mode, "工作模式", "DB600.B2"));
list.add(new ItemDto(item_move, "光电信号", "DB600.B3")); list.add(new ItemDto(item_move, "光电信号", "DB600.B3"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB600.B4")); list.add(new ItemDto(item_container_direction, "托盘方向", "DB600.B4"));
list.add(new ItemDto(item_action, "动作信号", "DB600.B5")); list.add(new ItemDto(item_action, "动作信号", "DB600.B5"));
list.add(new ItemDto(item_error, "报警信号", "DB600.B6")); list.add(new ItemDto(item_error, "报警信号", "DB600.B6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B7")); list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B7"));

View File

@@ -249,6 +249,9 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
//申请空托盘入库 //申请空托盘入库
if (mode == 9 && move == 1 && !requireSucess) { if (mode == 9 && move == 1 && !requireSucess) {
if (container_type==0){
message = "universal_notCreateInstMessage7";
}
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode); applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
} }
@@ -256,6 +259,9 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
//申请空托盘出库 //申请空托盘出库
if (mode == 8 && !requireSucess) { if (mode == 8 && !requireSucess) {
if (container_type==0){
message = "universal_notCreateInstMessage7";
}
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType(), mode); applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType(), mode);

View File

@@ -304,12 +304,18 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
List toInstructions; List toInstructions;
//木箱入库申请入库任务 //木箱入库申请入库任务
if (mode == 6 && !requireSucess){ if (mode == 6 && !requireSucess){
if (StrUtil.isEmpty(barcode)){
message = "universal_notCreateInstMessage8";
}
applyIn(StorageTypeEnum.BOX_IN.getType(),mode); applyIn(StorageTypeEnum.BOX_IN.getType(),mode);
} }
//子卷入库申请入库任务 //子卷入库申请入库任务
if (mode == 7 && !requireSucess){ if (mode == 7 && !requireSucess){
if (StrUtil.isEmpty(barcode)||StrUtil.isEmpty(material_barcode)){
message = "universal_notCreateInstMessage8";
}
applyIn(StorageTypeEnum.STORAGE.getType(),mode); applyIn(StorageTypeEnum.STORAGE.getType(),mode);
} }
@@ -317,16 +323,25 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
//申请空托盘入库 //申请空托盘入库
if (mode == 9 && move == 1 && !requireSucess){ if (mode == 9 && move == 1 && !requireSucess){
if (container_type==0){
message = "universal_notCreateInstMessage7";
}
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode); applyEmptyTask(StorageTypeEnum.DISKS_IN.getType(), mode);
} }
//申请退货入库 //申请退货入库
if (mode == 18 && move == 1 && !requireSucess){ if (mode == 18 && move == 1 && !requireSucess){
if (StrUtil.isEmpty(barcode)){
message = "universal_notCreateInstMessage8";
}
applyBoxReturnTask(StorageTypeEnum.BOX_RETURN.getType(), mode); applyBoxReturnTask(StorageTypeEnum.BOX_RETURN.getType(), mode);
} }
if (mode == 23 && !requireSucess){ if (mode == 23 && !requireSucess){
if (StrUtil.isEmpty(barcode)||StrUtil.isEmpty(material_barcode)){
message = "universal_notCreateInstMessage8";
}
applyErrorHeight(); applyErrorHeight();
} }

View File

@@ -302,7 +302,6 @@ 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();
@@ -544,7 +543,6 @@ 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());
} }
@@ -921,7 +919,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
//指令未执行 //指令未执行
if (StrUtil.equals(inst.getInstruction_status(), "0")) { if (StrUtil.equals(inst.getInstruction_status(), "0")) {
String start_device_code = inst.getStart_device_code(); String start_device_code = inst.getStart_device_code();
String next_device_code = inst.getNext_device_code();
Device startDevice = deviceAppService.findDeviceByCode(start_device_code); Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
BeltConveyorDeviceDriver beltConveyorDeviceDriver; BeltConveyorDeviceDriver beltConveyorDeviceDriver;
if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) { if (startDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver(); beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) startDevice.getDeviceDriver();
@@ -931,6 +931,14 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
return false; return false;
} }
} }
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
if (beltConveyorDeviceDriver.getMode() != 2 || beltConveyorDeviceDriver.getMove() != 0) {
notCreateInstMessage = "未下发电气信号原因->输送线-货架对接位:" + beltConveyorDeviceDriver.getDevice_code() +
"无货或未联机,无法下发指令!指令号:" + inst.getInstruction_code();
return false;
}
}
List list = new ArrayList(); List list = new ArrayList();
pakageCommand(list, "1", inst.getInstruction_code()); pakageCommand(list, "1", inst.getInstruction_code());
packagePlcCoordinate(startDevice, list); packagePlcCoordinate(startDevice, list);

View File

@@ -109,7 +109,6 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
@Override @Override
public void subRun() throws Exception { public void subRun() throws Exception {
System.out.println("add 线程开始时间"+ LocalDateTime.now() + deviceDriver.getDeviceCode() );
deviceDriver.executeAuto(); deviceDriver.executeAuto();
} }
@@ -123,7 +122,6 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
} }
runnable.setIndex(this.runs); runnable.setIndex(this.runs);
this.executorService.submit(runnable); this.executorService.submit(runnable);
System.out.println("run 线程开始时间"+ LocalDateTime.now() + deviceDriver.getDeviceCode() );
} }
} }

View File

@@ -147,8 +147,8 @@ public class CreateDDJInst {
StandardStackerDeviceDriver standardStackerDeviceDriver; StandardStackerDeviceDriver standardStackerDeviceDriver;
if (deviceByCode.getDeviceDriver() instanceof StandardStackerDeviceDriver) { if (deviceByCode.getDeviceDriver() instanceof StandardStackerDeviceDriver) {
standardStackerDeviceDriver = (StandardStackerDeviceDriver) deviceByCode.getDeviceDriver(); standardStackerDeviceDriver = (StandardStackerDeviceDriver) deviceByCode.getDeviceDriver();
if (standardStackerDeviceDriver.getMode() != 3 || standardStackerDeviceDriver.getForkCargo() == 1 || standardStackerDeviceDriver.getCommand() != 0) { if (standardStackerDeviceDriver.getMode() != 3 || standardStackerDeviceDriver.getForkCargo() == 1 || standardStackerDeviceDriver.getCommand() != 0 || standardStackerDeviceDriver.getError() != 0) {
log.error("堆垛机,{}未联机或者在执行中", deviceByCode.getDevice_code()); log.error("堆垛机,{}未联机或者在执行中或者有异常", deviceByCode.getDevice_code());
((StandardStackerDeviceDriver) deviceByCode.getDeviceDriver()).setNotCreateInstMessage("堆垛机,{}未联机或者在执行中"); ((StandardStackerDeviceDriver) deviceByCode.getDeviceDriver()).setNotCreateInstMessage("堆垛机,{}未联机或者在执行中");
return; return;
} }
@@ -208,6 +208,7 @@ public class CreateDDJInst {
return; return;
} }
} }
//单台堆垛机最多只能创建固定数量指令 //单台堆垛机最多只能创建固定数量指令
Instruction instruction = new Instruction(); Instruction instruction = new Instruction();
instruction.setInstruction_status(CommonFinalParam.ONE); instruction.setInstruction_status(CommonFinalParam.ONE);

View File

@@ -53,6 +53,8 @@ universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8
universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4!
universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4! universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4!
universal_notCreateInstMessage6=\u4E0B\u4E00\u4E2A\u8BBE\u5907\u4E0D\u662F\u8F93\u9001\u7EBF\u6307\u4EE4! universal_notCreateInstMessage6=\u4E0B\u4E00\u4E2A\u8BBE\u5907\u4E0D\u662F\u8F93\u9001\u7EBF\u6307\u4EE4!
universal_notCreateInstMessage7=\u6258\u76D8\u7C7B\u578B\u4E3A\u7A7A!
universal_notCreateInstMessage8=\u6761\u7801\u4E3A\u7A7A!
universal_actionMessage1=\u4E0D\u5141\u8BB8\u53D6\u653E universal_actionMessage1=\u4E0D\u5141\u8BB8\u53D6\u653E
universal_actionMessage2=\u5141\u8BB8\u53D6\u653E universal_actionMessage2=\u5141\u8BB8\u53D6\u653E
universal_actionMessage3=\u5141\u8BB8\u79BB\u5F00 universal_actionMessage3=\u5141\u8BB8\u79BB\u5F00

View File

@@ -57,3 +57,7 @@ universal_actionMessage2=Pick-and-place is allowed
universal_actionMessage3=Permission to leave universal_actionMessage3=Permission to leave
universal_actionMessage4=The request action has been reset universal_actionMessage4=The request action has been reset
universal_actionMessage5=The request action is not reset universal_actionMessage5=The request action is not reset
universal_notCreateInstMessage7=ray type is empty!
universal_notCreateInstMessage8=The barcode is blank\uFF01

View File

@@ -57,3 +57,5 @@ universal_actionMessage2=Pick-and-place diperbolehkan
universal_actionMessage3=Izin untuk pergi universal_actionMessage3=Izin untuk pergi
universal_actionMessage4=Tindakan permintaan telah disetel ulang universal_actionMessage4=Tindakan permintaan telah disetel ulang
universal_actionMessage5=Tindakan permintaan tidak disetel ulang universal_actionMessage5=Tindakan permintaan tidak disetel ulang
universal_notCreateInstMessage7=ponypianmereka yang kosong!
universal_notCreateInstMessage8=Kode batang kosong!

View File

@@ -57,4 +57,8 @@ universal_notCreateInstMessage3=\u8BBE\u5907\u5F85\u673A\u6216\u4E0D\u5141\u8BB8
universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4! universal_notCreateInstMessage4=ddj\u5BF9\u63A5\u4F4D\u6709\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4!
universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4! universal_notCreateInstMessage5=\u5B58\u5728\u76F8\u540C\u8DEF\u7EBF\u7684\u6307\u4EE4!
universal_notCreateInstMessage6=\u4E0B\u4E00\u4E2A\u8BBE\u5907\u4E0D\u662F\u8F93\u9001\u7EBF\u6307\u4EE4! universal_notCreateInstMessage6=\u4E0B\u4E00\u4E2A\u8BBE\u5907\u4E0D\u662F\u8F93\u9001\u7EBF\u6307\u4EE4!
universal_notCreateInstMessage7=\u6258\u76D8\u7C7B\u578B\u4E3A\u7A7A!
universal_notCreateInstMessage8=\u6761\u7801\u4E3A\u7A7A!

View File

@@ -68,6 +68,7 @@ https://juejin.cn/post/6844903775631572999
<springProfile name="dev"> <springProfile name="dev">
<root level="debug"> <root level="debug">
<appender-ref ref="asyncLuceneAppender"/> <appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="asyncFileAppender"/>
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
</root> </root>
<logger name="jdbc" level="ERROR" additivity="true"> <logger name="jdbc" level="ERROR" additivity="true">
@@ -115,9 +116,11 @@ https://juejin.cn/post/6844903775631572999
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>
</root> </root>
<logger name="jdbc" level="ERROR" additivity="true"> <logger name="jdbc" level="ERROR" additivity="true">
<appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>
</logger> </logger>
<logger name="org.springframework" level="ERROR" additivity="true"> <logger name="org.springframework" level="ERROR" additivity="true">
<appender-ref ref="asyncLuceneAppender"/>
<appender-ref ref="asyncFileAppender"/> <appender-ref ref="asyncFileAppender"/>
</logger> </logger>
<logger name="org.hibernate" level="ERROR" additivity="true"> <logger name="org.hibernate" level="ERROR" additivity="true">