|
@@ -83,23 +83,41 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
return R.ok();
|
|
|
}
|
|
|
DeviceInfoDto.Vo deviceInfo = copy(DeviceInfoDto.Vo.class, list.get(0));
|
|
|
- ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.DEVICE_COMMON_POLL, 3)
|
|
|
- .execute(() -> {
|
|
|
+ int num = 0;
|
|
|
+ if (obj.getIsSysinfo()) {
|
|
|
+ num++;
|
|
|
+ }
|
|
|
+ if (obj.getIsStatus()) {
|
|
|
+ num++;
|
|
|
+ }
|
|
|
+ if (obj.getIsRegister()) {
|
|
|
+ num++;
|
|
|
+ }
|
|
|
+ if (num > 0) {
|
|
|
+ ThreadPoolUtils.Execute execute = ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.DEVICE_COMMON_POLL, num);
|
|
|
+ if (obj.getIsSysinfo()) {
|
|
|
+ execute.execute(() -> {
|
|
|
//系统信息
|
|
|
DeviceSysinfoDto.Vo deviceSysinfo = deviceSysinfoService.get(new DeviceSysinfoDto.Vo().setDeviceId(deviceInfo.getDeviceId())).getData();
|
|
|
deviceInfo.setDeviceSysinfo(deviceSysinfo);
|
|
|
- })
|
|
|
- .execute(() -> {
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (obj.getIsStatus()) {
|
|
|
+ execute.execute(() -> {
|
|
|
//状态信息
|
|
|
DeviceStatusDto.Vo deviceStatus = deviceStatusService.obj(new DeviceStatusDto.Vo().setDeviceId(deviceInfo.getDeviceId())).getData();
|
|
|
deviceInfo.setDeviceStatus(deviceStatus);
|
|
|
- })
|
|
|
- .execute(() -> {
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (obj.getIsRegister()) {
|
|
|
+ execute.execute(() -> {
|
|
|
//注册信息
|
|
|
DeviceRegisterDto.Vo deviceRegister = deviceRegisterService.obj(new DeviceRegisterDto.Vo().setDeviceId(deviceInfo.getDeviceId())).getData();
|
|
|
deviceInfo.setDeviceRegister(deviceRegister);
|
|
|
- })
|
|
|
- .end();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ execute.end();
|
|
|
+ }
|
|
|
return R.ok(deviceInfo);
|
|
|
}
|
|
|
|