海南bug修改提交

This commit is contained in:
hzj
2025-12-23 11:40:18 +08:00
parent e0f1e314a4
commit 917e3fb2d5
16 changed files with 89 additions and 42 deletions

View File

@@ -83,10 +83,10 @@ public class EventRelevantAnalysisController extends BaseController {
public HttpResult<Page<RmpEventDetailAssPO>> queryEventsAssPage(@RequestBody BaseParam baseParam){
String methodDescribe = getMethodDescribe("queryEventsAssPage");
String searchValue = baseParam.getSearchValue();
Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
if(pattern.matcher(searchValue).find()){
throw new BusinessException(ValidMessage.SPECIAL_REGEX);
}
// Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
// if(pattern.matcher(searchValue).find()){
// throw new BusinessException(ValidMessage.SPECIAL_REGEX);
// }
Page<RmpEventDetailAssPO> page = eventRelevantAnalysisService.queryEventsAssPage(baseParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
}

View File

@@ -471,6 +471,8 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
List<AdvanceEventDetailVO> advanceEventDetailVOList = BeanUtil.copyToList(rmpEventDetailPOList, AdvanceEventDetailVO.class);
advanceEventDetailVOList = advanceEventDetailVOList.stream().peek(item -> {
item.setFeatureAmplitude(item.getFeatureAmplitude()*100);
if (map.containsKey(item.getLineId())) {
AreaLineInfoVO areaLineInfoVO = map.get(item.getLineId());
item.setGdName(areaLineInfoVO.getGdName());

View File

@@ -93,7 +93,7 @@ public class DeviceParam {
@NotBlank(message = "设备制造商不能为空")
private String manufacturer;
@ApiModelProperty(name = "electroplate",value = "功能",required = true)
@ApiModelProperty(name = "electroplate",value = "功能",required = true)
@NotNull(message = "电镀标识不能为空")
private Integer electroplate;

View File

@@ -96,7 +96,7 @@ public class DeviceVO implements Serializable {
@ApiModelProperty(name = "manufacturer",value = "设备制造商Guid")
private String manufacturer;
@ApiModelProperty(name = "electroplate",value = "功能")
@ApiModelProperty(name = "electroplate",value = "功能")
private Integer electroplate;
@ApiModelProperty(name = "thisTimeCheck",value = "本次定检时间")

View File

@@ -92,7 +92,7 @@ public class PqDevice implements Serializable {
*/
private Date nextTimeCheck;
/**
* 电功能 0关闭 1开启 默认关闭
* 电功能 0关闭 1开启 默认关闭
*/
private Integer electroplate;
/**

View File

@@ -148,6 +148,8 @@ public class AreaInfoServiceImpl implements AreaInfoService {
eventDetailNew = BeanUtil.copyProperties(eventDetail, EventDetailNew.class);
//监测点id
eventDetailNew.setLineId(eventDetail.getMeasurementPointId());
//需要转成百分比*100
eventDetailNew.setFeatureAmplitude(eventDetail.getFeatureAmplitude()*100);
//持续时间
eventDetailNew.setDuration(eventDetail.getDuration());
//特征幅值

View File

@@ -204,13 +204,41 @@ public class TransientServiceImpl implements TransientService {
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
log.info("本地磁盘波形文件路径----" + cfgPath);
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath);
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath(datPath);
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
//适配文件后缀小写
cfgPath2 = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG.toLowerCase();
datPath2 = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT.toLowerCase();
log.info("本地磁盘波形文件路径----" + cfgPath2);
log.info("本地磁盘波形文件路径----" + datPath2);
try (
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath);
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath(datPath);
)
{
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
}
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
} catch (Exception e) {
log.info("大写文件流为空");
try {
InputStream cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath2);
InputStream datStream = waveFileComponent.getFileInputStreamByFilePath(datPath2);
if (Objects.isNull(cfgStream) || Objects.isNull(datStream)) {
throw new BusinessException(WaveFileResponseEnum.ANALYSE_WAVE_NOT_FOUND);
}
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
} catch (Exception e1) {
throw new BusinessException(WaveFileResponseEnum.WAVE_DATA_INVALID);
}
}
waveDataDTO = waveFileComponent.getComtrade(cfgStream, datStream, 1);
} else {
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
datPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT;
@@ -495,22 +523,23 @@ public class TransientServiceImpl implements TransientService {
try {
if (generalInfo.getBusinessWaveFileStorage() == GeneralConstant.LOCAL_DISK) {
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG;
log.info("cfg-----"+cfgPath);
log.info("cfg-----"+datPath);
//判断文件是否存在
boolean result1 = minIoUtils.checkFileIsExist(minIossProperties.getBucket(), cfgPath);
if (!result1) {
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG_LOWER;
cfg = GeneralConstant.CFG_LOWER;
File file = new File(cfgPath);
if(!file.exists()){
cfgPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.CFG_LOWER;
}
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT;
boolean result2 = minIoUtils.checkFileIsExist(minIossProperties.getBucket(), datPath);
if (!result2) {
datPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.DAT_LOWER;
dat = GeneralConstant.DAT_LOWER;
File file2 = new File(datPath);
if(!file2.exists()){
datPath = generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + GeneralConstant.DAT_LOWER;
}
log.info("cfg-----"+cfgPath);
log.info("cfg-----"+datPath);
cfgStream = waveFileComponent.getFileInputStreamByFilePath(cfgPath);
datStream = waveFileComponent.getFileInputStreamByFilePath(datPath);
} else {
cfgPath = OssPath.WAVE_DIR + ip + StrUtil.SLASH + waveName + GeneralConstant.CFG;
boolean result1 = minIoUtils.checkFileIsExist(minIossProperties.getBucket(), cfgPath);

View File

@@ -54,11 +54,11 @@ public class QualifiedReportController extends BaseController {
@ApiImplicitParam(name = "qualifiedReportParam", value = "合格率报告参数", required = true)
public HttpResult<Page<FpyReportDTO>> pageTable(@RequestBody @Validated QualifiedReportParam qualifiedReportParam) {
TimeInterval timeInterval = new TimeInterval();
String searchValue = qualifiedReportParam.getSearchValue();
Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
if(pattern.matcher(searchValue).find()){
throw new BusinessException(ValidMessage.SPECIAL_REGEX);
}
// String searchValue = qualifiedReportParam.getSearchValue();
// Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
// if(pattern.matcher(searchValue).find()){
// throw new BusinessException(ValidMessage.SPECIAL_REGEX);
// }
String methodDescribe = getMethodDescribe("pageTable");
Page<FpyReportDTO> result = qualifiedReportService.pageTable(qualifiedReportParam);
log.info("合格率报告执行时长:"+timeInterval.interval());

View File

@@ -54,7 +54,7 @@ public class SensitiveReportExcel implements Serializable {
// private String orgId;
@Excel(name = "工程预期投产日期(yyyy-MM-dd)", width = 30)
@Excel(name = "*工程预期投产日期(yyyy-MM-dd)", width = 30)
private String expectedProductionDate;
@Excel(name = "电压等级", width = 30)

View File

@@ -57,7 +57,7 @@ public class SensitiveUserSExcel implements Serializable {
// private String orgId;
@Excel(name = "工程预期投产日期(yyyy-MM-dd)", width = 30)
@Excel(name = "*工程预期投产日期(yyyy-MM-dd)", width = 30)
@NotBlank(message = "工程预期投产日期不能为空")
private String expectedProductionDate;

View File

@@ -209,14 +209,14 @@ public class SupervisionDevMainReportExcel {
private String timeSyncFunction = "0";
/**
* 电功能
* 电功能
*/
@Excel(name = "电度功能", width = 30, replace = {"关闭_0", "开启_1"})
private String electroplatingFunction = "0";
/**
* 召标志
* 召标志
*/
@Excel(name = "召唤标志", width = 30, replace = {"周期触发_0", "变位触发_1"})
private String summonFlag = "0";

View File

@@ -206,9 +206,9 @@ public class SupervisionTempDeviceReportParam {
private Integer timeSyncFunction;
/**
* 电功能
* 电功能
*/
@ApiModelProperty(value="功能")
@ApiModelProperty(value="功能")
private Integer electroplatingFunction;
/**
@@ -218,9 +218,9 @@ public class SupervisionTempDeviceReportParam {
private String monitoringDeviceInstallationPosition;
/**
* 召标志
* 召标志
*/
@ApiModelProperty(value="标志")
@ApiModelProperty(value="标志")
private String summonFlag;
/**

View File

@@ -204,7 +204,7 @@ public class SupervisionTempDeviceReport {
private Integer timeSyncFunction;
/**
* 电功能
* 电功能
*/
@TableField(value = "electroplating_function")
private Integer electroplatingFunction;
@@ -216,7 +216,7 @@ public class SupervisionTempDeviceReport {
private String monitoringDeviceInstallationPosition;
/**
* 召标志
* 召标志
*/
@TableField(value = "summon_flag")
private String summonFlag;

View File

@@ -56,6 +56,7 @@ import com.njcn.web.factory.PageFactory;
import com.njcn.web.utils.RequestUtil;
import com.njcn.web.utils.WebUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
@@ -65,6 +66,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -78,6 +80,7 @@ import java.util.stream.Stream;
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<SupervisionDevMainReportPOMapper, SupervisionDevMainReportPO> implements SupervisionDevMainReportPOService {
@@ -502,6 +505,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
@Override
public void importDevData(MultipartFile file, HttpServletResponse response) {
log.info("beginImport-------------------"+ LocalDateTime.now());
ImportParams params = new ImportParams();
//表头
params.setHeadRows(1);
@@ -528,8 +532,11 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
throw new BusinessException(SupervisionResponseEnum.IMPORT_DEV_ERROR);
}
List<SupervisionDevMainReportExcel.ExcelMsg> devMsgList = new ArrayList<>();
log.info("beginqueryjiBeiArea-------------------"+ LocalDateTime.now());
//所属地市
List<DictData> jiBeiArea = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.JIBEI_AREA.getCode()).getData();
log.info("beginquerydeptS-------------------"+ LocalDateTime.now());
//所属供电公司
List<DeptDTO> deptS = deptFeignClient.getDeptDescendantIndexes(RequestUtil.getDeptIndex(), WebUtil.filterDeptType()).getData();
@@ -542,6 +549,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
//获取所有前置机
List<Node> nodes = nodeClient.nodeAllList().getData();
Map<String, String> nodeMap = nodes.stream().collect(Collectors.toMap(Node::getName, Node::getId, (k1, k2) -> k1));
log.info("beginquerydevConnect-------------------"+ LocalDateTime.now());
//接线方式
List<DictData> devConnect = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_CONNECT.getCode()).getData();
@@ -552,10 +560,14 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
List<DictData> voltageTransformer = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.VOLTAGE_TRANSFORMER.getCode()).getData();
//中性点接线方式
List<DictData> neutralPoint = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.Neutral_Point.getCode()).getData();
log.info("beginqueryneutralPoint-------------------"+ LocalDateTime.now());
SubstationParam substationParam=new SubstationParam();
substationParam.setOrgIds(deptS.stream().map(DeptDTO::getId).distinct().collect(Collectors.toList()));
log.info("beginquerySubGetBase-------------------"+ LocalDateTime.now());
List<SubGetBase> data = commterminalGeneralClient.tagOrIdGetSub(substationParam).getData();
log.info("endquerySubGetBase-------------------"+ LocalDateTime.now());
SupervisionDevMainReportPO po;
if (CollectionUtil.isNotEmpty(devExcels)) {

View File

@@ -793,8 +793,9 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
params.setHeadRows(1);
//标题
params.setTitleRows(1);
params.setNeedVerify(true);
params.setNeedVerify(false);
params.setStartSheetIndex(0);
params.setReadRows(100); // 最多读取100行数据
params.setSheetNum(1);
List<SensitiveUserSExcel> sensitiveUserExcels;
try {
@@ -1018,6 +1019,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
params.setTitleRows(1);
params.setNeedVerify(false); // 关闭校验,避免校验导致的性能问题
params.setStartSheetIndex(0);
params.setReadRows(100); // 最多读取100行数据
params.setSheetNum(1);
// 限制最大读取行数防止Excel模板带下拉列表导致读取大量空行
// 如果实际数据超过此限制,需要分批导入或调整此参数
@@ -1055,7 +1057,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
//评估类型
List<DictData> evaluationType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVALUATION_TYPE.getCode()).getData();
//解决填报部门问题
List<DeptDTO> data = deptFeignClient.getDeptDescendantIndexes(RequestUtil.getUserIndex(), WebUtil.filterDeptType()).getData();
List<DeptDTO> data = deptFeignClient.getDeptDescendantIndexes(RequestUtil.getDeptIndex(), WebUtil.filterDeptType()).getData();
//执行批量导入敏感及重要用户,入库过程中会进行数据校验
List<SensitiveReportExcel.SensitiveReportExcelMsg> sensitiveUserExcelMsgs = new ArrayList<>();

View File

@@ -98,11 +98,11 @@ public class PqFrontLogsServiceImpl extends ServiceImpl<PqFrontLogsMapper, PqFro
@Override
public Page<PqFrontLogsVO> queryPage(PqFrontLogsParam baseParam) {
QueryWrapper<PqFrontLogs> queryWrapper = new QueryWrapper<>();
if (Objects.nonNull(baseParam.getSearchBeginTime()) && Objects.nonNull(baseParam.getSearchEndTime())) {
if (StringUtils.isNotBlank(baseParam.getSearchBeginTime()) && StringUtils.isNotBlank(baseParam.getSearchEndTime())) {
queryWrapper.between("A.update_Time", baseParam.getSearchBeginTime()+" 00:00:00", baseParam.getSearchEndTime()+" 23:59:59");
}
if(Objects.nonNull(baseParam.getSearchValue())){
if(StringUtils.isNotBlank(baseParam.getSearchValue())){
queryWrapper.like("line.name", baseParam.getSearchValue());
}
queryWrapper.eq(StringUtils.isNotBlank(baseParam.getCode()),"A.code",baseParam.getCode());