fix: 二期bug解决
This commit is contained in:
@@ -93,6 +93,8 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
private Date instruction_apply_time = new Date();
|
private Date instruction_apply_time = new Date();
|
||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 3000;
|
||||||
|
|
||||||
|
String notCreateInstMessage = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 心跳
|
* 心跳
|
||||||
*/
|
*/
|
||||||
@@ -276,6 +278,26 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
//申请任务
|
//申请任务
|
||||||
if (move == 1 && !requireSucess) {
|
if (move == 1 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
|
} else {
|
||||||
|
String remark = "";
|
||||||
|
;
|
||||||
|
if (mode != 2) {
|
||||||
|
remark = "universal_remark2";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = "universal_remark5";
|
||||||
|
}
|
||||||
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@@ -291,6 +313,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
//申请AGV任务
|
//申请AGV任务
|
||||||
if (move == 1 && !requireSucess) {
|
if (move == 1 && !requireSucess) {
|
||||||
applyAgvTask();
|
applyAgvTask();
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "mode");
|
||||||
|
map.put("value", 5);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -521,6 +549,89 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//入库异常口为起点的任务
|
||||||
|
TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code);
|
||||||
|
if (ObjectUtil.isNotNull(taskdto)) {
|
||||||
|
//判断指令的起点和当前的设备号相同
|
||||||
|
if (!taskdto.getStart_device_code().equals(device_code)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断当前任务号是否存在指令
|
||||||
|
String taskid = taskdto.getTask_id();
|
||||||
|
String taskcode = taskdto.getTask_code();
|
||||||
|
String priority = taskdto.getPriority();
|
||||||
|
String start_point_code = taskdto.getStart_point_code();
|
||||||
|
String start_device_code = taskdto.getStart_device_code();
|
||||||
|
String route_plan_code = taskdto.getRoute_plan_code();
|
||||||
|
String next_device_code = "";
|
||||||
|
String containerType = "";
|
||||||
|
String interactionJson = taskdto.getInteraction_json();
|
||||||
|
if (StrUtil.isNotEmpty(interactionJson)) {
|
||||||
|
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||||
|
containerType = interactionJsonDTO.getContainerType();
|
||||||
|
}
|
||||||
|
|
||||||
|
String this_coevice_code = taskserver.queryAssignedByDevice(device_code, taskdto.getNext_device_code());
|
||||||
|
if (StrUtil.isEmpty(this_coevice_code)) {
|
||||||
|
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(start_device_code, taskdto.getNext_device_code(), route_plan_code);
|
||||||
|
RouteLineDto routeLineDto = shortPathsList.get(0);
|
||||||
|
|
||||||
|
String path = routeLineDto.getPath();
|
||||||
|
String type = routeLineDto.getType();
|
||||||
|
String[] str = path.split("->");
|
||||||
|
|
||||||
|
List<String> pathlist = Arrays.asList(str);
|
||||||
|
int index = 0;
|
||||||
|
for (int m = 0; m < pathlist.size(); m++) {
|
||||||
|
if (pathlist.get(m).equals(start_device_code)) {
|
||||||
|
index = m + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
next_device_code = pathlist.get(index);
|
||||||
|
} else {
|
||||||
|
next_device_code = this_coevice_code;
|
||||||
|
}
|
||||||
|
//校验路由关系
|
||||||
|
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(start_device_code, next_device_code, route_plan_code);
|
||||||
|
if (ObjectUtils.isEmpty(shortPathsList) || shortPathsList.size() < 1) {
|
||||||
|
throw new RuntimeException("路由不通!");
|
||||||
|
}
|
||||||
|
Device startdevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||||
|
Device nextdevice = deviceAppservice.findDeviceByCode(next_device_code);
|
||||||
|
String next_point_code;
|
||||||
|
if (StrUtil.equals(deviceAppservice.findDeviceTypeByCode(next_device_code), "storage")) {
|
||||||
|
next_point_code = taskdto.getTo_x() + "-" + taskdto.getTo_y() + "-" + taskdto.getTo_z();
|
||||||
|
} else {
|
||||||
|
next_point_code = next_device_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断ddj对接位是否有光电信号
|
||||||
|
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
||||||
|
if (nextdevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
||||||
|
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
|
if (beltConveyorDeviceDriver.getMode() != 2 || beltConveyorDeviceDriver.getMove() == 1) {
|
||||||
|
log.error("输送机,{}未联机或执行中", next_device_code);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Instruction instdto = new Instruction();
|
||||||
|
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority, containerType);
|
||||||
|
log.error("=================================,{}", instdto.getCreate_by());
|
||||||
|
try {
|
||||||
|
instructionService.create(instdto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error("指令创建失败!,{}", e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return updateTask(taskdto, nextdevice, instdto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -678,9 +789,9 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
move = "有货";
|
move = "有货";
|
||||||
}
|
}
|
||||||
String container_type = "";
|
String container_type = "";
|
||||||
if(this.container_type == 1){
|
if (this.container_type == 1) {
|
||||||
container_type = "小托盘";
|
container_type = "小托盘";
|
||||||
}else if (this.container_type == 2){
|
} else if (this.container_type == 2) {
|
||||||
container_type = "大托盘";
|
container_type = "大托盘";
|
||||||
}
|
}
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
@@ -690,6 +801,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
jo.put("isOnline", this.getIsonline());
|
jo.put("isOnline", this.getIsonline());
|
||||||
jo.put("requireSucess", requireSucess);
|
jo.put("requireSucess", requireSucess);
|
||||||
jo.put("hand_barcode", hand_barcode);
|
jo.put("hand_barcode", hand_barcode);
|
||||||
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
boolean requireEmptyInSuccess = false;
|
boolean requireEmptyInSuccess = false;
|
||||||
boolean requiresShipDeviceUpdate = true;
|
boolean requiresShipDeviceUpdate = true;
|
||||||
private int instruction_finished_time_out;
|
private int instruction_finished_time_out;
|
||||||
|
String notCreateInstMessage = "";
|
||||||
|
|
||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
String inst_message;
|
String inst_message;
|
||||||
@@ -231,6 +232,26 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//申请任务
|
//申请任务
|
||||||
if (move > 0 && task == 0 && !requireSucess) {
|
if (move > 0 && task == 0 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
|
}else {
|
||||||
|
String remark = "";
|
||||||
|
;
|
||||||
|
if (mode != 2) {
|
||||||
|
remark = "universal_remark2";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = "universal_remark5";
|
||||||
|
}
|
||||||
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@@ -620,6 +641,7 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("requireSucess", requireSucess);
|
jo.put("requireSucess", requireSucess);
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
private String error_type = "ssx_error_type";
|
private String error_type = "ssx_error_type";
|
||||||
|
|
||||||
|
String notCreateInstMessage = "";
|
||||||
|
|
||||||
//工作模式
|
//工作模式
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
@@ -219,6 +221,26 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//申请任务
|
//申请任务
|
||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
|
}else {
|
||||||
|
String remark = "";
|
||||||
|
;
|
||||||
|
if (mode != 2) {
|
||||||
|
remark = "universal_remark2";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = "universal_remark5";
|
||||||
|
}
|
||||||
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -319,6 +341,7 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("requireSucess", requireSucess);
|
jo.put("requireSucess", requireSucess);
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
|
|
||||||
private String error_type = "ssx_error_type";
|
private String error_type = "ssx_error_type";
|
||||||
|
|
||||||
|
String notCreateInstMessage = "";
|
||||||
|
|
||||||
//工作模式
|
//工作模式
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
@@ -236,6 +238,26 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
//申请任务
|
//申请任务
|
||||||
if (move > 0 && !requireSucess) {
|
if (move > 0 && !requireSucess) {
|
||||||
instruction_require();
|
instruction_require();
|
||||||
|
}else {
|
||||||
|
String remark = "";
|
||||||
|
;
|
||||||
|
if (mode != 2) {
|
||||||
|
remark = "universal_remark2";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = "universal_remark5";
|
||||||
|
}
|
||||||
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@@ -598,6 +620,7 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
|||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("requireSucess", requireSucess);
|
jo.put("requireSucess", requireSucess);
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,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.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拆叠盘机
|
* 拆叠盘机
|
||||||
@@ -220,12 +219,25 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
//申请空托盘入库
|
//申请空托盘入库
|
||||||
if (mode == 9 && move == 1 && !requireSucess){
|
if (mode == 9 && move == 1 && !requireSucess){
|
||||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType());
|
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType());
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "mode");
|
||||||
|
map.put("value", 9);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//申请空托盘出库
|
//申请空托盘出库
|
||||||
if (mode == 8 && move == 1 && !requireSucess){
|
if (mode == 8 && move == 1 && !requireSucess){
|
||||||
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType());
|
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType());
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "mode");
|
||||||
|
map.put("value", 8);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -276,6 +288,37 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
last_carrier_direction = carrier_direction;
|
last_carrier_direction = carrier_direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writing(List list) {
|
||||||
|
|
||||||
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
Object ob = list.get(i);
|
||||||
|
JSONObject json = (JSONObject) JSONObject.toJSON(ob);
|
||||||
|
if (!StrUtil.isEmpty(json.getString("value"))) {
|
||||||
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + json.getString("code");
|
||||||
|
itemMap.put(to_param, json.getString("value"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发多个电气信号" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void applyEmptyTask(String type) {
|
private void applyEmptyTask(String type) {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.require_apply_strangulation_time.getTime()
|
if (date.getTime() - this.require_apply_strangulation_time.getTime()
|
||||||
|
|||||||
@@ -285,11 +285,23 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
//木箱入库申请入库任务
|
//木箱入库申请入库任务
|
||||||
if (mode == 6 && !requireSucess){
|
if (mode == 6 && !requireSucess){
|
||||||
applyIn(StorageTypeEnum.BOX_IN.getType());
|
applyIn(StorageTypeEnum.BOX_IN.getType());
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "mode");
|
||||||
|
map.put("value", 6);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//子卷入库申请入库任务
|
//子卷入库申请入库任务
|
||||||
if (mode == 7 && !requireSucess){
|
if (mode == 7 && !requireSucess){
|
||||||
applyIn(StorageTypeEnum.STORAGE.getType());
|
applyIn(StorageTypeEnum.STORAGE.getType());
|
||||||
|
List list1 = new ArrayList();
|
||||||
|
Map map = new HashMap();
|
||||||
|
map.put("code", "mode");
|
||||||
|
map.put("value", 7);
|
||||||
|
list1.add(map);
|
||||||
|
this.writing(list1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请入库指令、异常位指令
|
//申请入库指令、异常位指令
|
||||||
@@ -301,29 +313,25 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mode == 2) {
|
String remark = "";
|
||||||
//if (!requireSucess) {
|
;
|
||||||
String remark = "";;
|
if (mode != 2) {
|
||||||
if (mode != 2) {
|
remark = "universal_remark2";
|
||||||
remark = "universal_remark2";
|
|
||||||
}
|
|
||||||
if (move != 1) {
|
|
||||||
remark = "universal_remark3";
|
|
||||||
}
|
|
||||||
if (task != 0) {
|
|
||||||
remark = remark + LangProcess.msg("universal_remark4");
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
|
||||||
this.inst = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (requireSucess) {
|
|
||||||
remark = remark + LangProcess.msg("universal_remark5");
|
|
||||||
|
|
||||||
}
|
|
||||||
this.setNotCreateTaskMessage(remark);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (requireSucess) {
|
||||||
|
remark = "universal_remark5";
|
||||||
|
}
|
||||||
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,24 +223,26 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
notCreateTaskMessage = "";
|
notCreateTaskMessage = "";
|
||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}
|
}
|
||||||
} else {
|
}else {
|
||||||
String remark = "";;
|
String remark = "";
|
||||||
if (mode != 2) {
|
;
|
||||||
remark = "universal_remark2";
|
if (mode != 2) {
|
||||||
|
remark = "universal_remark2";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
remark = "universal_remark3";
|
||||||
|
}
|
||||||
|
if (task != 0) {
|
||||||
|
remark = "universal_remark4";
|
||||||
|
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||||
|
this.inst = null;
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
}
|
||||||
remark = "universal_remark3";
|
if (requireSucess) {
|
||||||
}
|
remark = "universal_remark5";
|
||||||
if (task != 0) {
|
}
|
||||||
remark = "universal_remark4";
|
this.setNotCreateInstMessage(remark);
|
||||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
//}
|
||||||
this.inst = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (requireSucess) {
|
|
||||||
remark = "universal_remark5";
|
|
||||||
}
|
|
||||||
this.setNotCreateTaskMessage(remark);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -432,7 +434,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
.device_code(device_code)
|
.device_code(device_code)
|
||||||
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
.content(device_code+"创建指令时出现异常:" + e.getMessage())
|
||||||
.build();
|
.build();
|
||||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
|
|||||||
@@ -191,7 +191,8 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String remark = "";;
|
String remark = "";
|
||||||
|
;
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = "universal_remark2";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
@@ -207,7 +208,8 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = "universal_remark5";
|
remark = "universal_remark5";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String remark = "";;
|
String remark = "";
|
||||||
|
;
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = "universal_remark2";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
@@ -221,7 +222,8 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = "universal_remark5";
|
remark = "universal_remark5";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,12 +199,13 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
feedMessage = "";
|
feedMessage = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String remark = "";;
|
String remark = "";
|
||||||
|
;
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = remark + "工作模式(mode)不是待机状态,";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
if (move != 0) {
|
if (move != 0) {
|
||||||
remark = remark + "光电信号(move)为有货状态,";
|
remark = "universal_remark3";
|
||||||
}
|
}
|
||||||
if (task != 0) {
|
if (task != 0) {
|
||||||
remark = "universal_remark4";
|
remark = "universal_remark4";
|
||||||
@@ -215,7 +216,8 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
|||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = "universal_remark5";
|
remark = "universal_remark5";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String remark = "";
|
String remark = "";
|
||||||
|
;
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = "universal_remark2";
|
remark = "universal_remark2";
|
||||||
}
|
}
|
||||||
@@ -236,7 +237,8 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
|
|||||||
if (requireSucess) {
|
if (requireSucess) {
|
||||||
remark = "universal_remark5";
|
remark = "universal_remark5";
|
||||||
}
|
}
|
||||||
this.setNotCreateTaskMessage(remark);
|
this.setNotCreateInstMessage(remark);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
storage_cache = this.itemProtocol.getItem_storage_cache();
|
storage_cache = this.itemProtocol.getItem_storage_cache();
|
||||||
|
|
||||||
if (!command.equals(last_command)){
|
if (!command.equals(last_command)){
|
||||||
requireSucess=false;
|
requireSucess=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1186,7 +1186,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
type = 3;
|
type = 3;
|
||||||
}
|
}
|
||||||
cancelTaskRequest.setTaskType(type);
|
cancelTaskRequest.setTaskType(type);
|
||||||
acsToLiKuService.cancelTask(cancelTaskRequest);
|
// acsToLiKuService.cancelTask(cancelTaskRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
String currentUsername = SecurityUtils.getCurrentNickName();
|
String currentUsername = SecurityUtils.getCurrentNickName();
|
||||||
|
|||||||
Reference in New Issue
Block a user