代码提交
This commit is contained in:
@@ -99,5 +99,5 @@ public class CsEquipmentDeliveryDTO {
|
||||
private Integer runStatus;
|
||||
|
||||
private Integer moduleNumber;
|
||||
|
||||
private Integer process;
|
||||
}
|
||||
@@ -23,4 +23,7 @@ public class LineParamDTO {
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private String devId;
|
||||
|
||||
@ApiModelProperty(value = "监测点id")
|
||||
private String lineId;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</select>
|
||||
|
||||
<select id="queryLine" resultType="com.njcn.csdevice.pojo.po.CsLedger">
|
||||
select id from cs_ledger a where a.`Level`='3' and a.state='1'
|
||||
select * from cs_ledger a where a.`Level`='3' and a.state='1'
|
||||
<if test="lineParamdto.engineerId!=null and lineParamdto.engineerId!=''">
|
||||
and FIND_IN_SET(#{lineParamdto.engineerId}, a.pids )
|
||||
</if>
|
||||
@@ -50,6 +50,9 @@
|
||||
<if test="lineParamdto.devId!=null and lineParamdto.devId!=''">
|
||||
and FIND_IN_SET(#{lineParamdto.devId}, a.pids )
|
||||
</if>
|
||||
<if test="lineParamdto.lineId!=null and lineParamdto.lineId!=''">
|
||||
and a.id=#{lineParamdto.lineId}
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
@@ -33,6 +33,10 @@ public class CommonStatisticalQueryParam {
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
private String process;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -97,4 +97,10 @@ public class CsEventPO extends BaseEntity {
|
||||
*/
|
||||
@TableField(value = "location")
|
||||
private String location;
|
||||
/**
|
||||
* 用于数据控制 1:设备登记,2:功能调试,3:出厂调试 4:设备投运)
|
||||
*/
|
||||
@TableField(value = "process")
|
||||
private String process;
|
||||
|
||||
}
|
||||
@@ -38,54 +38,54 @@ public class StableDataController extends BaseController {
|
||||
|
||||
private final StableDataService stableDataService;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryFisrtThdData")
|
||||
@ApiOperation("查询谐波畸变率实时数据")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true)
|
||||
})
|
||||
public HttpResult<List<ThdDataVO>> queryFisrtThdData(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) {
|
||||
String methodDescribe = getMethodDescribe("queryThdData");
|
||||
List<ThdDataVO> list = stableDataService.queryThdData(devId, statisticalName);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryThdDataByTime")
|
||||
@ApiOperation("查询时间段内谐波畸变率")
|
||||
@ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true)
|
||||
public HttpResult<List<ThdDataVO>> queryThdDataByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryThdDataByTime");
|
||||
List<ThdDataVO> list = stableDataService.queryThdDataByTime(thdDataQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryFisrtThdContent")
|
||||
@ApiOperation("查询谐波含量实时数据")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||
@ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true)
|
||||
})
|
||||
public HttpResult<List<ThdDataVO>> queryFisrtThdContent(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) {
|
||||
String methodDescribe = getMethodDescribe("queryFisrtThdContent");
|
||||
List<ThdDataVO> list = stableDataService.queryFisrtThdContent(devId, statisticalName);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryThdContentByTime")
|
||||
@ApiOperation("查询时间段内谐波畸变率")
|
||||
@ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true)
|
||||
public HttpResult<List<ThdDataVO>> queryThdContentByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryThdContentByTime");
|
||||
List<ThdDataVO> list = stableDataService.queryThdContentByTime(thdDataQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
//
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/queryFisrtThdData")
|
||||
// @ApiOperation("查询谐波畸变率实时数据")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||
// @ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true)
|
||||
// })
|
||||
// public HttpResult<List<ThdDataVO>> queryFisrtThdData(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) {
|
||||
// String methodDescribe = getMethodDescribe("queryThdData");
|
||||
// List<ThdDataVO> list = stableDataService.queryThdData(devId, statisticalName);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
// }
|
||||
//
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/queryThdDataByTime")
|
||||
// @ApiOperation("查询时间段内谐波畸变率")
|
||||
// @ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true)
|
||||
// public HttpResult<List<ThdDataVO>> queryThdDataByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) {
|
||||
// String methodDescribe = getMethodDescribe("queryThdDataByTime");
|
||||
// List<ThdDataVO> list = stableDataService.queryThdDataByTime(thdDataQueryParm);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/queryFisrtThdContent")
|
||||
// @ApiOperation("查询谐波含量实时数据")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "devId", value = "设备id", required = true),
|
||||
// @ApiImplicitParam(name = "statisticalName", value = "统计指标name", required = true)
|
||||
// })
|
||||
// public HttpResult<List<ThdDataVO>> queryFisrtThdContent(@RequestParam("devId") String devId, @RequestParam("statisticalName") String statisticalName) {
|
||||
// String methodDescribe = getMethodDescribe("queryFisrtThdContent");
|
||||
// List<ThdDataVO> list = stableDataService.queryFisrtThdContent(devId, statisticalName);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
// }
|
||||
//
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/queryThdContentByTime")
|
||||
// @ApiOperation("查询时间段内谐波畸变率")
|
||||
// @ApiImplicitParam(name = "thdDataQueryParm", value = "查询参数", required = true)
|
||||
// public HttpResult<List<ThdDataVO>> queryThdContentByTime(@RequestBody @Validated ThdDataQueryParm thdDataQueryParm) {
|
||||
// String methodDescribe = getMethodDescribe("queryThdContentByTime");
|
||||
// List<ThdDataVO> list = stableDataService.queryThdContentByTime(thdDataQueryParm);
|
||||
// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
//
|
||||
// }
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryFisrtCommonStatistical")
|
||||
@ApiOperation("查询实时数据")
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
public interface CsEventUserPOMapper extends BaseMapper<CsEventUserPO> {
|
||||
Integer queryEventCount(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam);
|
||||
|
||||
List<EventDetailVO> queryUserEventList(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam, @Param("devIds") List<String> devIds);
|
||||
List<EventDetailVO> queryUserEventList(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam, @Param("devIds") List<String> devIds, @Param("flag") Boolean flag);
|
||||
|
||||
Page<EventDetailVO> queryEventpage(Page<EventDetailVO> returnpage, @Param("csEventUserQueryPage") CsEventUserQueryPage csEventUserQueryPage, @Param("devIds") List<String> devIds);
|
||||
Page<EventDetailVO> queryEventpage(Page<EventDetailVO> returnpage, @Param("csEventUserQueryPage") CsEventUserQueryPage csEventUserQueryPage, @Param("devIds") List<String> devIds, @Param("flag") Boolean flag);
|
||||
}
|
||||
@@ -29,10 +29,17 @@
|
||||
</select>
|
||||
|
||||
<select id="queryUserEventList" resultType="com.njcn.csharmonic.pojo.vo.EventDetailVO">
|
||||
select DISTINCT a.event_id id,a.status status,b.device_id deviceId,b.line_id lineId,
|
||||
select DISTINCT a.event_id id,
|
||||
<if test="flag">
|
||||
a.status status,
|
||||
</if>
|
||||
<if test="!flag">
|
||||
1 status,
|
||||
</if>
|
||||
b.device_id deviceId,b.line_id lineId,
|
||||
b.start_time startTime,b.tag tag ,b.wave_path wavePath,b.instant_pics,b.rms_pics , b.type type
|
||||
from cs_event_user a inner join cs_event b on a.event_id=b.id where 1=1
|
||||
|
||||
from cs_event_user a inner join cs_event b on a.event_id=b.id inner join cs_equipment_delivery c on b.device_id=c.id where 1=1
|
||||
and b.process=c.process
|
||||
<if test="csEventUserQueryParam!=null and csEventUserQueryParam.endTime != null and csEventUserQueryParam.endTime !=''">
|
||||
AND DATE(b.start_time) <= DATE(#{csEventUserQueryParam.endTime})
|
||||
</if>
|
||||
@@ -68,10 +75,17 @@
|
||||
</select>
|
||||
|
||||
<select id="queryEventpage" resultType="com.njcn.csharmonic.pojo.vo.EventDetailVO">
|
||||
select DISTINCT a.event_id id,a.status status,b.device_id deviceId,b.line_id lineId,
|
||||
select DISTINCT a.event_id id,
|
||||
<if test="flag">
|
||||
a.status status,
|
||||
</if>
|
||||
<if test="!flag">
|
||||
1 status,
|
||||
</if>
|
||||
b.device_id deviceId,b.line_id lineId,
|
||||
b.start_time startTime,b.tag tag ,b.wave_path wavePath,b.instant_pics,b.rms_pics , b.type type
|
||||
from cs_event_user a inner join cs_event b on a.event_id=b.id where 1=1
|
||||
|
||||
from cs_event_user a inner join cs_event b on a.event_id=b.id inner join cs_equipment_delivery c on b.device_id=c.id where 1=1
|
||||
and b.process=c.process
|
||||
<if test="csEventUserQueryPage!=null and csEventUserQueryPage.endTime != null and csEventUserQueryPage.endTime !=''">
|
||||
AND DATE(b.start_time) <= DATE(#{csEventUserQueryPage.endTime})
|
||||
</if>
|
||||
|
||||
@@ -68,6 +68,8 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
public List<EventDetailVO> queryUserEventList(CsEventUserQueryParam csEventUserQueryParam) {
|
||||
csEventUserQueryParam.setUserId(RequestUtil.getUserIndex());
|
||||
String role = RequestUtil.getUserRole();
|
||||
Boolean flag =Boolean.TRUE;
|
||||
|
||||
if(Objects.equals(role, LogInfo.UNKNOWN_ROLE)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
@@ -81,6 +83,8 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
}
|
||||
if( Objects.equals(role, AppRoleEnum.OPERATION_MANAGER.getCode())||Objects.equals(role, AppRoleEnum.ROOT.getCode())){
|
||||
csEventUserQueryParam.setUserId(null);
|
||||
flag = Boolean.FALSE;
|
||||
|
||||
}
|
||||
// if(CollectionUtil.isEmpty(csEventUserQueryParam.getTarget())&&Objects.equals(csEventUserQueryParam.getType(),"0")){
|
||||
// /*获取所有暂态事件类型*/
|
||||
@@ -101,7 +105,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
if (CollectionUtils.isEmpty(collect)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<EventDetailVO> list = this.getBaseMapper().queryUserEventList(csEventUserQueryParam,collect);
|
||||
List<EventDetailVO> list = this.getBaseMapper().queryUserEventList(csEventUserQueryParam,collect,flag);
|
||||
// 主要用于统计不关心详情,详情重分页查询获取
|
||||
// list.forEach(temp->{
|
||||
// DevDetailDTO devDetail = csLedgerFeignClient.queryDevDetail(temp.getDeviceId()).getData();
|
||||
@@ -208,7 +212,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
@Override
|
||||
public Page<EventDetailVO> queryEventpage(CsEventUserQueryPage csEventUserQueryPage) {
|
||||
Page<EventDetailVO> returnpage = new Page<> (csEventUserQueryPage.getPageNum ( ), csEventUserQueryPage.getPageSize ( ));
|
||||
|
||||
Boolean flag =Boolean.TRUE;
|
||||
|
||||
csEventUserQueryPage.setUserId(RequestUtil.getUserIndex());
|
||||
String role = RequestUtil.getUserRole();
|
||||
@@ -225,6 +229,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
}
|
||||
if( Objects.equals(role, AppRoleEnum.OPERATION_MANAGER.getCode())||Objects.equals(role, AppRoleEnum.ROOT.getCode())){
|
||||
csEventUserQueryPage.setUserId(null);
|
||||
flag = Boolean.FALSE;
|
||||
}
|
||||
List<String> deviceId = new ArrayList<>();
|
||||
List<CsLedgerVO> data = csLedgerFeignClient.getDeviceTree().getData();
|
||||
@@ -247,7 +252,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
}
|
||||
|
||||
|
||||
returnpage = this.getBaseMapper().queryEventpage(returnpage,csEventUserQueryPage,collect);
|
||||
returnpage = this.getBaseMapper().queryEventpage(returnpage,csEventUserQueryPage,collect,flag);
|
||||
|
||||
returnpage.getRecords().forEach(temp->{
|
||||
DevDetailDTO devDetail = csLedgerFeignClient.queryDevDetail(temp.getDeviceId()).getData();
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.njcn.csharmonic.service.impl;
|
||||
|
||||
import com.njcn.csdevice.api.CsLedgerFeignClient;
|
||||
import com.njcn.csdevice.api.DataArrayFeignClient;
|
||||
import com.njcn.csdevice.api.EquipmentFeignClient;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.dto.LineParamDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsLedger;
|
||||
import com.njcn.csharmonic.param.DevicDataTrendQueryParam;
|
||||
import com.njcn.csharmonic.pojo.vo.ThdDataVO;
|
||||
import com.njcn.csharmonic.service.DeviceDataTrendService;
|
||||
@@ -32,6 +37,8 @@ public class DeviceDataTrendServiceImpl implements DeviceDataTrendService {
|
||||
private final EpdFeignClient epdFeignClient;
|
||||
private final CommonService commonService;
|
||||
private final DataArrayFeignClient dataArrayFeignClient;
|
||||
private final CsLedgerFeignClient csLedgerFeignClient;
|
||||
private final EquipmentFeignClient equipmentFeignClient;
|
||||
@Override
|
||||
public List<List<ThdDataVO>> queryDataTrend(DevicDataTrendQueryParam devicDataTrendQueryParam) {
|
||||
List<List<ThdDataVO>> result = new ArrayList<>();
|
||||
@@ -39,8 +46,10 @@ public class DeviceDataTrendServiceImpl implements DeviceDataTrendService {
|
||||
if(CollectionUtils.isEmpty(devicDataTrendQueryParam.getStatisticalParams())){
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
LineParamDTO lineParamDTO = new LineParamDTO();
|
||||
lineParamDTO.setLineId(devicDataTrendQueryParam.getLineId());
|
||||
List<CsLedger> data = csLedgerFeignClient.queryLine(lineParamDTO).getData();
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(data.get(0).getPid()).collect(Collectors.toList())).getData();
|
||||
devicDataTrendQueryParam.getStatisticalParams().forEach(temp->{
|
||||
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(Stream.of(devicDataTrendQueryParam.getLineId()).collect(Collectors.toList()),
|
||||
@@ -48,7 +57,8 @@ public class DeviceDataTrendServiceImpl implements DeviceDataTrendService {
|
||||
temp.getName(), temp.getPhase(),
|
||||
temp.getStatMethod(),
|
||||
devicDataTrendQueryParam.getStartTime(),
|
||||
devicDataTrendQueryParam.getEndTime());
|
||||
devicDataTrendQueryParam.getEndTime(),
|
||||
data1.get(0).getProcess()+"");
|
||||
List<ThdDataVO> collect1 = deviceRtData.stream().map(statisticalDataDTO -> {
|
||||
ThdDataVO vo = new ThdDataVO();
|
||||
vo.setLineId(statisticalDataDTO.getLineId());
|
||||
|
||||
@@ -4,7 +4,9 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.CsLedgerFeignClient;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.api.EquipmentFeignClient;
|
||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.csdevice.utils.ReflectUtils;
|
||||
import com.njcn.csharmonic.param.CommonStatisticalQueryParam;
|
||||
@@ -37,6 +39,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
@@ -60,6 +63,8 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
private final CsStatisticalSetFeignClient csStatisticalSetFeignClient;
|
||||
|
||||
private final EquipmentFeignClient equipmentFeignClient;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ThdDataVO> queryThdData(String devId, String statisticalName) {
|
||||
@@ -180,6 +185,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
csLinePOList = csLineFeignClient.queryLineByDevId(commonStatisticalQueryParam.getDevId()).getData();
|
||||
|
||||
}
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(commonStatisticalQueryParam.getDevId()).collect(Collectors.toList())).getData();
|
||||
String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
||||
|
||||
Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
||||
@@ -195,7 +201,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
}else {
|
||||
frequency = "_"+commonStatisticalQueryParam.getFrequency();
|
||||
}
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtData(collect, data.getClassId(), data.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType());
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtData(collect, data.getClassId(), data.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType(),data1.get(0).getProcess()+"");
|
||||
List<CsLinePO> finalCsLinePOList = csLinePOList;
|
||||
String finalFrequency = frequency;
|
||||
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
|
||||
@@ -227,6 +233,9 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
List<ThdDataVO> result = new ArrayList();
|
||||
|
||||
Optional.ofNullable(commonStatisticalQueryParam.getDevId()).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DEVICE_LOSE));
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(commonStatisticalQueryParam.getDevId()).collect(Collectors.toList())).getData();
|
||||
|
||||
|
||||
|
||||
List<CsLinePO> csLinePOList = csLineFeignClient.queryLineByDevId(commonStatisticalQueryParam.getDevId()).getData();
|
||||
if(CollectionUtil.isEmpty(csLinePOList)){
|
||||
@@ -245,7 +254,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
List<String> finalCollect = collect;
|
||||
data.forEach(epdPqd->{
|
||||
String frequency = Optional.ofNullable(commonStatisticalQueryParam.getFrequency()).orElse("");
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(finalCollect, epdPqd.getClassId(), epdPqd.getName()+frequency, epdPqd.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(finalCollect, epdPqd.getClassId(), epdPqd.getName()+frequency, epdPqd.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime(),data1.get(0).getProcess()+"");
|
||||
|
||||
|
||||
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
|
||||
@@ -281,6 +290,9 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
if(CollectionUtil.isEmpty(csLinePOList)){
|
||||
throw new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR);
|
||||
}
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(commonStatisticalQueryParam.getDevId()).collect(Collectors.toList())).getData();
|
||||
|
||||
|
||||
List<String> collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
||||
Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
||||
@@ -295,7 +307,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
if(CollectionUtil.isNotEmpty(data)){
|
||||
List<String> finalCollect = collect;
|
||||
data.forEach(epdPqd->{
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(finalCollect, epdPqd.getClassId(), epdPqd.getName()+frequency, epdPqd.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
|
||||
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(finalCollect, epdPqd.getClassId(), epdPqd.getName()+frequency, epdPqd.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime(),data1.get(0).getProcess()+"");
|
||||
|
||||
|
||||
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
|
||||
@@ -353,6 +365,9 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
csLinePOList = csLineFeignClient.queryLineByDevId(frequencyStatisticalQueryParam.getDevId()).getData();
|
||||
|
||||
}
|
||||
|
||||
List<CsEquipmentDeliveryDTO> data1 = equipmentFeignClient.queryDeviceById(Stream.of(frequencyStatisticalQueryParam.getDevId()).collect(Collectors.toList())).getData();
|
||||
|
||||
String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
||||
|
||||
Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
||||
@@ -373,7 +388,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
stringBuilder1.append("last("+data.getName()).append("_"+i).append(") AS "+data.getName()).append("_"+i).append(",");
|
||||
}
|
||||
}
|
||||
stringBuilder2.append ("line_id='").append (csLinePO.getLineId()).append("' and value_type = 'avg' group by phasic_type ").append(InfluxDbSqlConstant.TZ);
|
||||
stringBuilder2.append ("line_id='").append (csLinePO.getLineId()).append("' and value_type = 'avg' and process="+data1.get(0).getProcess()+" group by phasic_type ").append(InfluxDbSqlConstant.TZ);
|
||||
String sql1 = "select "+stringBuilder1+" from "+"apf_data"+" where "+stringBuilder2;
|
||||
|
||||
QueryResult sqlData = influxDbUtils.query(sql1);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class TemperatureServiceImpl implements TemperatureService {
|
||||
if(CollectionUtils.isEmpty(collect)){
|
||||
throw new BusinessException("不存在输出侧监测点,无温度信息");
|
||||
}
|
||||
List<StatisticalDataDTO> topTemperature = commonService.getTopTemperature(collect.get(0).getLineId(), "apf_data", "Apf_Temp_Env");
|
||||
List<StatisticalDataDTO> topTemperature = commonService.getTopTemperature(collect.get(0).getLineId(), "apf_data", "Apf_Temp_Env",data1.get(0).getProcess()+"");
|
||||
List<StatisticalDataDTO> result = new ArrayList<>();
|
||||
for(int i = 0; i <=moduleNumber; i++){
|
||||
StatisticalDataDTO statisticalData = new StatisticalDataDTO();
|
||||
|
||||
Reference in New Issue
Block a user