终点寻找起点路由生成指令改造
This commit is contained in:
@@ -1098,6 +1098,11 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
standardInspectSiteDeviceDriver.setBatch(batch);
|
standardInspectSiteDeviceDriver.setBatch(batch);
|
||||||
device.setMaterial_type(material_type);
|
device.setMaterial_type(material_type);
|
||||||
device.setBatch(batch);
|
device.setBatch(batch);
|
||||||
|
if (!StrUtil.isEmpty(hasGoodStatus)) {
|
||||||
|
standardInspectSiteDeviceDriver.setHasGoods(Integer.parseInt(hasGoodStatus));
|
||||||
|
device.setHas_goods(Integer.parseInt(hasGoodStatus));
|
||||||
|
standardInspectSiteDeviceDriver.setMove(Integer.parseInt(hasGoodStatus));
|
||||||
|
}
|
||||||
} else if (device.getDeviceDriver() instanceof YkbkSpecialDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof YkbkSpecialDeviceDriver) {
|
||||||
ykbkSpecialDeviceDriver = (YkbkSpecialDeviceDriver) device.getDeviceDriver();
|
ykbkSpecialDeviceDriver = (YkbkSpecialDeviceDriver) device.getDeviceDriver();
|
||||||
ykbkSpecialDeviceDriver.setMaterial(material_type);
|
ykbkSpecialDeviceDriver.setMaterial(material_type);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
|
|||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.instruction.service.dto.Instruction;
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
@@ -141,9 +142,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
devicecode = this.getDeviceCode();
|
devicecode = this.getDeviceCode();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
move = this.itemProtocol.getMove();
|
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
hasGoods = this.itemProtocol.getMove();
|
|
||||||
|
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
this.setEmptyrequireSucess(false);
|
this.setEmptyrequireSucess(false);
|
||||||
@@ -291,38 +290,32 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
this.instruction_require(container);
|
this.instruction_require(container);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//申请
|
//申请
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
if (!inrequireSucess){
|
if (!inrequireSucess) {
|
||||||
if (move == 1){
|
if (move != 0) {
|
||||||
this.execute_log.log("设备:" + devicecode + ",move:" + move);
|
this.execute_log.log("设备:" + devicecode + ",move:" + move);
|
||||||
this.apply_in_require(container);
|
this.apply_in_require(container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//取消
|
//取消
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
this.cancle_require();
|
this.cancle_require();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
if (!emptyrequireSucess){
|
//终点查找起点是否有货,生成任务
|
||||||
//mode = 5 并且工位上无货时申请空托盘
|
if (!inrequireSucess) {
|
||||||
if (move == 0){
|
this.execute_log.log("设备:" + devicecode + ",move:" + move);
|
||||||
this.execute_log.log("设备:" + devicecode + ",move:" + move);
|
this.apply_in_require_endPoint(container);
|
||||||
this.apply_empty_require(container);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (!inrequireSucess){
|
this.cancle_require_endpoint();
|
||||||
if (move == 1){
|
//终点取消任务
|
||||||
this.execute_log.log("设备:" + devicecode + ",move:" + move);
|
|
||||||
this.apply_in_require(container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,16 +436,21 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
public boolean instruction_require(String container_code) {
|
public boolean instruction_require(String container_code) {
|
||||||
return instruction_require(container_code, WcsConfig.task_container_type_default_desc);
|
return instruction_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||||
}
|
}
|
||||||
public synchronized boolean apply_empty_require(String container_code) {
|
|
||||||
|
public synchronized boolean apply_empty_require(String container_code) {
|
||||||
return apply_empty_require(container_code, WcsConfig.task_container_type_default_desc);
|
return apply_empty_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||||
}
|
}
|
||||||
public synchronized boolean apply_in_require(String container_code) {
|
|
||||||
|
public synchronized boolean apply_in_require(String container_code) {
|
||||||
return apply_in_require(container_code, WcsConfig.task_container_type_default_desc);
|
return apply_in_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean apply_in_require_endPoint(String container_code) {
|
||||||
|
return apply_in_require_endPoint(container_code, WcsConfig.task_container_type_default_desc);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求取消指令
|
* 请求取消指令
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public synchronized boolean cancle_require() throws Exception {
|
public synchronized boolean cancle_require() throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
@@ -461,19 +459,19 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
List<TaskDto> taskList = taskserver.queryTaskByDeviceCode(this.devicecode);
|
List<TaskDto> taskList = taskserver.queryTaskByDeviceCode(this.devicecode);
|
||||||
try{
|
try {
|
||||||
if(taskList.size() != 0){
|
if (taskList.size() != 0) {
|
||||||
for(int i=0;i<taskList.size();i++){
|
for (int i = 0; i < taskList.size(); i++) {
|
||||||
TaskDto task = taskList.get(i);
|
TaskDto task = taskList.get(i);
|
||||||
Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code());
|
Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code());
|
||||||
if(ObjectUtil.isNotEmpty(inst)){
|
if (ObjectUtil.isNotEmpty(inst)) {
|
||||||
instructionService.cancel(inst.getInstruction_id());
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
}
|
}
|
||||||
taskserver.cancel(task.getTask_id());
|
taskserver.cancel(task.getTask_id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
writing(4);
|
writing(4);
|
||||||
@@ -481,6 +479,31 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终点请求取消指令
|
||||||
|
*/
|
||||||
|
public synchronized boolean cancle_require_endpoint() throws Exception {
|
||||||
|
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 false;
|
||||||
|
} else {
|
||||||
|
this.instruction_require_time = date;
|
||||||
|
TaskDto task = taskserver.findByNextCode(this.devicecode);
|
||||||
|
try {
|
||||||
|
Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code());
|
||||||
|
if (ObjectUtil.isNotEmpty(inst)) {
|
||||||
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
|
}
|
||||||
|
taskserver.cancel(task.getTask_id());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
writing(6);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求指令
|
* 请求指令
|
||||||
@@ -509,7 +532,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
//获取该路由终点设备信息
|
//获取该路由终点设备信息
|
||||||
Device route_link_device = deviceAppservice.findDeviceByCode(next_device_code);
|
Device route_link_device = deviceAppservice.findDeviceByCode(next_device_code);
|
||||||
//判断终点设备驱动是否为检测站点驱动
|
//判断终点设备驱动是否为检测站点驱动
|
||||||
if (route_link_device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver){
|
if (route_link_device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) route_link_device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) route_link_device.getDeviceDriver();
|
||||||
//判断该终点设备是否有货,有货就结束循环
|
//判断该终点设备是否有货,有货就结束循环
|
||||||
if (standardInspectSiteDeviceDriver.getMove() != 0 || standardInspectSiteDeviceDriver.getMode() != 2) {
|
if (standardInspectSiteDeviceDriver.getMove() != 0 || standardInspectSiteDeviceDriver.getMode() != 2) {
|
||||||
@@ -573,7 +596,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
writing(3);
|
writing(3);
|
||||||
break;
|
break;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.execute_log.log("设备:" + devicecode+ "", "", "创建任务失败");
|
this.execute_log.log("设备:" + devicecode + "", "", "创建任务失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -582,7 +605,113 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
||||||
inrequireSucess = true;
|
inrequireSucess = true;
|
||||||
this.execute_log.log("设备:" + devicecode+ "", "", "对应路由设备,生成任务成功已锁定");
|
this.execute_log.log("设备:" + devicecode + "", "", "对应路由设备,生成任务成功已锁定");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终点请求指令
|
||||||
|
*
|
||||||
|
* @param container_code
|
||||||
|
* @param container_type
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_in_require_endPoint(String container_code, String container_type) {
|
||||||
|
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
|
||||||
|
Date date = new Date();
|
||||||
|
Boolean flag = false;
|
||||||
|
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||||
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.instruction_require_time = date;
|
||||||
|
//查询该设备所有路由
|
||||||
|
List<RouteLineDto> pathLinesByCode = routelineserver.getPathLinesByCode(this.getDevice().getDevice_code(), "normal");
|
||||||
|
StandardOrdinarySiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||||
|
for (int i = 0; i < pathLinesByCode.size(); i++) {
|
||||||
|
RouteLineDto routeLineDto = pathLinesByCode.get(i);
|
||||||
|
//获取该路由的起点设备编码
|
||||||
|
String start_device_code = routeLineDto.getDevice_code();
|
||||||
|
//获取该路由的终点设备编码
|
||||||
|
String next_device_code = routeLineDto.getNext_device_code();
|
||||||
|
//获取该路由终点设备信息
|
||||||
|
Device route_link_device = deviceAppservice.findDeviceByCode(start_device_code);
|
||||||
|
//判断终点设备驱动是否为检测站点驱动
|
||||||
|
if (route_link_device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
|
// standardInspectSiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) route_link_device.getDeviceDriver();
|
||||||
|
// //判断该终点设备是否无货,无货就结束循环
|
||||||
|
// if (standardInspectSiteDeviceDriver.getHasGoods() == 0) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
|
//判断是否已经有该起点设备的任务,如果有就结束循环
|
||||||
|
int num1 = taskserver.querySameOriginTask(start_device_code);
|
||||||
|
if (num1 != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//判断是否有相同终点的任务,有就结束本次循环
|
||||||
|
int num = taskserver.querySameDestinationTask(next_device_code);
|
||||||
|
if (num != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* //判断检测站点是否锁定,如果锁定就结束本次循环
|
||||||
|
JSONObject jsonObject = runpointwo.query("device_code = '" + next_device_code + "' and islock = '1'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) {
|
||||||
|
this.execute_log.log("设备:" + devicecode+ "", "", "对应路由设备," + next_device_code + "已锁定");
|
||||||
|
continue;
|
||||||
|
}*/
|
||||||
|
//创建任务
|
||||||
|
TaskDto dto = new TaskDto();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
dto.setTask_id(IdUtil.simpleUUID());
|
||||||
|
dto.setCreate_by(this.getDevice().getDevice_code());
|
||||||
|
dto.setUpdate_by(this.getDevice().getDevice_code());
|
||||||
|
dto.setVehicle_code(container_code);
|
||||||
|
dto.setVehicle_type(container_type);
|
||||||
|
String taskcode = CodeUtil.getNewCode("TASK_NO");
|
||||||
|
dto.setTask_code("-" + taskcode);
|
||||||
|
dto.setTask_status("0");
|
||||||
|
dto.setPriority("1");
|
||||||
|
dto.setMaterial(this.getDevice().getMaterial_type());
|
||||||
|
dto.setUpdate_time(now);
|
||||||
|
dto.setCreate_time(now);
|
||||||
|
dto.setStart_device_code(start_device_code);
|
||||||
|
dto.setStart_point_code(start_device_code);
|
||||||
|
dto.setNext_device_code(next_device_code);
|
||||||
|
dto.setNext_point_code(next_device_code);
|
||||||
|
try {
|
||||||
|
//判断是否已经有该起点设备的任务,如果有就结束循环
|
||||||
|
int num2 = taskserver.querySameOriginTask(start_device_code);
|
||||||
|
if (num2 != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//判断是否有相同终点的任务,有就结束本次循环
|
||||||
|
int num3 = taskserver.querySameDestinationTask(next_device_code);
|
||||||
|
if (num3 != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
taskserver.create(dto);
|
||||||
|
/* //任务创建成功 锁定终点设备
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("islock", "true");
|
||||||
|
map.put("update_by", "auto");
|
||||||
|
map.put("update_time", DateUtil.now());
|
||||||
|
runpointwo.update(map, "device_code = '" + next_device_code + "'");*/
|
||||||
|
flag = true;
|
||||||
|
writing(5);
|
||||||
|
break;
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.execute_log.log("设备:" + devicecode + "", "", "创建任务失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成任务成功
|
||||||
|
if (flag) {
|
||||||
|
|
||||||
|
inrequireSucess = true;
|
||||||
|
this.execute_log.log("设备:" + devicecode + "", "", "对应路由设备,生成任务成功已锁定");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -616,7 +745,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
//获取起点设备的信息
|
//获取起点设备的信息
|
||||||
Device route_link_device = deviceAppservice.findDeviceByCode(start_device_code);
|
Device route_link_device = deviceAppservice.findDeviceByCode(start_device_code);
|
||||||
//判断起点设备驱动是否为堆叠位驱动
|
//判断起点设备驱动是否为堆叠位驱动
|
||||||
if (route_link_device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver){
|
if (route_link_device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
|
||||||
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) route_link_device.getDeviceDriver();
|
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) route_link_device.getDeviceDriver();
|
||||||
// TODO 判断堆叠位是否有货,没货就结束本次循环
|
// TODO 判断堆叠位是否有货,没货就结束本次循环
|
||||||
//判断堆叠位的数量是否大于0,如果=0就结束本次循环
|
//判断堆叠位的数量是否大于0,如果=0就结束本次循环
|
||||||
@@ -679,7 +808,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
flag = true;
|
flag = true;
|
||||||
break;
|
break;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.execute_log.log("设备:" + devicecode+ "", "", "创建任务失败");
|
this.execute_log.log("设备:" + devicecode + "", "", "创建任务失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -687,7 +816,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
//生成任务成功
|
//生成任务成功
|
||||||
if (flag) {
|
if (flag) {
|
||||||
emptyrequireSucess = true;
|
emptyrequireSucess = true;
|
||||||
this.execute_log.log("设备:" + devicecode+ "", "", "对应路由设备,生成任务成功已锁定");
|
this.execute_log.log("设备:" + devicecode + "", "", "对应路由设备,生成任务成功已锁定");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -517,16 +517,18 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
} else if (standardInspectSiteDevicedriver.getMode() == 2) {
|
} else if (standardInspectSiteDevicedriver.getMode() == 2) {
|
||||||
mode = "联机";
|
mode = "联机";
|
||||||
}
|
}
|
||||||
if (standardInspectSiteDevicedriver.getMove() == 0) {
|
if (standardInspectSiteDevicedriver.getHasGoods() == 0) {
|
||||||
move = "无货";
|
move = "无货";
|
||||||
} else if (standardInspectSiteDevicedriver.getMove() == 1) {
|
} else if (standardInspectSiteDevicedriver.getHasGoods() == 1) {
|
||||||
move = "有货";
|
move = "有货";
|
||||||
} else if (standardInspectSiteDevicedriver.getMove() == 2) {
|
} else if (standardInspectSiteDevicedriver.getHasGoods() == 2) {
|
||||||
move = "有托盘有货";
|
move = "有托盘有货";
|
||||||
}
|
}
|
||||||
obj.put("device_name", standardInspectSiteDevicedriver.getDevice().getDevice_name());
|
obj.put("device_name", standardInspectSiteDevicedriver.getDevice().getDevice_name());
|
||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
|
//点击弹出
|
||||||
|
jo.put("is_click", true);
|
||||||
jo.put("hasGoods", standardInspectSiteDevicedriver.getHasGoods());
|
jo.put("hasGoods", standardInspectSiteDevicedriver.getHasGoods());
|
||||||
jo.put("isOnline", standardInspectSiteDevicedriver.getIsonline());
|
jo.put("isOnline", standardInspectSiteDevicedriver.getIsonline());
|
||||||
jo.put("error", standardInspectSiteDevicedriver.getError());
|
jo.put("error", standardInspectSiteDevicedriver.getError());
|
||||||
|
|||||||
@@ -279,22 +279,22 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
}
|
}
|
||||||
//普通站点
|
//普通站点
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.IGNOREHASGOODS), "1")) {
|
// if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.IGNOREHASGOODS), "1")) {
|
||||||
inst.setExecute_status("1");
|
// inst.setExecute_status("1");
|
||||||
instructionService.update(inst);
|
// instructionService.update(inst);
|
||||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
flag = true;
|
flag = true;
|
||||||
} else {
|
// } else {
|
||||||
if (device.getHas_goods() != 0) {
|
// if (device.getHas_goods() != 0) {
|
||||||
inst.setExecute_status("1");
|
// inst.setExecute_status("1");
|
||||||
instructionService.update(inst);
|
// instructionService.update(inst);
|
||||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
// data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
flag = true;
|
// flag = true;
|
||||||
} else {
|
// } else {
|
||||||
log.info("AGV请求取货设备{}无货,无法反馈", device_code);
|
// log.info("AGV请求取货设备{}无货,无法反馈", device_code);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
//标准版-货架
|
//标准版-货架
|
||||||
|
|||||||
@@ -137,8 +137,7 @@
|
|||||||
<el-form-item label="设备状态" label-width="80px">
|
<el-form-item label="设备状态" label-width="80px">
|
||||||
<el-radio-group v-model="form.hasGoodStatus">
|
<el-radio-group v-model="form.hasGoodStatus">
|
||||||
<el-radio-button :label="0">无货</el-radio-button>
|
<el-radio-button :label="0">无货</el-radio-button>
|
||||||
<el-radio-button :label="1">有托盘</el-radio-button>
|
<el-radio-button :label="1">有货</el-radio-button>
|
||||||
<el-radio-button :label="2">有托盘有货</el-radio-button>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
Reference in New Issue
Block a user