更新
This commit is contained in:
@@ -22,7 +22,9 @@ import org.nl.acs.device.service.*;
|
|||||||
import org.nl.acs.device.service.dto.*;
|
import org.nl.acs.device.service.dto.*;
|
||||||
import org.nl.acs.device_driver.DeviceDriverDefination;
|
import org.nl.acs.device_driver.DeviceDriverDefination;
|
||||||
import org.nl.acs.device_driver.ScannerDeviceDriver;
|
import org.nl.acs.device_driver.ScannerDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.oven_manipulator.OvenGantryManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.siemens_conveyor_labeling.SiemensConveyorLabelingDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.slit_two_manipulator.SlitTwoManipulatorDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.slit_two_manipulator.SlitTwoManipulatorDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||||
@@ -941,6 +943,12 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
} else if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof SiemensConveyorDeviceDriver) {
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver();
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
siemensConveyorDeviceDriver.setDeviceStatus(form);
|
siemensConveyorDeviceDriver.setDeviceStatus(form);
|
||||||
|
} else if (device.getDeviceDriver() instanceof SiemensConveyorLabelingDeviceDriver) {
|
||||||
|
SiemensConveyorLabelingDeviceDriver siemensConveyorLabelingDeviceDriver = (SiemensConveyorLabelingDeviceDriver) device.getDeviceDriver();
|
||||||
|
siemensConveyorLabelingDeviceDriver.setDeviceStatus(form);
|
||||||
|
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||||
|
OvenGantryManipulatorDeviceDriver ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) device.getDeviceDriver();
|
||||||
|
ovenGantryManipulatorDeviceDriver.setDeviceStatus(form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -820,12 +820,19 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
jo.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||||
jo.put("feedMessage", feedMessage);
|
jo.put("feedMessage", feedMessage);
|
||||||
|
jo.put("driver_type", "siemens_conveyor");
|
||||||
|
jo.put("is_click", true);
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
String requestSucess = data.getString("requireSucess");
|
||||||
|
if (StrUtil.equals(requestSucess, "0")) {
|
||||||
|
this.requireSucess = false;
|
||||||
|
} else if(StrUtil.equals(requestSucess, "1")) {
|
||||||
|
this.requireSucess = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void writing(int type, int command) {
|
// public void writing(int type, int command) {
|
||||||
|
|||||||
@@ -850,10 +850,12 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
} else {
|
} else {
|
||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
|
Instruction instruction = instructionService.findByCode(String.valueOf(task));
|
||||||
message = "申请AGV搬运任务中...";
|
message = "申请AGV搬运任务中...";
|
||||||
JSONObject apply = new JSONObject();
|
JSONObject apply = new JSONObject();
|
||||||
apply.put("device_code", device_code);
|
apply.put("device_code", device_code);
|
||||||
apply.put("type","1");
|
apply.put("type", "4");
|
||||||
|
apply.put("vehicle_code", instruction.getVehicle_code());
|
||||||
String str = acsToWmsService.applyTaskToWms(apply);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
@@ -861,9 +863,9 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
} else {
|
} else {
|
||||||
if (jo.getInteger("status") == 200) {
|
if (jo.getInteger("status") == 200) {
|
||||||
message = "申请AGV搬运任务成功";
|
message = "申请AGV搬运任务成功";
|
||||||
requireEmptyOutSuccess = true;
|
requireSucess = true;
|
||||||
} else {
|
} else {
|
||||||
requireEmptyOutSuccess = false;
|
requireSucess = false;
|
||||||
message = "申请AGV搬运任务失败," + jo.get("message").toString();
|
message = "申请AGV搬运任务失败," + jo.get("message").toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1134,6 +1134,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
map5.put("code", "to_command1");
|
map5.put("code", "to_command1");
|
||||||
map5.put("value", "1");
|
map5.put("value", "1");
|
||||||
list.add(map5);
|
list.add(map5);
|
||||||
|
HashMap<String, String> map6 = new HashMap<String, String>() {{
|
||||||
|
put("code", "to_command2");
|
||||||
|
put("value", "0");
|
||||||
|
}};
|
||||||
|
list.add(map6);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发前工位任务");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发前工位任务");
|
||||||
|
|
||||||
@@ -1164,6 +1169,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
map5.put("code", "to_command2");
|
map5.put("code", "to_command2");
|
||||||
map5.put("value", "1");
|
map5.put("value", "1");
|
||||||
list.add(map5);
|
list.add(map5);
|
||||||
|
HashMap map6 = new HashMap() {{
|
||||||
|
put("code", "to_command1");
|
||||||
|
put("value", "0");
|
||||||
|
}};
|
||||||
|
list.add(map6);
|
||||||
this.writing(list);
|
this.writing(list);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发后工位任务");
|
logServer.deviceExecuteLog(device_code, "", "", dto.getInstruction_code() + "下发后工位任务");
|
||||||
|
|
||||||
|
|||||||
@@ -646,6 +646,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("vehicle_code", vehicle_code);
|
jo.put("vehicle_code", vehicle_code);
|
||||||
jo.put("vehicle_type", vehicle_type);
|
jo.put("vehicle_type", vehicle_type);
|
||||||
jo.put("storage_task_type", storage_task_type);
|
jo.put("storage_task_type", storage_task_type);
|
||||||
|
if (StrUtil.equals("4",task_type)){
|
||||||
|
agv_system_type = "1";
|
||||||
|
}
|
||||||
jo.put("agv_system_type", agv_system_type);
|
jo.put("agv_system_type", agv_system_type);
|
||||||
jo.put("oven_time", (int) Math.ceil(oven_time));
|
jo.put("oven_time", (int) Math.ceil(oven_time));
|
||||||
jo.put("remark", remark);
|
jo.put("remark", remark);
|
||||||
|
|||||||
Reference in New Issue
Block a user