|
@@ -427,9 +427,11 @@ public class IotOpeationFillController {
|
|
|
IotOpeationFillDO fillDO2 = iotOpeationFillService.orderDO(fillDO);
|
|
|
|
|
|
List<IotOpeationFillDO> reportList = new ArrayList<>();
|
|
|
+ List<IotOpeationFillDO> reportList1 = new ArrayList<>();
|
|
|
|
|
|
if(fillDO2!=null){
|
|
|
reportList = iotOpeationFillService.reportList(fillDO2);
|
|
|
+ reportList1 = iotOpeationFillService.reportList1(fillDO2);
|
|
|
}
|
|
|
|
|
|
List<IotModelTemplateAttrsDO1> resut = new ArrayList<>();
|
|
@@ -442,7 +444,11 @@ public class IotOpeationFillController {
|
|
|
|
|
|
//根据日报取值设备赋值
|
|
|
if(reportList.size()>0){
|
|
|
+
|
|
|
List<IotOpeationFillDO> cxLixt = reportList.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
+ //虚拟设备取值
|
|
|
+ List<IotOpeationFillDO> cxLixt1 = reportList1.stream().filter(e->e.getOrgName().equals(attrsDO.getName())).collect(Collectors.toList());
|
|
|
+
|
|
|
if(cxLixt.size()>0){
|
|
|
// 使用Map按orgName分组存储累加结果
|
|
|
Map<String, String> orgNameToFillContent = new HashMap<>();
|
|
@@ -486,6 +492,25 @@ public class IotOpeationFillController {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(cxLixt1.size()>0){
|
|
|
+ for (IotOpeationFillDO reportData : cxLixt1) {
|
|
|
+ IotDeviceRunLogDO report = new IotDeviceRunLogDO();
|
|
|
+ report.setDeviceId(reportData.getDeviceId());
|
|
|
+ report.setPointName(reportData.getOrgName());
|
|
|
+ report.setCreateTime(reportData.getCreateTime());
|
|
|
+ IotDeviceRunLogDO reportCx = iotOpeationFillService.reportData(report);
|
|
|
+
|
|
|
+ String currentContent = "";
|
|
|
+ if(reportCx==null){
|
|
|
+ attrsDO.setFillContent("");
|
|
|
+ }else{
|
|
|
+ currentContent = reportCx.getFillContent() != null ? reportCx.getFillContent() : "";
|
|
|
+ attrsDO.setFillContent(currentContent);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
attrsDO.setIsCollection(0);
|