|
|
|
@ -36,6 +36,14 @@ public class EXAServiceImpl implements EXAService { |
|
|
|
|
|
|
|
@Value("${EXA.ip}") |
|
|
|
private String EXA_IP; |
|
|
|
|
|
|
|
//根据测点名称测点描述模糊查询
|
|
|
|
/** |
|
|
|
* 根据测点名称测点描述模糊查询 |
|
|
|
* |
|
|
|
* @param reqVO 分页条件和测点名称测点描述模糊查询对象 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageResult<EXAHttp> getEXAPage(EXAPageReqVO reqVO) throws IOException, URISyntaxException { |
|
|
|
List<EXAHttp> exaListAll = exaUtils.getPointInfo(EXA_IP,reqVO); |
|
|
|
@ -47,6 +55,12 @@ public class EXAServiceImpl implements EXAService { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据点号列表查询实时值--循环每个点号,效率慢 |
|
|
|
* |
|
|
|
* @param list 点号列表 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<EXAHttp> getEXAListNow(List<EXAHttp> list) throws URISyntaxException, IOException { |
|
|
|
|
|
|
|
@ -62,20 +76,44 @@ public class EXAServiceImpl implements EXAService { |
|
|
|
|
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据多个点号查询实时值--批量查询,效率高 |
|
|
|
* |
|
|
|
* @param list 点号列表 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public EXAResult getEXAListNowReal(EXANowListReqVO list) throws URISyntaxException, IOException { |
|
|
|
return exaUtils.getNowDataList(EXA_IP,list); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 根据点号查询实时值 |
|
|
|
* |
|
|
|
* @param itemName 点号 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public String getEXANow(String itemName) throws URISyntaxException, IOException { |
|
|
|
return exaUtils.getNowData(EXA_IP,itemName).get(0); |
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
* 根据点号查询历史值 |
|
|
|
* |
|
|
|
* @param exaHistoryReqVo 点号查询历史值对象 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<List<Double>> getEXAHistory(EXAHistoryReqVO exaHistoryReqVo) { |
|
|
|
return exaUtils.getHistory(EXA_IP,exaHistoryReqVo); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据多个点号查询历史值 |
|
|
|
* |
|
|
|
* @param exaHistoryReqVo 点号查询历史值对象 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<List<List<Double>>> getEXAHistorys(EXAHistoryReqVO exaHistoryReqVo) { |
|
|
|
return exaUtils.getHistorys(EXA_IP,exaHistoryReqVo); |
|
|
|
@ -85,16 +123,33 @@ public class EXAServiceImpl implements EXAService { |
|
|
|
public String createPoint(Point pointVo) throws IOException { |
|
|
|
return exaUtils.setPoint(EXA_IP,pointVo); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 查询EXA所有分组信息 |
|
|
|
* |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<Object> getEXAGroupInfo() throws URISyntaxException, IOException { |
|
|
|
return exaUtils.getGroup(EXA_IP); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除EXA点号 |
|
|
|
* |
|
|
|
* @param ItemName 点号 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public String deletePoint(String ItemName){ |
|
|
|
return exaUtils.deletePoint(EXA_IP,ItemName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 导入EXA点号 |
|
|
|
* |
|
|
|
* @param importPoints 导入点号列表 |
|
|
|
* @param isUpdateSupport 是否支持更新 |
|
|
|
* @return 分页结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) // 添加事务,异常则回滚所有导入
|
|
|
|
public EXAPointImportRespVO importPointList(List<Point> importPoints, boolean isUpdateSupport) { |
|
|
|
@ -120,6 +175,7 @@ public class EXAServiceImpl implements EXAService { |
|
|
|
return respVO; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PointOptionItemVO> getPointOptionList(String search) { |
|
|
|
try { |
|
|
|
|