|
@@ -118,10 +118,10 @@ public class LeanModelStatistics {
|
|
|
//遍历设备集合
|
|
|
fpgLeanModellist.forEach(fpgLeanModeInfo -> {
|
|
|
LambdaQueryWrapper<FpgGatherData> fpgGatherQuery = new LambdaQueryWrapper<FpgGatherData>().eq(FpgGatherData::getFpgModelState, "0");
|
|
|
- // 检测是否配置设备条件
|
|
|
-// if(fpgLeanModeInfo.ge){
|
|
|
-//
|
|
|
-// }
|
|
|
+ // 检测是否配置设备特殊条件
|
|
|
+ if(!fpgLeanModeInfo.getDeviceInformationIds().isEmpty()){
|
|
|
+ fpgGatherQuery.in(FpgGatherData::getDeviceInformationId, Arrays.asList(fpgLeanModeInfo.getDeviceInformationIds().split(",")));
|
|
|
+ }
|
|
|
List<FpgGatherData> fpgGatherList = fpgGatherDataService.list(fpgGatherQuery);
|
|
|
// 处理数据业务逻辑
|
|
|
fpgGatherList.forEach(fpgGatherData -> { // 循环处理采集数据处理
|
|
@@ -170,7 +170,13 @@ public class LeanModelStatistics {
|
|
|
// 重组对象
|
|
|
FpgStatiscsModelData fpgStatiscsModelData = new FpgStatiscsModelData(fpgGatherData, fpgLeanModeInfo, finalDatestr, dayDate, classs, curentDate, curentDate);
|
|
|
Query query = new Query();
|
|
|
- query.addCriteria(Criteria.where("deviceRegionId").is(fpgGatherData.getDeviceRegionId())).addCriteria(Criteria.where("deviceInformationId").is(fpgGatherData.getDeviceInformationId())).addCriteria(Criteria.where("devicePointId").is(fpgGatherData.getDevicePointId())).addCriteria(Criteria.where("dates").is(dayDate)).addCriteria(Criteria.where("datestr").is(finalDatestr));
|
|
|
+ query.addCriteria(Criteria.where("devicePointId").is(fpgGatherData.getDevicePointId())).addCriteria(Criteria.where("dates").is(dayDate)).addCriteria(Criteria.where("datestr").is(finalDatestr));
|
|
|
+ if(fpgGatherData.getDeviceRegionId() != null && !fpgGatherData.getDeviceRegionId().isEmpty()){ // 区域特殊处理
|
|
|
+ query.addCriteria(Criteria.where("deviceRegionId").is(fpgGatherData.getDeviceRegionId()));
|
|
|
+ }
|
|
|
+ if(fpgGatherData.getDeviceInformationId() != null && !fpgGatherData.getDeviceInformationId().isEmpty()){ // 设备特殊处理
|
|
|
+ query.addCriteria(Criteria.where("deviceInformationId").is(fpgGatherData.getDeviceInformationId()));
|
|
|
+ }
|
|
|
if(!classs.isEmpty()){ // 增加班次条件
|
|
|
query.addCriteria(Criteria.where("classs").is(classs));
|
|
|
}
|