rev:新增请求接口,驱动代码优化
This commit is contained in:
@@ -38,7 +38,6 @@ import org.nl.acs.storage_cell.service.mapper.StorageCellMapper;
|
||||
import org.nl.acs.task.enums.TaskStatusEnum;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
@@ -631,7 +630,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
instdto.setVehicle_code(vehiclecode);
|
||||
String now = DateUtil.now();
|
||||
instdto.setCreate_time(now);
|
||||
instdto.setCreate_by(SecurityUtils.getCurrentNickName());
|
||||
instdto.setCreate_by("auto");
|
||||
instdto.setStart_device_code(start_device_code);
|
||||
instdto.setNext_device_code(next_device_code);
|
||||
instdto.setStart_point_code(start_point_code);
|
||||
|
||||
@@ -26,19 +26,17 @@ ItemProtocol {
|
||||
public static String item_task = "task";
|
||||
//报警
|
||||
public static String item_error = "error";
|
||||
//托盘类型
|
||||
public static String item_container_type="container_type";
|
||||
//气涨轴编号
|
||||
public static String item_barcode = "barcode";
|
||||
|
||||
//下发命令
|
||||
public static String item_to_command = "to_command";
|
||||
//下发起始站
|
||||
public static String item_to_onset = "to_onset";
|
||||
//下发目标站
|
||||
public static String item_to_target = "to_target";
|
||||
//下发任务号
|
||||
public static String item_to_task = "to_task";
|
||||
//下发托盘类型
|
||||
public static String item_to_container_type = "to_container_type";
|
||||
//下发子卷号
|
||||
public static String item_to_sub_volume_no = "to_sub_volume_no";
|
||||
|
||||
private RgvDeviceDriver driver;
|
||||
|
||||
@@ -70,6 +68,10 @@ ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_error);
|
||||
}
|
||||
|
||||
public int getBarcode() {
|
||||
return this.getOpcIntegerValue(item_barcode);
|
||||
}
|
||||
|
||||
public int getTask() {
|
||||
return this.getOpcIntegerValue(item_task);
|
||||
}
|
||||
@@ -78,9 +80,6 @@ ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_task);
|
||||
}
|
||||
|
||||
public int getTo_onset() {
|
||||
return this.getOpcIntegerValue(item_to_onset);
|
||||
}
|
||||
|
||||
public int getTo_command() {
|
||||
return this.getOpcIntegerValue(item_to_command);
|
||||
@@ -90,12 +89,9 @@ ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_target);
|
||||
}
|
||||
|
||||
public int getContainer_type(){
|
||||
return this.getOpcIntegerValue(item_container_type);
|
||||
}
|
||||
|
||||
public int getTo_container_type(){
|
||||
return this.getOpcIntegerValue(item_to_container_type);
|
||||
public int getTo_sub_volume_no(){
|
||||
return this.getOpcIntegerValue(item_to_sub_volume_no);
|
||||
}
|
||||
|
||||
Boolean isonline;
|
||||
@@ -121,17 +117,16 @@ ItemProtocol {
|
||||
list.add(new ItemDto(item_walk_y, "行走列", "DB1.B4"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB1.B5"));
|
||||
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
|
||||
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.D6"));
|
||||
list.add(new ItemDto(item_barcode, "任务号", "DB1.B7"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList<ItemDto> list = new ArrayList<>();
|
||||
list.add(new ItemDto(item_to_command, "下发命令", "DB2.W0"));
|
||||
list.add(new ItemDto(item_to_onset, "下发起始站", "DB2.W2"));
|
||||
list.add(new ItemDto(item_to_target, "下发目标站", "DB2.W4"));
|
||||
list.add(new ItemDto(item_to_task, "下发任务号", "DB2.D6"));
|
||||
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB2.W8"));
|
||||
list.add(new ItemDto(item_to_sub_volume_no, "下发子卷号", "DB2.W8"));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.rgv;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -33,6 +34,7 @@ import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -86,6 +88,9 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
//任务号
|
||||
int task = 0;
|
||||
int last_task = 0;
|
||||
//气涨轴条码
|
||||
int barcode = 0;
|
||||
int last_barcode = 0;
|
||||
|
||||
|
||||
int heartbeat = 0;
|
||||
@@ -99,15 +104,9 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
int to_task = 0;
|
||||
int last_to_task = 0;
|
||||
|
||||
int to_onset = 0;
|
||||
int last_to_onset = 0;
|
||||
|
||||
//托盘类型
|
||||
int container_type = 0;
|
||||
int last_container_type = 0;
|
||||
|
||||
int to_container_type = 0;
|
||||
int last_to_container_type = 0;
|
||||
int to_sub_volume_no = 0;
|
||||
int last_to_sub_volume_no = 0;
|
||||
|
||||
Boolean isonline = true;
|
||||
int hasGoods = 0;
|
||||
@@ -132,6 +131,9 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
|
||||
String device_code;
|
||||
|
||||
String left = "1";
|
||||
String right = "2";
|
||||
|
||||
//当前指令
|
||||
Instruction inst = null;
|
||||
|
||||
@@ -163,23 +165,17 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
walk_y = this.itemProtocol.getWalk_y();
|
||||
error = this.itemProtocol.getError();
|
||||
task = this.itemProtocol.getTask();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
heartbeat = this.itemProtocol.getHeartbeat();
|
||||
to_command = this.itemProtocol.getTo_command();
|
||||
to_target = this.itemProtocol.getTo_target();
|
||||
to_task = this.itemProtocol.getTo_task();
|
||||
to_onset = this.itemProtocol.getTo_onset();
|
||||
to_container_type = this.itemProtocol.getTo_container_type();
|
||||
container_type = this.itemProtocol.getContainer_type();
|
||||
to_sub_volume_no = this.itemProtocol.getTo_sub_volume_no();
|
||||
|
||||
if (to_container_type != last_to_container_type) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_container_type:" + last_to_container_type + "->" + to_container_type);
|
||||
}
|
||||
if (container_type != last_container_type) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号container_type:" + last_container_type + "->" + container_type);
|
||||
}
|
||||
if (to_onset != last_to_onset) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_onset:" + last_to_onset + "->" + to_onset);
|
||||
if (to_sub_volume_no != last_to_sub_volume_no) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_sub_volume_no:" + last_to_sub_volume_no + "->" + to_sub_volume_no);
|
||||
}
|
||||
|
||||
if (to_command != last_to_command) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command);
|
||||
}
|
||||
@@ -274,12 +270,11 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
last_error = error;
|
||||
last_task = task;
|
||||
last_heartbeat = heartbeat;
|
||||
last_barcode = barcode;
|
||||
last_to_task = to_task;
|
||||
last_to_command = to_command;
|
||||
last_to_target = to_target;
|
||||
last_to_onset = to_onset;
|
||||
last_to_container_type = to_container_type;
|
||||
last_container_type = container_type;
|
||||
last_to_sub_volume_no = to_sub_volume_no;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -291,15 +286,17 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
|
||||
public synchronized void applyTask() {
|
||||
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
|
||||
ApplyManipulatorActionResponse applyManipulatorActionResponse;
|
||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task));
|
||||
String task_code1 = inst1.getTask_code();
|
||||
applyManipulatorActionRequest.setDevice_code(device_code);
|
||||
applyManipulatorActionRequest.setTask_code(task_code1);
|
||||
applyManipulatorActionRequest.setLocation("1");
|
||||
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
if (applyManipulatorActionResponse.getCode() == 200) {
|
||||
String barcode = applyManipulatorActionRequest.getBarcode();
|
||||
map.put("to_barcode", barcode);
|
||||
map.put("to_target",applyManipulatorActionResponse.getNext_point());
|
||||
if (StrUtil.isEmpty(left)){
|
||||
map.put("to_sub_volume_no", right);
|
||||
} else {
|
||||
map.put("to_sub_volume_no", left);
|
||||
}
|
||||
this.writing(map);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请行架任务,返回参数:" + applyManipulatorActionResponse);
|
||||
message = "申请行架任务成功";
|
||||
|
||||
@@ -198,7 +198,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
if (mode == 3 && task > 0) {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_update_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
||||
|
||||
} else {
|
||||
this.instruction_update_time = date;
|
||||
@@ -232,29 +232,29 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
ja.add(jo);
|
||||
HttpResponse body = acsToWmsService.feedbackTaskStatusToWms(ja);
|
||||
if (body.getStatus() == 200) {
|
||||
message = LangProcess.msg("two_message1");
|
||||
message = "two_message1";
|
||||
requireSucess = true;
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(LangProcess.msg("two_message3") + JSON.toJSONString(body))
|
||||
.content("反馈请求成功,响应参数:" + JSON.toJSONString(body))
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "5");
|
||||
this.writing(map);
|
||||
} else {
|
||||
message = LangProcess.msg("two_message2");
|
||||
message = "two_message2";
|
||||
requireSucess = false;
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(LangProcess.msg("two_message2"))
|
||||
.content("反馈重量以及收卷轴LMS失败...")
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(LangProcess.msg("universal_message6"))
|
||||
.content("当前指令号为空")
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
}
|
||||
@@ -264,13 +264,13 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
feedMessage = feedMessage + "universal_feedMessage1";
|
||||
}
|
||||
if (action != 5) {
|
||||
feedMessage = feedMessage + LangProcess.msg("two_message4");
|
||||
feedMessage = feedMessage + "two_message4";
|
||||
}
|
||||
if (move != 1) {
|
||||
feedMessage = feedMessage + LangProcess.msg("universal_feedMessage7");
|
||||
feedMessage = feedMessage + "universal_feedMessage7";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage = feedMessage + LangProcess.msg("universal_feedMessage8");
|
||||
feedMessage = feedMessage + "universal_feedMessage8";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
if (StrUtil.equals(inst2.getInstruction_status(), InstructionStatusEnum.BUSY.getIndex())) {
|
||||
try {
|
||||
requireSucess = true;
|
||||
message = LangProcess.msg("universal_message7");
|
||||
message = "universal_message7";
|
||||
finish_instruction(inst2);
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "6");
|
||||
@@ -299,7 +299,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
feedMessage = var17.getMessage();
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content(LangProcess.msg("universal_message8") + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol))
|
||||
.content("读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol))
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
|
||||
@@ -307,11 +307,11 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = LangProcess.msg("universal_off-line");
|
||||
message = "universal_off-line";
|
||||
//有报警
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = LangProcess.msg("universal_message3");
|
||||
message = "universal_message3";
|
||||
//无报警
|
||||
} else {
|
||||
this.setIsonline(true);
|
||||
@@ -331,21 +331,21 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
} else {
|
||||
if (mode == 2) {
|
||||
//if (!requireSucess) {
|
||||
String remark = "";;
|
||||
String remark = "未查找任务原因为:";
|
||||
if (mode != 2) {
|
||||
remark = remark + "universal_remark2";
|
||||
remark = remark + "工作模式(mode)不是待机状态";
|
||||
}
|
||||
if (move != 0) {
|
||||
remark = remark + "universal_remark3";
|
||||
remark = remark + "光电信号(move)为有货状态";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
remark = remark + "当前上报任务号(task)应该为0";
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + LangProcess.msg("universal_remark5");
|
||||
remark = remark + "右击该图标,将请求任务复位标记(requireSucess)改为否。";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -378,7 +378,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
public synchronized boolean applyTask() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_require_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return false;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = LangProcess.msg("universal_off-line");
|
||||
message = "universal_off-line";
|
||||
// 有报警
|
||||
// } else if (error != 0) {
|
||||
// this.setIsonline(false);
|
||||
@@ -155,7 +155,7 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
this.setIserror(false);
|
||||
if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = LangProcess.msg("universal_message3");
|
||||
message = "universal_message3";
|
||||
}
|
||||
message = "";
|
||||
Instruction instruction = null;
|
||||
@@ -163,10 +163,10 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
|
||||
switch (mode) {
|
||||
case 2:
|
||||
log.debug(LangProcess.msg("universal_standby"));
|
||||
log.debug("待机");
|
||||
break;
|
||||
case 3:
|
||||
log.debug(LangProcess.msg("universal_operation"));
|
||||
log.debug("运行中");
|
||||
break;
|
||||
case 9:
|
||||
// 表处下满料请求
|
||||
@@ -206,26 +206,26 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime()
|
||||
< (long) this.instruction_require_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_require_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
||||
message = LangProcess.msg("two_message5");
|
||||
message = "two_message5";
|
||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
||||
blankingButtonRequest.setDevice_code(device_code);
|
||||
blankingButtonRequest.setType("1");
|
||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
||||
if (ObjectUtil.isEmpty(response)) {
|
||||
message = LangProcess.msg("two_message6");
|
||||
message = "two_message6";
|
||||
} else {
|
||||
if (response.getCode()== 200) {
|
||||
this.writing("to_command","9");
|
||||
message = LangProcess.msg("two_message7");
|
||||
message = "two_message7";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
requireSucess = false;
|
||||
message = LangProcess.msg("two_message8") + response.getMessage();
|
||||
message = "two_message8" + response.getMessage();
|
||||
this.writing("to_command","99");
|
||||
}
|
||||
}
|
||||
@@ -240,26 +240,26 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime()
|
||||
< (long) this.instruction_require_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_require_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
||||
message = LangProcess.msg("two_message9");
|
||||
message = "two_message9";
|
||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
||||
blankingButtonRequest.setDevice_code(device_code);
|
||||
blankingButtonRequest.setType("2");
|
||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
||||
if (ObjectUtil.isEmpty(response)) {
|
||||
message = LangProcess.msg("two_message10");
|
||||
message = "two_message10";
|
||||
} else {
|
||||
if (response.getCode()== 200) {
|
||||
this.writing("to_command","10");
|
||||
message = LangProcess.msg("two_message11");
|
||||
message = "two_message11";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
requireSucess = false;
|
||||
message = LangProcess.msg("two_message12") + response.getMessage();
|
||||
message = "two_message12" + response.getMessage();
|
||||
this.writing("to_command","99");
|
||||
}
|
||||
}
|
||||
@@ -274,26 +274,26 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime()
|
||||
< (long) this.instruction_require_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_require_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
||||
message = LangProcess.msg("two_message13");
|
||||
message = "two_message13";
|
||||
BlankingButtonRequest blankingButtonRequest = new BlankingButtonRequest();
|
||||
blankingButtonRequest.setDevice_code(device_code);
|
||||
blankingButtonRequest.setType("2");
|
||||
BlankingButtonResponse response = acsToWmsService.applyBlankButtonTask(blankingButtonRequest);
|
||||
if (ObjectUtil.isEmpty(response)) {
|
||||
message = LangProcess.msg("two_message14");
|
||||
message = "two_message14";
|
||||
} else {
|
||||
if (response.getCode()== 200) {
|
||||
this.writing("to_command","10");
|
||||
message = LangProcess.msg("two_message15");
|
||||
message = "two_message15";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
requireSucess = false;
|
||||
message = LangProcess.msg("two_message16") + response.getMessage();
|
||||
message = "two_message16" + response.getMessage();
|
||||
this.writing("to_command","99");
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,54 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walk_y = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = "取货中";
|
||||
} else if (this.getAction() == 2) {
|
||||
action = "取货完成";
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "放货中";
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "放货完成";
|
||||
}
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -137,7 +137,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = LangProcess.msg("universal_off-line");
|
||||
message = "universal_off-line";
|
||||
// 有报警
|
||||
// } else if (error != 0) {
|
||||
// this.setIsonline(false);
|
||||
@@ -146,7 +146,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
// //无报警
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = LangProcess.msg("universal_message3");
|
||||
message = "universal_message3";
|
||||
}else {
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
@@ -156,10 +156,10 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
switch (mode) {
|
||||
case 2:
|
||||
log.debug(LangProcess.msg("universal_standby"));
|
||||
log.debug("待机");
|
||||
break;
|
||||
case 3:
|
||||
log.debug(LangProcess.msg("universal_operation"));
|
||||
log.debug("运行中");
|
||||
break;
|
||||
case 4:
|
||||
// 申请AGV取空取满放空放满任务
|
||||
@@ -208,18 +208,18 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime()
|
||||
< (long) this.instruction_require_time_out) {
|
||||
log.trace(LangProcess.msg("universal_feedMessage6"), this.instruction_require_time_out);
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), CommonFinalParam.ONE)) {
|
||||
message = LangProcess.msg("two_message17");
|
||||
message = "two_message17";
|
||||
ApplyGreenFoilButtonRequest applyGreenFoilButtonRequest = new ApplyGreenFoilButtonRequest();
|
||||
applyGreenFoilButtonRequest.setDevice_code(device_code);
|
||||
applyGreenFoilButtonRequest.setType(String.valueOf(mode));
|
||||
ApplyGreenFoilButtonResponse response = acsToWmsService.applyGreenFoilButtonTask(applyGreenFoilButtonRequest);
|
||||
if (ObjectUtil.isEmpty(response)) {
|
||||
message = LangProcess.msg("two_message18");
|
||||
message = "two_message18";
|
||||
} else {
|
||||
if (response.getCode()== 200) {
|
||||
if (mode==4){
|
||||
@@ -229,11 +229,11 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
}else if (mode==9){
|
||||
this.writing("to_command","9");
|
||||
}
|
||||
message = LangProcess.msg("two_message19");
|
||||
message = "two_message19";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
requireSucess = false;
|
||||
message = LangProcess.msg("two_message20") + response.getMessage();
|
||||
message = "two_message20" + response.getMessage();
|
||||
this.writing("to_command","99");
|
||||
}
|
||||
}
|
||||
@@ -264,7 +264,54 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walk_y = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = "取货中";
|
||||
} else if (this.getAction() == 2) {
|
||||
action = "取货完成";
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "放货中";
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "放货完成";
|
||||
}
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -133,9 +134,6 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号type:" + last_type + "->" + type);
|
||||
}
|
||||
|
||||
if (move==1&&!requireSucess){
|
||||
this.writing("to_command","1");
|
||||
}
|
||||
|
||||
|
||||
last_mode = mode;
|
||||
@@ -167,7 +165,54 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walk_y = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = "取货中";
|
||||
} else if (this.getAction() == 2) {
|
||||
action = "取货完成";
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "放货中";
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "放货完成";
|
||||
}
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,11 +46,11 @@ public class ItemProtocol {
|
||||
//气涨轴类型
|
||||
public static String item_to_qzz_type = "to_qzz_type";
|
||||
//是否换轴
|
||||
public static String item_to_is_changeShaft = "to_is_changeShaft";
|
||||
public static String item_to_weight1 = "to_weight1";
|
||||
//尺寸
|
||||
public static String item_to_size = "to_size";
|
||||
//存储位置
|
||||
public static String item_to_location = "to_location";
|
||||
public static String item_to_weight2 = "to_weight2";
|
||||
|
||||
private PlugPullDeviceSiteDeviceDriver driver;
|
||||
|
||||
@@ -112,16 +112,16 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_qzz_type);
|
||||
}
|
||||
|
||||
public int getTo_is_changeShaft() {
|
||||
return this.getOpcIntegerValue(item_to_is_changeShaft);
|
||||
public int getTo_weight2() {
|
||||
return this.getOpcIntegerValue(item_to_weight2);
|
||||
}
|
||||
|
||||
public int getTo_size() {
|
||||
return this.getOpcIntegerValue(item_to_size);
|
||||
}
|
||||
|
||||
public int getTo_location() {
|
||||
return this.getOpcIntegerValue(item_to_location);
|
||||
public int getTo_weight1() {
|
||||
return this.getOpcIntegerValue(item_to_weight1);
|
||||
}
|
||||
|
||||
Boolean isonline;
|
||||
@@ -180,8 +180,8 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_material2, "纸管2规格", "DB10.W4"));
|
||||
list.add(new ItemDto(item_to_qty, "纸管数量", "DB10.W6"));
|
||||
list.add(new ItemDto(item_to_qzz_type, "气胀轴类型", "DB10.W8"));
|
||||
list.add(new ItemDto(item_to_is_changeShaft, "是否换轴", "DB10.W10"));
|
||||
list.add(new ItemDto(item_to_location, "存储位置", "DB10.W12"));
|
||||
list.add(new ItemDto(item_to_weight1, "纸管1标准重量", "DB10.W10"));
|
||||
list.add(new ItemDto(item_to_weight2, "纸管2标准重量", "DB10.W12"));
|
||||
list.add(new ItemDto(item_to_size, "尺寸", "DB10.W14"));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -90,20 +90,20 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int last_to_command = 0;
|
||||
|
||||
//气胀轴条码
|
||||
int barcode =0;
|
||||
int last_barcode =0;
|
||||
int barcode = 0;
|
||||
int last_barcode = 0;
|
||||
//纸管1重量
|
||||
int weight1 =0;
|
||||
int last_weight1 =0;
|
||||
int weight1 = 0;
|
||||
int last_weight1 = 0;
|
||||
//纸管1规格
|
||||
int material1 =0;
|
||||
int last_material1 =0;
|
||||
int material1 = 0;
|
||||
int last_material1 = 0;
|
||||
//纸管2重量
|
||||
int weight2 =0;
|
||||
int last_weight2 =0;
|
||||
int weight2 = 0;
|
||||
int last_weight2 = 0;
|
||||
//纸管2规格
|
||||
int material2 =0;
|
||||
int last_material2 =0;
|
||||
int material2 = 0;
|
||||
int last_material2 = 0;
|
||||
|
||||
int to_size = 0;
|
||||
int last_to_size = 0;
|
||||
@@ -120,11 +120,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
int to_qzz_type = 0;
|
||||
int last_to_qzz_type = 0;
|
||||
|
||||
int to_is_changeShaft = 0;
|
||||
int last_to_is_changeShaft = 0;
|
||||
int to_weight1 = 0;
|
||||
int last_to_weight1 = 0;
|
||||
|
||||
int to_location = 0;
|
||||
int last_to_location = 0;
|
||||
int to_weight2 = 0;
|
||||
int last_to_weight2 = 0;
|
||||
|
||||
|
||||
Boolean isonline = true;
|
||||
@@ -147,7 +147,7 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
return this.device;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 请求成功标记
|
||||
*/
|
||||
Boolean requireSucess = false;
|
||||
@@ -171,9 +171,9 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
to_material1 = this.itemProtocol.getTo_material1();
|
||||
to_material2 = this.itemProtocol.getTo_material2();
|
||||
to_qty = this.itemProtocol.getTo_qty();
|
||||
to_qzz_type=this.itemProtocol.getTo_qzz_type();
|
||||
to_is_changeShaft=this.itemProtocol.getTo_is_changeShaft();
|
||||
to_location=this.itemProtocol.getTo_location();
|
||||
to_qzz_type = this.itemProtocol.getTo_qzz_type();
|
||||
to_weight1 = this.itemProtocol.getTo_weight1();
|
||||
to_weight2 = this.itemProtocol.getTo_weight2();
|
||||
to_size = this.itemProtocol.getTo_size();
|
||||
|
||||
if (mode != last_mode) {
|
||||
@@ -232,11 +232,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (to_qzz_type != last_to_qzz_type) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_qzz_type:" + last_to_qzz_type + "->" + to_qzz_type);
|
||||
}
|
||||
if (to_is_changeShaft != last_to_is_changeShaft) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_is_changeShaft:" + last_to_is_changeShaft + "->" + to_is_changeShaft);
|
||||
if (to_weight1 != last_to_weight1) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "to_weight1:" + last_to_weight1 + "->" + to_weight1);
|
||||
}
|
||||
if (to_location != last_to_location) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_location:" + last_to_location + "->" + to_location);
|
||||
if (to_weight2 != last_to_weight2) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_weight2:" + last_to_weight2 + "->" + to_weight2);
|
||||
}
|
||||
if (to_size != last_to_size) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_size:" + last_to_size + "->" + to_size);
|
||||
@@ -270,9 +270,20 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
log.info(LangProcess.msg("universal_operation"));
|
||||
break;
|
||||
case 4:
|
||||
Instruction inst = instructionService.findByCode(String.valueOf(task));
|
||||
TaskDto taskDto = taskserver.findByCode(inst.getTask_code());
|
||||
if (StrUtil.equals("1", taskDto.getIs_bushing())) {
|
||||
if (task > 0) {
|
||||
Instruction inst = instructionService.findByCode(String.valueOf(task));
|
||||
TaskDto taskDto = taskserver.findByCode(inst.getTask_code());
|
||||
if (StrUtil.equals("1", taskDto.getIs_bushing())) {
|
||||
if (move == 1 && !requireSucess) {
|
||||
//申请套管
|
||||
apply_casing(mode);
|
||||
}
|
||||
} else {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_size", taskDto.getSize());
|
||||
this.writing(map);
|
||||
}
|
||||
} else {
|
||||
if (move == 1 && !requireSucess) {
|
||||
//申请套管
|
||||
apply_casing(mode);
|
||||
@@ -324,8 +335,8 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
last_to_material2 = to_material2;
|
||||
last_to_qty = to_qty;
|
||||
last_to_qzz_type = to_qzz_type;
|
||||
last_to_is_changeShaft = to_is_changeShaft;
|
||||
last_to_location = to_location;
|
||||
last_to_weight2 = to_weight2;
|
||||
last_to_weight1 = to_weight1;
|
||||
last_to_size = to_size;
|
||||
}
|
||||
|
||||
@@ -404,6 +415,10 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||
Instruction inst1 = instructionService.findByCode(String.valueOf(task));
|
||||
String task_code1 = inst1.getTask_code();
|
||||
TaskDto taskDto = taskserver.findByCode(task_code1);
|
||||
if (ObjectUtil.isNotEmpty(taskDto)){
|
||||
|
||||
}
|
||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||
applyPlugPullSiteRequest.setTask_code(task_code1);
|
||||
applyPlugPullSiteRequest.setBarcode(String.valueOf(barcode));
|
||||
|
||||
@@ -54,6 +54,8 @@ public class ItemProtocol {
|
||||
//子卷2长度
|
||||
public static String item_to_length2 = "to_length2";
|
||||
|
||||
public static String item_to_barcode = "to_barcode";
|
||||
|
||||
|
||||
private PullHeadManipulatorDeviceDriver driver;
|
||||
|
||||
@@ -113,6 +115,10 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_qty);
|
||||
}
|
||||
|
||||
public int getTo_barcode() {
|
||||
return this.getOpcIntegerValue(item_to_barcode);
|
||||
}
|
||||
|
||||
public int getTo_onset() {
|
||||
return this.getOpcIntegerValue(item_to_onset);
|
||||
}
|
||||
@@ -203,6 +209,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_command, "下发命令", "DB12.W0"));
|
||||
list.add(new ItemDto(item_to_onset, "下发起始站", "DB12.W2"));
|
||||
list.add(new ItemDto(item_to_target, "下发目标站", "DB12.W4"));
|
||||
list.add(new ItemDto(item_to_barcode, "下发气涨轴条码", "DB12.W4"));
|
||||
list.add(new ItemDto(item_to_task, "下发任务号", "DB12.D6"));
|
||||
list.add(new ItemDto(item_to_pull, "是否拔轴", "DB12.W8"));
|
||||
list.add(new ItemDto(item_to_sleeve, "是否套轴", "DB12.W10"));
|
||||
|
||||
@@ -186,16 +186,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
// } else
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = "未联机";
|
||||
message = "universal_off-line";
|
||||
//有报警
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = "有报警";
|
||||
message = "universal_message3";
|
||||
//无报警
|
||||
} else {
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
message = "运行中";
|
||||
message = "universal_operation";
|
||||
switch (mode) {
|
||||
case 1:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
@@ -218,19 +218,16 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
if (!requireSucess) {
|
||||
String remark = "";
|
||||
if (mode != 2) {
|
||||
remark = remark + "行架工作模式不为待机(mode != 2),";
|
||||
remark = remark + "universal_remark2";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
remark = remark + "前工位有货(move1 != 0),";
|
||||
remark = remark + "universal_remark6";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
remark = remark + "后工位有货(move2 != 0),";
|
||||
}
|
||||
if (action != 0) {
|
||||
remark = remark + "动作信号不为0(action != 0),";
|
||||
remark = remark + "universal_remark7";
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "存在任务(task != 0),";
|
||||
remark = remark + "universal_remark4";
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
}
|
||||
@@ -289,23 +286,22 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
feedMessage = "任务完成";
|
||||
feedMessage = "universal_feedMessage6";
|
||||
} else {
|
||||
feedMessage = "任务完成后未反馈原因-->";
|
||||
if (mode != 3) {
|
||||
feedMessage += "行架工作模式不为运行中(mode != 3),";
|
||||
feedMessage += "universal_feedMessage1";
|
||||
}
|
||||
if (action != 9) {
|
||||
feedMessage += "动作信号不是任务完成(action != 9),";
|
||||
feedMessage += "universal_feedMessage9";
|
||||
}
|
||||
if (move1 != 0) {
|
||||
feedMessage += "前工位光电信号不应该为有货状态(move2 != 0),";
|
||||
feedMessage += "universal_feedMessage10";
|
||||
}
|
||||
if (move2 != 0) {
|
||||
feedMessage += "后工位光电信号不应该为有货状态(move2 != 0),";
|
||||
feedMessage += "universal_feedMessage11";
|
||||
}
|
||||
if (task == 0) {
|
||||
feedMessage += "没有任务号(task == 0),";
|
||||
feedMessage += "universal_feedMessage4";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -388,6 +384,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.isSetAddress(nextDevice);
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
if (ObjectUtil.isEmpty(start_addr)) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(next_addr)) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
//下发电气信号
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_onset1", start_addr);
|
||||
@@ -436,6 +440,14 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
this.isSetAddress(nextDevice);
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
if (ObjectUtil.isEmpty(start_addr)) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(next_addr)) {
|
||||
notCreateInstMessage = "universal_notCreateInstMessage1";
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
//下发电气信号
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_onset1", start_addr);
|
||||
@@ -656,51 +668,46 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
mode = LangProcess.msg("universal_off-line");
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
mode = LangProcess.msg("universal_stand-alone");
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}
|
||||
|
||||
|
||||
if (this.getMove1() == 0) {
|
||||
move_1 = "无货";
|
||||
move_1 = LangProcess.msg("universal_no");
|
||||
} else if (this.getMove1() == 1) {
|
||||
move_1 = "有货";
|
||||
move_1 = LangProcess.msg("universal_yes");
|
||||
}
|
||||
|
||||
if (this.getMove2() == 0) {
|
||||
move_2 = "无货";
|
||||
move_2 = LangProcess.msg("universal_no");
|
||||
} else if (this.getMove2() == 1) {
|
||||
move_2 = "有货";
|
||||
move_2 = LangProcess.msg("universal_yes");
|
||||
}
|
||||
|
||||
if (this.getAction() == 1) {
|
||||
action = "前工位取货中";
|
||||
action = LangProcess.msg("two_action1");
|
||||
} else if (this.getAction() == 2) {
|
||||
action = "前工位取货完成";
|
||||
action = LangProcess.msg("two_action2");
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "前工位放货中";
|
||||
action = LangProcess.msg("two_action3");
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "前工位放货完成";
|
||||
action = LangProcess.msg("two_action4");
|
||||
} else if (this.getAction() == 5) {
|
||||
action = "后工位取货中";
|
||||
action = LangProcess.msg("two_action5");
|
||||
} else if (this.getAction() == 6) {
|
||||
action = "后工位取货完成";
|
||||
action = LangProcess.msg("two_action6");
|
||||
} else if (this.getAction() == 7) {
|
||||
action = "后工位取货中";
|
||||
action = LangProcess.msg("two_action7");
|
||||
} else if (this.getAction() == 8) {
|
||||
action = "后工位放货完成";
|
||||
action = LangProcess.msg("two_action8");
|
||||
}
|
||||
|
||||
if (this.getWalk_y() == 0) {
|
||||
walk_y = "原位";
|
||||
} else if (this.getWalk_y() == 2) {
|
||||
walk_y = "非原位";
|
||||
}
|
||||
|
||||
if (this.getIs_disable() == 0) {
|
||||
is_disable = "正常";
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -224,26 +225,25 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
String action = "";
|
||||
String move = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
mode = LangProcess.msg("universal_off-line");
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
mode = LangProcess.msg("universal_stand-alone");
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
move = LangProcess.msg("universal_no");
|
||||
jo.put("hasGoods", false);
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
move = LangProcess.msg("universal_yes");
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
if(error == 0){
|
||||
if(this.itemProtocol.isError){
|
||||
iserror = true;
|
||||
message = "信号连接异常!";
|
||||
}else{
|
||||
iserror = false;
|
||||
}
|
||||
@@ -251,7 +251,6 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
return jo;
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -136,7 +137,54 @@ public class SubvolumeWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walk_y = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "脱机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "待机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
if (this.getAction() == 1) {
|
||||
action = "取货中";
|
||||
} else if (this.getAction() == 2) {
|
||||
action = "取货完成";
|
||||
} else if (this.getAction() == 3) {
|
||||
action = "放货中";
|
||||
} else if (this.getAction() == 4) {
|
||||
action = "放货完成";
|
||||
}
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("action", action);
|
||||
jo.put("walk_y", walk_y);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", LangProcess.msg(message));
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,9 +18,11 @@ public class ItemProtocol {
|
||||
public static String item_error = "error";
|
||||
public static String item_weight = "weight";
|
||||
public static String item_old_weight = "old_weight";
|
||||
public static String item_gap_weight = "gap_weight";
|
||||
|
||||
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_error = "to_error";
|
||||
|
||||
|
||||
private WasteFoilWeighingStationDriver driver;
|
||||
@@ -31,25 +33,28 @@ public class ItemProtocol {
|
||||
|
||||
public int getItem_heartbeat(){
|
||||
return this.getOpcIntegerValue(item_heartbeat);
|
||||
} ;
|
||||
}
|
||||
public int getItem_mode(){
|
||||
return this.getOpcIntegerValue(item_mode);
|
||||
} ;
|
||||
}
|
||||
public int getItem_move(){
|
||||
return this.getOpcIntegerValue(item_move);
|
||||
} ;
|
||||
}
|
||||
public int getItem_action(){
|
||||
return this.getOpcIntegerValue(item_action);
|
||||
};
|
||||
}
|
||||
public int getItem_error(){
|
||||
return this.getOpcIntegerValue(item_error);
|
||||
} ;
|
||||
}
|
||||
public float getItem_weight(){
|
||||
return this.getOpcFloatValue(item_weight);
|
||||
} ;
|
||||
}
|
||||
public float getItem_old_weight(){
|
||||
return this.getOpcFloatValue(item_old_weight);
|
||||
} ;
|
||||
}
|
||||
public float getItem_gap_weight(){
|
||||
return this.getOpcFloatValue(item_gap_weight);
|
||||
}
|
||||
|
||||
Boolean isonline;
|
||||
|
||||
@@ -86,12 +91,14 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_error, "故障", "DB19.B4"));
|
||||
list.add(new ItemDto(item_weight, "重量", "DB19.B5"));
|
||||
list.add(new ItemDto(item_old_weight, "上次重量", "DB19.B6"));
|
||||
list.add(new ItemDto(item_gap_weight, "差异重量", "DB19.B8"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "下发命令", "DB20.W0"));
|
||||
list.add(new ItemDto(item_to_error, "下发命令", "DB20.W1"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,17 @@ 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.GetWasteFoilWeightRequest;
|
||||
import org.nl.acs.ext.wms.data.GetWasteFoilWeightResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -29,6 +34,8 @@ import java.util.*;
|
||||
public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, FeedLmsRealFailed {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService;
|
||||
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
@@ -48,6 +55,7 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
public int error = 0;
|
||||
public Float weight = 0f;
|
||||
public Float old_weight = 0f;
|
||||
public Float gap_weight = 0f;
|
||||
|
||||
public int last_heartbeat = 0;
|
||||
public int last_mode = 0;
|
||||
@@ -56,10 +64,13 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
public int last_error = 0;
|
||||
public float last_weight = 0f;
|
||||
public float last_old_weight = 0f;
|
||||
public float last_gap_weight = 0f;
|
||||
|
||||
Boolean isonline = true;
|
||||
|
||||
Boolean iserror = false;
|
||||
//反馈成功表示
|
||||
boolean feedbackSucess = false;
|
||||
|
||||
|
||||
String device_code;
|
||||
@@ -76,7 +87,7 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
Boolean requireSucess = false;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
public void execute() throws InterruptedException {
|
||||
|
||||
device_code = this.getDeviceCode();
|
||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||
@@ -86,8 +97,10 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
error = this.itemProtocol.getItem_error();
|
||||
weight = this.itemProtocol.getItem_weight();
|
||||
old_weight = this.itemProtocol.getItem_old_weight();
|
||||
gap_weight = this.itemProtocol.getItem_gap_weight();
|
||||
if (mode != last_mode) {
|
||||
requireSucess = false;
|
||||
this.setFeedbackSucess(false);
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
@@ -139,12 +152,30 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
case 3:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
break;
|
||||
case 6:
|
||||
// 称重完成
|
||||
if (move > 0 && !requireSucess) {
|
||||
weightSuccess();
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
// 称重确认完成
|
||||
if (move > 0 && !requireSucess) {
|
||||
weightConfirmSuccess();
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
// 取消称重
|
||||
if (move > 0 && !requireSucess) {
|
||||
cancelWeight();
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
// 申请任务
|
||||
if (move > 0 && !requireSucess) {
|
||||
applyTask();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -161,11 +192,91 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
* 称重确认完成
|
||||
*/
|
||||
public synchronized void weightConfirmSuccess() {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "7");
|
||||
this.writing(map);
|
||||
GetWasteFoilWeightRequest getWasteFoilWeightRequest = new GetWasteFoilWeightRequest();
|
||||
GetWasteFoilWeightResponse getWasteFoilWeightResponse;
|
||||
getWasteFoilWeightRequest.setDevice_code(device_code);
|
||||
getWasteFoilWeightRequest.setType("2");
|
||||
getWasteFoilWeightRequest.setLastWeight(String.valueOf(old_weight));
|
||||
getWasteFoilWeightRequest.setCurrentWeight(String.valueOf(weight));
|
||||
getWasteFoilWeightRequest.setWeightGap(String.valueOf(gap_weight));
|
||||
getWasteFoilWeightResponse = acsToWmsService.feedbackWeight(getWasteFoilWeightRequest);
|
||||
if (getWasteFoilWeightResponse.getstatus()==200){
|
||||
feedbackSucess = true;
|
||||
message = "反馈重量确认成功...";
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "8");
|
||||
this.writing(map);
|
||||
}else {
|
||||
feedbackSucess = false;
|
||||
message = "反馈重量确认失败";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 称重完成
|
||||
*/
|
||||
public synchronized void weightSuccess() {
|
||||
GetWasteFoilWeightRequest getWasteFoilWeightRequest = new GetWasteFoilWeightRequest();
|
||||
GetWasteFoilWeightResponse getWasteFoilWeightResponse;
|
||||
getWasteFoilWeightRequest.setDevice_code(device_code);
|
||||
getWasteFoilWeightRequest.setType("1");
|
||||
getWasteFoilWeightRequest.setLastWeight(String.valueOf(old_weight));
|
||||
getWasteFoilWeightRequest.setCurrentWeight(String.valueOf(weight));
|
||||
getWasteFoilWeightRequest.setWeightGap(String.valueOf(gap_weight));
|
||||
getWasteFoilWeightResponse = acsToWmsService.feedbackWeight(getWasteFoilWeightRequest);
|
||||
if (getWasteFoilWeightResponse.getstatus()==200){
|
||||
feedbackSucess = true;
|
||||
message = "反馈重量成功...";
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_command", "7");
|
||||
this.writing(map);
|
||||
}else {
|
||||
feedbackSucess = false;
|
||||
message = "反馈重量确认失败";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消称重
|
||||
*/
|
||||
public synchronized void cancelWeight() {
|
||||
GetWasteFoilWeightRequest getWasteFoilWeightRequest = new GetWasteFoilWeightRequest();
|
||||
GetWasteFoilWeightResponse getWasteFoilWeightResponse;
|
||||
getWasteFoilWeightRequest.setDevice_code(device_code);
|
||||
getWasteFoilWeightRequest.setType("3");
|
||||
getWasteFoilWeightRequest.setLastWeight(String.valueOf(old_weight));
|
||||
getWasteFoilWeightRequest.setCurrentWeight(String.valueOf(weight));
|
||||
getWasteFoilWeightRequest.setWeightGap(String.valueOf(gap_weight));
|
||||
getWasteFoilWeightResponse = acsToWmsService.feedbackWeight(getWasteFoilWeightRequest);
|
||||
if (getWasteFoilWeightResponse.getstatus()==200){
|
||||
feedbackSucess = true;
|
||||
message = "取消称重成功...";
|
||||
}else {
|
||||
feedbackSucess = false;
|
||||
message = "取消称重失败";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请任务
|
||||
*/
|
||||
public synchronized void applyTask() {
|
||||
GetWasteFoilWeightRequest getWasteFoilWeightRequest = new GetWasteFoilWeightRequest();
|
||||
GetWasteFoilWeightResponse getWasteFoilWeightResponse;
|
||||
getWasteFoilWeightRequest.setDevice_code(device_code);
|
||||
getWasteFoilWeightRequest.setType("4");
|
||||
getWasteFoilWeightResponse = acsToWmsService.feedbackWeight(getWasteFoilWeightRequest);
|
||||
if (getWasteFoilWeightResponse.getstatus()==200){
|
||||
feedbackSucess = true;
|
||||
message = "申请任务成功...";
|
||||
}else {
|
||||
feedbackSucess = false;
|
||||
message = "申请任务失败";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -212,7 +323,49 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() throws Exception {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
String mode = "";
|
||||
String move = "";
|
||||
String action = "";
|
||||
String walk_y = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = LangProcess.msg("universal_off-line");
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = LangProcess.msg("universal_stand-alone");
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = LangProcess.msg("universal_standby");
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}
|
||||
|
||||
if (this.getMove() == 0) {
|
||||
move = LangProcess.msg("universal_no");
|
||||
jo.put("hasGoods", false);
|
||||
} else if (this.getMove() == 1) {
|
||||
move = LangProcess.msg("universal_yes");
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
|
||||
String requireSucess = "0";
|
||||
if (this.requireSucess) {
|
||||
requireSucess = "1";
|
||||
}
|
||||
jo.put("requireSucess", requireSucess);
|
||||
|
||||
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
jo.put("move", move);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("error", this.getError());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("weight", this.getWeight());
|
||||
jo.put("old_weight", this.getOld_weight());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("gap_weight", this.getGap_weight());
|
||||
jo.put("driver_type", "siemens_conveyor");
|
||||
jo.put("is_click", true);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,13 +22,28 @@ public class ApplyManipulatorActionRequest extends BaseRequest {
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private String task_id;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private String weight;
|
||||
|
||||
/**
|
||||
* 条码
|
||||
* 位置 1-左 2-右
|
||||
*/
|
||||
private String barcode;
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 左子卷号
|
||||
*/
|
||||
private String left;
|
||||
|
||||
/**
|
||||
* 右子卷号
|
||||
*/
|
||||
private String right;
|
||||
}
|
||||
|
||||
@@ -8,4 +8,13 @@ import java.util.Map;
|
||||
@Data
|
||||
public class ApplyManipulatorActionResponse extends BaseResponse{
|
||||
private Map<String, String> data = new HashMap();
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String barcode;
|
||||
|
||||
/**
|
||||
* 终点
|
||||
*/
|
||||
private String next_point;
|
||||
}
|
||||
|
||||
@@ -8,4 +8,5 @@ import java.util.Map;
|
||||
@Data
|
||||
public class ApplyPlugPullSitResponse extends BaseResponse {
|
||||
private Map<String, String> data = new HashMap();
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CreateTaskRequest extends BaseRequest {
|
||||
String vehicle_type;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
* 扩展属性
|
||||
*/
|
||||
String params2;
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GetWasteFoilWeightRequest extends BaseRequest {
|
||||
private String device_code;
|
||||
|
||||
/**
|
||||
* 1-称重完成
|
||||
* 2-称重确认完成
|
||||
* 3-取消称重
|
||||
* 4-申请任务
|
||||
*/
|
||||
private String type;
|
||||
|
||||
|
||||
/**
|
||||
* 当前重量
|
||||
*/
|
||||
private String currentWeight;
|
||||
|
||||
/**
|
||||
* 上次重量
|
||||
*/
|
||||
private String lastWeight;
|
||||
|
||||
/**
|
||||
* 重量差
|
||||
*/
|
||||
private String weightGap;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
public class GetWasteFoilWeightResponse extends BaseResponse{
|
||||
}
|
||||
@@ -2,5 +2,9 @@ package org.nl.acs.ext.wms.data;
|
||||
|
||||
public class PutActionResponse extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 结果 200成功
|
||||
*/
|
||||
private int status;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class PutWeightActionRequest extends BaseRequest {
|
||||
/**
|
||||
* 设备号
|
||||
*/
|
||||
String device_code;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
String code;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
String value;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
public class PutWeightActionResponse extends BaseResponse{
|
||||
}
|
||||
@@ -58,4 +58,6 @@ public class AcsToWmsController {
|
||||
return new ResponseEntity<>(acstowmsService.feedbackAgv(from), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.ext.wms.data.PutWeightActionRequest;
|
||||
import org.nl.acs.ext.wms.data.one.CancelTaskRequest;
|
||||
import org.nl.acs.ext.wms.data.one.CreateTaskRequest;
|
||||
import org.nl.acs.ext.wms.service.WmsToAcsService;
|
||||
@@ -95,4 +96,11 @@ public class WmsToAcsController {
|
||||
return new ResponseEntity<>(wmstoacsService.notifyAcs(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getWeight")
|
||||
@Log("wms下发废箔重量")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getWeight(@RequestBody String whereJson) throws Exception {
|
||||
return new ResponseEntity<>(wmstoacsService.putWeightAction(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public interface AcsToWmsService {
|
||||
*/
|
||||
HttpResponse feedbackAgv(JSONArray from);
|
||||
|
||||
|
||||
/**
|
||||
* 请求开门或关门
|
||||
*
|
||||
@@ -175,4 +176,11 @@ public interface AcsToWmsService {
|
||||
|
||||
|
||||
String applyUpdatePointCode(JSONObject param);
|
||||
|
||||
/**
|
||||
* 向lms反馈废箔重量
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
GetWasteFoilWeightResponse feedbackWeight(GetWasteFoilWeightRequest param);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package org.nl.acs.ext.wms.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.acs.ext.wms.data.PutWeightActionRequest;
|
||||
import org.nl.acs.ext.wms.data.PutWeightActionResponse;
|
||||
import org.nl.acs.ext.wms.data.one.*;
|
||||
|
||||
import java.util.List;
|
||||
@@ -99,5 +101,12 @@ public interface WmsToAcsService {
|
||||
*/
|
||||
JSONObject notifyAcs(JSONObject param);
|
||||
|
||||
/**
|
||||
* 下发废箔称重动作
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
PutWeightActionResponse putWeightAction(String jsonObject) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HttpResponse applyOpenOrCloseDoor(String device_code, String status) {
|
||||
return null;
|
||||
@@ -521,6 +522,43 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetWasteFoilWeightResponse feedbackWeight(GetWasteFoilWeightRequest param) {
|
||||
log.info("向LMS申请反馈,请求参数{}", param);
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
GetWasteFoilWeightResponse getWasteFoilWeightResponse = new GetWasteFoilWeightResponse();
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("feedbackWeight");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
log.info("GetWasteFoilWeightRequest----请求参数:{}", JSONObject.toJSONString(param));
|
||||
try {
|
||||
// String result = "";
|
||||
String result = HttpRequest.post(url)
|
||||
.body(JSON.toJSONString(param))
|
||||
.execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
log.info("GetWasteFoilWeightResponse----返回参数{}", result);
|
||||
getWasteFoilWeightResponse = JSONObject.toJavaObject(jsonObject, GetWasteFoilWeightResponse.class);
|
||||
} catch (Exception e) {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 400);
|
||||
map.put("message", e.getMessage());
|
||||
return JSONObject.toJavaObject(map, GetWasteFoilWeightResponse.class);
|
||||
}
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("GetWasteFoilWeightRequest", String.valueOf(getWasteFoilWeightResponse.getCode()),
|
||||
JSON.toJSONString(param), String.valueOf(getWasteFoilWeightResponse), "ACS向LMS申请反馈");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
}
|
||||
return getWasteFoilWeightResponse;
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject queryStationState(Instruction inst) {
|
||||
|
||||
@@ -424,6 +424,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
|
||||
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver;
|
||||
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
||||
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
||||
hongXiangStationDeviceDriver.writing(code, value);
|
||||
@@ -440,9 +441,17 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver();
|
||||
inflatableShaftLibraryDeviceDriver.writing(code, value);
|
||||
}
|
||||
|
||||
if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
|
||||
wasteFoilWeighingStationDriver = (WasteFoilWeighingStationDriver) device.getDeviceDriver();
|
||||
wasteFoilWeighingStationDriver.writing(code, value);
|
||||
try {
|
||||
Thread.sleep(1000); //休眠1秒
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
response.setCode(200);
|
||||
response.setStatus(200);
|
||||
response.setMessage("success");
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("putAction", String.valueOf(response.getCode()),
|
||||
jsonObject, String.valueOf(response), "LMS下发动作");
|
||||
@@ -454,6 +463,47 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PutWeightActionResponse putWeightAction(String jsonObject) throws Exception {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("putWeightAction--------------:输入参数" + jsonObject);
|
||||
JSONArray datas = JSONArray.parseArray(jsonObject);
|
||||
PutWeightActionResponse response = new PutWeightActionResponse();
|
||||
JSONArray errArr = new JSONArray();
|
||||
for (int i = 0; i < datas.size(); i++) {
|
||||
String data = datas.get(i).toString();
|
||||
PutWeightActionRequest request = JsonUtl.format(data, PutWeightActionRequest.class);
|
||||
String device_code = request.getDevice_code();
|
||||
String code = request.getCode();
|
||||
String value = request.getValue();
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new Exception("未找到对应设备:" + device_code);
|
||||
}
|
||||
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver;
|
||||
if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
|
||||
wasteFoilWeighingStationDriver = (WasteFoilWeighingStationDriver) device.getDeviceDriver();
|
||||
wasteFoilWeighingStationDriver.writing(code, value);
|
||||
try {
|
||||
Thread.sleep(1000); //休眠1秒
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
response.setCode(200);
|
||||
response.setMessage("success");
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("putWeightAction", String.valueOf(response.getCode()),
|
||||
jsonObject, String.valueOf(response), "LMS下发动作");
|
||||
luceneExecuteLogService.interfaceExecuteLog(luceneLogDto);
|
||||
log.info("putWeightAction--------------:输出参数:" + response);
|
||||
return response;
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryDevice(String jsonObject) throws Exception {
|
||||
try {
|
||||
|
||||
@@ -347,20 +347,20 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
@Override
|
||||
public Instruction findByTaskid(String id, String wherecaluse) {
|
||||
|
||||
/*LambdaQueryWrapper<InstructionMybatis> wrapper = new LambdaQueryWrapper<>();
|
||||
LambdaQueryWrapper<InstructionMybatis> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(InstructionMybatis::getTask_id, id);
|
||||
wrapper.apply(StringUtils.isNotBlank(wherecaluse), wherecaluse);
|
||||
InstructionMybatis ins = instructionMapper.selectOne(wrapper);
|
||||
if (ObjectUtil.isNotEmpty(ins)) {
|
||||
return ConvertUtil.convert(ins, Instruction.class);
|
||||
}*/
|
||||
if(instructions.size() > 0){
|
||||
List<Instruction> collect = instructions.stream().filter(instruction -> instruction.getTask_id().equals(id)
|
||||
&& Integer.parseInt(instruction.getInstruction_status()) < 2).collect(Collectors.toList());
|
||||
if(collect.size() > 0){
|
||||
return collect.get(0);
|
||||
}
|
||||
}
|
||||
// if(instructions.size() > 0){
|
||||
// List<Instruction> collect = instructions.stream().filter(instruction -> instruction.getTask_id().equals(id)
|
||||
// && Integer.parseInt(instruction.getInstruction_status()) < 2).collect(Collectors.toList());
|
||||
// if(collect.size() > 0){
|
||||
// return collect.get(0);
|
||||
// }
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -625,8 +625,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
} else {
|
||||
dto.setSend_status("2");
|
||||
}
|
||||
} NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
dto.setSend_status("2");
|
||||
@@ -872,7 +871,8 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.equals(task.getNext_device_code(), instnextdevice)) {
|
||||
taskService.finish(task.getTask_id());
|
||||
} else {
|
||||
finishAndCreateNextInst((Instruction) entity);
|
||||
// finishAndCreateNextInst((Instruction) entity);
|
||||
finishAndCreateNextInst(ConvertUtil.convert(entity, Instruction.class));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -333,4 +333,9 @@ public class TaskDto implements Serializable {
|
||||
* 是否套管 0:不套管 1:套管
|
||||
*/
|
||||
private String is_bushing;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
String params2;
|
||||
}
|
||||
|
||||
@@ -18,4 +18,12 @@ two_message17=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u4E2D
|
||||
two_message18=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u63A5\u53E3\u4E0D\u901A
|
||||
two_message19=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u6210\u529F
|
||||
two_message20=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u5931\u8D25
|
||||
two_action1=\u524D\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action2=\u524D\u5DE5\u4F4D\u53D6\u8D27\u5B8C\u6210
|
||||
two_action3=\u524D\u5DE5\u4F4D\u653E\u8D27\u4E2D
|
||||
two_action4=\u524D\u5DE5\u4F4D\u653E\u8D27\u5B8C\u6210
|
||||
two_action5=\u540E\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action6=\u540E\u5DE5\u4F4D\u53D6\u8D27\u5B8C\u6210
|
||||
two_action7=\u540E\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action8=\u540E\u5DE5\u4F4D\u653E\u8D27\u5B8C\u6210
|
||||
|
||||
|
||||
@@ -18,5 +18,13 @@ two_message17=Applying for AGV handling tasks
|
||||
two_message18=The interface for applying for AGV handling tasks is not working
|
||||
two_message19=The application for AGV handling task was successful
|
||||
two_message20=Failed to apply for AGV handling task
|
||||
two_action1=Pick-up at the front station
|
||||
two_action2=Pick-up at the front station is complete
|
||||
two_action3=The goods are being released at the front station
|
||||
two_action4=The release of goods at the front station is completed
|
||||
two_action5=Pick-up at the post-station
|
||||
two_action6=After the station pick-up is completed
|
||||
two_action7=Pick-up at the post-station
|
||||
two_action8=After the station is released, the goods are completed
|
||||
|
||||
|
||||
|
||||
@@ -18,3 +18,11 @@ two_message17=Melamar tugas penanganan AGV
|
||||
two_message18=Antarmuka untuk melamar tugas penanganan AGV tidak berfungsi
|
||||
two_message19=Aplikasi untuk tugas penanganan AGV berhasil
|
||||
two_message20=Gagal melamar tugas penanganan AGV
|
||||
two_action1=Penjemputan di stasiun depan
|
||||
two_action2=Penjemputan di stasiun depan selesai
|
||||
two_action3=Barang-barang sedang dirilis di stasiun depan
|
||||
two_action4=Pelepasan barang di stasiun depan selesai
|
||||
two_action5=Penjemputan di stasiun pos
|
||||
two_action6=Setelah penjemputan stasiun selesai
|
||||
two_action7=Penjemputan di stasiun pos
|
||||
two_action8=Setelah stasiun dilepaskan, barang selesai
|
||||
|
||||
@@ -18,5 +18,12 @@ two_message17=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u4E2D
|
||||
two_message18=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u63A5\u53E3\u4E0D\u901A
|
||||
two_message19=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u6210\u529F
|
||||
two_message20=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u5931\u8D25
|
||||
|
||||
two_action1=\u524D\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action2=\u524D\u5DE5\u4F4D\u53D6\u8D27\u5B8C\u6210
|
||||
two_action3=\u524D\u5DE5\u4F4D\u653E\u8D27\u4E2D
|
||||
two_action4=\u524D\u5DE5\u4F4D\u653E\u8D27\u5B8C\u6210
|
||||
two_action5=\u540E\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action6=\u540E\u5DE5\u4F4D\u53D6\u8D27\u5B8C\u6210
|
||||
two_action7=\u540E\u5DE5\u4F4D\u53D6\u8D27\u4E2D
|
||||
two_action8=\u540E\u5DE5\u4F4D\u653E\u8D27\u5B8C\u6210
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ universal_remark2=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u662F\u5F85\u673A\u72B6\u
|
||||
universal_remark3=\u5149\u7535\u4FE1\u53F7(move)\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_remark4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u5E94\u8BE5\u4E3A0
|
||||
universal_remark5=\u53F3\u51FB\u8BE5\u56FE\u6807,\u5C06\u8BF7\u6C42\u4EFB\u52A1\u590D\u4F4D\u6807\u8BB0(requireSucess)\u6539\u4E3A\u5426\u3002
|
||||
universal_remark6=\u524D\u5DE5\u4F4D\u6709\u8D27
|
||||
universal_remark7=\u540E\u5DE5\u4F4D\u6709\u8D27
|
||||
universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\u4EFB\u52A1\uFF0C\u6307\u4EE4\u65E0\u6CD5\u521B\u5EFA
|
||||
universal_message1=\u653E\u8D27\u5B8C\u6210
|
||||
universal_message2=\u653E\u8D27\u5931\u8D25
|
||||
@@ -30,9 +32,12 @@ universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\
|
||||
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
||||
universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0
|
||||
universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B
|
||||
universal_feedMessage6=\u89E6\u53D1\u65F6\u95F4\u56E0\u4E3A\u5C0F\u4E8E{}\u6BEB\u79D2\uFF0C\u800C\u88AB\u65E0\u89C6
|
||||
universal_feedMessage6=\u4EFB\u52A1\u5B8C\u6210
|
||||
universal_feedMessage7=move\u4E0D\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_feedMessage8=\u4EFB\u52A1\u53F7\u4E3A0
|
||||
universal_feedMessage9=\u52A8\u4F5C\u4FE1\u53F7\u4E0D\u662F\u4EFB\u52A1\u5B8C\u6210
|
||||
universal_feedMessage10=\u524D\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_feedMessage11=\u540E\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25
|
||||
universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7!
|
||||
universal_notCreateInstMessage2=\u5149\u7535\u65E0\u8D27,\u65E0\u6CD5\u751F\u6210\u6307\u4EE4!
|
||||
|
||||
@@ -16,7 +16,8 @@ universal_message4=No matching instructions were found
|
||||
universal_message5=Succeeded in delivering the electrical task number
|
||||
universal_remark4=The current report task ID should be 0
|
||||
universal_remark5=Right-click the icon and change the Request task reset flag (requireSucess) to No
|
||||
|
||||
universal_remark6=The front station is in stock
|
||||
universal_remark7=The rear station is in stock
|
||||
universal_message1=Release completed
|
||||
universal_message2=Delivery failure
|
||||
universal_message3=Have an alarm
|
||||
@@ -30,9 +31,12 @@ universal_feedMessage2=action signal (action signal) is not a release completed
|
||||
universal_feedMessage3=Photoelectric signal (move) is not out of stock
|
||||
universal_feedMessage4=The current report task number (task) should not be 0
|
||||
universal_feedMessage5=Gantry manipulator
|
||||
universal_feedMessage6=The trigger time is ignored because it is less than {} milliseconds
|
||||
universal_feedMessage6=Mission accomplished
|
||||
universal_feedMessage7=Move is not in stock
|
||||
universal_feedMessage8=The task number is 0
|
||||
universal_feedMessage9=The action signal is not task completion
|
||||
universal_feedMessage10=The front station photoelectric signal should not be in stock
|
||||
universal_feedMessage11=The photoelectric signal of the rear station should not be in stock
|
||||
universal_write_erro=Write signal failure
|
||||
universal_notCreateInstMessage=Instructions cannot be created because the task for the associated device is not found
|
||||
universal_notCreateInstMessage1=The electrical dispatch number is not set!
|
||||
|
||||
@@ -14,7 +14,8 @@ universal_remark2=Mode tidak dalam mode siaga
|
||||
universal_remark3=Sinyal fotolistrik untuk kondisi pengiriman
|
||||
universal_remark4=Kita tugaskan tugaskan task
|
||||
universal_remark5=Klik kanan pada ikon dan ubah not (requicess) untuk penugasan ulang
|
||||
|
||||
universal_remark6=Stasiun depan tersedia
|
||||
universal_remark7=Stasiun belakang tersedia
|
||||
universal_message1=Pengiriman selesai
|
||||
universal_message2=Gagal memasukkan barang
|
||||
universal_message3=Alarm berbunyi
|
||||
@@ -30,9 +31,12 @@ universal_feedMessage2=Sinyal aksi tidak lengkap untuk penempatan
|
||||
universal_feedMessage3=tidak ada status pengiriman
|
||||
universal_feedMessage4=Tugaskan tugaskan tugaskan bukan hanya 0
|
||||
universal_feedMessage5=Pengemudi-mekanik line
|
||||
universal_feedMessage6=Waktu pemicu diabaikan karena kurang dari {} milidetik
|
||||
universal_feedMessage6=Misi tercapai
|
||||
universal_feedMessage7=Pindah tidak tersedia
|
||||
universal_feedMessage8=Nomor tugasnya adalah 0
|
||||
universal_feedMessage9=Sinyal tindakan bukanlah penyelesaian tugas
|
||||
universal_feedMessage10=Sinyal fotolistrik stasiun depan seharusnya tidak tersedia
|
||||
universal_feedMessage11=Sinyal fotolistrik dari stasiun belakang seharusnya tidak tersedia
|
||||
universal_write_erro=Sinyal penulis gagal
|
||||
universal_notCreateInstMessage=Misi untuk divais yang diasosiasikan tidak ditemukan, perintah tidak dapat dibuat
|
||||
universal_notCreateInstMessage1=Nomor pengiriman listrik tidak diatur!
|
||||
|
||||
@@ -14,7 +14,8 @@ universal_remark2=\u5DE5\u4F5C\u6A21\u5F0F(mode)\u4E0D\u662F\u5F85\u673A\u72B6\u
|
||||
universal_remark3=\u5149\u7535\u4FE1\u53F7(move)\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_remark4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u5E94\u8BE5\u4E3A0
|
||||
universal_remark5=\u53F3\u51FB\u8BE5\u56FE\u6807,\u5C06\u8BF7\u6C42\u4EFB\u52A1\u590D\u4F4D\u6807\u8BB0(requireSucess)\u6539\u4E3A\u5426\u3002
|
||||
|
||||
universal_remark6=\u524D\u5DE5\u4F4D\u6709\u8D27
|
||||
universal_remark7=\u540E\u5DE5\u4F4D\u6709\u8D27
|
||||
universal_message1=\u653E\u8D27\u5B8C\u6210
|
||||
universal_message2=\u653E\u8D27\u5931\u8D25
|
||||
universal_message3=\u6709\u62A5\u8B66
|
||||
@@ -30,9 +31,12 @@ universal_feedMessage2=\u52A8\u4F5C\u4FE1\u53F7(action)\u4E0D\u4E3A\u653E\u8D27\
|
||||
universal_feedMessage3=\u5149\u7535\u4FE1\u53F7(move)\u4E0D\u4E3A\u65E0\u8D27\u72B6\u6001
|
||||
universal_feedMessage4=\u5F53\u524D\u4E0A\u62A5\u4EFB\u52A1\u53F7(task)\u4E0D\u5E94\u8BE5\u4E3A0
|
||||
universal_feedMessage5=\u884C\u67B6\u673A\u68B0\u624B
|
||||
universal_feedMessage6=\u89E6\u53D1\u65F6\u95F4\u56E0\u4E3A\u5C0F\u4E8E{}\u6BEB\u79D2\uFF0C\u800C\u88AB\u65E0\u89C6
|
||||
universal_feedMessage6=\u4EFB\u52A1\u5B8C\u6210
|
||||
universal_feedMessage7=move\u4E0D\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_feedMessage8=\u4EFB\u52A1\u53F7\u4E3A0
|
||||
universal_feedMessage9=\u52A8\u4F5C\u4FE1\u53F7\u4E0D\u662F\u4EFB\u52A1\u5B8C\u6210
|
||||
universal_feedMessage10=\u524D\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_feedMessage11=\u540E\u5DE5\u4F4D\u5149\u7535\u4FE1\u53F7\u4E0D\u5E94\u8BE5\u4E3A\u6709\u8D27\u72B6\u6001
|
||||
universal_write_erro=\u5199\u5165\u4FE1\u53F7\u5931\u8D25
|
||||
universal_notCreateInstMessage=\u672A\u627E\u5230\u5173\u8054\u8BBE\u5907\u7684\u4EFB\u52A1\uFF0C\u6307\u4EE4\u65E0\u6CD5\u521B\u5EFA
|
||||
universal_notCreateInstMessage1=\u672A\u8BBE\u7F6E\u7535\u6C14\u8C03\u5EA6\u53F7!
|
||||
|
||||
@@ -241,6 +241,7 @@ export default {
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dialogFormVisible6: false,
|
||||
arr2: [],
|
||||
currentItem: '',
|
||||
stageSelectList: [],
|
||||
@@ -286,6 +287,8 @@ export default {
|
||||
this.$refs.child1.setForm(clickObj)
|
||||
} else if (clickObj.data.driver_type === 'standard_stacker') {
|
||||
this.dialogFormVisible4 = true
|
||||
} else if (clickObj.data.driver_type === 'pull_head_manipulator') {
|
||||
this.dialogFormVisible6 = true
|
||||
} else {
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
@@ -502,11 +505,13 @@ export default {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible6 = false
|
||||
this.initArr2()
|
||||
}).catch(err => {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible6 = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -255,6 +255,8 @@ export default {
|
||||
dialogFormVisible6: false,
|
||||
dialogFormVisible7: false,
|
||||
dialogFormVisible8: false,
|
||||
dialogFormVisible9: false,
|
||||
dialogFormVisible10: false,
|
||||
stageParam: [{// 舞台参数
|
||||
value: 'age',
|
||||
label: 'age'
|
||||
@@ -413,6 +415,8 @@ export default {
|
||||
this.dialogFormVisible6 = true
|
||||
} else if (clickObj.data.driver_type === 'standard_stacker') {
|
||||
this.dialogFormVisible8 = true
|
||||
} else if (clickObj.data.driver_type === 'pull_head_manipulator') {
|
||||
this.dialogFormVisible9 = true
|
||||
} else {
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
@@ -711,6 +715,7 @@ export default {
|
||||
this.dialogFormVisible6 = false
|
||||
this.dialogFormVisible7 = false
|
||||
this.dialogFormVisible8 = false
|
||||
this.dialogFormVisible9 = false
|
||||
this.initStageData()
|
||||
}).catch(err => {
|
||||
this.dialogFormVisible = false
|
||||
@@ -719,6 +724,7 @@ export default {
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible7 = false
|
||||
this.dialogFormVisible8 = false
|
||||
this.dialogFormVisible9 = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user