Commit 9915b628 authored by 廖旭伟's avatar 廖旭伟

修改下发设备开柜指令

parent e5e7bfcd
...@@ -268,13 +268,19 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -268,13 +268,19 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
deviceCodeList.add(device.getTargetDevice()); deviceCodeList.add(device.getTargetDevice());
}else { }else {
DevicePdu devicePdu = new DevicePdu(); DevicePdu devicePdu = new DevicePdu();
devicePdu.setDeviceStatus(2);
devicePdu.setEnabled(1);
devicePdu.setSiteId(device.getSiteId()); devicePdu.setSiteId(device.getSiteId());
devicePdu.setProductName("取件柜"); devicePdu.setProductName("取件柜");
Rest<RespData<List<DevicePdu>>> restd = deviceFeign.list(devicePdu); Rest<RespData<List<DevicePdu>>> restd = deviceFeign.list(devicePdu);
if (restd.getCode().equals(YesNoEnum.YES.getValue())) { if (restd.getCode().equals(YesNoEnum.YES.getValue())) {
if (restd.getData() != null && restd.getData().getData().size() > 0) { if (restd.getData() != null && restd.getData().getData().size() > 0) {
deviceCodeList.add(restd.getData().getData().get(0).getDeviceCode()); deviceCodeList.add(restd.getData().getData().get(0).getDeviceCode());
}else {
throw new AppException("指令发送失败,没有找到在线的取件柜");
} }
}else {
throw new AppException("查询设备列表失败");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment