更新
This commit is contained in:
@@ -1123,7 +1123,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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
int flag;
|
||||
|
||||
|
||||
|
||||
String device_code;
|
||||
|
||||
@Override
|
||||
@@ -111,7 +110,7 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
action = this.itemProtocol.getItem_action();
|
||||
error = this.itemProtocol.getItem_error();
|
||||
if (mode != last_mode) {
|
||||
if (mode == 3){
|
||||
if (mode == 3) {
|
||||
this.setRequireSucess(false);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
@@ -150,7 +149,7 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
message = "";
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
if (mode == 3 && !requireSucess){
|
||||
if (mode == 3 && !requireSucess) {
|
||||
instruction_require();
|
||||
}
|
||||
}
|
||||
@@ -174,21 +173,21 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
for (int i = 0; i < link_device_codes.size(); i++) {
|
||||
String link_device_code = link_device_codes.get(i);
|
||||
Device device = deviceAppservice.findDeviceByCode(link_device_code);
|
||||
if (device.getDeviceDriver() instanceof MaGangConveyorDeviceDriver){
|
||||
if (device.getDeviceDriver() instanceof MaGangConveyorDeviceDriver) {
|
||||
maGangConveyorDeviceDriver = (MaGangConveyorDeviceDriver) device.getDeviceDriver();
|
||||
if (maGangConveyorDeviceDriver.getMove() == 0){
|
||||
if (maGangConveyorDeviceDriver.getMove() == 0) {
|
||||
next_device_code = link_device_code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StrUtil.isEmpty(next_device_code)){
|
||||
if (StrUtil.isEmpty(next_device_code)) {
|
||||
return false;
|
||||
}
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user