|
|
@ -107,7 +107,7 @@ public class CMDService { |
|
|
|
public List<Supplier<Boolean>> moveToHeatArea(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
Map<String ,Object> map = baseDataService.getOffsetMap(); |
|
|
|
String heatAreaPosition = baseDataService.getHeatAreaPositionById((Integer) params.get("areaId")); |
|
|
|
String heatAreaPosition = baseDataService.getHeatAreaPositionById((Integer) params.get("heatId")); |
|
|
|
String [] heatAreaPositionArr =heatAreaPosition.split(","); |
|
|
|
int x1 = Integer.parseInt(heatAreaPositionArr[0]); |
|
|
|
int y1 = Integer.parseInt(heatAreaPositionArr[1]); |
|
|
@ -163,14 +163,14 @@ public class CMDService { |
|
|
|
public List<Supplier<Boolean>> putBackCap(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
// 加热位机器代码 |
|
|
|
String heaterId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String heatId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
String lidPosition = baseDataService.getLidPosition(); |
|
|
|
String [] lidPositionArr = lidPosition.split(","); |
|
|
|
int x1 = Integer.parseInt(lidPositionArr[0]); |
|
|
|
int y1 = Integer.parseInt(lidPositionArr[1]); |
|
|
|
int z1 = Integer.parseInt(lidPositionArr[2]); |
|
|
|
|
|
|
|
String position = baseDataService.getHeatAreaLidPositionById((Integer) params.get("areaId")); |
|
|
|
String position = baseDataService.getHeatAreaLidPositionById((Integer) params.get("heatId")); |
|
|
|
Map<String ,Object> map = baseDataService.getOffsetMap(); |
|
|
|
String [] positionArr =position.split(","); |
|
|
|
int x2 = Integer.parseInt(positionArr[0]); |
|
|
@ -196,7 +196,7 @@ public class CMDService { |
|
|
|
cmdList.add(() -> deviceService.closeClaw()); |
|
|
|
// 密封 |
|
|
|
// 解除密封 |
|
|
|
cmdList.add(() -> deviceService.setSealLid(Integer.parseInt(heaterId), true)); |
|
|
|
cmdList.add(() -> deviceService.setSealLid(Integer.parseInt(heatId), true)); |
|
|
|
// 机械臂复位 |
|
|
|
return cmdList; |
|
|
|
} |
|
|
@ -204,9 +204,9 @@ public class CMDService { |
|
|
|
public List<Supplier<Boolean>> takeOffCap(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
// 拍子坐标 |
|
|
|
String position = baseDataService.getHeatAreaLidPositionById((Integer) params.get("areaId")); |
|
|
|
String position = baseDataService.getHeatAreaLidPositionById((Integer) params.get("heatId")); |
|
|
|
// 加热位机器代码 |
|
|
|
String heaterId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
|
|
|
|
Map<String ,Object> map = baseDataService.getOffsetMap(); |
|
|
|
String [] positionArr =position.split(","); |
|
|
@ -223,7 +223,7 @@ public class CMDService { |
|
|
|
//机械臂移动到拍子坐标 |
|
|
|
cmdList.add(() -> deviceService.moveRailArmToPoint(x1,y1,z1)); |
|
|
|
// 解除密封 |
|
|
|
cmdList.add(() -> deviceService.setSealLid(Integer.parseInt(heaterId), false)); |
|
|
|
cmdList.add(() -> deviceService.setSealLid(Integer.parseInt(hardwareId), false)); |
|
|
|
// 打开钩子 |
|
|
|
cmdList.add(() -> deviceService.openClaw()); |
|
|
|
// 机械臂下移位置 |
|
|
@ -252,17 +252,17 @@ public class CMDService { |
|
|
|
// 停止加热 |
|
|
|
public List<Supplier<Boolean>> stopHeat(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
cmdList.add(() -> deviceService.stopHeating(hardwareId)); |
|
|
|
return cmdList; |
|
|
|
} |
|
|
|
// 开始加热 |
|
|
|
public List<Supplier<Boolean>> startHeat(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
Double temperature; |
|
|
|
if (params.get("temperature") == null) { |
|
|
|
temperature = Double.valueOf(baseDataService.getHeatAreaTemperatureById((Integer) params.get("areaId"))); |
|
|
|
temperature = Double.valueOf(baseDataService.getHeatAreaTemperatureById((Integer) params.get("heatId"))); |
|
|
|
}else{ |
|
|
|
temperature = (Double) params.get("temperature"); |
|
|
|
} |
|
|
@ -289,7 +289,7 @@ public class CMDService { |
|
|
|
public List<Supplier<Boolean>> moveToActionArea(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
Map<String ,Object> map = baseDataService.getOffsetMap(); |
|
|
|
String heatAreaPosition = baseDataService.getHeatAreaPositionById((Integer) params.get("areaId")); |
|
|
|
String heatAreaPosition = baseDataService.getHeatAreaPositionById((Integer) params.get("heatId")); |
|
|
|
String [] heatAreaPositionArr =heatAreaPosition.split(","); |
|
|
|
int x1 = Integer.parseInt(heatAreaPositionArr[0]); |
|
|
|
int y1 = Integer.parseInt(heatAreaPositionArr[1]); |
|
|
@ -345,7 +345,7 @@ public class CMDService { |
|
|
|
// 放下托盘 |
|
|
|
public List<Supplier<Boolean>> downTray(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
if(params.get("height") != null && params.get("speed") != null) { |
|
|
|
cmdList.add(() -> deviceService.setTrayParams(hardwareId, (Integer) params.get("speed"), (Integer) params.get("height"))); |
|
|
|
} |
|
|
@ -356,7 +356,7 @@ public class CMDService { |
|
|
|
// 抬起托盘 |
|
|
|
public List<Supplier<Boolean>> upTray(Map<String, Object> params) { |
|
|
|
List<Supplier<Boolean>> cmdList = new ArrayList<>(); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("areaId")); |
|
|
|
String hardwareId = baseDataService.getHeatAreaHardwareIdById((Integer) params.get("heatId")); |
|
|
|
if(params.get("height") != null && params.get("speed") != null) { |
|
|
|
cmdList.add(() -> deviceService.setTrayParams(hardwareId, (Integer) params.get("speed"), (Integer) params.get("height"))); |
|
|
|
} |
|
|
|