feat(data): 新增文件路径查询版本信息功能并完善设备升级流程
- 在CsEdDataController中新增findByPath接口用于根据文件路径获取版本信息 - 在CsEdDataFeignClient中添加findByPath远程调用方法 - 为CsEdDataFeignClientFallbackFactory增加降级处理逻辑 - 扩展CsEdDataService接口和服务实现类,添加findByPath业务方法 - 在addEdData和auditEdData方法中增加版本冲突检查机制 - 实现uploadUpgradeFile功能支持设备升级文件上传 - 完善CsEquipmentDeliveryServiceImpl中的文件分片传输逻辑 - 修复CsEventUserPOServiceImpl中的空指针安全检查 - 优化CsLinePOServiceImpl中PT类型处理的空值判断 - 改进CsUpgradeLogsController中按设备ID查询的排序功能 - 补充CustomReportServiceImpl中接线方式的空值验证 - 在EquipmentDeliveryController中暴露uploadUpgradeFile控制器接口 - 增强WordExportModelController中电压等级数据的完整性校验
This commit is contained in:
@@ -2,6 +2,8 @@ package com.njcn.csharmonic.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
@@ -10,7 +12,6 @@ import com.njcn.harmonic.common.pojo.dto.DeviceUnitCommDTO;
|
||||
import com.njcn.harmonic.common.pojo.dto.HarmLineDetailDataCommDTO;
|
||||
import com.njcn.harmonic.common.pojo.dto.OverLimitInfoCommDTO;
|
||||
import com.njcn.harmonic.common.service.MonitorHarmonicReportService;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -21,7 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -79,6 +80,9 @@ public class WordExportModelController extends BaseController {
|
||||
harmLineDetailDataCommDTO = BeanUtil.copyProperties(lineDto, HarmLineDetailDataCommDTO.class);
|
||||
|
||||
List<Overlimit> overLimitList = csLineFeignClient.getOverLimitData(Stream.of(lineIndex).collect(Collectors.toList())).getData();
|
||||
if (CollUtil.isEmpty(overLimitList)) {
|
||||
throw new BusinessException("监测点缺失电压等级数据,限值缺失,无法生成报告");
|
||||
}
|
||||
overLimit = overLimitList.get(0);
|
||||
overLimitInfoCommDTO = BeanUtil.copyProperties(overLimit, OverLimitInfoCommDTO.class);
|
||||
|
||||
|
||||
@@ -500,7 +500,7 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
if (ObjectUtil.isNotNull(temp.getLineId())) {
|
||||
if (!Objects.isNull(dto)) {
|
||||
temp.setLineVoltage(dto.getVolGrade());
|
||||
if (dto.getClDid() == 0) {
|
||||
if (!Objects.isNull(dto.getClDid()) && dto.getClDid() == 0) {
|
||||
temp.setModuleNo("模块" + temp.getClDid());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2220,21 +2220,23 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
//根据监测点获取接线方式
|
||||
CsLinePO po = csLineFeignClient.getById(lineId).getData();
|
||||
//根据接线方式获取模板id
|
||||
if (Objects.isNull(po.getConType())) {
|
||||
throw new BusinessException("监测点缺失接线方式,无法匹配模板");
|
||||
}
|
||||
int conType = po.getConType();
|
||||
DictData dicData;
|
||||
dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.STAR.getCode()).getData();
|
||||
// //角型
|
||||
// if (conType == 1) {
|
||||
// dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.STAR_TRIANGLE.getCode()).getData();
|
||||
// }
|
||||
// //v型
|
||||
// else if (conType == 2){
|
||||
// dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.OPEN_DELTA.getCode()).getData();
|
||||
// }
|
||||
// //星型 或 其他
|
||||
// else {
|
||||
// dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.STAR.getCode()).getData();
|
||||
// }
|
||||
//角型
|
||||
if (conType == 1) {
|
||||
dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.STAR_TRIANGLE.getCode()).getData();
|
||||
}
|
||||
//v型
|
||||
else if (conType == 2){
|
||||
dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.OPEN_DELTA.getCode()).getData();
|
||||
}
|
||||
//星型 或 其他
|
||||
else {
|
||||
dicData = dicDataFeignClient.getDicDataByCode(DicDataEnum.STAR.getCode()).getData();
|
||||
}
|
||||
String tempId;
|
||||
Optional<ReportTemplateVO> vo = result.stream().filter(item -> Objects.equals(dicData.getId(),item.getWiringMethod())).findFirst();
|
||||
if (vo.isPresent()) {
|
||||
|
||||
Reference in New Issue
Block a user