1.解决device模块Swagger无法显示bug
2.修改监测点评价,数据异常,指标数据质量算法兼容修改
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.njcn.device.pq.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.pq.service.LineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/9/14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/commLine")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@Api(tags = "通用台账查询")
|
||||
public class CommLineController extends BaseController {
|
||||
|
||||
private final LineService lineService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getLineDetail")
|
||||
@ApiOperation("获取监测点id取监测点信息")
|
||||
public HttpResult<LineDTO> getLineDetail(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineDetail");
|
||||
LineDTO result = lineService.getLineDetail(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.advanced.UpDevVO;
|
||||
@@ -513,4 +514,13 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
* @Date: 2023/8/29 12:50
|
||||
*/
|
||||
Page<HalfReportVO> selectHalfReport(Page page,@Param("param") TerminalMainQueryParam param);
|
||||
|
||||
/**
|
||||
* @Description: 根据监测点id获取监测点信息
|
||||
* @param id
|
||||
* @return: com.njcn.device.biz.pojo.dto.LineDTO
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/22 10:20
|
||||
*/
|
||||
LineDTO selectLineDetail(@Param("id") String id);
|
||||
}
|
||||
|
||||
@@ -1340,5 +1340,29 @@
|
||||
devName,
|
||||
lineName
|
||||
</select>
|
||||
<select id="selectLineDetail" resultType="com.njcn.device.biz.pojo.dto.LineDTO">
|
||||
SELECT
|
||||
line.id AS lineId,
|
||||
dev.id AS devId,
|
||||
detail.Time_Interval AS timeInterval,
|
||||
vg.Scale AS voltageLevel,
|
||||
pqd.Run_Flag as runFlag,
|
||||
detail.PT_Type AS ptType,
|
||||
detail.PT_Phase_Type AS ptPhaseType
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail detail,
|
||||
pq_line vo,
|
||||
pq_voltage vg,
|
||||
pq_line dev,
|
||||
pq_device pqd
|
||||
WHERE
|
||||
line.id = detail.id
|
||||
AND vo.id = line.pid
|
||||
AND dev.id = vo.pid
|
||||
AND vo.id = vg.id
|
||||
AND pqd.id = dev.id
|
||||
AND line.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionParamDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||
@@ -181,4 +182,13 @@ public interface LineService {
|
||||
List<TopMsgPO> dailyDeviceAbnormal(DeviceInfoParam.BusinessParam conditionBusinessParam);
|
||||
|
||||
Page<HalfReportVO> halfReport(TerminalMainQueryParam param);
|
||||
|
||||
/**
|
||||
* @Description: 根据监测点获取监测点信息
|
||||
* @param id
|
||||
* @return: com.njcn.device.biz.pojo.dto.LineDTO
|
||||
* @Author: wr
|
||||
* @Date: 2023/9/22 10:46
|
||||
*/
|
||||
LineDTO getLineDetail(String id);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.utils.EnumUtils;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.biz.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
@@ -35,6 +36,8 @@ import com.njcn.influx.pojo.po.PqsCommunicate;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.system.api.AreaFeignClient;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.web.pojo.vo.LineDataVO;
|
||||
import com.njcn.web.utils.GeneralUtil;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
@@ -469,6 +472,18 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
return this.baseMapper.selectHalfReport(page,param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LineDTO getLineDetail(String id) {
|
||||
List<DictData> data = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||
Map<String, String> dicMap = data.stream().collect(Collectors.toMap(DictData::getId, DictData::getValue));
|
||||
LineDTO lineDTO = this.baseMapper.selectLineDetail(id);
|
||||
if(dicMap.containsKey(lineDTO.getVoltageLevel())){
|
||||
lineDTO.setVoltageLevel(dicMap.get(lineDTO.getVoltageLevel()));
|
||||
return lineDTO;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||
|
||||
Reference in New Issue
Block a user