rev 反馈mes取放倒完成
This commit is contained in:
@@ -482,6 +482,7 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
if (docking_barcode != 0) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("inbox", "" + docking_barcode);
|
||||
}
|
||||
taskDto.setVehicle_code(String.valueOf(docking_barcode));
|
||||
|
||||
@@ -22,6 +22,8 @@ import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -46,7 +48,8 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvServiceImpl.class);
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
|
||||
int mode = 0;
|
||||
//储料仓运行中
|
||||
@@ -191,6 +194,14 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
this.writing(map);
|
||||
inst.setExecute_status(InstActionEnum.EXECUTE_PUT_FALL_SEND_FULL_FINISH.getCode());
|
||||
instructionService.update(inst);
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("fall_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
}
|
||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||
NDCSocketConnectionAutoRun.write(data);
|
||||
this.set(0, 0, null);
|
||||
|
||||
@@ -27,6 +27,8 @@ import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* 海亮专机设备空框位
|
||||
@@ -186,6 +188,7 @@ public class HailiangOldSpecialEmptyStationDeviceDriver extends AbstractOpcDevic
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("put_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -242,6 +243,7 @@ public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDevice
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("take_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
|
||||
@@ -32,11 +32,14 @@ import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.order.service.ProduceshiftorderService;
|
||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -61,6 +64,8 @@ public class HailiangOldSpecialPourStationDeviceDriver extends AbstractOpcDevice
|
||||
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean(ProduceshiftorderServiceImpl.class);
|
||||
@Autowired
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
|
||||
private Date instruction_require_time = new Date();
|
||||
private int instruction_require_time_out = 3000;
|
||||
@@ -213,6 +218,14 @@ public class HailiangOldSpecialPourStationDeviceDriver extends AbstractOpcDevice
|
||||
this.writing("item_to_pour_num", inst.getQuantity());
|
||||
inst.setExecute_status(InstActionEnum.EXECUTE_PUT_FALL_SEND_FULL_FINISH.getCode());
|
||||
instructionService.update(inst);
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("fall_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
}
|
||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||
NDCSocketConnectionAutoRun.write(data);
|
||||
this.set(0, 0, null);
|
||||
|
||||
@@ -27,6 +27,8 @@ import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 海亮专机设备空框位
|
||||
*/
|
||||
@@ -186,6 +188,7 @@ public class HailiangSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDr
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("put_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -243,6 +244,7 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("take_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
|
||||
@@ -32,11 +32,14 @@ import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.order.service.ProduceshiftorderService;
|
||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -61,6 +64,8 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean(ProduceshiftorderServiceImpl.class);
|
||||
@Autowired
|
||||
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
|
||||
private int instruction_require_time_out = 3000;
|
||||
int mode = 0;
|
||||
@@ -215,6 +220,14 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
this.writing("item_to_pour_num", inst.getQuantity());
|
||||
inst.setExecute_status(InstActionEnum.EXECUTE_PUT_FALL_SEND_FULL_FINISH.getCode());
|
||||
instructionService.update(inst);
|
||||
if (inst != null) {
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setExt_param(new HashMap<>());
|
||||
taskDto.getExt_param().put("fall_finish", "1");
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
}
|
||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||
NDCSocketConnectionAutoRun.write(data);
|
||||
this.set(0, 0, null);
|
||||
@@ -323,7 +336,7 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
jo.put("is_click", true);
|
||||
jo.put("noFeedAgvMessage", this.getNoFeedAgvMessage());
|
||||
jo.put("noApplyTaskMessage", this.getNoApplyTaskMessage());
|
||||
jo.put("driver_type", "hailiang_special_pour_station");
|
||||
jo.put("driver_type", "hailiang_special_full_station");
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
itemMap.put(getToParam() + key, value);
|
||||
ReadUtil.write(itemMap, server);
|
||||
server.disconnect();
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.getDeviceCode(),"下发单个电气信号:" + key + ",下发电气信号值:" + value));
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.getDeviceCode(), "下发单个电气信号:" + key + ",下发电气信号值:" + value));
|
||||
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发单个电气信号:" + key + ",下发电气信号值:" + value);
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
*/
|
||||
public void writing(Map<String, Object> map) {
|
||||
LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
Map<String, Object> itemMap = new LinkedHashMap<>();
|
||||
map.forEach((key, value) -> {
|
||||
if (ObjectUtil.isNotEmpty(value)) {
|
||||
@@ -174,7 +175,8 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
|
||||
});
|
||||
if (ObjectUtil.isNotEmpty(itemMap)) {
|
||||
this.control(itemMap);
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.getDeviceCode(),"下发多个电气信号:" + itemMap));
|
||||
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.getDeviceCode(), "下发多个电气信号:" + itemMap));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -520,6 +520,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
if (ObjectUtil.isNotEmpty(dto.getVehicle_code())) {
|
||||
feed_jo.put("vehicle_code", dto.getVehicle_code());
|
||||
}
|
||||
feed_jo.put("ext_param", dto.getExt_param());
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
HttpResponse httpResponse = acsToWmsService.feedbackTaskStatusToWms(ja);
|
||||
|
||||
Reference in New Issue
Block a user