冀北终端评价列表信息增加
This commit is contained in:
@@ -11,6 +11,15 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DevDetailVO {
|
||||
|
||||
@ApiModelProperty("地市")
|
||||
private String cit;
|
||||
|
||||
@ApiModelProperty("供电公司")
|
||||
private String company;
|
||||
|
||||
@ApiModelProperty("终端厂家")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty(name = "lineId",value = "监测点索引")
|
||||
private String lineId;
|
||||
|
||||
@@ -32,4 +41,6 @@ public class DevDetailVO {
|
||||
@ApiModelProperty(name = "subName",value = "对象id(新能源用户)")
|
||||
private String ObjId;
|
||||
|
||||
@ApiModelProperty("终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||
private Integer runFlag;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,18 @@ public class DeviceRunEvaluateVO {
|
||||
@ApiModelProperty("评价")
|
||||
private BigDecimal evaluate;
|
||||
|
||||
@ApiModelProperty("地市")
|
||||
private String cit;
|
||||
|
||||
@ApiModelProperty("供电公司")
|
||||
private String company;
|
||||
|
||||
@ApiModelProperty("终端厂家")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)")
|
||||
private String runFlag;
|
||||
|
||||
@ApiModelProperty("完整率")
|
||||
private BigDecimal integrityRate;
|
||||
|
||||
|
||||
@@ -36,6 +36,11 @@ import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.supervision.api.UserLedgerFeignClient;
|
||||
import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -66,7 +71,8 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
||||
private final DeptLineService deptLineService;
|
||||
private final GeneralDeviceService deviceService;
|
||||
private final OnLineRateMapper onLineRateMapper;
|
||||
private final LineService lineService;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
/**
|
||||
* 数据完整性:50%
|
||||
*/
|
||||
@@ -340,6 +346,11 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
||||
|
||||
@Override
|
||||
public List<DeviceRunEvaluateVO.Detail> getRunEvaluate(DeviceInfoParam.BusinessParam param) {
|
||||
List<DictData> manufacturerList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_MANUFACTURER.getCode()).getData();
|
||||
Map<String, String> manufacturerMap = manufacturerList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
List<Dept> deptList = deptFeignClient.getAllDept().getData();
|
||||
Map<String, String> deptMap = deptList.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
|
||||
|
||||
List<DeviceRunEvaluateVO.Detail> info = new ArrayList<>();
|
||||
//获取终端台账类信息
|
||||
List<GeneralDeviceDTO> deviceInfo = deviceService.getDeviceInfo(param, ObjectUtil.isNull(param.getLineRunFlag()) ? null : Arrays.asList(param.getLineRunFlag()), Arrays.asList(1));
|
||||
@@ -395,6 +406,14 @@ public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
||||
evaluateVO.setName(value.get(0).getDevName());
|
||||
evaluateVO.setSubName(value.get(0).getSubName());
|
||||
evaluateVO.setIp(value.get(0).getIp());
|
||||
//部门
|
||||
if (deptMap.containsKey(value.get(0).getCit())) {
|
||||
evaluateVO.setCit(deptMap.get(value.get(0).getCit()));
|
||||
}
|
||||
//终端厂商
|
||||
if (manufacturerMap.containsKey(value.get(0).getManufacturer())) {
|
||||
evaluateVO.setManufacturer(manufacturerMap.get(value.get(0).getManufacturer()));
|
||||
}
|
||||
evaluateVO.setOnLineRate(onLineRate(onlineRateByDev, Arrays.asList(key)));
|
||||
evaluateVO.setIntegrityRate(integrity(integrityList, ids));
|
||||
evaluateVO.setPassRate(limitRate(limitRatePOList, ids));
|
||||
|
||||
@@ -1851,42 +1851,55 @@
|
||||
where t1.state = 1
|
||||
</select>
|
||||
<select id="getLineDeviceByDevIds" resultType="com.njcn.device.pq.pojo.vo.DevDetailVO">
|
||||
SELECT distinct
|
||||
t.id lineId,
|
||||
t.NAME lineName,
|
||||
dev.id devId,
|
||||
dev.NAME devName,
|
||||
sub.NAME subName,
|
||||
td.Obj_Id objId,
|
||||
device.ip
|
||||
SELECT DISTINCT
|
||||
line.id as lineId,
|
||||
line.name as lineName,
|
||||
device.id as devId,
|
||||
pd.Id as cit,
|
||||
gd.NAME as company,
|
||||
substation.NAME as subName,
|
||||
device.NAME as devName,
|
||||
lineDetail.Line_Grade AS lineGrade,
|
||||
deviceDetail.Update_Time AS timeID,
|
||||
deviceDetail.ip as ip,
|
||||
deviceDetail.Com_Flag as comFlag,
|
||||
deviceDetail.run_Flag as runFlag,
|
||||
deviceDetail.Manufacturer as manufacturer,
|
||||
deviceDetail.Next_Time_Check as nextTimeCheck,
|
||||
lineDetail.Obj_Id objId
|
||||
FROM
|
||||
pq_line t,
|
||||
pq_line_detail td,
|
||||
pq_line subv,
|
||||
pq_line dev,
|
||||
pq_device device,
|
||||
pq_line sub
|
||||
WHERE
|
||||
t.id = td.id
|
||||
AND subv.id = t.pid
|
||||
AND dev.id = subv.pid
|
||||
AND dev.id = device.id
|
||||
AND sub.id = dev.pid
|
||||
<if test="powerFlag!=null and powerFlag!=2">
|
||||
AND td.Power_Flag =#{powerFlag}
|
||||
</if>
|
||||
<if test="lineIds!=null and lineIds.size()!=0">
|
||||
AND t.id in
|
||||
<foreach item="item" collection="lineIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="devIds!=null and devIds.size()!=0">
|
||||
AND dev.id in
|
||||
<foreach item="item" collection="devIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
pq_line line,
|
||||
pq_dept_line pd,
|
||||
pq_line voltage,
|
||||
pq_line device,
|
||||
pq_line substation,
|
||||
pq_line gd,
|
||||
pq_device deviceDetail,
|
||||
pq_line_detail lineDetail
|
||||
<where>
|
||||
line.pid = voltage.id
|
||||
AND line.id = pd.Line_Id
|
||||
AND voltage.pid = device.id
|
||||
AND device.pid = substation.id
|
||||
AND substation.pid = gd.id
|
||||
AND device.id = deviceDetail.id
|
||||
AND line.id = lineDetail.id
|
||||
<if test="powerFlag!=null and powerFlag!=2">
|
||||
AND lineDetail.Power_Flag =#{powerFlag}
|
||||
</if>
|
||||
<if test="lineIds!=null and lineIds.size()!=0">
|
||||
AND line.id in
|
||||
<foreach item="item" collection="lineIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="devIds!=null and devIds.size()!=0">
|
||||
AND device.id in
|
||||
<foreach item="item" collection="devIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getSubIdByPid" resultType="String">
|
||||
|
||||
Reference in New Issue
Block a user