rev:优化根据木箱号查询方法

This commit is contained in:
2024-09-04 15:38:13 +08:00
parent 6afccdc7a6
commit c21cc00085
6 changed files with 106 additions and 53 deletions

View File

@@ -273,18 +273,19 @@ public class ItemProtocol {
setIsonline(true);
return value;
}
return value;
return 0;
}
public String getOpcStringValue(String protocol) {
String value = this.driver.getStringValue(protocol);
if (value == null) {
setIsonline(false);
return "";
// return "";
} else {
setIsonline(true);
return value;
}
return "";
}
public int[] getOpcIntegerArrayValue(String protocol) {

View File

@@ -23,6 +23,7 @@ import org.nl.acs.device_driver.conveyor.standard_ordinary_site.StandardOrdinary
import org.nl.acs.device_driver.one_conveyor.fold_disc_site.FoldDiscSiteDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.BoxPackageManipulatorDeviceDriver;
import org.nl.acs.device_driver.conveyor.box_palletizing_manipulator.BoxPalletizingManipulatorDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.trapped_manipulator.TrappedManipulatorManipulatorDeviceDriver;
import org.nl.acs.device_driver.paper_tube_device2.PaperTubeConveyor2DeviceDriver;
import org.nl.acs.device_driver.paper_tube_pick_site.PaperTubePickSiteDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.blank_manipulator.BlankManipulatorDeviceDriver;
@@ -558,6 +559,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
BeltConveyorDeviceDriver beltConveyorDeviceDriver ;
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver;
FoldDiscSiteDeviceDriver foldDiscSiteDeviceDriver;
TrappedManipulatorManipulatorDeviceDriver trappedManipulatorManipulatorDeviceDriver;
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
hongXiangStationDeviceDriver.writing(code, value);
@@ -569,6 +571,24 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver=(BeltConveyorDeviceDriver) device.getDeviceDriver();
beltConveyorDeviceDriver.writing(code, value);
Device mxddhj1 = deviceAppService.findDeviceByCode("MXDDHJ1");
trappedManipulatorManipulatorDeviceDriver= (TrappedManipulatorManipulatorDeviceDriver) mxddhj1.getDeviceDriver();
if (StrUtil.equals(device_code,"CK2020")){
Map<String, Object> map1 = new HashMap<>();
List list = new ArrayList();
map1.put("code", "to_command");
map1.put("value", 2020);
list.add(map1);
trappedManipulatorManipulatorDeviceDriver.writing(list);
}
if (StrUtil.equals(device_code,"CK2022")){
Map<String, Object> map2 = new HashMap<>();
List list = new ArrayList();
map2.put("code", "to_command");
map2.put("value", 2022);
list.add(map2);
trappedManipulatorManipulatorDeviceDriver.writing(list);
}
}
if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver();

View File

@@ -242,6 +242,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
public Map<String, Object> getAll(Map whereJson, Pageable page) {
String code = (String) whereJson.get("code");
String vehicle_code = (String) whereJson.get("vehicle_code");
String vehicle_code2 = (String) whereJson.get("vehicle_code2");
String material_type = (String) whereJson.get("material_type");
String status = (String) whereJson.get("status");
String point_code = (String) whereJson.get("point_code");
@@ -258,6 +259,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (!StrUtil.isEmpty(vehicle_code)) {
wrapper.like(InstructionMybatis::getVehicle_code, vehicle_code);
}
if (!StrUtil.isEmpty(vehicle_code2)) {
wrapper.like(InstructionMybatis::getVehicle_code2, vehicle_code2);
}
if (!StrUtil.isEmpty(material_type)) {
wrapper.eq(InstructionMybatis::getMaterial, material_type);
}

View File

@@ -355,6 +355,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
public Map<String, Object> getAll(Map whereJson, Pageable page) {
String task_code = (String) whereJson.get("task_code");
String vehicle_code = (String) whereJson.get("vehicle_code");
String vehicle_code2 = (String) whereJson.get("vehicle_code2");
String material_type = (String) whereJson.get("material_type");
String status = (String) whereJson.get("status");
String taskType = (String) whereJson.get("task_type");
@@ -373,6 +374,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
if (!StrUtil.isEmpty(vehicle_code)) {
wrapper.like(Task::getVehicle_code, vehicle_code);
}
if (!StrUtil.isEmpty(vehicle_code2)) {
wrapper.like(Task::getVehicle_code2, vehicle_code2);
}
if (!StrUtil.isEmpty(material_type)) {
wrapper.eq(Task::getMaterial, material_type);
}