1.解决台账数据缺少变电站个别信息
2.解决技术监督台账管理终端信息 3.增加全景展示稳态9指标数据
This commit is contained in:
@@ -13,6 +13,7 @@ import com.njcn.supervision.pojo.param.user.UserReportNormalParam;
|
||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||
import com.njcn.supervision.service.user.IUserReportNormalService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -30,7 +31,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userReportNormal")
|
||||
@ApiOperation("干扰源常态化管理")
|
||||
@Api("干扰源常态化管理")
|
||||
@RequiredArgsConstructor
|
||||
public class UserReportNormalController extends BaseController {
|
||||
|
||||
|
||||
@@ -269,12 +269,12 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
|
||||
@Override
|
||||
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
||||
SupervisionTempLineDebugVO supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
||||
SupervisionTempLineDebugVO supervisionTempLineDebugVO =null;
|
||||
SupervisionTempLineReport supervisionTempLineReport = supervisionTempLineReportService.getById(id);
|
||||
SupervisionTempLineDebugPO supervisionTempLineDebugPO = this.getById(id);
|
||||
if(ObjectUtil.isNotNull(supervisionTempLineDebugPO)){
|
||||
supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
||||
supervisionTempLineDebugVO.setId(id);
|
||||
|
||||
supervisionTempLineDebugVO.setUserName(supervisionTempLineReport.getUserName());
|
||||
supervisionTempLineDebugVO.setConnectedBus(supervisionTempLineReport.getConnectedBus());
|
||||
supervisionTempLineDebugVO.setMonitoringTerminalCode(supervisionTempLineReport.getMonitoringTerminalCode());
|
||||
@@ -287,8 +287,6 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
supervisionTempLineDebugVO.setProcessInstanceId(supervisionTempLineDebugPO.getProcessInstanceId());
|
||||
supervisionTempLineDebugVO.setStatus(supervisionTempLineDebugPO.getStatus());
|
||||
}
|
||||
|
||||
|
||||
return supervisionTempLineDebugVO;
|
||||
}
|
||||
|
||||
@@ -306,12 +304,13 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineDebugVO.getHistoryInstanceId());
|
||||
String sign = "";
|
||||
if(StrUtil.isNotBlank(supervisionTempLineDebugVO.getPowerSubstationName())){
|
||||
sign = supervisionTempLineDebugVO.getPowerSubstationName()
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineDebugVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineDebugVO.getLineName());
|
||||
sign=supervisionTempLineDebugVO.getPowerSubstationName()
|
||||
.concat(StrPool.SLASH);
|
||||
}
|
||||
sign = sign
|
||||
.concat(supervisionTempLineDebugVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineDebugVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.supervision.service.device.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.text.StrPool;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -46,6 +47,8 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static javafx.beans.binding.Bindings.concat;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
@@ -202,15 +205,22 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
SupervisionTempLineReportVO supervisionTempLineReportVO = this.getDetailTempLine(businessId);
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineReportVO.getHistoryInstanceId());
|
||||
String sign = supervisionTempLineReportVO.getPowerSubstationName()
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineReportVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineReportVO.getConnectedBus())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineReportVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
if(ObjectUtil.isNotNull(supervisionTempLineReportVO)){
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineReportVO.getHistoryInstanceId());
|
||||
String powerSubstationName = supervisionTempLineReportVO.getPowerSubstationName();
|
||||
if(StrUtil.isNotBlank(powerSubstationName)){
|
||||
powerSubstationName.concat(StrPool.SLASH);
|
||||
}else{
|
||||
powerSubstationName="";
|
||||
}
|
||||
String sign = powerSubstationName
|
||||
.concat(supervisionTempLineReportVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineReportVO.getConnectedBus())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineReportVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
|
||||
@@ -228,21 +238,23 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
|
||||
@Override
|
||||
public SupervisionTempLineReportVO getDetailTempLine(String id) {
|
||||
SupervisionTempLineReportVO vo =new SupervisionTempLineReportVO();
|
||||
SupervisionTempLineReportVO vo=null;
|
||||
SupervisionTempLineReport byId = this.getById(id);
|
||||
BeanUtils.copyProperties(byId,vo);
|
||||
|
||||
//处理特殊字段,用户名、部门名
|
||||
UserVO userVO = userFeignClient.getUserById(vo.getCreateBy()).getData();
|
||||
vo.setReporter(userVO.getName());
|
||||
if(StringUtils.isNotEmpty(vo.getOrgId())){
|
||||
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(vo.getLoadType())){
|
||||
vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(vo.getBusinessType())){
|
||||
vo.setBusinessType(dictTreeFeignClient.queryById(vo.getBusinessType()).getData().getName());
|
||||
if(ObjectUtil.isNotNull(byId)){
|
||||
vo =new SupervisionTempLineReportVO();
|
||||
BeanUtils.copyProperties(byId,vo);
|
||||
//处理特殊字段,用户名、部门名
|
||||
UserVO userVO = userFeignClient.getUserById(vo.getCreateBy()).getData();
|
||||
vo.setReporter(userVO.getName());
|
||||
if(StringUtils.isNotEmpty(vo.getOrgId())){
|
||||
vo.setOrgName(deptFeignClient.getDeptById(vo.getOrgId()).getData().getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(vo.getLoadType())){
|
||||
vo.setLoadType(dictTreeFeignClient.queryById(vo.getLoadType()).getData().getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(vo.getBusinessType())){
|
||||
vo.setBusinessType(dictTreeFeignClient.queryById(vo.getBusinessType()).getData().getName());
|
||||
}
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.text.StrPool;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
@@ -237,7 +238,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
if (CollUtil.isNotEmpty(usePoList)) {
|
||||
List<String> lineRunTestIds = usePoList.stream().map(SupervisionTempLineRunTestPO::getId).collect(Collectors.toList());
|
||||
List<SupervisionTempLineReport> supervisionTempLineReports = supervisionTempLineReportMapper.selectBatchIds(lineRunTestIds);
|
||||
Map<String, String> lineReportMap = supervisionTempLineReports.stream().collect(Collectors.toMap(SupervisionTempLineReport::getId, SupervisionTempLineReport::getMainWiringDiagram));
|
||||
Map<String, String> lineReportMap = supervisionTempLineReports.stream().filter(x -> StrUtil.isNotBlank(x.getMainWiringDiagram())).collect(Collectors.toMap(SupervisionTempLineReport::getId, SupervisionTempLineReport::getMainWiringDiagram));
|
||||
Map<String, List<SupervisionTempLineRunTestPO>> map = usePoList.stream().collect(Collectors.groupingBy(SupervisionTempLineRunTestPO::getTestRunTime));
|
||||
map.forEach((key, val) -> {
|
||||
String startTime = key.split("--")[0];
|
||||
@@ -271,11 +272,12 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
po.setOnlineRate(dto.getOnlineRate());
|
||||
po.setIntegrityRate(dto.getIntegrityRate());
|
||||
po.setSuitRate(dto.getSuitRate());
|
||||
MockMultipartFile file;
|
||||
MockMultipartFile file= new MockMultipartFile("file", new byte[0]);
|
||||
if (lineReportMap.containsKey(supervisionTempLineRunTestPO.getId())) {
|
||||
String url = lineReportMap.get(supervisionTempLineRunTestPO.getId());
|
||||
InputStream fileStream = fileStorageUtil.getFileStream(url.substring(url.indexOf("/")));
|
||||
InputStream fileStream = null;
|
||||
try {
|
||||
fileStream = fileStorageUtil.getFileStream(url.substring(url.indexOf("/")));
|
||||
file = new MockMultipartFile("file", url.substring(url.lastIndexOf("/") + 1), MediaType.IMAGE_PNG_VALUE, fileStream);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -288,8 +290,6 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
file = new MockMultipartFile("file", new byte[0]);
|
||||
}
|
||||
try {
|
||||
startTime = DateUtil.beginOfDay(DateUtil.parse(startTime)).toString();
|
||||
@@ -344,15 +344,17 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
SupervisionTempLineRunTestVO supervisionTempLineRunTestVO = this.getRunTestById(businessId);
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineRunTestVO.getHistoryInstanceId());
|
||||
String sign = supervisionTempLineRunTestVO.getPowerSubstationName()
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getConnectedBus())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
if(ObjectUtil.isNotNull(supervisionTempLineRunTestVO)){
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineRunTestVO.getHistoryInstanceId());
|
||||
String sign = supervisionTempLineRunTestVO.getPowerSubstationName()
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getMonitoringTerminalName())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getConnectedBus())
|
||||
.concat(StrPool.SLASH)
|
||||
.concat(supervisionTempLineRunTestVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -753,11 +753,11 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
userReportSensitivePO.setDeviceName(userExcel.getDeviceName());
|
||||
userReportSensitivePO.setPowerSupplyCount(userExcel.getPowerSupplyCount());
|
||||
//处理多指标数据
|
||||
String[] indexArr = userExcel.getEnergyQualityIndex().split(",");
|
||||
for (String s : indexArr) {
|
||||
indexList.add(PubUtil.getDicById(s, problemIndicators));
|
||||
}
|
||||
userReportSensitivePO.setEnergyQualityIndex(indexList.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
||||
// String[] indexArr = userExcel.getEnergyQualityIndex().split(",");
|
||||
// for (String s : indexArr) {
|
||||
// indexList.add(PubUtil.getDicById(s, problemIndicators));
|
||||
// }
|
||||
userReportSensitivePO.setEnergyQualityIndex(userExcel.getEnergyQualityIndex());
|
||||
userReportSensitivePO.setEvaluationType(PubUtil.getDicById(userExcel.getEvaluationType(), evaluationType));
|
||||
userReportSensitivePO.setAntiInterferenceTest(userExcel.getAntiInterferenceTest() + "");
|
||||
userReportSensitivePO.setEvaluationChekDept(userExcel.getEvaluationChekDept());
|
||||
|
||||
Reference in New Issue
Block a user