Browse Source

更新

master
gengby 2 years ago
parent
commit
6ffe2ecd21
  1. 7
      acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java
  2. 3
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java

7
acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java

@ -1122,10 +1122,17 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
if ("true".equalsIgnoreCase(json.getString("extra_value")) ||
"false".equalsIgnoreCase(json.getString("extra_value"))) {
extraObj.put(json.getString("extra_code"), json.getBoolean("extra_value"));
} else {
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"));
}
}
}
extraObj.put("address", dto.getAddress());
result.put("form", extraObj);

3
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java

@ -90,7 +90,6 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
int flag;
String device_code;
@Override
@ -188,7 +187,7 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
TaskDto taskDto = new TaskDto();
String now = DateUtil.now();
taskDto.setTask_id(IdUtil.simpleUUID());
taskDto.setTask_code(CodeUtil.getNewCode("TASK_NO"));
taskDto.setTask_code("-" + CodeUtil.getNewCode("TASK_NO"));
taskDto.setTask_type("1");
taskDto.setRoute_plan_code("normal");
taskDto.setTask_status("0");

Loading…
Cancel
Save