Commit 42b30e45 authored by 廖旭伟's avatar 廖旭伟

修改下发设备开柜指令

parent cf5447e3
...@@ -4,6 +4,8 @@ import lombok.Data; ...@@ -4,6 +4,8 @@ import lombok.Data;
@Data @Data
public class DeviceOpenBoxPdu { public class DeviceOpenBoxPdu {
private Long siteId;
/*** 目标设备 */ /*** 目标设备 */
private String targetDevice; private String targetDevice;
......
...@@ -262,7 +262,18 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -262,7 +262,18 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
try { try {
DeviceNotifyPdu pdu = new DeviceNotifyPdu(); DeviceNotifyPdu pdu = new DeviceNotifyPdu();
List<String> deviceCodeList = new ArrayList<>(); List<String> deviceCodeList = new ArrayList<>();
deviceCodeList.add(device.getTargetDevice()); DevicePdu devicePdu = new DevicePdu();
devicePdu.setSiteId(device.getSiteId());
devicePdu.setProductName("取件柜");
Rest<RespData<List<DevicePdu>>> restd = deviceFeign.list(devicePdu);
if (restd.getCode().equals(YesNoEnum.YES.getValue())) {
if(restd.getData()!=null && restd.getData().getData().size()>0) {
deviceCodeList.add(restd.getData().getData().get(0).getDeviceCode());
}
}
//
//
// deviceCodeList.add(device.getTargetDevice());
pdu.setDeviceCodeList(deviceCodeList); pdu.setDeviceCodeList(deviceCodeList);
pdu.setAction("openBox"); pdu.setAction("openBox");
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
......
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