电能质量问题
This commit is contained in:
@@ -0,0 +1,116 @@
|
|||||||
|
package com.njcn.process.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xiaoyao
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/11/29 9:23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FlowDetailVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 6025928276036950946L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电能质量问题编号
|
||||||
|
*/
|
||||||
|
private String powerQualityProblemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||||
|
*/
|
||||||
|
private String reportProcess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧原因
|
||||||
|
*/
|
||||||
|
private String[] reportProcessContentYyfx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户侧原因
|
||||||
|
*/
|
||||||
|
private String[] userReportProcessContentYyfx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧受影响设备
|
||||||
|
*/
|
||||||
|
private String[] powerGridAffectDev;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户侧受影响设备
|
||||||
|
*/
|
||||||
|
private String[] userAffectDev;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件描述
|
||||||
|
*/
|
||||||
|
private String eventDescriptionYyfx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原因分析报告文件名称
|
||||||
|
*/
|
||||||
|
private String fileNameYyfx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原因分析报告文件路径
|
||||||
|
*/
|
||||||
|
private String filePathYyfx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧整改治理措施
|
||||||
|
*/
|
||||||
|
private String[] reportProcessContentJhzg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户侧整改治理措施
|
||||||
|
*/
|
||||||
|
private String[] userReportProcessContentJhzg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划整改文件名称
|
||||||
|
*/
|
||||||
|
private String fileNameJhzg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划整改文件路径
|
||||||
|
*/
|
||||||
|
private String filePathJhzg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧实际采取措施
|
||||||
|
*/
|
||||||
|
private String[] reportProcessContentSjcq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户侧实际采取措施
|
||||||
|
*/
|
||||||
|
private String[] userReportProcessContentSjcq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际采取措施报告文件名称
|
||||||
|
*/
|
||||||
|
private String fileNameSjcq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际采取措施报告文件路径
|
||||||
|
*/
|
||||||
|
private String filePathSjcq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成效分析概述
|
||||||
|
*/
|
||||||
|
private String descriptionZlxg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成效分析报告文件名称
|
||||||
|
*/
|
||||||
|
private String fileNameZlxg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成效分析报告文件路径
|
||||||
|
*/
|
||||||
|
private String filePathZlxg;
|
||||||
|
}
|
||||||
@@ -182,10 +182,11 @@ public class ElectricityQualityIssuesController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||||
@PostMapping("/uploadFile")
|
@PostMapping("/uploadFile")
|
||||||
@ApiOperation("上传文件")
|
@ApiOperation("上传文件")
|
||||||
@ApiImplicitParam(name = "issuesFile", value = "填报进度文件", required = true)
|
@ApiImplicitParam(name = "file", value = "填报进度文件", required = true)
|
||||||
public HttpResult<MinIoUploadResDTO> uploadFile(@RequestParam("issuesFile") MultipartFile issuesFile){
|
public HttpResult<MinIoUploadResDTO> uploadFile(@RequestParam("file") MultipartFile issuesFile){
|
||||||
String methodDescribe = getMethodDescribe("uploadFile");
|
String methodDescribe = getMethodDescribe("uploadFile");
|
||||||
MinIoUploadResDTO out = issuesService.uploadFile(issuesFile);
|
MinIoUploadResDTO out = issuesService.uploadFile(issuesFile);
|
||||||
|
out.setMinFileName(issuesFile.getOriginalFilename());
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -236,26 +236,32 @@ public class IssuesServiceImpl implements IssuesService {
|
|||||||
/**
|
/**
|
||||||
* 处理填报信息
|
* 处理填报信息
|
||||||
*/
|
*/
|
||||||
private ProcessVO processFlowDetail(RMpElectricQualityProblemFlowDetails details){
|
private FlowDetailVO processFlowDetail(RMpElectricQualityProblemFlowDetails details){
|
||||||
ProcessVO process = new ProcessVO();
|
FlowDetailVO process = new FlowDetailVO();
|
||||||
BeanUtil.copyProperties(details,process);
|
BeanUtil.copyProperties(details,process);
|
||||||
if (!StrUtil.isEmpty(details.getReportProcessContentYyfx())){
|
if (!StrUtil.isEmpty(details.getReportProcessContentYyfx())){
|
||||||
process.setReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentYyfx(),"["),"\\]").split(","));
|
process.setReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentYyfx(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getReportProcessContentYyfx());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentYyfx())){
|
if (!StrUtil.isEmpty(details.getUserReportProcessContentYyfx())){
|
||||||
process.setUserReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentYyfx(),"["),"\\]").split(","));
|
process.setUserReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentYyfx(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getUserReportProcessContentYyfx());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(details.getReportProcessContentJhzg())){
|
if (!StrUtil.isEmpty(details.getReportProcessContentJhzg())){
|
||||||
process.setReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentJhzg(),"["),"\\]").split(","));
|
process.setReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentJhzg(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getReportProcessContentJhzg());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentJhzg())){
|
if (!StrUtil.isEmpty(details.getUserReportProcessContentJhzg())){
|
||||||
process.setUserReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentJhzg(),"["),"\\]").split(","));
|
process.setUserReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentJhzg(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getUserReportProcessContentJhzg());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(details.getReportProcessContentSjcq())){
|
if (!StrUtil.isEmpty(details.getReportProcessContentSjcq())){
|
||||||
process.setReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentSjcq(),"["),"\\]").split(","));
|
process.setReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentSjcq(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getReportProcessContentSjcq());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentSjcq())){
|
if (!StrUtil.isEmpty(details.getUserReportProcessContentSjcq())){
|
||||||
process.setUserReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentSjcq(),"["),"\\]").split(","));
|
process.setUserReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentSjcq(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(process.getUserReportProcessContentSjcq());
|
||||||
}
|
}
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
@@ -313,10 +319,12 @@ public class IssuesServiceImpl implements IssuesService {
|
|||||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||||
if (!StrUtil.isEmpty(complaintOut.getPowerGridAffectDev())){
|
if (!StrUtil.isEmpty(complaintOut.getPowerGridAffectDev())){
|
||||||
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getPowerGridAffectDev(),"["),"\\]").split(","));
|
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getPowerGridAffectDev(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(detail.getPowerGridAffectDev());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(complaintOut.getUserAffectDev())){
|
if (!StrUtil.isEmpty(complaintOut.getUserAffectDev())){
|
||||||
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getUserAffectDev(),"["),"\\]").split(","));
|
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getUserAffectDev(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(detail.getUserAffectDev());
|
||||||
}
|
}
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
@@ -338,10 +346,12 @@ public class IssuesServiceImpl implements IssuesService {
|
|||||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||||
if (!StrUtil.isEmpty(abnormalOut.getPowerGridAffectDev())){
|
if (!StrUtil.isEmpty(abnormalOut.getPowerGridAffectDev())){
|
||||||
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getPowerGridAffectDev(),"["),"\\]").split(","));
|
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getPowerGridAffectDev(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(detail.getPowerGridAffectDev());
|
||||||
}
|
}
|
||||||
if (!StrUtil.isEmpty(abnormalOut.getUserAffectDev())){
|
if (!StrUtil.isEmpty(abnormalOut.getUserAffectDev())){
|
||||||
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getUserAffectDev(),"["),"\\]").split(","));
|
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getUserAffectDev(),"["),"]").split(","));
|
||||||
|
StrUtil.trim(detail.getUserAffectDev());
|
||||||
}
|
}
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
@@ -350,14 +360,18 @@ public class IssuesServiceImpl implements IssuesService {
|
|||||||
* 稳态指标处理
|
* 稳态指标处理
|
||||||
*/
|
*/
|
||||||
private String[] steadyIndicator(String target){
|
private String[] steadyIndicator(String target){
|
||||||
return StrUtil.removePrefix(target.split("]\\[")[0],"\\[").split(",");
|
String[] process = StrUtil.removePrefix(target.split("]\\[")[0],"\\[").split(",");
|
||||||
|
StrUtil.trim(process);
|
||||||
|
return process;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 暂态指标处理
|
* 暂态指标处理
|
||||||
*/
|
*/
|
||||||
private String[] transientIndicators(String target){
|
private String[] transientIndicators(String target){
|
||||||
return StrUtil.removeSuffix(target.split("]\\[")[1],"]").split(",");
|
String[] process = StrUtil.removeSuffix(target.split("]\\[")[1],"]").split(",");
|
||||||
|
StrUtil.trim(process);
|
||||||
|
return process;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -481,7 +495,7 @@ public class IssuesServiceImpl implements IssuesService {
|
|||||||
}else if (DicDataEnum.INSIGHTS.getName().equals(reportProcess)){
|
}else if (DicDataEnum.INSIGHTS.getName().equals(reportProcess)){
|
||||||
filePath = details.getFilePathZlxg();
|
filePath = details.getFilePathZlxg();
|
||||||
}
|
}
|
||||||
return minIoUtils.getObjectUrl (minIoProperties.getBucket ( ), filePath, 7 * 24 * 60 * 60);
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user