add: 添加反馈LMS烘箱信息

This commit is contained in:
yanps
2024-04-23 17:19:49 +08:00
parent 7bc392b12d
commit ca633ff27d
2 changed files with 82 additions and 24 deletions

View File

@@ -360,7 +360,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
}
String startAddr = startDevice.getExtraValue().get("address").toString();
String nextAddr = nextDevice.getExtraValue().get("address").toString();
/*String interaction_json = taskDto.getInteraction_json();
String interaction_json = taskDto.getInteraction_json();
JSONObject jsonObject = JSONObject.parseObject(interaction_json);
//套管1物料
Object to_material1 = jsonObject.get("left");
@@ -390,14 +390,14 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
//套管数量
Object to_qty1 = jsonObject.get("casingCount");
//拔管数量
Object to_qty2 = jsonObject.get("pullCount");*/
Object to_qty2 = jsonObject.get("pullCount");
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", CommonFinalParam.ONE);
map.put("to_onset", startAddr);
map.put("to_task", instruction.getInstruction_code());
map.put("to_target", nextAddr);
toTranscription(taskDto,map);
/*map.put("to_material1", to_material1);
//toTranscription(taskDto,map);
map.put("to_material1", to_material1);
if (ObjectUtil.isNotEmpty(to_material2)) {
map.put("to_material2", to_material2);
}
@@ -422,7 +422,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
map.put("to_spec4", to_spec4);
}
map.put("to_qty1", to_qty1);
map.put("to_qty2", to_qty2);*/
map.put("to_qty2", to_qty2);
this.writing(map);
this.setRequireSucess(true);
return true;
@@ -499,32 +499,69 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
}
String startAddr = startDevice.getExtraValue().get("address").toString();
String nextAddr = nextDevice.getExtraValue().get("address").toString();
/*String interactionJson = task.getInteraction_json();
JSONObject jsonObject = JSONObject.parseObject(interactionJson);
//所需纸管信息(左边)
Object left = jsonObject.get("left");
//所需纸管信息(右边)
Object right = jsonObject.get("right");
//当前纸管信息(左边)
Object currentLeft = jsonObject.get("currentLeft");
//当前纸管信息(右边)
Object currentRight = jsonObject.get("currentRight");
String interaction_json = task.getInteraction_json();
JSONObject jsonObject = JSONObject.parseObject(interaction_json);
//套管1物料
Object to_material1 = jsonObject.get("left");
//套管2物料
Object to_material2 = jsonObject.get("right");
//套管1规格
Object to_spec1 = jsonObject.get("leftSpec");
//套管2规格
Object to_spec2 = jsonObject.get("rightSpec");
//套管1尺寸
Object to_size1 = jsonObject.get("leftSize");
//套管2尺寸
Object to_size2 = jsonObject.get("rightSize");
//拔管1物料
Object to_material3 = jsonObject.get("currentLeft");
//拔管2物料
Object to_material4 = jsonObject.get("currentRight");
//拔管1尺寸
Object to_size3 = jsonObject.get("currentLeftSize");
//拔管2尺寸
Object to_size4 = jsonObject.get("currentRightSize");
//拔管1规格
Object to_spec3 = jsonObject.get("currentLeftSpec");
//拔管2规格
Object to_spec4 = jsonObject.get("currentRightSpec");
//套管数量
Object casingCount = jsonObject.get("casingCount");
Object to_qty1 = jsonObject.get("casingCount");
//拔管数量
Object pullCount = jsonObject.get("pullCount");*/
Object to_qty2 = jsonObject.get("pullCount");
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", CommonFinalParam.ONE);
map.put("to_onset", startAddr);
map.put("to_task", instdto.getInstruction_code());
map.put("to_target", nextAddr);
toTranscription(task,map);
/*map.put("left", left);
map.put("right", right);
map.put("currentLeft", currentLeft);
map.put("currentRight", currentRight);
map.put("casingCount", casingCount);
map.put("pullCount", pullCount);*/
//toTranscription(taskDto,map);
map.put("to_material1", to_material1);
if (ObjectUtil.isNotEmpty(to_material2)) {
map.put("to_material2", to_material2);
}
map.put("to_spec1", to_spec1);
if (ObjectUtil.isNotEmpty(to_spec2)) {
map.put("to_spec2", to_spec2);
}
map.put("to_size1", to_size1);
if (ObjectUtil.isNotEmpty(to_size2)) {
map.put("to_size2", to_size2);
}
map.put("to_material3", to_material3);
if (ObjectUtil.isNotEmpty(to_material4)) {
map.put("to_material4", to_material4);
}
map.put("to_size3", to_size3);
if (ObjectUtil.isNotEmpty(to_size4)) {
map.put("to_size4", to_size4);
}
map.put("to_spec3", to_spec3);
if (ObjectUtil.isNotEmpty(to_spec4)) {
map.put("to_spec4", to_spec4);
}
map.put("to_qty1", to_qty1);
map.put("to_qty2", to_qty2);
this.writing(map);
this.setRequireSucess(true);
notCreateInstMessage = "";

View File

@@ -23,6 +23,7 @@ import org.nl.acs.device_driver.conveyor.box_palletizing_manipulator.BoxPalletiz
import org.nl.acs.device_driver.paper_tube_device2.PaperTubeConveyor2DeviceDriver;
import org.nl.acs.device_driver.two_conveyor.blank_manipulator.BlankManipulatorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.inflatable_shaft_library.InflatableShaftLibraryDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.lamp_three_color.LampThreecolorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
@@ -605,6 +606,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
BlankManipulatorDeviceDriver blankManipulatorDeviceDriver;
//烘箱行架机械手
OvenGantryManipulatorDeviceDriver ovenGantryManipulatorDeviceDriver;
//烘箱
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
//装箱行架机械手
BoxPackageManipulatorDeviceDriver boxManipulatorDeviceDriver;
//木箱码垛机械手
@@ -647,6 +650,24 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("action", Math.min(3, blankManipulatorDeviceDriver.getAction()));
jo.put("task", Math.min(3, blankManipulatorDeviceDriver.getTask()));
jo.put("error", blankManipulatorDeviceDriver.getError());
}else if (device.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code);
jo.put("mode", hongXiangConveyorDeviceDriver.getMode());
jo.put("status", Math.min(3, hongXiangConveyorDeviceDriver.getMode()));
jo.put("move", hongXiangConveyorDeviceDriver.getMove());
jo.put("countdown_house", hongXiangConveyorDeviceDriver.getCountdown_house());
jo.put("countdown_min", hongXiangConveyorDeviceDriver.getCountdown_min());
jo.put("countdown_sec", hongXiangConveyorDeviceDriver.getCountdown_sec());
//温度需要除以10
jo.put("temperature", hongXiangConveyorDeviceDriver.getTo_temperature() / 10);
jo.put("now_temperature", hongXiangConveyorDeviceDriver.getTemperature() / 10);
jo.put("door", hongXiangConveyorDeviceDriver.getDoor());
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
jo.put("error", hongXiangConveyorDeviceDriver.getError());
jo.put("isError", hongXiangConveyorDeviceDriver.getError());
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) device.getDeviceDriver();
jo.put("device_code", ovenGantryManipulatorDeviceDriver.getDevice().getDevice_code());