微调
This commit is contained in:
@@ -2,6 +2,7 @@ package com.njcn.csharmonic.service.impl;
|
||||
|
||||
import com.njcn.access.api.AskDeviceDataFeignClient;
|
||||
import com.njcn.access.utils.MqttUtil;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.api.DataSetFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.CsDataSet;
|
||||
@@ -34,7 +35,7 @@ public class RealDataServiceImpl implements RealDataService {
|
||||
String clientName = "NJCN-" + nDid.substring(nDid.length() - 6);
|
||||
boolean mqttClient = mqttUtil.judgeClientOnline(clientName);
|
||||
if (!mqttClient) {
|
||||
throw new RuntimeException("装置离线");
|
||||
throw new BusinessException("装置离线");
|
||||
}
|
||||
Integer clDid = Integer.parseInt(lineId.substring(lineId.length() - 1));
|
||||
//获取装置所用模板
|
||||
@@ -53,8 +54,8 @@ public class RealDataServiceImpl implements RealDataService {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -67,7 +68,7 @@ public class RealDataServiceImpl implements RealDataService {
|
||||
String clientName = "NJCN-" + nDid.substring(nDid.length() - 6);
|
||||
boolean mqttClient = mqttUtil.judgeClientOnline(clientName);
|
||||
if (!mqttClient) {
|
||||
throw new RuntimeException("装置离线");
|
||||
throw new BusinessException("装置离线");
|
||||
}
|
||||
Integer clDid = Integer.parseInt(lineId.substring(lineId.length() - 1));
|
||||
//获取装置所用模板
|
||||
@@ -87,8 +88,8 @@ public class RealDataServiceImpl implements RealDataService {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user