Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -57,6 +57,6 @@ public interface DeviceExtraMapper extends CommonMapper<DeviceExtra> {
|
|||||||
* @param extra_code
|
* @param extra_code
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Select("select * from lzhl_two_acs.acs_device_extra where device_id=#{device_id} and extra_code=#{extra_code} order by create_time desc")
|
@Select("select * from acs_device_extra where device_id=#{device_id} and extra_code=#{extra_code} order by create_time desc")
|
||||||
DeviceExtra findByDeviceId(@Param("device_id") String device_id, @Param("extra_code") String extra_code);
|
DeviceExtra findByDeviceId(@Param("device_id") String device_id, @Param("extra_code") String extra_code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
|
if ((standardInspectSiteDeviceDriver.getMove() != 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
|
|||||||
@@ -677,6 +677,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
if (this.move == 1) {
|
if (this.move == 1) {
|
||||||
move = "有货";
|
move = "有货";
|
||||||
}
|
}
|
||||||
|
String container_type = "";
|
||||||
|
if(this.container_type == 1){
|
||||||
|
container_type = "小托盘";
|
||||||
|
}else if (this.container_type == 2){
|
||||||
|
container_type = "大托盘";
|
||||||
|
}
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
jo.put("task", task);
|
jo.put("task", task);
|
||||||
jo.put("type", container_type);
|
jo.put("type", container_type);
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
log.error("指令创建失败!", e.getMessage());
|
log.error("指令创建失败!", e.getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Device nextdevice = deviceAppservice.findDeviceByCode(taskdto.getNext_device_code());
|
Device nextdevice = deviceAppservice.findDeviceByCode(instdto.getNext_device_code());
|
||||||
|
|
||||||
//创建指令后修改任务状态
|
//创建指令后修改任务状态
|
||||||
taskdto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
taskdto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class ItemProtocol {
|
|||||||
/**
|
/**
|
||||||
* y轴报警(载货台)
|
* y轴报警(载货台)
|
||||||
*/
|
*/
|
||||||
public static String item_error = "error";
|
public static String item_error = "Error";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行走排号
|
* 行走排号
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
message = "universal_releasing_completed";
|
message = "universal_releasing_completed";
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("code", "to_command");
|
map.put("code", "to_command");
|
||||||
map.put("value", 5);
|
map.put("value", 11);
|
||||||
list.add(map);
|
list.add(map);
|
||||||
Instruction inst = checkInst();
|
Instruction inst = checkInst();
|
||||||
try {
|
try {
|
||||||
@@ -979,8 +979,31 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
if (this.requireSucess) {
|
if (this.requireSucess) {
|
||||||
requireSucess = "1";
|
requireSucess = "1";
|
||||||
}
|
}
|
||||||
|
String command = "";
|
||||||
|
if(this.command == 0){
|
||||||
|
command = "待机";
|
||||||
|
}else if(this.command == 1){
|
||||||
|
command = "取货中";
|
||||||
|
}else if(this.command == 2){
|
||||||
|
command = "取货完成";
|
||||||
|
}else if(this.command == 3){
|
||||||
|
command = "放货中";
|
||||||
|
}else if(this.command == 4){
|
||||||
|
command = "请求卸货(申请卸货)";
|
||||||
|
}else if(this.command == 5){
|
||||||
|
command = "放货完成";
|
||||||
|
}else if(this.command == 6){
|
||||||
|
command = "取货准备(回库台)";
|
||||||
|
}else if(this.command == 7){
|
||||||
|
command = "召回";
|
||||||
|
}else if(this.command == 8){
|
||||||
|
command = "急停";
|
||||||
|
}else if(this.command == 9){
|
||||||
|
command = "未知";
|
||||||
|
}
|
||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
|
jo.put("command", command);
|
||||||
jo.put("action", action);
|
jo.put("action", action);
|
||||||
jo.put("task", task);
|
jo.put("task", task);
|
||||||
jo.put("error", this.getError());
|
jo.put("error", this.getError());
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
public int lastMove = 0;
|
public int lastMove = 0;
|
||||||
public int lastAction = 0;
|
public int lastAction = 0;
|
||||||
public int lastError = 0;
|
public int lastError = 0;
|
||||||
|
int to_command = 0;
|
||||||
|
int last_to_command = 0;
|
||||||
|
|
||||||
|
int to_error = 0;
|
||||||
|
int last_to_error = 0;
|
||||||
|
|
||||||
Boolean isonline = true;
|
Boolean isonline = true;
|
||||||
|
|
||||||
@@ -117,6 +122,8 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
action = this.itemProtocol.getItem_action();
|
action = this.itemProtocol.getItem_action();
|
||||||
error = this.itemProtocol.getItem_error();
|
error = this.itemProtocol.getItem_error();
|
||||||
iserror = this.itemProtocol.isError;
|
iserror = this.itemProtocol.isError;
|
||||||
|
to_command = this.itemProtocol.getItem_to_command();
|
||||||
|
to_error = this.itemProtocol.getItem_error();
|
||||||
|
|
||||||
if (mode != lastMode) {
|
if (mode != lastMode) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
@@ -134,7 +141,7 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
} else if (error != 0) {
|
} else if (error != 0) {
|
||||||
this.setIserror(true);
|
this.setIserror(true);
|
||||||
message = "universal_message3";
|
message = "universal_message3";
|
||||||
}else {
|
} else {
|
||||||
this.setIsonline(true);
|
this.setIsonline(true);
|
||||||
this.setIserror(false);
|
this.setIserror(false);
|
||||||
message = "";
|
message = "";
|
||||||
@@ -175,11 +182,12 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lastMode = mode;
|
lastMode = mode;
|
||||||
lastMove = move;
|
lastMove = move;
|
||||||
lastAction = action;
|
lastAction = action;
|
||||||
lastError = error;
|
lastError = error;
|
||||||
|
last_to_error = to_error;
|
||||||
|
last_to_command = to_command;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,20 +211,20 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
if (ObjectUtil.isEmpty(response)) {
|
if (ObjectUtil.isEmpty(response)) {
|
||||||
message = "two_message18";
|
message = "two_message18";
|
||||||
} else {
|
} else {
|
||||||
if (response.getCode()== CommonFinalParam.STATUS_OPEN) {
|
if (response.getCode() == CommonFinalParam.STATUS_OPEN) {
|
||||||
if (mode==4){
|
if (mode == 4) {
|
||||||
this.writing("to_command","4");
|
this.writing("to_command", "4");
|
||||||
}else if (mode==5){
|
} else if (mode == 5) {
|
||||||
this.writing("to_command","5");
|
this.writing("to_command", "5");
|
||||||
}else if (mode==9){
|
} else if (mode == 9) {
|
||||||
this.writing("to_command","9");
|
this.writing("to_command", "9");
|
||||||
}
|
}
|
||||||
message = "two_message19";
|
message = "two_message19";
|
||||||
requireSucess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
message = "two_message20" + response.getMessage();
|
message = "two_message20" + response.getMessage();
|
||||||
this.writing("to_command","99");
|
this.writing("to_command", "99");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,8 +232,6 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void writing(String param, String value) {
|
public void writing(String param, String value) {
|
||||||
|
|
||||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
@@ -277,14 +283,12 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
|
|||||||
requireSucess = "1";
|
requireSucess = "1";
|
||||||
}
|
}
|
||||||
jo.put("requireSucess", requireSucess);
|
jo.put("requireSucess", requireSucess);
|
||||||
if (this.getAction() == 1) {
|
if (this.getAction() == 0) {
|
||||||
action = "取货中";
|
action = "不允许取放";
|
||||||
|
} else if (this.getAction() == 1) {
|
||||||
|
action = "允许取放";
|
||||||
} else if (this.getAction() == 2) {
|
} else if (this.getAction() == 2) {
|
||||||
action = "取货完成";
|
action = "允许离开";
|
||||||
} else if (this.getAction() == 3) {
|
|
||||||
action = "放货中";
|
|
||||||
} else if (this.getAction() == 4) {
|
|
||||||
action = "放货完成";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jo.put("device_name", this.getDevice().getDevice_name());
|
jo.put("device_name", this.getDevice().getDevice_name());
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
|
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
|
public static String item_to_error = "to_error";
|
||||||
|
|
||||||
|
|
||||||
private GreenFoilMachineButtonDriver driver;
|
private GreenFoilMachineButtonDriver driver;
|
||||||
@@ -42,6 +43,9 @@ public class ItemProtocol {
|
|||||||
};
|
};
|
||||||
public int getItem_error(){
|
public int getItem_error(){
|
||||||
return this.getOpcIntegerValue(item_error);
|
return this.getOpcIntegerValue(item_error);
|
||||||
|
}
|
||||||
|
public int getItem_to_command(){
|
||||||
|
return this.getOpcIntegerValue(item_to_error);
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Boolean isonline;
|
Boolean isonline;
|
||||||
@@ -89,6 +93,7 @@ public class ItemProtocol {
|
|||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_command, "下发命令", "DB6.W0"));
|
list.add(new ItemDto(item_to_command, "下发命令", "DB6.W0"));
|
||||||
|
list.add(new ItemDto(item_to_error, "下发故障代码", "DB6.W1"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -282,6 +282,37 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void writing(List list) {
|
||||||
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
Object ob = list.get(i);
|
||||||
|
JSONObject json = (JSONObject) JSONObject.toJSON(ob);
|
||||||
|
if (!StrUtil.isEmpty(json.getString("value"))) {
|
||||||
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + json.getString("code");
|
||||||
|
itemMap.put(to_param, json.getString("value"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
|
.device_code(device_code)
|
||||||
|
.content("下发电气信号:" + itemMap)
|
||||||
|
.build();
|
||||||
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
try {
|
||||||
|
this.checkcontrol(itemMap);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//将扩展表中的字符串数据转换成集合
|
//将扩展表中的字符串数据转换成集合
|
||||||
@Override
|
@Override
|
||||||
public List<String> getExtraDeviceCodes(String extraName) {
|
public List<String> getExtraDeviceCodes(String extraName) {
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 3000;
|
||||||
//行架机械手申请任务成功标识
|
//行架机械手申请任务成功标识
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
|
//行架机械手申请动作成功标识
|
||||||
|
boolean requireActionSucess = false;
|
||||||
|
|
||||||
private int instruction_finished_time_out;
|
private int instruction_finished_time_out;
|
||||||
|
|
||||||
@@ -179,12 +181,16 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
y_position = this.itemProtocol.getY_position();
|
y_position = this.itemProtocol.getY_position();
|
||||||
iserror = this.itemProtocol.device_status;
|
iserror = this.itemProtocol.device_status;
|
||||||
|
|
||||||
if(mode != last_mode){
|
if (mode != last_mode) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
}
|
}
|
||||||
|
if (action != last_action) {
|
||||||
|
requireActionSucess = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!requireActionSucess) {
|
||||||
update_instruction_status();
|
update_instruction_status();
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
var17.printStackTrace();
|
var17.printStackTrace();
|
||||||
@@ -219,7 +225,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} else {
|
} else {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
//if (!requireSucess) {
|
//if (!requireSucess) {
|
||||||
String remark = "";;
|
String remark = "";
|
||||||
if (mode != 2) {
|
if (mode != 2) {
|
||||||
remark = remark + "工作模式(mode)不是待机状态,";
|
remark = remark + "工作模式(mode)不是待机状态,";
|
||||||
}
|
}
|
||||||
@@ -293,7 +299,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (ObjectUtil.isEmpty(putDeviceCodeList)) {
|
if (ObjectUtil.isEmpty(putDeviceCodeList)) {
|
||||||
putDeviceCodeList = this.getExtraDeviceCodes("put_device_code");
|
putDeviceCodeList = this.getExtraDeviceCodes("put_device_code");
|
||||||
}
|
}
|
||||||
|
if(CollUtil.isEmpty(getDeviceCodeList) || getDeviceCodeList.size() == 0){
|
||||||
|
notCreateInstMessage = "未设置取货点";
|
||||||
|
}
|
||||||
TaskDto task = null;
|
TaskDto task = null;
|
||||||
for (int i = 0; i < getDeviceCodeList.size(); i++) {
|
for (int i = 0; i < getDeviceCodeList.size(); i++) {
|
||||||
String startDeviceCode = getDeviceCodeList.get(i);
|
String startDeviceCode = getDeviceCodeList.get(i);
|
||||||
@@ -431,7 +439,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
}
|
}
|
||||||
this.setNow_steps_type(2);
|
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -593,7 +600,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||||
if(ObjectUtil.isEmpty(start_addr) || ObjectUtil.isEmpty(next_addr)){
|
if (ObjectUtil.isEmpty(start_addr) || ObjectUtil.isEmpty(next_addr)) {
|
||||||
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "或设备:" + nextDevice.getDevice_code() + "地址值!");
|
throw new BadRequestException("设备:" + startDevice.getDevice_code() + "或设备:" + nextDevice.getDevice_code() + "地址值!");
|
||||||
}
|
}
|
||||||
String msg = "当前设备:" + device_code + ",下发指令:"
|
String msg = "当前设备:" + device_code + ",下发指令:"
|
||||||
@@ -633,7 +640,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door", "1");
|
||||||
}
|
}
|
||||||
this.setNow_steps_type(2);
|
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
notCreateInstMessage = "";
|
notCreateInstMessage = "";
|
||||||
notCreateTaskMessage = "";
|
notCreateTaskMessage = "";
|
||||||
@@ -822,45 +828,38 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int error = hongXiangConveyorDeviceDriver.getError();
|
int error = hongXiangConveyorDeviceDriver.getError();
|
||||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error == 0 && error1 == 0 && move == 1) {
|
if (mode == 1 && door == 1 && action == 1 && error == 0 && error1 == 0 && move == 1) {
|
||||||
if (this.getNow_steps_type() == 2) {
|
|
||||||
map.put("code", "to_command");
|
|
||||||
map.put("value", "2");
|
|
||||||
list.add(map);
|
|
||||||
this.writing(list);
|
|
||||||
this.setNow_steps_type(3);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.getNow_steps_type() == 2) {
|
|
||||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
|
||||||
if (mode != 1) {
|
|
||||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
|
||||||
}
|
|
||||||
if (door != 1) {
|
|
||||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
|
||||||
}
|
|
||||||
if (action != 1) {
|
|
||||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
|
||||||
}
|
|
||||||
if (move != 1) {
|
|
||||||
feedMessage = feedMessage + "取货位光电信号(move)不应该为无货状态,";
|
|
||||||
}
|
|
||||||
if (error1 != 0) {
|
|
||||||
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.getNow_steps_type() == 2) {
|
|
||||||
map.put("code", "to_command");
|
map.put("code", "to_command");
|
||||||
map.put("value", "2");
|
map.put("value", "2");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(3);
|
this.setRequireActionSucess(true);
|
||||||
|
} else {
|
||||||
|
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||||
|
if (mode != 1) {
|
||||||
|
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||||
|
}
|
||||||
|
if (door != 1) {
|
||||||
|
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||||
|
}
|
||||||
|
if (move != 1) {
|
||||||
|
feedMessage = feedMessage + "取货位光电信号(move)不应该为无货状态,";
|
||||||
|
}
|
||||||
|
if (error1 != 0) {
|
||||||
|
feedMessage = feedMessage + "故障(error1)信号出现故障,故障值:" + error1 + "。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
map.put("code", "to_command");
|
||||||
|
map.put("value", "2");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
|
this.setRequireActionSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 2) {
|
|
||||||
feedMessage = "行架机械手:";
|
feedMessage = "行架机械手:";
|
||||||
if (mode != 3) {
|
if (mode != 3) {
|
||||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||||
@@ -874,7 +873,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//取货完成关闭烘箱门
|
//取货完成关闭烘箱门
|
||||||
@@ -886,32 +884,32 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
map.put("to_close_door", "1");
|
Map map1 = new HashMap();
|
||||||
hongXiangConveyorDeviceDriver.writing(map);
|
ArrayList list1 = new ArrayList();
|
||||||
}
|
map1.put("code", "to_close_door");
|
||||||
if (this.getNow_steps_type() == 3) {
|
map1.put("value", "1");
|
||||||
map.put("code", "to_command");
|
list1.add(map1);
|
||||||
map.put("value", "3");
|
hongXiangConveyorDeviceDriver.writing(list1);
|
||||||
list.add(map);
|
|
||||||
this.writing(list);
|
|
||||||
this.setNow_steps_type(4);
|
|
||||||
}
|
}
|
||||||
|
map.put("code", "to_command");
|
||||||
|
map.put("value", "3");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
|
this.setRequireActionSucess(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 3) {
|
feedMessage = "行架机械手:";
|
||||||
feedMessage = "行架机械手:";
|
if (mode != 3) {
|
||||||
if (mode != 3) {
|
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
}
|
||||||
}
|
if (action != 2) {
|
||||||
if (action != 2) {
|
feedMessage = feedMessage + "动作信号(action)不为取货完成状态,";
|
||||||
feedMessage = feedMessage + "动作信号(action)不为取货完成状态,";
|
}
|
||||||
}
|
if (move != 1) {
|
||||||
if (move != 1) {
|
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
||||||
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
}
|
||||||
}
|
if (task == 0) {
|
||||||
if (task == 0) {
|
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -931,59 +929,49 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int error = hongXiangConveyorDeviceDriver.getError();
|
int error = hongXiangConveyorDeviceDriver.getError();
|
||||||
int move = hongXiangConveyorDeviceDriver.getMove();
|
int move = hongXiangConveyorDeviceDriver.getMove();
|
||||||
if (mode == 1 && door == 1 && action == 1 && error == 0 && error1 == 0 && move == 0) {
|
if (mode == 1 && door == 1 && action == 1 && error == 0 && error1 == 0 && move == 0) {
|
||||||
if (this.getNow_steps_type() == 4) {
|
|
||||||
map.put("code", "to_command");
|
|
||||||
map.put("value", "4");
|
|
||||||
list.add(map);
|
|
||||||
this.writing(list);
|
|
||||||
this.setNow_steps_type(5);
|
|
||||||
} else {
|
|
||||||
feedMessage = "未反馈电气信号原因:当前步骤不为允许放货(now_steps_type!=4)";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.getNow_steps_type() == 4) {
|
|
||||||
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
|
||||||
if (mode != 1) {
|
|
||||||
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
|
||||||
}
|
|
||||||
if (door != 1) {
|
|
||||||
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
|
||||||
}
|
|
||||||
if (action != 1) {
|
|
||||||
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
|
||||||
}
|
|
||||||
if (move != 0) {
|
|
||||||
feedMessage = feedMessage + "放货位光电信号不应该为有货状态";
|
|
||||||
}
|
|
||||||
if (error1 != 0) {
|
|
||||||
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.getNow_steps_type() == 4) {
|
|
||||||
map.put("code", "to_command");
|
map.put("code", "to_command");
|
||||||
map.put("value", "4");
|
map.put("value", "4");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(5);
|
this.setRequireActionSucess(true);
|
||||||
|
} else {
|
||||||
|
feedMessage = "烘箱:" + hongXiangConveyorDeviceDriver.getDevice_code();
|
||||||
|
if (mode != 1) {
|
||||||
|
feedMessage = feedMessage + "工作模式(mode)信号未联机,";
|
||||||
|
}
|
||||||
|
if (door != 1) {
|
||||||
|
feedMessage = feedMessage + "门状态(door)信号未开门,";
|
||||||
|
}
|
||||||
|
if (action != 1) {
|
||||||
|
feedMessage = feedMessage + "允许取放(action)信号未允许取放,";
|
||||||
|
}
|
||||||
|
if (move != 0) {
|
||||||
|
feedMessage = feedMessage + "放货位光电信号不应该为有货状态";
|
||||||
|
}
|
||||||
|
if (error1 != 0) {
|
||||||
|
feedMessage = feedMessage + "故障(error1)信号出现故障。";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
map.put("code", "to_command");
|
||||||
|
map.put("value", "4");
|
||||||
|
list.add(map);
|
||||||
|
this.writing(list);
|
||||||
|
this.setRequireActionSucess(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 4) {
|
feedMessage = "行架机械手:";
|
||||||
feedMessage = "行架机械手:";
|
if (mode != 3) {
|
||||||
if (mode != 3) {
|
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
}
|
||||||
}
|
if (action != 3) {
|
||||||
if (action != 3) {
|
feedMessage = feedMessage + "动作信号(action)不为放货中状态,";
|
||||||
feedMessage = feedMessage + "动作信号(action)不为放货中状态,";
|
}
|
||||||
}
|
if (move != 1) {
|
||||||
if (move != 1) {
|
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
||||||
feedMessage = feedMessage + "光电信号(move)不为有货状态,";
|
}
|
||||||
}
|
if (task == 0) {
|
||||||
if (task == 0) {
|
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,7 +988,12 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
||||||
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_close_door", "1");
|
Map map1 = new HashMap();
|
||||||
|
ArrayList list1 = new ArrayList();
|
||||||
|
map1.put("code", "to_close_door");
|
||||||
|
map1.put("value", "1");
|
||||||
|
list1.add(map1);
|
||||||
|
hongXiangConveyorDeviceDriver.writing(list1);
|
||||||
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
|
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
|
||||||
//下发烘箱时间
|
//下发烘箱时间
|
||||||
int time = Integer.parseInt(taskDto.getOven_time());
|
int time = Integer.parseInt(taskDto.getOven_time());
|
||||||
@@ -1038,8 +1031,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
map.put("value", "5");
|
map.put("value", "5");
|
||||||
list.add(map);
|
list.add(map);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
this.setNow_steps_type(6);
|
this.setRequireActionSucess(true);
|
||||||
this.setNow_steps_type(0);
|
|
||||||
try {
|
try {
|
||||||
finish_instruction(inst2);
|
finish_instruction(inst2);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1049,7 +1041,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.getNow_steps_type() == 5) {
|
|
||||||
feedMessage = "行架机械手:";
|
feedMessage = "行架机械手:";
|
||||||
if (mode != 3) {
|
if (mode != 3) {
|
||||||
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
feedMessage = feedMessage + "工作模式(mode)不为运行中状态,";
|
||||||
@@ -1063,7 +1054,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (task == 0) {
|
if (task == 0) {
|
||||||
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
feedMessage = feedMessage + "当前上报任务号(task)不应该为0。";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1113,6 +1103,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (error == 0 && iserror) {
|
if (error == 0 && iserror) {
|
||||||
this.setMessage(LangProcess.msg("universal_message4"));
|
this.setMessage(LangProcess.msg("universal_message4"));
|
||||||
}
|
}
|
||||||
|
String requireActionSucess = "请求动作已复位";
|
||||||
|
if(this.requireActionSucess){
|
||||||
|
requireActionSucess = "请求动作未复位";
|
||||||
|
}
|
||||||
jo.put("device_name", this.getDevice().getDevice_name());
|
jo.put("device_name", this.getDevice().getDevice_name());
|
||||||
jo.put("mode", mode);
|
jo.put("mode", mode);
|
||||||
jo.put("move", move);
|
jo.put("move", move);
|
||||||
@@ -1126,6 +1120,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
jo.put("feedMessage", feedMessage);
|
jo.put("feedMessage", feedMessage);
|
||||||
|
jo.put("requireActionSucess", requireActionSucess);
|
||||||
jo.put("driver_type", "siemens_conveyor");
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("x", x_position);
|
jo.put("x", x_position);
|
||||||
|
|||||||
@@ -81,6 +81,9 @@ public class TaskScreenServiceImpl extends CommonServiceImpl<TaskScreenMapper, D
|
|||||||
DeviceDto deviceDto = deviceService.findByCode(deviceCode);
|
DeviceDto deviceDto = deviceService.findByCode(deviceCode);
|
||||||
String deviceId = deviceDto.getDevice_id();
|
String deviceId = deviceDto.getDevice_id();
|
||||||
DeviceExtra deviceExtra = deviceExtraMapper.findByDeviceId(deviceId, "link_device_code");
|
DeviceExtra deviceExtra = deviceExtraMapper.findByDeviceId(deviceId, "link_device_code");
|
||||||
|
if (ObjectUtil.isEmpty(deviceExtra)){
|
||||||
|
throw new BadRequestException("未配置关联设备!");
|
||||||
|
}
|
||||||
String extraValue = deviceExtra.getExtra_value();
|
String extraValue = deviceExtra.getExtra_value();
|
||||||
List<String> extraDeviceCodes = getExtraDeviceCodes(extraValue);
|
List<String> extraDeviceCodes = getExtraDeviceCodes(extraValue);
|
||||||
if (CollUtil.isEmpty(extraDeviceCodes) || extraDeviceCodes.size() < 0) {
|
if (CollUtil.isEmpty(extraDeviceCodes) || extraDeviceCodes.size() < 0) {
|
||||||
|
|||||||
@@ -54,19 +54,13 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
String task_type = dto.getTask_type();
|
String task_type = dto.getTask_type();
|
||||||
|
|
||||||
if (StrUtil.isEmpty(start_device_code)) {
|
if (StrUtil.isEmpty(start_device_code)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("起点1不能为空");
|
||||||
json.put("message", "起点1不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(next_device_code)) {
|
if (StrUtil.isEmpty(next_device_code)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("终点1不能为空");
|
||||||
json.put("message", "终点1不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(task_type)) {
|
if (StrUtil.isEmpty(task_type)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("任务类型不能为空");
|
||||||
json.put("message", "任务类型不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
@@ -85,11 +79,8 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
jo.put("next_device_code", next_device_code);
|
jo.put("next_device_code", next_device_code);
|
||||||
jo.put("start_point_code", start_device_code);
|
jo.put("start_point_code", start_device_code);
|
||||||
jo.put("next_point_code", next_device_code);
|
jo.put("next_point_code", next_device_code);
|
||||||
jo.put("start_device_code2", start_device_code2);
|
|
||||||
jo.put("next_device_code2", next_device_code2);
|
|
||||||
jo.put("start_point_code2", start_device_code2);
|
|
||||||
jo.put("next_point_code2", next_device_code2);
|
|
||||||
jo.put("task_type", task_type);
|
jo.put("task_type", task_type);
|
||||||
|
jo.put("route_plan_code","normal");
|
||||||
jo.put("agv_system_type", "2");
|
jo.put("agv_system_type", "2");
|
||||||
jo.put("priority", "1");
|
jo.put("priority", "1");
|
||||||
|
|
||||||
@@ -101,6 +92,7 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("message", e.getMessage());
|
json.put("message", e.getMessage());
|
||||||
errArr.add(json);
|
errArr.add(json);
|
||||||
|
throw new RuntimeException(e.getMessage());
|
||||||
}
|
}
|
||||||
JSONArray data = new JSONArray();
|
JSONArray data = new JSONArray();
|
||||||
JSONObject resultJson = new JSONObject();
|
JSONObject resultJson = new JSONObject();
|
||||||
@@ -119,7 +111,7 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
JSONArray data = new JSONArray();
|
JSONArray data = new JSONArray();
|
||||||
//查询所有生箔区的设备
|
//查询所有生箔区的设备
|
||||||
List<Device> list = deviceService.lambdaQuery()
|
List<Device> list = deviceService.lambdaQuery()
|
||||||
.eq(Device::getRegion, "2")
|
.eq(Device::getRegion, "1")
|
||||||
.list();
|
.list();
|
||||||
if (CollectionUtil.isEmpty(list)) {
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
throw new BadRequestException("未查到该区域的设备!");
|
throw new BadRequestException("未查到该区域的设备!");
|
||||||
@@ -158,15 +150,12 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
String device_code = dto.getDevice_code();
|
String device_code = dto.getDevice_code();
|
||||||
String option = dto.getOption();
|
String option = dto.getOption();
|
||||||
if (StrUtil.isEmpty(device_code)) {
|
if (StrUtil.isEmpty(device_code)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("设备号不能为空");
|
||||||
json.put("message", "设备号不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(option)) {
|
if (StrUtil.isEmpty(option)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("操作不能为空");
|
||||||
json.put("message", "操作不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
|
//满轴位允许进入,空轴位允许离开
|
||||||
if (device_code.contains("M")&&(!"1".equals(option))){
|
if (device_code.contains("M")&&(!"1".equals(option))){
|
||||||
throw new BadRequestException("该设备为满轴位,不能进行该操作");
|
throw new BadRequestException("该设备为满轴位,不能进行该操作");
|
||||||
}
|
}
|
||||||
@@ -175,6 +164,11 @@ public class B2HandServiceImpl implements B2HandService {
|
|||||||
}
|
}
|
||||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||||
Device device = deviceAppService.findDeviceByCode(device_code);
|
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||||
|
if (ObjectUtil.isEmpty(device)){
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("message", "设备不存在!");
|
||||||
|
errArr.add(json);
|
||||||
|
}
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
|
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
|
||||||
JSONArray data = new JSONArray();
|
JSONArray data = new JSONArray();
|
||||||
|
|||||||
@@ -115,19 +115,13 @@ public class HandServiceImpl implements HandService {
|
|||||||
String task_type = dto.getTask_type();
|
String task_type = dto.getTask_type();
|
||||||
|
|
||||||
if (StrUtil.isEmpty(start_device_code)) {
|
if (StrUtil.isEmpty(start_device_code)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("起点不能为空");
|
||||||
json.put("message", "起点不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(next_device_code)) {
|
if (StrUtil.isEmpty(next_device_code)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("终点不能为空");
|
||||||
json.put("message", "终点不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty(task_type)) {
|
if (StrUtil.isEmpty(task_type)) {
|
||||||
JSONObject json = new JSONObject();
|
throw new BadRequestException("任务类型不能为空");
|
||||||
json.put("message", "任务类型不能为空");
|
|
||||||
errArr.add(json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String start_device_code2 = "";
|
String start_device_code2 = "";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Order(100)
|
@Order(100)
|
||||||
@ConditionalOnProperty(value = "spring.profiles.active",havingValue = "dev")
|
@ConditionalOnProperty(value = "spring.profiles.active",havingValue = "prod")
|
||||||
public class JobRunner implements ApplicationRunner {
|
public class JobRunner implements ApplicationRunner {
|
||||||
private static final Logger log = LoggerFactory.getLogger(JobRunner.class);
|
private static final Logger log = LoggerFactory.getLogger(JobRunner.class);
|
||||||
private final ISysQuartzJobService quartzJobService;
|
private final ISysQuartzJobService quartzJobService;
|
||||||
|
|||||||
@@ -350,6 +350,24 @@ export default {
|
|||||||
} else if (val === 'mode') {
|
} else if (val === 'mode') {
|
||||||
const obj = { name: '模式', value: data[val] }
|
const obj = { name: '模式', value: data[val] }
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
|
} else if (val === 'container_type') {
|
||||||
|
const obj = { name: '托盘类型', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'command') {
|
||||||
|
const obj = { name: '作业状态', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'prohibitInWarehouse') {
|
||||||
|
const obj = { name: '禁止入库', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'prohibitOutWarehouse') {
|
||||||
|
const obj = { name: '禁止出库', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'stopReceiveTask') {
|
||||||
|
const obj = { name: '停止接收任务', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'hand_barcode') {
|
||||||
|
const obj = { name: '条码', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
} else if (val === 'error') {
|
} else if (val === 'error') {
|
||||||
const obj = { name: '报警', value: data[val] }
|
const obj = { name: '报警', value: data[val] }
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export default {
|
|||||||
const timer = setInterval(() => {
|
const timer = setInterval(() => {
|
||||||
this.settime()// 你所加载数据的方法
|
this.settime()// 你所加载数据的方法
|
||||||
this.getMessage()
|
this.getMessage()
|
||||||
}, 10000)
|
}, 1000)
|
||||||
// 销毁定时器
|
// 销毁定时器
|
||||||
this.$once('hook:beforeDestroy', () => {
|
this.$once('hook:beforeDestroy', () => {
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
@@ -175,14 +175,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
changeDevice(val) {
|
changeDevice(val) {
|
||||||
this.device = val
|
this.device = val
|
||||||
deviceCrud.getLedMessage(this.device).then(data => {
|
|
||||||
this.form = data
|
|
||||||
})
|
|
||||||
// todo: 定时器
|
|
||||||
this.timer = setInterval(() => { // 定时刷新设备的状态信息
|
|
||||||
console.log('定时器启动')
|
|
||||||
this.initStatus()
|
|
||||||
}, 10000)
|
|
||||||
},
|
},
|
||||||
getMessage() {
|
getMessage() {
|
||||||
deviceCrud.getLedMessage(this.device).then(data => {
|
deviceCrud.getLedMessage(this.device).then(data => {
|
||||||
|
|||||||
@@ -1401,7 +1401,8 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
||||||
@@ -1428,7 +1429,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
||||||
@@ -1454,7 +1455,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
||||||
@@ -1484,7 +1485,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
||||||
@@ -1515,7 +1516,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
|
||||||
|
|||||||
@@ -2776,7 +2776,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
||||||
@@ -2810,7 +2810,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
||||||
@@ -3229,7 +3229,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成");
|
||||||
@@ -3260,7 +3260,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
for (int k = 0; k < numArr.size(); k++) {
|
for (int k = 0; k < numArr.size(); k++) {
|
||||||
JSONObject json = numArr.getJSONObject(k);
|
JSONObject json = numArr.getJSONObject(k);
|
||||||
error += json.getString("struct_code") + ",";
|
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成!");
|
throw new BadRequestException("仓位:" + error + "被锁定请等待下发任务并等待任务完成!");
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@
|
|||||||
AND task_status IN ('07')
|
AND task_status IN ('07')
|
||||||
AND is_delete = '0'
|
AND is_delete = '0'
|
||||||
AND task_type = '010503'
|
AND task_type = '010503'
|
||||||
AND DATEDIFF( NOW(), LEFT(update_time,10) ) <= 2
|
AND TIMESTAMPDIFF(HOUR,update_time,NOW()) <= 3
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
Reference in New Issue
Block a user