fix:调试修改

This commit is contained in:
2023-12-19 09:28:54 +08:00
parent f04013cf3d
commit 7085c09289
7 changed files with 44 additions and 31 deletions

View File

@@ -272,18 +272,18 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
private synchronized void bushingSucess() {
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
ApplyManipulatorActionResponse applyManipulatorActionResponse;
Instruction inst1 = instructionService.findByCode(String.valueOf(task1));
// Instruction inst2 = instructionService.findByCode(String.valueOf(task2));
Instruction inst1 = instructionService.findByCode(String.valueOf(task));
Instruction inst2 = instructionService.findByCode(String.valueOf(task1));
String task_code1 = inst1.getTask_code();
// String task_code2 = inst2.getTask_code();
String task_code2 = inst2.getTask_code();
applyManipulatorActionRequest.setDevice_code(device_code);
applyManipulatorActionRequest.setTask_code1(task_code1);
// applyManipulatorActionRequest.setTask_code2(task_code2);
applyManipulatorActionRequest.setTask_code1(task_code2);
applyManipulatorActionRequest.setTask_code2(task_code1);
applyManipulatorActionRequest.setType("7");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 4);
map.put("to_command", 5);
this.writing(map);
requireSucess = true;
logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse);

View File

@@ -454,8 +454,6 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String bushing_num = task.getBushing_num();
Map<String, Object> map = new LinkedHashMap<>();
map.put("inflatableShaftVersion", Integer.parseInt(version));
map.put("tube_num", Integer.parseInt(bushing_num));
map.put("is_wrapped", Integer.parseInt(is_bushing));
map.put("to_command", 2);
this.writing(map);
} else {
@@ -473,10 +471,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus()==200) {
logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
String put_device_code = applyManipulatorActionResponse.getPut_device_code();
String put_device_code = applyManipulatorActionResponse.getDevice_code();
Device device = deviceAppService.findDeviceByCode(put_device_code);
String to_putpoint = device.getExtraValue().get("address").toString();
Map<String, Object> map = new LinkedHashMap<>();
map.put("inflatableShaftVersion", applyManipulatorActionResponse.getVersion());
// map.put("to_size", applyManipulatorActionResponse.getSize());
map.put("to_command", 3);
map.put("to_putpoint", Integer.parseInt(to_putpoint));
this.writing(map);
@@ -496,7 +496,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
applyManipulatorActionRequest.setTask_code1(task_code);
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
String get_device_code = applyManipulatorActionResponse.getGet_device_code();
String get_device_code = applyManipulatorActionResponse.getDevice_code();
Device device = deviceAppService.findDeviceByCode(get_device_code);
String to_new_getpoint = device.getExtraValue().get("address").toString();
Map<String, Object> map = new LinkedHashMap<>();
@@ -520,10 +520,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
applyManipulatorActionRequest.setTask_code1(task_code);
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
String put_device_code2 = applyManipulatorActionResponse.getPut_device_code2();
String put_device_code2 = applyManipulatorActionResponse.getDevice_code();
Device device = deviceAppService.findDeviceByCode(put_device_code2);
String to_two_putpoint = device.getExtraValue().get("address").toString();
Map<String, Object> map = new LinkedHashMap<>();
map.put("inflatableShaftVersion", applyManipulatorActionResponse.getVersion());
// map.put("to_size", applyManipulatorActionResponse.getSize());
map.put("to_command", 5);
map.put("to_two_putpoint", Integer.parseInt(to_two_putpoint));
this.writing(map);

View File

@@ -193,6 +193,9 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
}
private synchronized void bushingSucess() {
List list = new ArrayList();
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();

View File

@@ -6,7 +6,6 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
@@ -15,18 +14,16 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.nl.acs.AcsConfig;
import org.nl.acs.agv.server.NDCAgvService;
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device.service.impl.DeviceServiceImpl;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.FeedLmsRealFailed;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.ScannerDeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_scanner.StandardScannerDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingRequest;
import org.nl.acs.ext.wms.data.ApplyLabelingAndBindingResponse;
import org.nl.acs.ext.wms.data.ApplyManipulatorActionRequest;
import org.nl.acs.ext.wms.data.ApplyManipulatorActionResponse;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.history.ErrorUtil;
import org.nl.acs.history.service.DeviceErrorLogService;
@@ -38,7 +35,6 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.DeviceAppServiceImpl;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.route.service.dto.RouteLineDto;
import org.nl.acs.task.service.TaskService;
@@ -304,7 +300,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
logServer.deviceItemValue(this.device_code, "task", String.valueOf(task));
logServer.deviceExecuteLog(this.device_code, "", "", "信号task" + last_task + "->" + task);
if ("true".equals(this.device.getExtraValue().get("task_update"))) {
taskDeviceUpdate();
taskDeviceUpdate(task);
}
}
if (move != 0 && task > 0) {
@@ -433,17 +430,19 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
}
private void taskDeviceUpdate() {
Instruction inst = checkInst();
JSONObject param = new JSONObject() {{
put("device_code", device_code);
put("task_code", inst.getTask_code());
private void taskDeviceUpdate(int task) {
Instruction inst = instructionService.findByTaskcode(String.valueOf(task));
}};
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,参数:" + param);
HttpResponse response = acsToWmsService.taskDeviceUpdate(param);
if (response == null || response.getStatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.body());
ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest();
applyManipulatorActionRequest.setDevice_code(device_code);
applyManipulatorActionRequest.setAction("3");
applyManipulatorActionRequest.setTask_code1(inst.getTask_code());
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,参数:" + applyManipulatorActionRequest);
ApplyManipulatorActionResponse response = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (response == null || response.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "task变化请求LMS,接口返回:" + response.getMessage());
}
}

View File

@@ -9,6 +9,15 @@ import java.util.Map;
public class ApplyManipulatorActionResponse extends BaseResponse {
private Map<String, String> data = new HashMap();
/**
* 取放货点
*/
private String device_code;
/**
* 气胀轴尺寸
*/
private String size;
/**
* 放货点

View File

@@ -39,7 +39,7 @@ public class AutoCreateInst {
List<TaskDto> list = taskserver.queryAll("task_status = '0'");
for (int i = 0; i < list.size(); i++) {
TaskDto acsTask = list.get(i);
if (StrUtil.equals(acsTask.getTask_type(), "7") && !StrUtil.startWith(acsTask.getTask_code(), "-")) {
if (StrUtil.equals(acsTask.getTask_type(), "7") || StrUtil.equals(acsTask.getTask_type(), "9")) {
continue;
}
String taskid = acsTask.getTask_id();

View File

@@ -1,9 +1,9 @@
window.g = {
dev: {
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
VUE_APP_BASE_API: 'http://127.0.0.1:8012'
},
prod: {
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
VUE_APP_BASE_API: 'http://127.0.0.1:8012'
}