rev 驱动配置

This commit is contained in:
周俊杰
2023-08-09 13:48:52 +08:00
parent 8ba2642c34
commit 87b87a84e8
6 changed files with 53 additions and 58 deletions

View File

@@ -1223,7 +1223,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
"false".equalsIgnoreCase(json.getString("extra_value"))) {
extraObj.put(json.getString("extra_code"), json.getBoolean("extra_value"));
} else {
extraObj.put(json.getString("extra_code"), json.get("extra_value"));
boolean endsWith = json.getString("extra_value").endsWith("]");
boolean startsWith = json.getString("extra_value").startsWith("[");
if (endsWith && startsWith){
JSONArray extraValue = JSONArray.parseArray(json.getString("extra_value"));
extraObj.put(json.getString("extra_code"), extraValue);
} else {
extraObj.put(json.getString("extra_code"), json.get("extra_value"));
}
}
}

View File

@@ -42,7 +42,7 @@ public enum RequestMethodEnum {
feedback_device_status(16, "feedback_device_status", "反馈设备状态","1"),
apply_feedback_weight(16, "apply_feedback_weight", "反馈压机残留重量","0");
apply_feedback_weight(16, "apply_feedback_weight", "反馈压机残留重量","1");
//驱动索引

View File

@@ -674,7 +674,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
List<String> getDeviceCodeList = this.getExtraDeviceCodes("get_station");
List<String> putDeviceCodeList = this.getExtraDeviceCodes("put_station");
request.setGet_station(getDeviceCodeList.get(get_station));
request.setGet_station(getDeviceCodeList.get(0));
request.setPut_station(putDeviceCodeList.get(put_station));
request.setLaser_marking_code(laser_marking_code);
request.setGrinding_number(grinding_number);

View File

@@ -186,7 +186,7 @@ public class StandardEmptyPalletSiteDeviceDriver extends AbstractOpcDeviceDriver
if (number == max_emptypalletnum && !requireSucess && move > 0) {
//判断逻辑
//需要检查关联的另一设备也满足数量后才能入库
Object[] linkobj = (Object[]) this.getDevice().getExtraValue().get("link_device_code");
Object[] linkobj = (Object[]) this.getDevice().getExtraValue().get("device_code");
for (int i = 0; i < linkobj.length; i++) {
String linkDevice = linkobj[i].toString();
Device device = appService.findDeviceByCode(linkDevice);