Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -20,7 +20,7 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
* 监测点信息
|
||||
*/
|
||||
@ApiModelProperty(name = "specialAnalysisVOList", value = "监测点信息")
|
||||
Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> specialAnalysisVOList;
|
||||
Map<String,List<SpecialAnalysisVO>> specialAnalysisVOList;
|
||||
|
||||
/**
|
||||
* 电压等级分布(监测点)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
|
||||
@@ -76,11 +76,11 @@ public class TerminalBaseController extends BaseController {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_REPETITION);
|
||||
}
|
||||
//校验装置是否存在重复ip
|
||||
List<String> devIp = listDev.stream().map(DeviceParam::getIp).collect(Collectors.toList());
|
||||
/*List<String> devIp = listDev.stream().map(DeviceParam::getIp).collect(Collectors.toList());
|
||||
long countIp = devIp.stream().distinct().count();
|
||||
if (countIp != devIp.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_IP_REPETITION);
|
||||
}
|
||||
}*/
|
||||
|
||||
//校验母线名称
|
||||
for (DeviceParam deviceParam : listDev) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.njcn.device.pq.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pq.pojo.po.Device;
|
||||
import com.njcn.device.pq.pojo.vo.RunManageVO;
|
||||
import com.njcn.device.pq.pojo.vo.RunTimeVO;
|
||||
@@ -20,13 +19,18 @@ import java.util.List;
|
||||
*/
|
||||
public interface DeviceMapper extends BaseMapper<Device> {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过设备id集查询装置信息
|
||||
* 获取变电站下面装置
|
||||
* @param subId 变电站id
|
||||
* @param ip 装置ip
|
||||
* @param port 装置端口号
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
* @date 2022/12/26
|
||||
*/
|
||||
//TODO
|
||||
List<Device> getDeviceList(@Param("list") List<String> list);
|
||||
List<Device> getDeviceBySubId(@Param("subId") String subId,@Param("ip") String ip,@Param("port") Integer port,@Param("devId")String devId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点台账信息
|
||||
|
||||
@@ -3,7 +3,16 @@
|
||||
<mapper namespace="com.njcn.device.pq.mapper.DeviceMapper">
|
||||
|
||||
|
||||
<select id="getDeviceList">
|
||||
<select id="getDeviceBySubId" resultType="com.njcn.device.pq.pojo.po.Device">
|
||||
select * from pq_line a
|
||||
inner join pq_device b on a.id=b.id
|
||||
where a.pid = #{subId}
|
||||
and a.state = 1
|
||||
and b.ip = #{ip}
|
||||
and b.port = #{port}
|
||||
<if test="devId !=null and devId !=''">
|
||||
and a.id != #{devId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.pq.enums.LineBaseEnum;
|
||||
import com.njcn.device.pq.mapper.*;
|
||||
import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||
import com.njcn.device.pq.pojo.bo.excel.NodeExcel;
|
||||
@@ -29,7 +30,6 @@ import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||
import com.njcn.device.pq.pojo.param.*;
|
||||
import com.njcn.device.pq.pojo.po.*;
|
||||
import com.njcn.device.pq.pojo.vo.*;
|
||||
import com.njcn.device.pq.mapper.*;
|
||||
import com.njcn.device.pq.service.DeviceBakService;
|
||||
import com.njcn.device.pq.service.INodeService;
|
||||
import com.njcn.device.pq.service.LineBakService;
|
||||
@@ -55,9 +55,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@@ -201,13 +199,13 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
//用于记录装置id
|
||||
String devIdIndex;
|
||||
//监测点序号
|
||||
List<Integer> listLineNum = Stream.of(1, 2, 3, 4, 5, 6).collect(Collectors.toList());
|
||||
List<Integer> listLineNum = Stream.of(1, 2, 3, 4, 5, 6,7,8,9,10).collect(Collectors.toList());
|
||||
//母线序号
|
||||
List<Integer> listVoltageNum = Stream.of(1, 2, 3, 4, 5, 6).collect(Collectors.toList());
|
||||
List<Integer> listVoltageNum = Stream.of(1, 2, 3, 4, 5, 6,7,8,9,10).collect(Collectors.toList());
|
||||
//标识当前装置下的监测点数量
|
||||
int lineNum = 0, voltageNum = 0;
|
||||
|
||||
//校验监测点总数不超过6
|
||||
//校验监测点总数不超过10
|
||||
if (CollectionUtil.isNotEmpty(deviceParam.getSubVoltageParam())) {
|
||||
for (SubVoltageParam subVoltage : deviceParam.getSubVoltageParam()) {
|
||||
if (CollectionUtil.isNotEmpty(subVoltage.getLineParam())) {
|
||||
@@ -218,7 +216,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
}
|
||||
|
||||
//一台装置母线最多6路
|
||||
//一台装置母线最多10路
|
||||
if (StrUtil.isBlank(subVoltage.getSubvIndex())) {
|
||||
voltageNum++;
|
||||
}
|
||||
@@ -282,10 +280,10 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
}
|
||||
|
||||
if (lineNum > 6) {
|
||||
if (lineNum > 10) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_LINE_BIG);
|
||||
}
|
||||
if (voltageNum > 6) {
|
||||
if (voltageNum > 10) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_VOLTAGE_BIG);
|
||||
}
|
||||
|
||||
@@ -443,14 +441,20 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_NAME, String.join(";", stringList));
|
||||
}
|
||||
}
|
||||
List<String> devIpList = addTerminalParam.getDeviceParam().stream().filter((dev -> dev.getDevIndex() == null)).map(DeviceParam::getIp).collect(Collectors.toList());
|
||||
List<DeviceParam> devIpList = addTerminalParam.getDeviceParam().stream().filter((dev -> dev.getDevIndex() == null)).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(devIpList)) {
|
||||
List<Device> deviceListIpRes = lineMapper.getDeviceBySubId(subIndex, devIpList);
|
||||
for(DeviceParam deviceParam : devIpList){
|
||||
List<Device> deviceListIpRes = deviceMapper.getDeviceBySubId(subIndex, deviceParam.getIp(),deviceParam.getPort(),null);
|
||||
if(CollectionUtil.isNotEmpty(deviceListIpRes)){
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_IP,deviceListIpRes.get(0).getIp());
|
||||
}
|
||||
|
||||
}
|
||||
//校验当前变电站下的装置是否有相同ip
|
||||
if (CollectionUtil.isNotEmpty(deviceListIpRes)) {
|
||||
/* if (CollectionUtil.isNotEmpty(deviceListIpRes)) {
|
||||
List<String> stringList = deviceListIpRes.stream().map(Device::getIp).collect(Collectors.toList());
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_IP, String.join(";", stringList));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,12 +535,12 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
}
|
||||
|
||||
//IP校验
|
||||
List<String> devIpList = devList.stream()
|
||||
.filter(item -> item.getUpdateFlag() == 1)
|
||||
.map(DeviceParam::getIp).collect(Collectors.toList());
|
||||
List<DeviceParam> devIpList = devList.stream()
|
||||
.filter(item -> item.getUpdateFlag() == 1).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(devIpList)) {
|
||||
long ipCount = devIpList.stream().distinct().count();
|
||||
if (ipCount != devIpList.size()) {
|
||||
Set<String> set = new HashSet<>();
|
||||
devIpList.forEach(item-> set.add(item.getIp()+item.getPort()));
|
||||
if(devIpList.size()!=set.size()){
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_IP_REPETITION);
|
||||
}
|
||||
}
|
||||
@@ -558,11 +562,13 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_NAME, "重复装置:" + String.join(";", repeatDevNames));
|
||||
}
|
||||
//校验装置ip
|
||||
List<Device> deviceIpList = lineMapper.getDeviceBySubIdForUpdate(deviceValid.getPid(), devIpList, devIndexList);
|
||||
if (CollectionUtil.isNotEmpty(deviceIpList)) {
|
||||
List<String> repeatDevIps = deviceIpList.stream().map(Device::getIp).collect(Collectors.toList());
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_IP, "重复IP:" + String.join(";", repeatDevIps));
|
||||
for(DeviceParam deviceParam:devIpList){
|
||||
List<Device> deviceIpList = deviceMapper.getDeviceBySubId(deviceValid.getPid(), deviceParam.getIp(),deviceParam.getPort(),deviceParam.getDevIndex());
|
||||
if (CollectionUtil.isNotEmpty(deviceIpList)) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_IP, "重复IP:" + deviceIpList.get(0).getIp());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (DeviceParam updateDeviceParam : devList) {
|
||||
@@ -1546,7 +1552,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
||||
if (Objects.isNull(temp)) {
|
||||
temp = assembleLine(deviceName, LineBaseEnum.DEVICE_LEVEL.getCode(), pids.get(LineBaseEnum.SUB_LEVEL.getCode()), pids);
|
||||
this.baseMapper.insert(temp);
|
||||
List<Device> existIp = lineMapper.getDeviceBySubId(pids.get(LineBaseEnum.SUB_LEVEL.getCode()), Stream.of(oracleTerminalExcel.getIp()).collect(Collectors.toList()));
|
||||
List<Device> existIp = deviceMapper.getDeviceBySubId(pids.get(LineBaseEnum.SUB_LEVEL.getCode()),oracleTerminalExcel.getIp(),oracleTerminalExcel.getPort(),null);
|
||||
if (CollectionUtil.isNotEmpty(existIp)) {
|
||||
Device device = existIp.get(0);
|
||||
if (!device.getId().equalsIgnoreCase(temp.getId())) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EventFeatureAmplitudeCurveVO implements Serializable {
|
||||
private Integer totalNumberOfEvents;
|
||||
|
||||
@ApiModelProperty(name = "eventFeatureAmplitudeCurveDataList", value = "图表数据")
|
||||
private List<EventFeatureAmplitudeCurveVO.EventFeatureAmplitudeCurveDataList> eventFeatureAmplitudeCurveDataList;
|
||||
private List<EventFeatureAmplitudeCurveDataList> eventFeatureAmplitudeCurveDataList;
|
||||
|
||||
/**
|
||||
* 构建默认对象
|
||||
@@ -46,7 +46,7 @@ public class EventFeatureAmplitudeCurveVO implements Serializable {
|
||||
* @param dataList 图表数据
|
||||
* @return 默认对象
|
||||
*/
|
||||
public static EventFeatureAmplitudeCurveVO buildVO(int numberEvents, List<EventFeatureAmplitudeCurveVO.EventFeatureAmplitudeCurveDataList> dataList) {
|
||||
public static EventFeatureAmplitudeCurveVO buildVO(int numberEvents, List<EventFeatureAmplitudeCurveDataList> dataList) {
|
||||
return EventFeatureAmplitudeCurveVO.builder().totalNumberOfEvents(numberEvents).eventFeatureAmplitudeCurveDataList(dataList).build();
|
||||
|
||||
}
|
||||
@@ -67,8 +67,8 @@ public class EventFeatureAmplitudeCurveVO implements Serializable {
|
||||
@ApiModelProperty(name = "startTime", value = "开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
public static Comparator<EventFeatureAmplitudeCurveVO.EventFeatureAmplitudeCurveDataList> sortAscTime() {
|
||||
return Comparator.comparing(EventFeatureAmplitudeCurveVO.EventFeatureAmplitudeCurveDataList::getStartTime);
|
||||
public static Comparator<EventFeatureAmplitudeCurveDataList> sortAscTime() {
|
||||
return Comparator.comparing(EventFeatureAmplitudeCurveDataList::getStartTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,12 +79,12 @@ public class EventDetailServiceImpl implements EventDetailService {
|
||||
stringBuilder.append(") and (");
|
||||
for (int i = 0; i < waveType.size(); i++) {
|
||||
if (waveType.size() - i != 1) {
|
||||
stringBuilder.append("wave_type =").append(waveType.get(i)).append(" or ");
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("wave_type =").append(waveType.get(i)).append(" ");
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(") order by time desc ");
|
||||
stringBuilder.append(") order by time desc");
|
||||
stringBuilder.append(" tz('Asia/Shanghai')");
|
||||
//sql语句
|
||||
String sql = "SELECT * FROM pqs_eventdetail WHERE " + stringBuilder;
|
||||
@@ -114,12 +114,12 @@ public class EventDetailServiceImpl implements EventDetailService {
|
||||
stringBuilder.append(") and (");
|
||||
for (int i = 0; i < waveType.size(); i++) {
|
||||
if (waveType.size() - i != 1) {
|
||||
stringBuilder.append("wave_type =").append(waveType.get(i)).append(" or ");
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("wave_type =").append(waveType.get(i)).append(" ");
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(") order by time desc ");
|
||||
stringBuilder.append(") order by time desc");
|
||||
int i = (pageNum - 1)*pageSize;
|
||||
stringBuilder.append("LIMIT ").append(pageSize).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
//sql语句
|
||||
|
||||
@@ -1511,7 +1511,7 @@ public class ReportServiceImpl implements ReportService {
|
||||
*/
|
||||
public void setPosition(Bar bar,String position,String color){
|
||||
//设置标签
|
||||
com.github.abel533.echarts.Label label = new Label();
|
||||
Label label = new Label();
|
||||
label.show(true);
|
||||
label.position(position);
|
||||
TextStyle textStyle = new TextStyle();
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
@Component
|
||||
public class HarmonicComAssesUtil {
|
||||
// 日志记录
|
||||
private static final Logger logger = LoggerFactory.getLogger(com.njcn.harmonic.utils.HarmonicComAssesUtil.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(HarmonicComAssesUtil.class);
|
||||
private static final int ST_QT_NUM = 6;//系统评价指标数目
|
||||
private static final int GRADE_NUM = 5;//指标分级数目
|
||||
private static final int METHOD_NUM = 5;//评估方法数
|
||||
|
||||
@@ -65,6 +65,38 @@
|
||||
<artifactId>common-minio</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--调用minio服务器-->
|
||||
<dependency>
|
||||
<groupId>me.tongfei</groupId>
|
||||
<artifactId>progressbar</artifactId>
|
||||
<version>0.5.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.2.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--避免idea后端配置类报红-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.njcn.harmonic.controller;
|
||||
package com.njcn.harmonic.controller;//package com.njcn.harmonic.controller;
|
||||
//
|
||||
//import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
//import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//package com.njcn.harmonic.controller;
|
||||
package com.njcn.harmonic.controller;//package com.njcn.harmonic.controller;
|
||||
//
|
||||
//import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
//import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.constant;
|
||||
|
||||
|
||||
/**
|
||||
* 常量类
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @date 2022年11月11日 09:56
|
||||
*/
|
||||
public interface Param {
|
||||
/**
|
||||
* 干扰源用户管理 数据状态
|
||||
*/
|
||||
Integer LOAD_TYPE_USER_SUBMIT = 1;
|
||||
Integer LOAD_TYPE_USER_SAVE = 2;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.process.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 异常处理类
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @date 2022年11月11日 09:56
|
||||
*/
|
||||
@Getter
|
||||
public enum ProcessResponseEnum {
|
||||
|
||||
/**
|
||||
* 过程监督异常响应码的范围:
|
||||
* A00550 ~ A00649
|
||||
*/
|
||||
PROCESS_COMMON_ERROR("A00550","监督管理模块异常"),
|
||||
UPLOAD_FILE_ERROR("A00551","上传文件服务器错误,请检查数据"),
|
||||
ARCHIVE_ERROR("A00552","不满足归档调节,操作失败!"),
|
||||
PROCESS_ERROR("A00553","当前流程未审核通过,操作失败!"),
|
||||
DOWNLOAD_FILE_ERROR("A00554","下载文件URL不存在,请检查数据"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String message;
|
||||
|
||||
ProcessResponseEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.process.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公共DTO(初始化类)
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
public class PublicDTO {
|
||||
|
||||
private String id;
|
||||
|
||||
private String date;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 运维异常问题Param
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:47
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AbnormalParam extends IssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "abnormalDevName",value = "异常设备名称")
|
||||
@NotNull(message = "异常设备名称不可为空")
|
||||
private String abnormalDevName;
|
||||
|
||||
@ApiModelProperty(name = "abnormalDevTime",value = "发现异常时间")
|
||||
@NotNull(message = "发现异常时间不可为空")
|
||||
private String abnormalDevTime;
|
||||
|
||||
@ApiModelProperty(name = "steadyState",value = "稳态指标")
|
||||
@NotNull(message = "稳态指标不可为空")
|
||||
private String[] steadyState;
|
||||
|
||||
@ApiModelProperty(name = "transientIndicators",value = "暂态指标")
|
||||
@NotNull(message = "暂态指标不可为空")
|
||||
private String[] transientIndicators;
|
||||
|
||||
@ApiModelProperty(name = "eventDescription",value = "事件描述")
|
||||
@NotNull(message = "事件描述不可为空")
|
||||
private String eventDescription;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 用户投诉Param
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:40
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ComplaintParam extends IssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "userType",value = "用户类别")
|
||||
@NotNull(message = "用户类别不可为空")
|
||||
private String userType;
|
||||
|
||||
@ApiModelProperty(name = "userNo",value = "用户编号")
|
||||
@NotNull(message = "用户编号不可为空")
|
||||
private String userNo;
|
||||
|
||||
@ApiModelProperty(name = "userName",value = "用户名称")
|
||||
@NotNull(message = "用户类别不可为空")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(name = "complaintContent",value = "投诉内容")
|
||||
@NotNull(message = "投诉内容不可为空")
|
||||
private String complaintContent;
|
||||
|
||||
@ApiModelProperty(name = "complaintTime",value = "投诉时间")
|
||||
@NotNull(message = "投诉时间不可为空")
|
||||
private String complaintTime;
|
||||
|
||||
@ApiModelProperty(name = "steadyState",value = "稳态指标")
|
||||
@NotNull(message = "稳态指标不可为空")
|
||||
private String[] steadyState;
|
||||
|
||||
@ApiModelProperty(name = "transientIndicators",value = "暂态指标")
|
||||
@NotNull(message = "暂态指标不可为空")
|
||||
private String[] transientIndicators;
|
||||
|
||||
@ApiModelProperty(name = "electricityType",value = "用电类别")
|
||||
@NotNull(message = "用电类别不可为空")
|
||||
private String electricityType;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 在线监测超标问题Param
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:30
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ExcessiveParam extends IssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "warnTarget",value = "告警指标")
|
||||
@NotNull(message = "告警指标不可为空")
|
||||
private String warnTarget;
|
||||
|
||||
@ApiModelProperty(name = "warnReason",value = "告警原因")
|
||||
@NotNull(message = "告警原因不可为空")
|
||||
private String warnReason;
|
||||
|
||||
@ApiModelProperty(name = "measurementPointId",value = "监测点ID")
|
||||
@NotNull(message = "监测点ID不可为空")
|
||||
private String measurementPointId;
|
||||
|
||||
@ApiModelProperty(name = "warnLastTime",value = "告警持续时间")
|
||||
@NotNull(message = "告警持续时间不可为空")
|
||||
private String warnLastTime;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 普测超标问题Param
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:35
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GeneralSurveyParam extends IssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "substationId",value = "变电站ID")
|
||||
@NotNull(message = "变电站ID不可为空")
|
||||
private String substationId;
|
||||
|
||||
@ApiModelProperty(name = "busbarId",value = "母线ID")
|
||||
@NotNull(message = "母线ID不可为空")
|
||||
private String busbarId;
|
||||
|
||||
@ApiModelProperty(name = "measurementPointId",value = "监测点ID")
|
||||
@NotNull(message = "监测点ID不可为空")
|
||||
private String measurementPointId;
|
||||
|
||||
@ApiModelProperty(name = "steadyState",value = "稳态指标")
|
||||
@NotNull(message = "稳态指标不可为空")
|
||||
private String[] steadyState;
|
||||
|
||||
@ApiModelProperty(name = "transientIndicators",value = "暂态指标")
|
||||
@NotNull(message = "暂态指标不可为空")
|
||||
private String[] transientIndicators;
|
||||
|
||||
@ApiModelProperty(name = "planName",value = "普测计划名称")
|
||||
@NotNull(message = "普测计划名称不可为空")
|
||||
private String planName;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 填报问题Param
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:13
|
||||
*/
|
||||
@Data
|
||||
public class IssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "orgNo",value = "单位ID")
|
||||
@NotNull(message = "单位不可为空")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty(name = "orgName",value = "单位名称")
|
||||
@NotNull(message = "单位名称不可为空")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(name = "problemName",value = "问题名称")
|
||||
@NotNull(message = "问题名称不可为空")
|
||||
private String problemName;
|
||||
|
||||
@ApiModelProperty(name = "problemSources",value = "问题来源")
|
||||
@NotNull(message = "问题来源不可为空")
|
||||
private String problemSources;
|
||||
|
||||
@ApiModelProperty(name = "reportProcessContent",value = "填报内容")
|
||||
private String reportProcessContent;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户实测上传Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/18 10:00
|
||||
*/
|
||||
@Data
|
||||
public class LoadTypeUserAUploadParam {
|
||||
|
||||
@ApiModelProperty(name = "id",required = true)
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "file",value = "实测报告文件",required = true)
|
||||
private MultipartFile file;
|
||||
|
||||
@ApiModelProperty(name = "status",value = "数据状态(1:提交 2:保存)",required = true)
|
||||
@NotNull(message = "数据状态不可为空")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(name = "aIsOverLimit",value = "实测是否超标(0:否 1:是)",required = true)
|
||||
@NotNull(message = "实测是否超标不可为空")
|
||||
private Integer aIsOverLimit;
|
||||
|
||||
@ApiModelProperty(name = "aOverLimitTarget",value = "实测超标指标",required = true)
|
||||
@NotBlank(message = "实测超标指标不可为空")
|
||||
private String aOverLimitTarget;
|
||||
|
||||
@ApiModelProperty(name = "aPlanStep",value = "实测计划采取措施",required = true)
|
||||
@NotBlank(message = "实测计划采取措施不可为空")
|
||||
private String aPlanStep;
|
||||
|
||||
@ApiModelProperty(name = "aDescription",value = "实测详情")
|
||||
private String aDescription;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户关联营销Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/16 10:34
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LoadTypeUserAssociateParam {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
@NotBlank(message = "用户类型不可为空")
|
||||
private String userLoadType;
|
||||
|
||||
@ApiModelProperty("关联干扰源用户编号")
|
||||
@NotBlank(message = "关联干扰源用户编号不可为空")
|
||||
private String relationUserId;
|
||||
|
||||
@ApiModelProperty("关联干扰源用户名称")
|
||||
@NotBlank(message = "关联干扰源用户名称不可为空")
|
||||
private String relationUserName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户入网上传Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
public class LoadTypeUserIUploadParam {
|
||||
|
||||
@ApiModelProperty(name = "id",required = true)
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "file",value = "入网报告文件",required = true)
|
||||
private MultipartFile file;
|
||||
|
||||
@ApiModelProperty(name = "status",value = "数据状态(1:提交 2:保存)",required = true)
|
||||
@NotNull(message = "数据状态不可为空")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(name = "iIsOverLimit",value = "入网是否超标(0:否 1:是)",required = true)
|
||||
@NotNull(message = "入网是否超标不可为空")
|
||||
private Integer iIsOverLimit;
|
||||
|
||||
@ApiModelProperty(name = "iOverLimitTarget",value = "入网超标指标",required = true)
|
||||
@NotBlank(message = "入网超标指标不可为空")
|
||||
private String iOverLimitTarget;
|
||||
|
||||
@ApiModelProperty(name = "iPlanStep",value = "入网计划采取措施",required = true)
|
||||
@NotBlank(message = "入网计划采取措施不可为空")
|
||||
private String iPlanStep;
|
||||
|
||||
@ApiModelProperty(name = "iDescription",value = "入网详情")
|
||||
private String iDescription;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户编辑Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LoadTypeUserParam {
|
||||
|
||||
@ApiModelProperty("所属单位")
|
||||
@NotBlank(message = "所属单位不可为空")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty("干扰源类型")
|
||||
@NotBlank(message = "干扰源类型不可为空")
|
||||
private String loadType;
|
||||
|
||||
@ApiModelProperty("干扰源用户名称")
|
||||
@NotBlank(message = "干扰源用户名称不可为空")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("建档时间")
|
||||
@NotBlank(message = "时间不可为空")
|
||||
@Pattern(regexp = PatternRegex.TIME_SECOND_FORMAT, message = "时间格式错误")
|
||||
private String recordTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户搜索Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class LoadTypeUserSearchParam {
|
||||
|
||||
@ApiModelProperty("所属单位")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty("干扰源类型")
|
||||
private String loadType;
|
||||
|
||||
@ApiModelProperty("干扰源用户名称")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("关联干扰源用户名称")
|
||||
private String relationUserName;
|
||||
|
||||
@ApiModelProperty("是否上传入网报告(0:否 1:是)")
|
||||
private Integer iIsFileUpload;
|
||||
|
||||
@ApiModelProperty("是否上传实测报告(0:否 1:是)")
|
||||
private Integer aIsFileUpload;
|
||||
|
||||
@ApiModelProperty("页码")
|
||||
@NotNull(message = "页码不可为空")
|
||||
@Range(min = 1,message = "页码必须大于0")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("条数")
|
||||
@NotNull(message = "条数不可为空")
|
||||
@Range(min = 1,message = "条数必须大于0")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/15 15:39
|
||||
*/
|
||||
@Data
|
||||
public class ProcessParam {
|
||||
|
||||
@ApiModelProperty(name = "powerQualityProblemNo",value = "电能质量问题编号")
|
||||
@NotNull(message = "电能质量问题编号不可为空")
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
@ApiModelProperty(name = "reportProcessContentYyfx",value = "电网侧原因")
|
||||
private String[] reportProcessContentYyfx;
|
||||
|
||||
@ApiModelProperty(name = "userReportProcessContentYyfx",value = "用户侧原因")
|
||||
private String[] userReportProcessContentYyfx;
|
||||
|
||||
@ApiModelProperty(name = "powerGridAffectDev",value = "电网侧受影响设备")
|
||||
private String[] powerGridAffectDev;
|
||||
|
||||
@ApiModelProperty(name = "userAffectDev",value = "用户侧受影响设备")
|
||||
private String[] userAffectDev;
|
||||
|
||||
@ApiModelProperty(name = "eventDescriptionYyfx",value = "事件描述")
|
||||
private String eventDescriptionYyfx;
|
||||
|
||||
@ApiModelProperty(name = "fileNameYyfx",value = "原因分析报告文件名称")
|
||||
private String fileNameYyfx;
|
||||
|
||||
@ApiModelProperty(name = "filePathYyfx",value = "原因分析报告文件路径")
|
||||
private String filePathYyfx;
|
||||
|
||||
@ApiModelProperty(name = "reportProcessContentYyfx",value = "电网侧整改治理措施")
|
||||
private String[] reportProcessContentJhzg;
|
||||
|
||||
@ApiModelProperty(name = "userReportProcessContentJhzg",value = "用户侧整改治理措施")
|
||||
private String[] userReportProcessContentJhzg;
|
||||
|
||||
@ApiModelProperty(name = "fileNameJhzg",value = "计划整改文件名称")
|
||||
private String fileNameJhzg;
|
||||
|
||||
@ApiModelProperty(name = "filePathJhzg",value = "计划整改文件路径")
|
||||
private String filePathJhzg;
|
||||
|
||||
@ApiModelProperty(name = "reportProcessContentSjcq",value = "电网侧实际采取措施")
|
||||
private String[] reportProcessContentSjcq;
|
||||
|
||||
@ApiModelProperty(name = "userReportProcessContentSjcq",value = "用户侧实际采取措施")
|
||||
private String[] userReportProcessContentSjcq;
|
||||
|
||||
@ApiModelProperty(name = "fileNameSjcq",value = "实际采取措施报告文件名称")
|
||||
private String fileNameSjcq;
|
||||
|
||||
@ApiModelProperty(name = "filePathSjcq",value = "实际采取措施报告文件路径")
|
||||
private String filePathSjcq;
|
||||
|
||||
@ApiModelProperty(name = "descriptionZlxg",value = "成效分析概述")
|
||||
private String descriptionZlxg;
|
||||
|
||||
@ApiModelProperty(name = "fileNameZlxg",value = "成效分析报告文件名称")
|
||||
private String fileNameZlxg;
|
||||
|
||||
@ApiModelProperty(name = "filePathZlxg",value = "成效分析报告文件路径")
|
||||
private String filePathZlxg;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公共Param(初始化类)
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
public class PublicParam {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "date")
|
||||
private String date;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 14:49
|
||||
*/
|
||||
@Data
|
||||
public class QueryIssuesParam {
|
||||
|
||||
@ApiModelProperty(name = "orgNo",value = "所属单位")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty(name = "problemSources",value = "问题来源")
|
||||
private String problemSources;
|
||||
|
||||
@ApiModelProperty(name = "reportProcess",value = "填报进度")
|
||||
private String reportProcess;
|
||||
|
||||
@ApiModelProperty(name = "reportProcessStatus",value = "审核状态")
|
||||
private String reportProcessStatus;
|
||||
|
||||
@ApiModelProperty(name = "problemName",value = "问题名称")
|
||||
private String problemName;
|
||||
|
||||
@ApiModelProperty(name = "dataType",value = "时间类型(年:1;季:2;月:3)")
|
||||
private Integer dataType;
|
||||
|
||||
@ApiModelProperty(name = "dataDate",value = "问题发生记录时间")
|
||||
private String dataDate;
|
||||
|
||||
@ApiModelProperty(name = "pageNum",value = "页码")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty(name = "pageSize",value = "页面尺寸")
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlanAddParm {
|
||||
|
||||
@ApiModelProperty(value="单位ID")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty(value="普测计划编号")
|
||||
private String planNo;
|
||||
|
||||
@ApiModelProperty(value="普测计划名称")
|
||||
private String planName;
|
||||
|
||||
@ApiModelProperty(value="计划开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planStartTime;
|
||||
|
||||
@ApiModelProperty(value="计划结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planEndTime;
|
||||
|
||||
@ApiModelProperty(value="计划负责人")
|
||||
private String leader;
|
||||
@ApiModelProperty(value="详细情况")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value="计划详细情况母线相关")
|
||||
private List<RGeneralSurveyPlanDetailAddParm> rGeneralSurveyPlanDetailAddParm;
|
||||
@Data
|
||||
@ApiModel(value="计划详细情况母线相关")
|
||||
public static class RGeneralSurveyPlanDetailAddParm{
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private String orgNo;
|
||||
@ApiModelProperty(value = "组织名")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value="变电站ID")
|
||||
private String subId;
|
||||
|
||||
@ApiModelProperty(value="变电站名称")
|
||||
private String subName;
|
||||
|
||||
@ApiModelProperty(value="变电站电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty(value="母线ID")
|
||||
private String busbarId;
|
||||
|
||||
@ApiModelProperty(value="母线名称")
|
||||
private String busbarName;
|
||||
|
||||
@ApiModelProperty(value="离线监测点id")
|
||||
private String measurementPointId;
|
||||
/**
|
||||
* 测试开始时间
|
||||
*/
|
||||
@ApiModelProperty(value="测试开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyStartTime;
|
||||
|
||||
/**
|
||||
* 测试结束时间
|
||||
*/
|
||||
@ApiModelProperty(value="测试结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyEndTime;
|
||||
|
||||
/**
|
||||
* 测试日期
|
||||
*/
|
||||
@ApiModelProperty(value="测试日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyTime;
|
||||
|
||||
/**
|
||||
* 测试负责人
|
||||
*/
|
||||
@ApiModelProperty(value="测试负责人")
|
||||
private String generalSurveyLeader;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlanQueryParm {
|
||||
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value="单位ID")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty(value="计划开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planStartTime;
|
||||
|
||||
@ApiModelProperty(value="计划结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planEndTime;
|
||||
|
||||
@ApiModelProperty(value="计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value="文件是否上传(0:否 1:是)")
|
||||
private String isFileUpload;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlandetailQueryParm {
|
||||
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value="普测计划编号")
|
||||
private String planNo;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class SurveyPlanQuestionQueryParm {
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value="单位ID")
|
||||
@NotNull(message="单位ID不能为空!")
|
||||
private String orgNo;
|
||||
|
||||
@ApiModelProperty(value="计划开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
@NotNull(message="计划开始时间不能为空!")
|
||||
private Date planStartTime;
|
||||
|
||||
@ApiModelProperty(value="计划名称")
|
||||
private String planName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.process.pojo.param;
|
||||
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 未建档干扰源用户入网上传Param
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 10:34
|
||||
*/
|
||||
@Data
|
||||
public class SurveyResultUploadParam {
|
||||
|
||||
@ApiModelProperty(name = "planId",required = true)
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
private String planId;
|
||||
|
||||
@ApiModelProperty(name = "file",value = "普测结果报告",required = true)
|
||||
@NotNull(message = "普测结果报告")
|
||||
private MultipartFile[] file;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 普测计划详情表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_general_survey_plan_detail")
|
||||
public class RGeneralSurveyPlanDetail {
|
||||
/**
|
||||
* 普测计划编号
|
||||
*/
|
||||
@MppMultiId(value = "plan_no")
|
||||
private String planNo;
|
||||
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
@TableField(value = "org_name")
|
||||
private String orgName;
|
||||
/**
|
||||
* 母线ID
|
||||
*/
|
||||
|
||||
@MppMultiId(value = "busbar_id")
|
||||
private String busbarId;
|
||||
|
||||
/**
|
||||
* 测试开始时间
|
||||
*/
|
||||
@TableField(value = "general_survey_start_time")
|
||||
private Date generalSurveyStartTime;
|
||||
|
||||
/**
|
||||
* 测试结束时间
|
||||
*/
|
||||
@TableField(value = "general_survey_end_time")
|
||||
private Date generalSurveyEndTime;
|
||||
|
||||
/**
|
||||
* 测试日期
|
||||
*/
|
||||
@TableField(value = "general_survey_time")
|
||||
private Date generalSurveyTime;
|
||||
|
||||
/**
|
||||
* 测试负责人
|
||||
*/
|
||||
@TableField(value = "general_survey_leader")
|
||||
private String generalSurveyLeader;
|
||||
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
@TableField(value = "sub_id")
|
||||
private String subId;
|
||||
|
||||
/**
|
||||
* 变电站名称
|
||||
*/
|
||||
@TableField(value = "sub_name")
|
||||
private String subName;
|
||||
|
||||
/**
|
||||
* 变电站电压等级
|
||||
*/
|
||||
@TableField(value = "voltage_level")
|
||||
private String voltageLevel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 母线名称
|
||||
*/
|
||||
@TableField(value = "busbar_name")
|
||||
private String busbarName;
|
||||
|
||||
/**
|
||||
* 离线监测点id
|
||||
*/
|
||||
@TableField(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 是否实现监测(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_survey")
|
||||
private Integer isSurvey;
|
||||
|
||||
/**
|
||||
* 是否生成问题(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_problem")
|
||||
private Integer isProblem;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 普测计划表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_general_survey_plan")
|
||||
public class RGeneralSurveyPlanPO {
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@TableField(value = "org_no")
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 普测计划编号
|
||||
*/
|
||||
@MppMultiId(value = "plan_no")
|
||||
private String planNo;
|
||||
|
||||
/**
|
||||
* 普测计划名称
|
||||
*/
|
||||
@TableField(value = "plan_name")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划生成时间
|
||||
*/
|
||||
@TableField(value = "plan_create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planCreateTime = new Date();
|
||||
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@TableField(value = "plan_start_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planStartTime;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
@TableField(value = "plan_end_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planEndTime;
|
||||
|
||||
/**
|
||||
* 实际完成时间
|
||||
*/
|
||||
@TableField(value = "plan_complate_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planComplateTime;
|
||||
|
||||
/**
|
||||
* 计划负责人
|
||||
*/
|
||||
@TableField(value = "leader")
|
||||
private String leader;
|
||||
|
||||
/**
|
||||
* 计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 文件是否上传(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_file_upload")
|
||||
private Integer isFileUpload;
|
||||
|
||||
/**
|
||||
* 上传文件数量
|
||||
*/
|
||||
@TableField(value = "file_count")
|
||||
private Integer fileCount ;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
@TableField(value = "file_path")
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@TableField(value = "upload_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uploadTime;
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理表(RLoadTypeUserManage)实体类
|
||||
*
|
||||
* @author qijian
|
||||
* @since 2022-11-11 10:11:41
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_load_type_user_manage")
|
||||
public class RLoadTypeUserManage implements Serializable {
|
||||
private static final long serialVersionUID = 390349030891669605L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
private String orgNo;
|
||||
/**
|
||||
* 干扰源类型ID
|
||||
*/
|
||||
private String loadType;
|
||||
/**
|
||||
* 干扰源用户名称
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 关联干扰源用户编号ID
|
||||
*/
|
||||
private String relationUserId;
|
||||
/**
|
||||
* 关联干扰源用户名称
|
||||
*/
|
||||
private String relationUserName;
|
||||
/**
|
||||
* 建档时间
|
||||
*/
|
||||
private Date recordTime;
|
||||
/**
|
||||
* 送电日期(并网日期)
|
||||
*/
|
||||
private Date powerTransmissionDate;
|
||||
/**
|
||||
* 合同容量(总装机容量)
|
||||
*/
|
||||
private Float userArgeementCapacity;
|
||||
/**
|
||||
* 用户类型,字典表
|
||||
*/
|
||||
private String userLoadType;
|
||||
/**
|
||||
* 入网报告是否上传(0:否 1:是)
|
||||
*/
|
||||
private Integer iIsFileUpload;
|
||||
/**
|
||||
* 入网报告状态,字典ID
|
||||
*/
|
||||
private String iStatus;
|
||||
/**
|
||||
* 入网报告路径
|
||||
*/
|
||||
private String iFilePath;
|
||||
/**
|
||||
* 入网报告上传时间
|
||||
*/
|
||||
private Date iUploadTime;
|
||||
/**
|
||||
* 入网是否超标(0:否 1:是)
|
||||
*/
|
||||
private Integer iIsOverLimit;
|
||||
/**
|
||||
* 入网超标指标
|
||||
*/
|
||||
private String iOverLimitTarget;
|
||||
/**
|
||||
* 入网计划采取措施,字典ID
|
||||
*/
|
||||
private String iPlanStep;
|
||||
/**
|
||||
* 入网详情
|
||||
*/
|
||||
private String iDescription;
|
||||
/**
|
||||
* 实测报告是否上传(0:否 1:是)
|
||||
*/
|
||||
private Integer aIsFileUpload;
|
||||
/**
|
||||
* 实测报告状态,字典ID
|
||||
*/
|
||||
private String aStatus;
|
||||
/**
|
||||
* 实测报告路径
|
||||
*/
|
||||
private String aFilePath;
|
||||
/**
|
||||
* 实测报告上传时间
|
||||
*/
|
||||
private Date aUploadTime;
|
||||
/**
|
||||
* 实测是否超标(0:否 1:是)
|
||||
*/
|
||||
private Integer aIsOverLimit;
|
||||
/**
|
||||
* 实测超标指标
|
||||
*/
|
||||
private String aOverLimitTarget;
|
||||
/**
|
||||
* 实测计划采取措施,字典ID
|
||||
*/
|
||||
private String aPlanStep;
|
||||
/**
|
||||
* 实测详情
|
||||
*/
|
||||
private String aDescription;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 电能质量问题流程详情表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_mp_electric_quality_problem_flow_details")
|
||||
public class RMpElectricQualityProblemFlowDetails implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9178900090120554888L;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 原因分析问题填报时间
|
||||
*/
|
||||
private LocalDateTime dataDateYyfx;
|
||||
|
||||
/**
|
||||
* 原因分析电网侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String reportProcessContentYyfx;
|
||||
|
||||
/**
|
||||
* 原因分析用户侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String userReportProcessContentYyfx;
|
||||
|
||||
/**
|
||||
* 原因分析事件描述
|
||||
*/
|
||||
private String eventDescriptionYyfx;
|
||||
|
||||
/**
|
||||
* 原因分析文件名称
|
||||
*/
|
||||
private String fileNameYyfx;
|
||||
|
||||
/**
|
||||
* 原因分析文件路径
|
||||
*/
|
||||
private String filePathYyfx;
|
||||
|
||||
/**
|
||||
* 计划整改问题填报时间
|
||||
*/
|
||||
private LocalDateTime dataDateJhzg;
|
||||
|
||||
/**
|
||||
* 计划整改电网侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String reportProcessContentJhzg;
|
||||
|
||||
/**
|
||||
* 计划整改用户侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String userReportProcessContentJhzg;
|
||||
|
||||
/**
|
||||
* 计划整改文件名称
|
||||
*/
|
||||
private String fileNameJhzg;
|
||||
|
||||
/**
|
||||
* 计划整改文件路径
|
||||
*/
|
||||
private String filePathJhzg;
|
||||
|
||||
/**
|
||||
* 实际采取问题填报时间
|
||||
*/
|
||||
private LocalDateTime dataDateSjcq;
|
||||
|
||||
/**
|
||||
* 实际采取电网侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String reportProcessContentSjcq;
|
||||
|
||||
/**
|
||||
* 实际采取用户侧填报内容,字典表(风电场)
|
||||
*/
|
||||
private String userReportProcessContentSjcq;
|
||||
|
||||
/**
|
||||
* 实际采取文件名称
|
||||
*/
|
||||
private String fileNameSjcq;
|
||||
|
||||
/**
|
||||
* 实际采取文件路径
|
||||
*/
|
||||
private String filePathSjcq;
|
||||
|
||||
/**
|
||||
* 治理效果问题填报时间
|
||||
*/
|
||||
private LocalDateTime dataDateZlxg;
|
||||
|
||||
/**
|
||||
* 治理效果事件描述
|
||||
*/
|
||||
private String descriptionZlxg;
|
||||
|
||||
/**
|
||||
* 治理效果文件名称
|
||||
*/
|
||||
private String fileNameZlxg;
|
||||
|
||||
/**
|
||||
* 治理效果文件路径
|
||||
*/
|
||||
private String filePathZlxg;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测超标问题详情表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_mp_general_survey_overproof_problem")
|
||||
public class RMpGeneralSurveyOverproofProblem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8919697054130246792L;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
private String substationId;
|
||||
|
||||
/**
|
||||
* 母线ID
|
||||
*/
|
||||
private String busbarId;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 问题发生记录时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 超标指标
|
||||
*/
|
||||
private String overLimitTarget;
|
||||
|
||||
/**
|
||||
* 普测计划名称
|
||||
*/
|
||||
private String planName;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 在线监测超标问题详情表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_mp_online_monitor_overproof_problem")
|
||||
public class RMpOnlineMonitorOverproofProblem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3162750613976845195L;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 告警指标
|
||||
*/
|
||||
private String warnTarget;
|
||||
|
||||
/**
|
||||
* 告警原因
|
||||
*/
|
||||
private String warnReason;
|
||||
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
private String substationId;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 告警持续时间
|
||||
*/
|
||||
private String warnLastTime;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 运维监控异常详情表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_mp_operation_monitor_abnormal")
|
||||
public class RMpOperationMonitorAbnormal implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8875641972721431859L;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 异常设备名称
|
||||
*/
|
||||
private String abnormalDevName;
|
||||
|
||||
/**
|
||||
* 发现异常时间
|
||||
*/
|
||||
private LocalDateTime abnormalDevTime;
|
||||
|
||||
/**
|
||||
* 异常指标
|
||||
*/
|
||||
private String abnormalTarget;
|
||||
|
||||
/**
|
||||
* 事件描述
|
||||
*/
|
||||
private String eventDescription;
|
||||
|
||||
/**
|
||||
* 问题发生记录时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 电网侧受影响设备
|
||||
*/
|
||||
private String powerGridAffectDev;
|
||||
|
||||
/**
|
||||
* 用户侧受影响设备
|
||||
*/
|
||||
private String userAffectDev;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户投诉详情表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_mp_user_complaint")
|
||||
public class RMpUserComplaint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3262855544539938372L;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 用户类别
|
||||
*/
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String userNo;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 投诉内容
|
||||
*/
|
||||
private String complaintContent;
|
||||
|
||||
/**
|
||||
* 投诉时间
|
||||
*/
|
||||
private LocalDateTime complaintTime;
|
||||
|
||||
/**
|
||||
* 异常指标
|
||||
*/
|
||||
private String abnormalTarget;
|
||||
|
||||
/**
|
||||
* 问题发生记录时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 用电类别
|
||||
*/
|
||||
private String electricityType;
|
||||
|
||||
/**
|
||||
* 电网侧受影响设备
|
||||
*/
|
||||
private String powerGridAffectDev;
|
||||
|
||||
/**
|
||||
* 用户侧受影响设备
|
||||
*/
|
||||
private String userAffectDev;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 电能质量问题流程表
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("r_stat_electric_quality_problem_flow")
|
||||
public class RStatElectricQualityProblemFlow implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2613309615015237749L;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 问题发生记录时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 流程开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 填报更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 问题来源(在线监测告警、普测超标、用户投诉、设备异常)
|
||||
*/
|
||||
private String problemSources;
|
||||
|
||||
/**
|
||||
* 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
private String reportProcess;
|
||||
|
||||
/**
|
||||
* 审核状态 (0:待审核 2:审核通过 3:已驳回)
|
||||
*/
|
||||
private String reportProcessStatus;
|
||||
|
||||
/**
|
||||
* 填报内容,字典表(风电场)
|
||||
*/
|
||||
private String reportProcessContent;
|
||||
|
||||
/**
|
||||
* 问题名称
|
||||
*/
|
||||
private String problemName;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/18 10:32
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AbnormalVO extends ProcessVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8022287041427540079L;
|
||||
|
||||
/**
|
||||
* 异常设备名称
|
||||
*/
|
||||
private String abnormalDevName;
|
||||
|
||||
/**
|
||||
* 发现异常时间
|
||||
*/
|
||||
private String abnormalDevTime;
|
||||
|
||||
/**
|
||||
* 设备异常描述
|
||||
*/
|
||||
private String eventDescription;
|
||||
|
||||
/**
|
||||
* 稳态指标
|
||||
*/
|
||||
private String[] steadyIndicator;
|
||||
|
||||
/**
|
||||
* 暂态指标
|
||||
*/
|
||||
private String[] transientIndicators;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/18 10:29
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ComplaintVO extends ProcessVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9158479795790063533L;
|
||||
|
||||
/**
|
||||
* 投诉用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 投诉用户编号
|
||||
*/
|
||||
private String userNo;
|
||||
|
||||
/**
|
||||
* 投诉时间
|
||||
*/
|
||||
private String complaintTime;
|
||||
|
||||
/**
|
||||
* 投诉内容
|
||||
*/
|
||||
private String complaintContent;
|
||||
|
||||
/**
|
||||
* 稳态指标
|
||||
*/
|
||||
private String[] steadyIndicator;
|
||||
|
||||
/**
|
||||
* 暂态指标
|
||||
*/
|
||||
private String[] transientIndicators;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/15 14:20
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ExcessiveDetailVO extends ProcessVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 8148172081938274507L;
|
||||
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
private String substationId;
|
||||
|
||||
/**
|
||||
* 所属变电站
|
||||
*/
|
||||
private String substationName;
|
||||
|
||||
/**
|
||||
* 母线ID
|
||||
*/
|
||||
private String busBarId;
|
||||
|
||||
/**
|
||||
* 所属母线
|
||||
*/
|
||||
private String busBarName;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
private String measurementPointName;
|
||||
|
||||
/**
|
||||
* 告警持续时间
|
||||
*/
|
||||
private String warnLastTime;
|
||||
|
||||
/**
|
||||
* 告警指标
|
||||
*/
|
||||
private String warnTarget;
|
||||
|
||||
/**
|
||||
* 告警原因
|
||||
*/
|
||||
private String warnReason;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/18 10:18
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GeneralSurveyVO extends ProcessVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2492655246455534163L;
|
||||
|
||||
/**
|
||||
* 普测计划名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
private String substationId;
|
||||
|
||||
/**
|
||||
* 所属变电站
|
||||
*/
|
||||
private String substationName;
|
||||
|
||||
/**
|
||||
* 母线ID
|
||||
*/
|
||||
private String busBarId;
|
||||
|
||||
/**
|
||||
* 所属母线
|
||||
*/
|
||||
private String busBarName;
|
||||
|
||||
/**
|
||||
* 稳态指标
|
||||
*/
|
||||
private String[] steadyIndicator;
|
||||
|
||||
/**
|
||||
* 暂态指标
|
||||
*/
|
||||
private String[] transientIndicators;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 15:26
|
||||
*/
|
||||
@Data
|
||||
public class IssuesVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3404206127125677291L;
|
||||
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 问题来源(在线监测告警、普测超标、用户投诉、设备异常)
|
||||
*/
|
||||
private String problemSources;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
private String powerQualityProblemNo;
|
||||
|
||||
/**
|
||||
* 问题名称
|
||||
*/
|
||||
private String problemName;
|
||||
|
||||
/**
|
||||
* 问题发生记录时间
|
||||
*/
|
||||
private LocalDateTime dataDate;
|
||||
|
||||
/**
|
||||
* 填报进度,字典表(未填报、原因分析结果、计划整改措施、实际采取措施、治理效果评价、已归档)
|
||||
*/
|
||||
private String reportProcess;
|
||||
|
||||
/**
|
||||
* 审核状态 (0:待审核 2:审核通过 3:已驳回)
|
||||
*/
|
||||
private String reportProcessStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/12/07 9:21
|
||||
*/
|
||||
@Data
|
||||
public class LoadTypeRelationExcel implements Serializable {
|
||||
|
||||
@Excel(name = "单位名称", width = 15)
|
||||
private String orgName;
|
||||
|
||||
@Excel(name = "干扰源类型", width = 15)
|
||||
private String loadTypeName;
|
||||
|
||||
@Excel(name = "干扰源用户名称", width = 15)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "关联干扰源用户名称", width = 15)
|
||||
private String relationUserName;
|
||||
|
||||
@Excel(name = "实测报告状态", width = 15)
|
||||
private String aStatusName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/12/06 9:21
|
||||
*/
|
||||
@Data
|
||||
public class LoadTypeUserExcel implements Serializable {
|
||||
|
||||
@Excel(name = "单位名称", width = 15)
|
||||
private String orgName;
|
||||
|
||||
@Excel(name = "干扰源类型", width = 15)
|
||||
private String loadTypeName;
|
||||
|
||||
@Excel(name = "干扰源用户名称", width = 15)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "建档时间", format = "yyyy-MM-dd HH:mm:ss", width = 15)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date recordTime;
|
||||
|
||||
@Excel(name = "报告是否上传", width = 15)
|
||||
private String iIsFileUpload;
|
||||
|
||||
@Excel(name = "入网报告状态", width = 15)
|
||||
private String iStatusName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/18 9:21
|
||||
*/
|
||||
@Data
|
||||
public class ProcessVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5482941481503051977L;
|
||||
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
private String orgNo;
|
||||
|
||||
/**
|
||||
* 所属单位
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 问题来源(在线监测告警、普测超标、用户投诉、设备异常)
|
||||
*/
|
||||
private String problemSources;
|
||||
|
||||
/**
|
||||
* 问题名称
|
||||
*/
|
||||
private String problemName;
|
||||
|
||||
/**
|
||||
* 电能质量问题编号
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 普测计划详情表(问题件页面)
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlanDetailOnQuestionVO {
|
||||
/**
|
||||
* 普测计划编号
|
||||
*/
|
||||
@ApiModelProperty(value="普测名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 变电站电压等级
|
||||
*/
|
||||
@ApiModelProperty(value="变电站电压等级")
|
||||
private String voltageLevel;
|
||||
/**
|
||||
* 变电站ID
|
||||
*/
|
||||
@ApiModelProperty(value="变电站ID")
|
||||
private String subId;
|
||||
|
||||
/**
|
||||
* 变电站名称
|
||||
*/
|
||||
@ApiModelProperty(value="变电站名称")
|
||||
private String subName;
|
||||
/**
|
||||
* 母线ID
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value="母线ID")
|
||||
private String busbarId;
|
||||
|
||||
|
||||
/**
|
||||
* 母线名称
|
||||
*/
|
||||
@ApiModelProperty(value="母线名称")
|
||||
private String busbarName;
|
||||
|
||||
/**
|
||||
* 离线监测点id
|
||||
*/
|
||||
@ApiModelProperty(value="离线监测点id")
|
||||
private String measurementPointId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 15:20【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class RGeneralSurveyPlanVO {
|
||||
|
||||
@ApiModelProperty(value="单位ID")
|
||||
private String orgNo;
|
||||
@ApiModelProperty(value="单位名称")
|
||||
private String orgName;
|
||||
|
||||
|
||||
@ApiModelProperty(value="普测计划编号")
|
||||
private String planNo;
|
||||
|
||||
@ApiModelProperty(value="普测计划名称")
|
||||
private String planName;
|
||||
|
||||
@ApiModelProperty(value="计划开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planStartTime;
|
||||
|
||||
@ApiModelProperty(value="计划结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planEndTime;
|
||||
|
||||
@ApiModelProperty(value="变电站数量")
|
||||
private Long subCount;
|
||||
|
||||
@ApiModelProperty(value="母线数量")
|
||||
private Long busCount;
|
||||
|
||||
@ApiModelProperty(value="计划状态(0:新建 1:待审核 2:审核未通过 3:已发布 4:已完成)")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "is_file_upload")
|
||||
@ApiModelProperty(value="文件是否上传(0:否 1:是)")
|
||||
private Integer isFileUpload;
|
||||
|
||||
/**
|
||||
* 上传文件数量
|
||||
*/
|
||||
@TableField(value = "file_count")
|
||||
@ApiModelProperty(value="上传文件数量")
|
||||
private Integer fileCount;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
@TableField(value = "file_path")
|
||||
@ApiModelProperty(value="文件路径")
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@TableField(value = "upload_time")
|
||||
@ApiModelProperty(value="上传时间")
|
||||
private Date uploadTime;
|
||||
|
||||
@ApiModelProperty(value="计划详细情况母线相关")
|
||||
private List<RGeneralSurveyPlanDetailVO> rGeneralSurveyPlanDetailVOList;
|
||||
@Data
|
||||
@ApiModel(value="计划详细情况母线相关")
|
||||
public static class RGeneralSurveyPlanDetailVO{
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private String orgNo;
|
||||
@ApiModelProperty(value = "组织名")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(value="变电站ID")
|
||||
private String subId;
|
||||
|
||||
@ApiModelProperty(value="变电站名称")
|
||||
private String subName;
|
||||
|
||||
@ApiModelProperty(value="变电站电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty(value="母线ID")
|
||||
private String busbarId;
|
||||
|
||||
@ApiModelProperty(value="母线名称")
|
||||
private String busbarName;
|
||||
|
||||
@ApiModelProperty(value="离线监测点id")
|
||||
private String measurementPointId;
|
||||
/**
|
||||
* 测试开始时间
|
||||
*/
|
||||
@ApiModelProperty(value="测试开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyStartTime;
|
||||
|
||||
/**
|
||||
* 测试结束时间
|
||||
*/
|
||||
@ApiModelProperty(value="测试结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyEndTime;
|
||||
|
||||
/**
|
||||
* 测试日期
|
||||
*/
|
||||
@ApiModelProperty(value="测试日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date generalSurveyTime;
|
||||
|
||||
/**
|
||||
* 是否实现监测(0:否 1:是)
|
||||
*/
|
||||
@TableField(value = "is_survey")
|
||||
@ApiModelProperty(value="是否生成问题(0:否 1:是)")
|
||||
private Integer isSurvey;
|
||||
|
||||
/**
|
||||
* 测试负责人
|
||||
*/
|
||||
@ApiModelProperty(value="测试负责人")
|
||||
private String generalSurveyLeader;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理表 VO
|
||||
*
|
||||
* @author qijian
|
||||
* @since 2022-11-11 10:11:41
|
||||
*/
|
||||
@Data
|
||||
public class RLoadTypeUserManageVO implements Serializable {
|
||||
private static final long serialVersionUID = 390349030891669605L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
/**
|
||||
* 单位ID
|
||||
*/
|
||||
@ApiModelProperty("单位ID")
|
||||
private String orgNo;
|
||||
/**
|
||||
* 干扰源类型ID
|
||||
*/
|
||||
@ApiModelProperty("干扰源类型ID")
|
||||
private String loadType;
|
||||
/**
|
||||
* 干扰源用户名称
|
||||
*/
|
||||
@ApiModelProperty("干扰源用户名称")
|
||||
private String userName;
|
||||
/**
|
||||
* 关联干扰源用户编号ID
|
||||
*/
|
||||
@ApiModelProperty("关联干扰源用户编号ID")
|
||||
private String relationUserId;
|
||||
/**
|
||||
* 关联干扰源用户名称
|
||||
*/
|
||||
@ApiModelProperty("关联干扰源用户名称")
|
||||
private String relationUserName;
|
||||
/**
|
||||
* 建档时间
|
||||
*/
|
||||
@ApiModelProperty("建档时间")
|
||||
private Date recordTime;
|
||||
/**
|
||||
* 送电日期(并网日期)
|
||||
*/
|
||||
@ApiModelProperty("送电日期(并网日期)")
|
||||
private Date powerTransmissionDate;
|
||||
/**
|
||||
* 合同容量(总装机容量)
|
||||
*/
|
||||
@ApiModelProperty("合同容量(总装机容量)")
|
||||
private Float userArgeementCapacity;
|
||||
/**
|
||||
* 用户类型,字典表
|
||||
*/
|
||||
@ApiModelProperty("用户类型,字典表")
|
||||
private String userLoadType;
|
||||
/**
|
||||
* 入网报告是否上传(0:否 1:是)
|
||||
*/
|
||||
@ApiModelProperty("入网报告是否上传(0:否 1:是)")
|
||||
private Integer iIsFileUpload;
|
||||
/**
|
||||
* 入网报告状态,字典ID
|
||||
*/
|
||||
@ApiModelProperty("入网报告状态,字典ID")
|
||||
private String iStatus;
|
||||
/**
|
||||
* 入网报告路径
|
||||
*/
|
||||
@ApiModelProperty("入网报告路径")
|
||||
private String iFilePath;
|
||||
/**
|
||||
* 入网报告上传时间
|
||||
*/
|
||||
@ApiModelProperty("入网报告上传时间")
|
||||
private Date iUploadTime;
|
||||
/**
|
||||
* 入网是否超标(0:否 1:是)
|
||||
*/
|
||||
@ApiModelProperty("入网是否超标(0:否 1:是)")
|
||||
private Integer iIsOverLimit;
|
||||
/**
|
||||
* 入网超标指标
|
||||
*/
|
||||
@ApiModelProperty("入网超标指标")
|
||||
private String iOverLimitTarget;
|
||||
/**
|
||||
* 入网计划采取措施,字典ID
|
||||
*/
|
||||
@ApiModelProperty("入网计划采取措施,字典ID")
|
||||
private String iPlanStep;
|
||||
/**
|
||||
* 入网详情
|
||||
*/
|
||||
@ApiModelProperty("入网详情")
|
||||
private String iDescription;
|
||||
/**
|
||||
* 实测报告是否上传(0:否 1:是)
|
||||
*/
|
||||
@ApiModelProperty("实测报告是否上传(0:否 1:是)")
|
||||
private Integer aIsFileUpload;
|
||||
/**
|
||||
* 实测报告状态,字典ID
|
||||
*/
|
||||
@ApiModelProperty("实测报告状态,字典ID")
|
||||
private String aStatus;
|
||||
/**
|
||||
* 实测报告路径
|
||||
*/
|
||||
@ApiModelProperty("实测报告路径")
|
||||
private String aFilePath;
|
||||
/**
|
||||
* 实测报告上传时间
|
||||
*/
|
||||
@ApiModelProperty("实测报告上传时间")
|
||||
private Date aUploadTime;
|
||||
/**
|
||||
* 实测是否超标(0:否 1:是)
|
||||
*/
|
||||
@ApiModelProperty("实测是否超标(0:否 1:是)")
|
||||
private Integer aIsOverLimit;
|
||||
/**
|
||||
* 实测超标指标
|
||||
*/
|
||||
@ApiModelProperty("实测超标指标")
|
||||
private String aOverLimitTarget;
|
||||
/**
|
||||
* 实测计划采取措施,字典ID
|
||||
*/
|
||||
@ApiModelProperty("实测计划采取措施,字典ID")
|
||||
private String aPlanStep;
|
||||
/**
|
||||
* 实测详情
|
||||
*/
|
||||
@ApiModelProperty("实测详情")
|
||||
private String aDescription;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty("入网报告文件地址")
|
||||
private String iFile;
|
||||
|
||||
@ApiModelProperty("实测报告文件地址")
|
||||
private String aFile;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.process.pojo.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/21 9:35【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class SurveyPlanExcel implements Serializable {
|
||||
|
||||
@Excel(name = "单位", width = 15)
|
||||
private String orgNo;
|
||||
|
||||
@Excel(name = "普测计划编号", width = 15)
|
||||
private String planNo;
|
||||
|
||||
@Excel(name = "普测计划名称", width = 15)
|
||||
private String planName;
|
||||
|
||||
@Excel(name = "计划开始时间", format = "yyyy-MM-dd HH:mm:ss", width = 15)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date planStartTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
@Excel(name = "计划结束时间",format = "yyyy-MM-dd HH:mm:ss", width = 15)
|
||||
private Date planEndTime;
|
||||
|
||||
@Excel(name = "变电站数量", width = 15)
|
||||
private Long subCount;
|
||||
|
||||
@Excel(name = "母线数量", width = 15)
|
||||
private Long busCount;
|
||||
|
||||
@Excel(name = "计划状态", width = 15)
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.njcn.process.utils;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* 数据公共工具类
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/10/14 - 10:07
|
||||
*/
|
||||
public class PublicDataUtils {
|
||||
/**
|
||||
* 下划线命名转驼峰命名
|
||||
* 将下划线替换为空格,将字符串根据空格分割成数组,再将每个单词首字母大写
|
||||
* @param s
|
||||
* @return
|
||||
*/
|
||||
public static String underCamel(String s)
|
||||
{
|
||||
String separator = "_";
|
||||
String under="";
|
||||
s = s.toLowerCase().replace(separator, " ");
|
||||
String sarr[]=s.split(" ");
|
||||
for(int i=0;i<sarr.length;i++)
|
||||
{
|
||||
String w=sarr[i].substring(0,1).toUpperCase()+sarr[i].substring(1);
|
||||
under +=w;
|
||||
}
|
||||
return under;
|
||||
}
|
||||
|
||||
/**
|
||||
* MultipartFile 转 String
|
||||
* @param multipartFile 原字符串
|
||||
* @return 成功标记
|
||||
*/
|
||||
private String MultipartFileToString(MultipartFile multipartFile) {
|
||||
InputStreamReader isr;
|
||||
BufferedReader br;
|
||||
StringBuilder txtResult = new StringBuilder();
|
||||
try {
|
||||
isr = new InputStreamReader(multipartFile.getInputStream(), StandardCharsets.UTF_8);
|
||||
br = new BufferedReader(isr);
|
||||
String lineTxt;
|
||||
while ((lineTxt = br.readLine()) != null) {
|
||||
txtResult.append(lineTxt);
|
||||
}
|
||||
isr.close();
|
||||
br.close();
|
||||
return txtResult.toString();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
5
pqs-process/process-boot/Dockerfile
Normal file
5
pqs-process/process-boot/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM openjdk:8-jdk-alpine
|
||||
ADD target/processboot.jar processboot.jar
|
||||
ENTRYPOINT ["java","-jar","/processboot.jar"]
|
||||
EXPOSE 10222
|
||||
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>prepare-api</artifactId>
|
||||
<artifactId>process-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -60,11 +60,48 @@
|
||||
<artifactId>event-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--调用minio服务器-->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-minio</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>me.tongfei</groupId>
|
||||
<artifactId>progressbar</artifactId>
|
||||
<version>0.5.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.2.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jeffreyning</groupId>
|
||||
<artifactId>mybatisplus-plus</artifactId>
|
||||
<version>1.5.1-RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -91,38 +128,38 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.0.0</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>${docker.operate}</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–<serverId>36dockerHarbor</serverId>–>-->
|
||||
<!-- <registryUrl>http://${docker.repostory}</registryUrl>-->
|
||||
<!-- <!– 镜像名称 –>-->
|
||||
<!-- <imageName>${docker.repostory}/${docker.registry.name}/${project.artifactId}</imageName>-->
|
||||
<!-- <imageTags>-->
|
||||
<!-- <imageTag>latest</imageTag>-->
|
||||
<!-- </imageTags>-->
|
||||
<!-- <dockerHost>${docker.url}</dockerHost>-->
|
||||
<!-- <dockerDirectory>${basedir}/</dockerDirectory>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/ROOT</targetPath>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>${docker.operate}</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!--<serverId>36dockerHarbor</serverId>-->
|
||||
<registryUrl>http://${docker.repostory}</registryUrl>
|
||||
<!-- 镜像名称 -->
|
||||
<imageName>${docker.repostory}/${docker.registry.name}/${project.artifactId}</imageName>
|
||||
<imageTags>
|
||||
<imageTag>latest</imageTag>
|
||||
</imageTags>
|
||||
<dockerHost>${docker.url}</dockerHost>
|
||||
<dockerDirectory>${basedir}/</dockerDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/ROOT</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.process;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.conf.EnableMPP;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -16,6 +17,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
@MapperScan("com.njcn.**.mapper")
|
||||
@EnableFeignClients(basePackages = "com.njcn")
|
||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||
@EnableMPP
|
||||
public class ProcessApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import com.njcn.process.service.IssuesService;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 电能质量问题
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 9:18
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "电能质量问题")
|
||||
@RestController
|
||||
@RequestMapping("/electricityQuality")
|
||||
@RequiredArgsConstructor
|
||||
public class ElectricityQualityIssuesController extends BaseController {
|
||||
|
||||
private final IssuesService issuesService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/addExcessiveIssues")
|
||||
@ApiOperation("填报在线监测超标问题")
|
||||
@ApiImplicitParam(name = "excessiveParam", value = "参数", required = true)
|
||||
public HttpResult<String> addExcessiveIssues(@RequestBody @Validated ExcessiveParam excessiveParam){
|
||||
String methodDescribe = getMethodDescribe("addExcessiveIssues");
|
||||
issuesService.addExcessiveIssues(excessiveParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/addGeneralSurveyIssues")
|
||||
@ApiOperation("填报普测超标问题")
|
||||
@ApiImplicitParam(name = "generalSurveyParam", value = "参数", required = true)
|
||||
public HttpResult<String> addGeneralSurveyIssues(@RequestBody @Validated GeneralSurveyParam generalSurveyParam){
|
||||
String methodDescribe = getMethodDescribe("addGeneralSurveyIssues");
|
||||
issuesService.addGeneralSurveyIssues(generalSurveyParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/addComplaintIssues")
|
||||
@ApiOperation("填报用户投诉问题")
|
||||
@ApiImplicitParam(name = "complaintParam", value = "参数", required = true)
|
||||
public HttpResult<String> addComplaintIssues(@RequestBody @Validated ComplaintParam complaintParam){
|
||||
String methodDescribe = getMethodDescribe("addComplaintIssues");
|
||||
issuesService.addComplaintIssues(complaintParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/addAbnormalIssues")
|
||||
@ApiOperation("填报运维监控异常问题")
|
||||
@ApiImplicitParam(name = "abnormalParam", value = "参数", required = true)
|
||||
public HttpResult<String> addAbnormalIssues(@RequestBody @Validated AbnormalParam abnormalParam){
|
||||
String methodDescribe = getMethodDescribe("addAbnormalIssues");
|
||||
issuesService.addAbnormalIssues(abnormalParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getIssues")
|
||||
@ApiOperation("查询问题列表")
|
||||
@ApiImplicitParam(name = "queryIssuesParam", value = "参数", required = true)
|
||||
public HttpResult<IPage<IssuesVO>> getIssues(@RequestBody @Validated QueryIssuesParam queryIssuesParam){
|
||||
String methodDescribe = getMethodDescribe("getIssues");
|
||||
Page<IssuesVO> out = issuesService.getIssues(queryIssuesParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getExcessiveDetail")
|
||||
@ApiOperation("查询在线监测超标问题详情")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<ExcessiveDetailVO> getExcessiveDetail(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("getExcessiveDetail");
|
||||
ExcessiveDetailVO out = issuesService.getExcessiveDetail(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getGeneralSurveyDetail")
|
||||
@ApiOperation("查询普测超标问题详情")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<GeneralSurveyVO> getGeneralSurveyDetail(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("getGeneralSurveyDetail");
|
||||
GeneralSurveyVO out = issuesService.getGeneralSurveyDetail(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getComplaintDetail")
|
||||
@ApiOperation("查询用户投诉问题详情")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<ComplaintVO> getComplaintDetail(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("getComplaintDetail");
|
||||
ComplaintVO out = issuesService.getComplaintDetail(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAbnormalDetail")
|
||||
@ApiOperation("查询运维异常问题详情")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<AbnormalVO> getAbnormalDetail(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("getAbnormalDetail");
|
||||
AbnormalVO out = issuesService.getAbnormalDetail(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/reasonAnalysis")
|
||||
@ApiOperation("原因分析")
|
||||
@ApiImplicitParam(name = "processParam", value = "参数", required = true)
|
||||
public HttpResult<String> reasonAnalysis(@RequestBody @Validated ProcessParam processParam){
|
||||
String methodDescribe = getMethodDescribe("reasonAnalysis");
|
||||
issuesService.reasonAnalysis(processParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/correctiveAction")
|
||||
@ApiOperation("计划整改措施")
|
||||
@ApiImplicitParam(name = "processParam", value = "参数", required = true)
|
||||
public HttpResult<String> correctiveAction(@RequestBody @Validated ProcessParam processParam){
|
||||
String methodDescribe = getMethodDescribe("correctiveAction");
|
||||
issuesService.process(processParam, DicDataEnum.PLAN_MEASURES.getCode());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/takeAction")
|
||||
@ApiOperation("实际采取措施")
|
||||
@ApiImplicitParam(name = "processParam", value = "参数", required = true)
|
||||
public HttpResult<String> takeAction(@RequestBody @Validated ProcessParam processParam){
|
||||
String methodDescribe = getMethodDescribe("takeAction");
|
||||
issuesService.process(processParam, DicDataEnum.ACTUAL_MEASURES.getCode());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/effectAnalysis")
|
||||
@ApiOperation("成效分析")
|
||||
@ApiImplicitParam(name = "processParam", value = "参数", required = true)
|
||||
public HttpResult<String> effectAnalysis(@RequestBody @Validated ProcessParam processParam){
|
||||
String methodDescribe = getMethodDescribe("effectAnalysis");
|
||||
issuesService.process(processParam, DicDataEnum.INSIGHTS.getCode());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/archive")
|
||||
@ApiOperation("问题归档")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<String> archive(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("archive");
|
||||
issuesService.archive(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@PostMapping("/uploadFile")
|
||||
@ApiOperation("上传文件")
|
||||
@ApiImplicitParam(name = "file", value = "填报进度文件", required = true)
|
||||
public HttpResult<MinIoUploadResDTO> uploadFile(@RequestParam("file") MultipartFile issuesFile){
|
||||
String methodDescribe = getMethodDescribe("uploadFile");
|
||||
MinIoUploadResDTO out = issuesService.uploadFile(issuesFile);
|
||||
out.setMinFileName(issuesFile.getOriginalFilename());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping("/downloadFile")
|
||||
@ApiOperation("下载文件")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true),
|
||||
@ApiImplicitParam(name = "reportProcess", value = "填报进度", required = true)
|
||||
})
|
||||
public HttpResult<String> downloadFile(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo,@RequestParam("reportProcess") String reportProcess){
|
||||
String methodDescribe = getMethodDescribe("downloadFile");
|
||||
String out = issuesService.downloadFile(powerQualityProblemNo, reportProcess);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/deleteIssues")
|
||||
@ApiOperation("删除问题")
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "电能质量问题编号", required = true)
|
||||
public HttpResult<String> deleteIssues(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("deleteIssues");
|
||||
issuesService.deleteIssues(powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.vo.LoadTypeRelationExcel;
|
||||
import com.njcn.process.pojo.vo.LoadTypeUserExcel;
|
||||
import com.njcn.process.pojo.vo.RLoadTypeUserManageVO;
|
||||
import com.njcn.process.service.LoadTypeUserManageService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 - 9:20
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/loadTypeUserManage")
|
||||
@Api(tags = "干扰源用户管理")
|
||||
@AllArgsConstructor
|
||||
public class LoadTypeUserManageController extends BaseController {
|
||||
|
||||
private final LoadTypeUserManageService loadTypeUserManageService;
|
||||
|
||||
/**
|
||||
* 查询所有干扰源用户
|
||||
* @author qijian
|
||||
* @date 2022/11/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLoadTypeUserList")
|
||||
@ApiOperation("查询所有干扰源用户(未建档干扰源用户管理)")
|
||||
@ApiImplicitParam(name = "loadTypeUserSearchParam", value = "干扰源用户入参", required = true)
|
||||
public HttpResult<Page<RLoadTypeUserManageVO>> getLoadTypeUserList(@RequestBody @Validated LoadTypeUserSearchParam loadTypeUserSearchParam){
|
||||
String methodDescribe = getMethodDescribe("getLoadTypeUserList");
|
||||
Page<RLoadTypeUserManageVO> list = loadTypeUserManageService.getLoadTypeUserList(loadTypeUserSearchParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询干扰源用户
|
||||
* @author qijian
|
||||
* @date 2022/11/14
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getLoadTypeUserById")
|
||||
@ApiOperation("根据id查询干扰源用户(通用)")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
public HttpResult<RLoadTypeUserManageVO> getLoadTypeUserById(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("getLoadTypeUserById");
|
||||
RLoadTypeUserManageVO rLoadTypeUserManageVO = loadTypeUserManageService.getLoadTypeUserById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rLoadTypeUserManageVO, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增干扰源用户
|
||||
* @author qijian
|
||||
* @date 2022/11/14
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.ADD)
|
||||
@PostMapping("/addLoadTypeUser")
|
||||
@ApiOperation("新增干扰源用户(未建档干扰源用户管理)")
|
||||
@ApiImplicitParam(name = "loadTypeUserParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> addLoadTypeUser(@RequestBody @Validated LoadTypeUserParam loadTypeUserParam){
|
||||
String methodDescribe = getMethodDescribe("addLoadTypeUser");
|
||||
boolean res = loadTypeUserManageService.addLoadTypeUser(loadTypeUserParam);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传干扰源用户入网报告
|
||||
* @author qijian
|
||||
* @date 2022/11/14
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/uploadLoadTypeUserI")
|
||||
@ApiOperation("上传干扰源用户入网报告(未建档干扰源用户管理)")
|
||||
// @ApiImplicitParam(name = "loadTypeUserIUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> uploadLoadTypeUserI(@Validated LoadTypeUserIUploadParam loadTypeUserIUploadParam){
|
||||
String methodDescribe = getMethodDescribe("uploadLoadTypeUserI");
|
||||
boolean res = loadTypeUserManageService.uploadLoadTypeUserI(loadTypeUserIUploadParam);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联营销用户
|
||||
* @author qijian
|
||||
* @date 2022/11/16
|
||||
*
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/linkUser")
|
||||
@ApiOperation("关联营销用户(未建档干扰源用户管理)")
|
||||
@ApiImplicitParam(name = "loadTypeUserAssociateParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> linkUser(@RequestBody @Validated LoadTypeUserAssociateParam loadTypeUserAssociateParam){
|
||||
String methodDescribe = getMethodDescribe("linkUser");
|
||||
boolean res = loadTypeUserManageService.linkUser(loadTypeUserAssociateParam);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出未建档干扰源用户管理信息
|
||||
* @author qijian
|
||||
* @date 2022/12/06
|
||||
*/
|
||||
@ResponseBody
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.DOWNLOAD)
|
||||
@ApiOperation("导出未建档干扰源用户管理信息")
|
||||
@PostMapping(value = "exportLoadTypeUserList")
|
||||
@ApiImplicitParam(name = "list", value = "导出勾选主键参数", required = true)
|
||||
public HttpResult<String> exportLoadTypeUserList(HttpServletResponse response, @RequestBody List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("exportLoadTypeUserList");
|
||||
String fileName = "未建档干扰源用户管理信息.xls";
|
||||
List<LoadTypeUserExcel> excelList = null;
|
||||
try {
|
||||
excelList = loadTypeUserManageService.exportLoadTypeUserList(list);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
ExportParams exportExcel = new ExportParams("未建档干扰源用户管理信息", "未建档干扰源用户");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportExcel, LoadTypeUserExcel.class, excelList);
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有干扰源用户(与营销系统关联)
|
||||
* @author qijian
|
||||
* @date 2022/11/17
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLoadTypeRelationList")
|
||||
@ApiOperation("查询所有干扰源用户(干扰源用户常态化管理)")
|
||||
@ApiImplicitParam(name = "loadTypeUserSearchParam", value = "干扰源用户入参", required = true)
|
||||
public HttpResult<Page<RLoadTypeUserManageVO>> getLoadTypeRelationList(@RequestBody @Validated LoadTypeUserSearchParam loadTypeUserSearchParam){
|
||||
String methodDescribe = getMethodDescribe("getLoadTypeRelationList");
|
||||
Page<RLoadTypeUserManageVO> list = loadTypeUserManageService.getLoadTypeRelationList(loadTypeUserSearchParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传干扰源用户实测报告
|
||||
* @author qijian
|
||||
* @date 2022/11/14
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/uploadLoadTypeUserA")
|
||||
@ApiOperation("上传干扰源用户实测报告(干扰源用户常态化管理)")
|
||||
// @ApiImplicitParam(name = "loadTypeUserAUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> uploadLoadTypeUserA(@Validated LoadTypeUserAUploadParam loadTypeUserAUploadParam){
|
||||
String methodDescribe = getMethodDescribe("uploadLoadTypeUserA");
|
||||
boolean res = loadTypeUserManageService.uploadLoadTypeUserA(loadTypeUserAUploadParam);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出干扰源用户常态化管理信息
|
||||
* @author qijian
|
||||
* @date 2022/12/07
|
||||
*/
|
||||
@ResponseBody
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.DOWNLOAD)
|
||||
@ApiOperation("导出干扰源用户常态化管理信息")
|
||||
@PostMapping(value = "exportLoadTypeRelationList")
|
||||
@ApiImplicitParam(name = "list", value = "导出勾选主键参数", required = true)
|
||||
public HttpResult<String> exportLoadTypeRelationList(HttpServletResponse response, @RequestBody List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("exportLoadTypeRelationList");
|
||||
String fileName = "导出干扰源用户常态化管理信息.xls";
|
||||
List<LoadTypeRelationExcel> excelList = null;
|
||||
try {
|
||||
excelList = loadTypeUserManageService.exportLoadTypeRelationList(list);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
ExportParams exportExcel = new ExportParams("干扰源用户常态化管理信息", "干扰源用户常态化管理");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportExcel, LoadTypeRelationExcel.class, excelList);
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.vo.SurveyPlanExcel;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanDetailService;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 14:50【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/rGeneralSurveyPlan")
|
||||
@Api(tags = "普测计划管理")
|
||||
@AllArgsConstructor
|
||||
public class RGeneralSurveyPlanController extends BaseController {
|
||||
|
||||
private final RGeneralSurveyPlanPOService rGeneralSurveyPlanPOService;
|
||||
|
||||
private @Autowired
|
||||
RGeneralSurveyPlanDetailService rGeneralSurveyPlanDetailService;
|
||||
/**
|
||||
* @Description: 新增/修改普测计划
|
||||
* @Param: [rGeneralSurveyPlanAddParm]
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<java.lang.Boolean>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/22
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addPlan")
|
||||
@ApiOperation("新增/修改普测计划")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanAddParm", value = "新增普测计划参数", required = true)
|
||||
public HttpResult<Boolean> addPlan(@RequestBody RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm){
|
||||
String methodDescribe = getMethodDescribe("addPlan");
|
||||
|
||||
Boolean addFlag = rGeneralSurveyPlanPOService.addPlan(rGeneralSurveyPlanAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, addFlag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlan")
|
||||
@ApiOperation("查询普测计划-新建页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlan");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("0","1","2","3").collect (Collectors.toList ()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanAudit")
|
||||
@ApiOperation("查询普测计划-审核页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlanAudit");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1").collect (Collectors.toList ()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanResult")
|
||||
@ApiOperation("查询普测计划-结果页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlanResult");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("3","4").collect (Collectors.toList ()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlandetail")
|
||||
@ApiOperation("根据planNO查询普测计划详情")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlandetailQueryParm", value = "普测计划详情查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO>> queryPlandetail(@Validated @RequestBody RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlandetail");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO> rGeneralSurveyPlanDetailVOIPage = rGeneralSurveyPlanDetailService.queryPlandetail (rGeneralSurveyPlandetailQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanDetailVOIPage, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPLOAD)
|
||||
@PostMapping("/surveyResultUpload")
|
||||
@ApiOperation("上传普测结果报告")
|
||||
// @ApiImplicitParam(name = "surveyResultUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> surveyResultUpload( @Validated SurveyResultUploadParam surveyResultUploadParam){
|
||||
String methodDescribe = getMethodDescribe("surveyResultUpload");
|
||||
boolean res = rGeneralSurveyPlanPOService.surveyResultUpload(surveyResultUploadParam);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.DOWNLOAD)
|
||||
@PostMapping("/surveyResultDownload")
|
||||
@ApiOperation("下载普测结果报告")
|
||||
@ApiImplicitParam(name = "planNo", value = "计划号", required = true)
|
||||
public HttpResult<List<MinIoUploadResDTO>> surveyResultDownload(@RequestParam("planNo") String planNo ){
|
||||
String methodDescribe = getMethodDescribe("surveyResultDownload");
|
||||
List<MinIoUploadResDTO> downloadUrls = rGeneralSurveyPlanPOService.surveyResultDownload(planNo);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, downloadUrls, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("导出普测计划信息")
|
||||
@PostMapping(value = "exportSurveyPlan")
|
||||
@ApiImplicitParam(name = "planIdList", value = "普测计划详情查询参数", required = true)
|
||||
public HttpResult<String> exportSurveyPlan(HttpServletResponse response,@RequestBody List<String> planIdList) {
|
||||
String methodDescribe = getMethodDescribe("exportSurveyPlan");
|
||||
String fileName = "普测计划信息.xls";
|
||||
List<SurveyPlanExcel> baseExcelList = null;
|
||||
try {
|
||||
baseExcelList = rGeneralSurveyPlanPOService.exportSurveyPlan(planIdList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
ExportParams exportExcel = new ExportParams("普测计划信息", "普测计划信息");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportExcel, SurveyPlanExcel.class, baseExcelList);
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("普测计划信息问题件新增查询")
|
||||
@PostMapping(value = "querySurveyPlanOnQuestion")
|
||||
@ApiImplicitParam(name = "questionQueryParm", value = "普测计划信息问题件查询参数", required = true)
|
||||
public HttpResult<List<RGeneralSurveyPlanDetailOnQuestionVO>> querySurveyPlanOnQuestion(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("querySurveyPlanOnQuestion");
|
||||
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> list= rGeneralSurveyPlanPOService.querySurveyPlanOnQuestion(questionQueryParm);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("普测计划名称查询")
|
||||
@PostMapping(value = "querySurveyPlanName")
|
||||
@ApiImplicitParam(name = "questionQueryParm", value = "普测计划名称查询参数", required = true)
|
||||
public HttpResult<List<RGeneralSurveyPlanPO>> querySurveyPlanName(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("querySurveyPlanName");
|
||||
|
||||
List<RGeneralSurveyPlanPO> list= rGeneralSurveyPlanPOService.querySurveyPlanName(questionQueryParm);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.process.pojo.param.LoadTypeUserSearchParam;
|
||||
import com.njcn.process.pojo.po.RLoadTypeUserManage;
|
||||
import com.njcn.process.pojo.vo.RLoadTypeUserManageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理Mapper
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 - 9:24
|
||||
*/
|
||||
public interface LoadTypeUserManageMapper extends BaseMapper<RLoadTypeUserManage> {
|
||||
|
||||
/**
|
||||
* 干扰源用户分页查询
|
||||
* @param page 分页参数
|
||||
* @param loadTypeUserSearchParam 入参
|
||||
* @return 结果
|
||||
*/
|
||||
Page<RLoadTypeUserManageVO> getLoadTypeUserPage(IPage<RLoadTypeUserManageVO> page, @Param("loadTypeUserSearchParam") LoadTypeUserSearchParam loadTypeUserSearchParam);
|
||||
|
||||
/**
|
||||
* 干扰源用户分页查询
|
||||
* @param page 分页参数
|
||||
* @param loadTypeUserSearchParam 入参
|
||||
* @return 结果
|
||||
*/
|
||||
Page<RLoadTypeUserManageVO> getLoadTypeRelationPage(IPage<RLoadTypeUserManageVO> page, @Param("loadTypeUserSearchParam") LoadTypeUserSearchParam loadTypeUserSearchParam);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RGeneralSurveyPlanDetailMapper extends MppBaseMapper<RGeneralSurveyPlanDetail> {
|
||||
@Select ({"<script>",
|
||||
"SELECT\n" +
|
||||
"\ta.plan_name as planName,\n" +
|
||||
"\tb.voltage_level as voltageLevel,\n" +
|
||||
"\tb.sub_id as subId,\n" +
|
||||
"\tb.sub_name as subName,\n" +
|
||||
"\tb.busbar_id as busbarId,\n" +
|
||||
"\tb.busbar_name as busbarName, b.measurement_point_id as measurementPointId\n" +
|
||||
"FROM\n" +
|
||||
"\tr_general_survey_plan a\n" +
|
||||
"INNER JOIN r_general_survey_plan_detail b ON a.plan_no = b.plan_no\n" +
|
||||
"WHERE\n" +
|
||||
"\ta.org_no = #{questionQueryParm.orgNo} " +
|
||||
"<when test='questionQueryParm.planName!=null and questionQueryParm.planName!=\"\"'>",
|
||||
"and a.plan_name = #{questionQueryParm.planName}\n" +
|
||||
"</when>",
|
||||
"AND DATE_FORMAT(a.upload_time, '%Y%m') = DATE_FORMAT(#{questionQueryParm.planStartTime}, '%Y%m')",
|
||||
"</script>"})
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> querySurveyPlanOnQuestion(@Param("questionQueryParm") SurveyPlanQuestionQueryParm questionQueryParm);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RGeneralSurveyPlanPOMapper extends MppBaseMapper<RGeneralSurveyPlanPO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.RMpElectricQualityProblemFlowDetails;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 电能质量问题流程详情表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RMpElectricQualityProblemFlowDetailsMapper extends BaseMapper<RMpElectricQualityProblemFlowDetails> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.RMpGeneralSurveyOverproofProblem;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 普测超标问题详情表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RMpGeneralSurveyOverproofProblemMapper extends BaseMapper<RMpGeneralSurveyOverproofProblem> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.RMpOnlineMonitorOverproofProblem;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 在线监测超标问题详情表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RMpOnlineMonitorOverproofProblemMapper extends BaseMapper<RMpOnlineMonitorOverproofProblem> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.RMpOperationMonitorAbnormal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 运维监控异常详情表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RMpOperationMonitorAbnormalMapper extends BaseMapper<RMpOperationMonitorAbnormal> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.RMpUserComplaint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户投诉详情表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RMpUserComplaintMapper extends BaseMapper<RMpUserComplaint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.process.pojo.param.QueryIssuesParam;
|
||||
import com.njcn.process.pojo.po.RStatElectricQualityProblemFlow;
|
||||
import com.njcn.process.pojo.vo.IssuesVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 电能质量问题流程表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author xiaoyao
|
||||
* @since 2022-11-14
|
||||
*/
|
||||
public interface RStatElectricQualityProblemFlowMapper extends BaseMapper<RStatElectricQualityProblemFlow> {
|
||||
|
||||
List<IssuesVO> getIssues(@Param("param") QueryIssuesParam param, @Param("dateBegin") String dateBegin, @Param("dateEnd") String dateEnd);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.LoadTypeUserManageMapper">
|
||||
|
||||
<select id="getLoadTypeUserPage" resultType="RLoadTypeUserManageVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
r_load_type_user_manage r
|
||||
where 1=1
|
||||
<if test="loadTypeUserSearchParam.orgNo != null and loadTypeUserSearchParam.orgNo != ''">
|
||||
and r.org_no = #{loadTypeUserSearchParam.orgNo}
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.loadType != null and loadTypeUserSearchParam.loadType != ''">
|
||||
and r.load_type = #{loadTypeUserSearchParam.loadType}
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.userName != null and loadTypeUserSearchParam.userName != ''">
|
||||
and r.user_name like CONCAT('%', #{loadTypeUserSearchParam.userName}, '%')
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.aIsFileUpload != null and loadTypeUserSearchParam.aIsFileUpload != ''">
|
||||
and r.i_is_file_upload = #{loadTypeUserSearchParam.iIsFileUpload}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getLoadTypeRelationPage" resultType="RLoadTypeUserManageVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
r_load_type_user_manage r
|
||||
where 1=1
|
||||
AND ISNULL( relation_user_id )= 0
|
||||
AND LENGTH(
|
||||
trim( relation_user_id ))> 0
|
||||
<if test="loadTypeUserSearchParam.orgNo != null and loadTypeUserSearchParam.orgNo != ''">
|
||||
and r.org_no = #{loadTypeUserSearchParam.orgNo}
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.loadType != null and loadTypeUserSearchParam.loadType != ''">
|
||||
and r.load_type = #{loadTypeUserSearchParam.loadType}
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.userName != null and loadTypeUserSearchParam.userName != ''">
|
||||
and r.user_name like CONCAT('%', #{loadTypeUserSearchParam.userName}, '%')
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.relationUserName != null and loadTypeUserSearchParam.relationUserName != ''">
|
||||
and r.relation_user_name like CONCAT('%', #{loadTypeUserSearchParam.relationUserName}, '%')
|
||||
</if>
|
||||
<if test="loadTypeUserSearchParam.aIsFileUpload != null and loadTypeUserSearchParam.aIsFileUpload != ''">
|
||||
and r.a_is_file_upload = #{loadTypeUserSearchParam.aIsFileUpload}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RGeneralSurveyPlanDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RGeneralSurveyPlanDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_general_survey_plan_detail-->
|
||||
<id column="plan_no" jdbcType="VARCHAR" property="planNo" />
|
||||
<result column="general_survey_start_time" jdbcType="DATE" property="generalSurveyStartTime" />
|
||||
<result column="general_survey_end_time" jdbcType="DATE" property="generalSurveyEndTime" />
|
||||
<result column="general_survey_time" jdbcType="DATE" property="generalSurveyTime" />
|
||||
<result column="general_survey_leader" jdbcType="VARCHAR" property="generalSurveyLeader" />
|
||||
<result column="sub_id" jdbcType="VARCHAR" property="subId" />
|
||||
<result column="sub_name" jdbcType="VARCHAR" property="subName" />
|
||||
<result column="voltage_level" jdbcType="VARCHAR" property="voltageLevel" />
|
||||
<result column="busbar_id" jdbcType="VARCHAR" property="busbarId" />
|
||||
<result column="busbar_name" jdbcType="VARCHAR" property="busbarName" />
|
||||
<result column="measurement_point_id" jdbcType="VARCHAR" property="measurementPointId" />
|
||||
<result column="is_problem" jdbcType="TINYINT" property="isProblem" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
plan_no, general_survey_start_time, general_survey_end_time, general_survey_time,
|
||||
general_survey_leader, sub_id, sub_name, voltage_level, busbar_id, busbar_name, measurement_point_id,
|
||||
is_problem
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RGeneralSurveyPlanPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.RGeneralSurveyPlanPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_general_survey_plan-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="plan_no" jdbcType="VARCHAR" property="planNo" />
|
||||
<result column="plan_name" jdbcType="VARCHAR" property="planName" />
|
||||
<result column="plan_create_time" jdbcType="DATE" property="planCreateTime" />
|
||||
<result column="plan_start_time" jdbcType="DATE" property="planStartTime" />
|
||||
<result column="plan_end_time" jdbcType="DATE" property="planEndTime" />
|
||||
<result column="plan_complate_time" jdbcType="DATE" property="planComplateTime" />
|
||||
<result column="leader" jdbcType="VARCHAR" property="leader" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="is_file_upload" jdbcType="TINYINT" property="isFileUpload" />
|
||||
<result column="file_count" jdbcType="INTEGER" property="fileCount" />
|
||||
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
||||
<result column="upload_time" jdbcType="DATE" property="uploadTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, plan_no, plan_name, plan_create_time, plan_start_time, plan_end_time, plan_complate_time,
|
||||
leader, `status`, description, is_file_upload, file_count, file_path, upload_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RMpElectricQualityProblemFlowDetailsMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RMpGeneralSurveyOverproofProblemMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RMpOnlineMonitorOverproofProblemMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RMpOperationMonitorAbnormalMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RMpUserComplaintMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.RStatElectricQualityProblemFlowMapper">
|
||||
|
||||
<select id="getIssues" resultType="com.njcn.process.pojo.vo.IssuesVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
r_stat_electric_quality_problem_flow
|
||||
WHERE
|
||||
data_date between #{dateBegin} AND #{dateEnd}
|
||||
<if test="param.orgNo !=null and param.orgNo !=''">
|
||||
AND org_no = #{param.orgNo}
|
||||
</if>
|
||||
<if test="param.problemSources !=null and param.problemSources !=''">
|
||||
AND problem_sources = #{param.problemSources}
|
||||
</if>
|
||||
<if test="param.reportProcess !=null and param.reportProcess !=''">
|
||||
AND report_process = #{param.reportProcess}
|
||||
</if>
|
||||
<if test="param.reportProcessStatus !=null and param.reportProcessStatus !=''">
|
||||
AND report_process_status = #{param.reportProcessStatus}
|
||||
</if>
|
||||
<if test="param.problemName !=null and param.problemName !=''">
|
||||
AND problem_name like CONCAT(CONCAT('%', #{param.problemName}), '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 电能质量问题接口类
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 10:59
|
||||
*/
|
||||
public interface IssuesService {
|
||||
|
||||
/**
|
||||
* 填报在线监测超标问题
|
||||
*/
|
||||
void addExcessiveIssues(ExcessiveParam excessiveParam);
|
||||
|
||||
/**
|
||||
* 填报普测超标问题
|
||||
*/
|
||||
void addGeneralSurveyIssues(GeneralSurveyParam generalSurveyParam);
|
||||
|
||||
/**
|
||||
* 填报用户投诉问题
|
||||
*/
|
||||
void addComplaintIssues(ComplaintParam complaintParam);
|
||||
|
||||
/**
|
||||
* 填报运维监控异常问题
|
||||
*/
|
||||
void addAbnormalIssues(AbnormalParam abnormalParam);
|
||||
|
||||
/**
|
||||
* 查询问题列表
|
||||
*/
|
||||
Page<IssuesVO> getIssues(QueryIssuesParam queryIssuesParam);
|
||||
|
||||
/**
|
||||
* 查询在线监测超标问题详情
|
||||
*/
|
||||
ExcessiveDetailVO getExcessiveDetail(String powerQualityProblemNo);
|
||||
|
||||
/**
|
||||
* 查询普测超标问题详情
|
||||
*/
|
||||
GeneralSurveyVO getGeneralSurveyDetail(String powerQualityProblemNo);
|
||||
|
||||
/**
|
||||
* 查询用户投诉问题详情
|
||||
*/
|
||||
ComplaintVO getComplaintDetail(String powerQualityProblemNo);
|
||||
|
||||
/**
|
||||
* 查询运维异常问题详情
|
||||
*/
|
||||
AbnormalVO getAbnormalDetail(String powerQualityProblemNo);
|
||||
|
||||
/**
|
||||
* 原因分析
|
||||
*/
|
||||
void reasonAnalysis(ProcessParam processParam);
|
||||
|
||||
/**
|
||||
* 计划整改措施、实际采取措施、成效分析
|
||||
*/
|
||||
void process(ProcessParam processParam, String code);
|
||||
|
||||
/**
|
||||
* 问题归档
|
||||
*/
|
||||
void archive(String powerQualityProblemNo);
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
MinIoUploadResDTO uploadFile(MultipartFile issuesFile);
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
String downloadFile(String powerQualityProblemNo, String reportProcess);
|
||||
|
||||
/**
|
||||
* 删除问题
|
||||
*/
|
||||
void deleteIssues(String powerQualityProblemNo);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.vo.LoadTypeRelationExcel;
|
||||
import com.njcn.process.pojo.vo.LoadTypeUserExcel;
|
||||
import com.njcn.process.pojo.vo.RLoadTypeUserManageVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 - 9:20
|
||||
*/
|
||||
public interface LoadTypeUserManageService {
|
||||
|
||||
/**
|
||||
* 干扰源用户分页查询
|
||||
* @param loadTypeUserSearchParam
|
||||
* @return
|
||||
*/
|
||||
Page<RLoadTypeUserManageVO> getLoadTypeUserList(LoadTypeUserSearchParam loadTypeUserSearchParam);
|
||||
|
||||
/**
|
||||
* 根据id查询干扰源用户
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RLoadTypeUserManageVO getLoadTypeUserById(String id);
|
||||
|
||||
/**
|
||||
* 新增干扰源用户
|
||||
* @param loadTypeUserParam
|
||||
* @return
|
||||
*/
|
||||
boolean addLoadTypeUser(LoadTypeUserParam loadTypeUserParam);
|
||||
|
||||
/**
|
||||
* 上传干扰源用户入网报告
|
||||
* @param loadTypeUserIUploadParam
|
||||
* @return
|
||||
*/
|
||||
boolean uploadLoadTypeUserI(LoadTypeUserIUploadParam loadTypeUserIUploadParam);
|
||||
|
||||
/**
|
||||
* 关联营销用户
|
||||
* @param loadTypeUserAssociateParam
|
||||
* @return
|
||||
*/
|
||||
boolean linkUser(LoadTypeUserAssociateParam loadTypeUserAssociateParam);
|
||||
|
||||
/**
|
||||
* 查询所有干扰源用户(与营销系统关联)
|
||||
* @param loadTypeUserSearchParam
|
||||
* @return
|
||||
*/
|
||||
Page<RLoadTypeUserManageVO> getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam);
|
||||
|
||||
/**
|
||||
* 上传干扰源用户实测报告
|
||||
* @param loadTypeUserAUploadParam
|
||||
* @return
|
||||
*/
|
||||
boolean uploadLoadTypeUserA(LoadTypeUserAUploadParam loadTypeUserAUploadParam);
|
||||
|
||||
/**
|
||||
* 导出未建档干扰源用户管理信息
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
List<LoadTypeUserExcel> exportLoadTypeUserList(List<String> list);
|
||||
|
||||
/**
|
||||
* 导出干扰源用户常态化管理信息
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
List<LoadTypeRelationExcel> exportLoadTypeRelationList(List<String> list);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlandetailQueryParm;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
public interface RGeneralSurveyPlanDetailService extends IMppService<RGeneralSurveyPlanDetail> {
|
||||
|
||||
/**
|
||||
* @Description: 根据planNO查询普测计划详情
|
||||
* @Param: [rGeneralSurveyPlandetailQueryParm]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/15
|
||||
*/
|
||||
IPage<RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO> queryPlandetail(RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanAddParm;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyResultUploadParam;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.vo.SurveyPlanExcel;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RGeneralSurveyPlanPOService extends IMppService<RGeneralSurveyPlanPO>{
|
||||
|
||||
/**
|
||||
* @Description: addPlan
|
||||
* @Param: [rGeneralSurveyPlanAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/14
|
||||
*/
|
||||
Boolean addPlan(RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm);
|
||||
/**
|
||||
* @Description: query
|
||||
* @Param: [rGeneralSurveyPlanQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RGeneralSurveyPlanVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/15
|
||||
*/
|
||||
IPage<RGeneralSurveyPlanVO> query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List<String> statusList);
|
||||
/**
|
||||
* @Description: surveyResultUpload
|
||||
* @Param: [surveyResultUploadParam]
|
||||
* @return: boolean
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/18
|
||||
*/
|
||||
boolean surveyResultUpload(SurveyResultUploadParam surveyResultUploadParam);
|
||||
/**
|
||||
* @Description: surveyResultDownload
|
||||
* @Param: [planNo]
|
||||
* @return: java.util.List<java.lang.String>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/18
|
||||
*/
|
||||
List<MinIoUploadResDTO> surveyResultDownload(String planNo);
|
||||
/**
|
||||
* @Description: exportSurveyPlan
|
||||
* @Param: []
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.SurveyPlanExcel>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/21
|
||||
*/
|
||||
List<SurveyPlanExcel> exportSurveyPlan(List<String> planIdList);
|
||||
/**
|
||||
* @Description: querySurveyPlanOnQuestion
|
||||
* @Param: [questionQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/30
|
||||
*/
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> querySurveyPlanOnQuestion(SurveyPlanQuestionQueryParm questionQueryParm);
|
||||
/**
|
||||
* @Description: 更具questionQueryParm查计划名称
|
||||
* @Param: [questionQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm>
|
||||
* @Author: clam
|
||||
* @Date: 2022/12/1
|
||||
*/
|
||||
List<RGeneralSurveyPlanPO> querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm);
|
||||
}
|
||||
@@ -0,0 +1,532 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.minio.config.MinIoProperties;
|
||||
import com.njcn.minio.utils.MinIoUtils;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
import com.njcn.process.mapper.*;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.*;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import com.njcn.process.service.IssuesService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电能质量问题实现类
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/14 11:03
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class IssuesServiceImpl implements IssuesService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
private final RStatElectricQualityProblemFlowMapper issuesMapper;
|
||||
|
||||
private final RMpOnlineMonitorOverproofProblemMapper excessiveMapper;
|
||||
|
||||
private final RMpGeneralSurveyOverproofProblemMapper generalSurveyMapper;
|
||||
|
||||
private final RMpUserComplaintMapper complaintMapper;
|
||||
|
||||
private final RMpOperationMonitorAbnormalMapper abnormalMapper;
|
||||
|
||||
private final RMpElectricQualityProblemFlowDetailsMapper flowDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private MinIoUtils minIoUtils;
|
||||
|
||||
@Resource
|
||||
private MinIoProperties minIoProperties;
|
||||
|
||||
/**
|
||||
* 新增电能质量问题流程表信息
|
||||
*/
|
||||
private LocalDateTime addIssues(IssuesParam issuesParam,String powerQualityProblemNo){
|
||||
RStatElectricQualityProblemFlow issues = new RStatElectricQualityProblemFlow();
|
||||
LocalDateTime local = LocalDateTimeUtil.now();
|
||||
BeanUtil.copyProperties(issuesParam,issues);
|
||||
issues.setPowerQualityProblemNo(powerQualityProblemNo);
|
||||
issues.setDataDate(local);
|
||||
issues.setStartTime(null);
|
||||
issues.setUpdateTime(null);
|
||||
issues.setReportProcess(DicDataEnum.NOT_REPORTED.getCode());
|
||||
issues.setReportProcessStatus(DicDataEnum.AUDITT.getCode());
|
||||
issuesMapper.insert(issues);
|
||||
return local;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成问题编号
|
||||
*/
|
||||
private String getPowerQualityProblemNo(IssuesParam issuesParam){
|
||||
StringBuilder powerQualityProblemNo = new StringBuilder();
|
||||
powerQualityProblemNo.append(PinyinUtil.getFirstLetter(issuesParam.getOrgName(),"").toUpperCase()).append("-");
|
||||
if (DicDataEnum.ONLINE.getCode().equals(issuesParam.getProblemSources())){
|
||||
powerQualityProblemNo.append("ZXJC");
|
||||
}else if (DicDataEnum.GENERAL.getCode().equals(issuesParam.getProblemSources())){
|
||||
powerQualityProblemNo.append("PCCB");
|
||||
}else if (DicDataEnum.USER_COMPLAINTS.getCode().equals(issuesParam.getProblemSources())){
|
||||
powerQualityProblemNo.append("YHTS");
|
||||
}else if (DicDataEnum.DEV_EXCEPTION.getCode().equals(issuesParam.getProblemSources())){
|
||||
powerQualityProblemNo.append("YWYC");
|
||||
}
|
||||
String nowDate = DateUtil.format(new Date(), "yyyyMMdd");
|
||||
String processDate = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
powerQualityProblemNo.append(nowDate);
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> issuesQuery = new LambdaQueryWrapper<>();
|
||||
LocalDateTime local = LocalDateTimeUtil.parse(processDate + "T00:00:00");
|
||||
LocalDateTime localEnd = LocalDateTimeUtil.parse(processDate + "T23:59:59");
|
||||
issuesQuery.ge(RStatElectricQualityProblemFlow::getDataDate, local).le(RStatElectricQualityProblemFlow::getDataDate,localEnd);
|
||||
Integer count = issuesMapper.selectCount(issuesQuery);
|
||||
powerQualityProblemNo.append(StrUtil.padPre(String.valueOf(count + 1),5, '0'));
|
||||
return powerQualityProblemNo.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 填报在线监测超标问题
|
||||
*/
|
||||
@Override
|
||||
public void addExcessiveIssues(ExcessiveParam excessiveParam) {
|
||||
IssuesParam issuesParam = new IssuesParam();
|
||||
BeanUtil.copyProperties(excessiveParam,issuesParam);
|
||||
String powerQualityProblemNo = getPowerQualityProblemNo(issuesParam);
|
||||
LocalDateTime localDateTime = addIssues(issuesParam,powerQualityProblemNo);
|
||||
RMpOnlineMonitorOverproofProblem excessive = new RMpOnlineMonitorOverproofProblem();
|
||||
BeanUtil.copyProperties(excessiveParam,excessive);
|
||||
excessive.setPowerQualityProblemNo(powerQualityProblemNo);
|
||||
excessive.setDataDate(localDateTime);
|
||||
excessiveMapper.insert(excessive);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填报普测超标问题
|
||||
*/
|
||||
@Override
|
||||
public void addGeneralSurveyIssues(GeneralSurveyParam generalSurveyParam) {
|
||||
IssuesParam issuesParam = new IssuesParam();
|
||||
BeanUtil.copyProperties(generalSurveyParam,issuesParam);
|
||||
String powerQualityProblemNo = getPowerQualityProblemNo(issuesParam);
|
||||
LocalDateTime localDateTime = addIssues(issuesParam,powerQualityProblemNo);
|
||||
RMpGeneralSurveyOverproofProblem generalSurvey = new RMpGeneralSurveyOverproofProblem();
|
||||
BeanUtil.copyProperties(generalSurveyParam,generalSurvey);
|
||||
generalSurvey.setOverLimitTarget(ArrayUtil.toString(generalSurveyParam.getSteadyState())+ArrayUtil.toString(generalSurveyParam.getTransientIndicators()));
|
||||
generalSurvey.setPowerQualityProblemNo(powerQualityProblemNo);
|
||||
generalSurvey.setDataDate(localDateTime);
|
||||
generalSurveyMapper.insert(generalSurvey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填报用户投诉问题
|
||||
*/
|
||||
@Override
|
||||
public void addComplaintIssues(ComplaintParam complaintParam) {
|
||||
IssuesParam issuesParam = new IssuesParam();
|
||||
BeanUtil.copyProperties(complaintParam,issuesParam);
|
||||
String powerQualityProblemNo = getPowerQualityProblemNo(issuesParam);
|
||||
LocalDateTime localDateTime = addIssues(issuesParam,powerQualityProblemNo);
|
||||
RMpUserComplaint complaint = new RMpUserComplaint();
|
||||
BeanUtil.copyProperties(complaintParam,complaint);
|
||||
complaint.setAbnormalTarget(ArrayUtil.toString(complaintParam.getSteadyState())+ArrayUtil.toString(complaintParam.getTransientIndicators()));
|
||||
complaint.setPowerQualityProblemNo(powerQualityProblemNo);
|
||||
complaint.setDataDate(localDateTime);
|
||||
complaintMapper.insert(complaint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填报运维监控异常问题
|
||||
*/
|
||||
@Override
|
||||
public void addAbnormalIssues(AbnormalParam abnormalParam) {
|
||||
IssuesParam issuesParam = new IssuesParam();
|
||||
BeanUtil.copyProperties(abnormalParam,issuesParam);
|
||||
String powerQualityProblemNo = getPowerQualityProblemNo(issuesParam);
|
||||
LocalDateTime localDateTime = addIssues(issuesParam,powerQualityProblemNo);
|
||||
RMpOperationMonitorAbnormal abnormal = new RMpOperationMonitorAbnormal();
|
||||
BeanUtil.copyProperties(abnormalParam,abnormal);
|
||||
abnormal.setAbnormalTarget(ArrayUtil.toString(abnormalParam.getSteadyState())+ArrayUtil.toString(abnormalParam.getTransientIndicators()));
|
||||
abnormal.setPowerQualityProblemNo(powerQualityProblemNo);
|
||||
abnormal.setDataDate(localDateTime);
|
||||
abnormalMapper.insert(abnormal);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询问题列表
|
||||
*/
|
||||
@Override
|
||||
public Page<IssuesVO> getIssues(QueryIssuesParam param) {
|
||||
Page<IssuesVO> page = new Page<>(param.getPageNum(), param.getPageSize());
|
||||
Date dateOut = DateUtil.parse(param.getDataDate());
|
||||
Date dateBegin = new Date();
|
||||
Date dateEnd = new Date();
|
||||
if (Integer.valueOf(BizParamConstant.STAT_BIZ_YEAR).equals(param.getDataType())){
|
||||
dateBegin = DateUtil.beginOfYear(dateOut);
|
||||
dateEnd = DateUtil.endOfYear(dateOut);
|
||||
}else if (Integer.valueOf(BizParamConstant.STAT_BIZ_QUARTER).equals(param.getDataType())){
|
||||
dateBegin = DateUtil.beginOfQuarter(dateOut);
|
||||
dateEnd = DateUtil.endOfQuarter(dateOut);
|
||||
}else if (Integer.valueOf(BizParamConstant.STAT_BIZ_MONTH).equals(param.getDataType())){
|
||||
dateBegin = DateUtil.beginOfMonth(dateOut);
|
||||
dateEnd = DateUtil.endOfMonth(dateOut);
|
||||
}
|
||||
List<IssuesVO> out = issuesMapper.getIssues(param,DateUtil.formatDateTime(dateBegin), DateUtil.formatDateTime(dateEnd));
|
||||
if (!CollectionUtils.isEmpty(out)) {
|
||||
out.forEach(data -> data.setOrgName((deptFeignClient.getDeptById(data.getOrgNo()).getData().getName())));
|
||||
/*问题来源*/
|
||||
List<DictData> problemSourcesDictData = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PROBLEM_SOURCES.getCode()).getData();
|
||||
problemSourcesDictData.forEach(dict -> out.stream().filter(data -> dict.getCode().equals(data.getProblemSources())).forEach(data -> data.setProblemSources(dict.getName())));
|
||||
page.setTotal(out.size());
|
||||
int pages = (int)Math.ceil(out.size()*1.0/param.getPageSize());
|
||||
page.setPages(pages);
|
||||
List<List<IssuesVO>> partition = Lists.partition(out, param.getPageSize());
|
||||
List<IssuesVO> issuesVOS = partition.get(param.getPageNum() - 1);
|
||||
page.setRecords(issuesVOS);
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 问题基本信息查询
|
||||
*/
|
||||
private RStatElectricQualityProblemFlow issuesSelectOne(String powerQualityProblemNo){
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
return issuesMapper.selectOne(issuesQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填报流程详情查询
|
||||
*/
|
||||
private RMpElectricQualityProblemFlowDetails flowDetailSelectOne(String powerQualityProblemNo){
|
||||
LambdaQueryWrapper<RMpElectricQualityProblemFlowDetails> flowQuery = new LambdaQueryWrapper<>();
|
||||
flowQuery.eq(RMpElectricQualityProblemFlowDetails::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
return flowDetailsMapper.selectOne(flowQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理填报信息
|
||||
*/
|
||||
private FlowDetailVO processFlowDetail(RMpElectricQualityProblemFlowDetails details){
|
||||
FlowDetailVO process = new FlowDetailVO();
|
||||
BeanUtil.copyProperties(details,process);
|
||||
if (!StrUtil.isEmpty(details.getReportProcessContentYyfx())){
|
||||
process.setReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentYyfx(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getReportProcessContentYyfx());
|
||||
}
|
||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentYyfx())){
|
||||
process.setUserReportProcessContentYyfx(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentYyfx(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getUserReportProcessContentYyfx());
|
||||
}
|
||||
if (!StrUtil.isEmpty(details.getReportProcessContentJhzg())){
|
||||
process.setReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentJhzg(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getReportProcessContentJhzg());
|
||||
}
|
||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentJhzg())){
|
||||
process.setUserReportProcessContentJhzg(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentJhzg(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getUserReportProcessContentJhzg());
|
||||
}
|
||||
if (!StrUtil.isEmpty(details.getReportProcessContentSjcq())){
|
||||
process.setReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getReportProcessContentSjcq(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getReportProcessContentSjcq());
|
||||
}
|
||||
if (!StrUtil.isEmpty(details.getUserReportProcessContentSjcq())){
|
||||
process.setUserReportProcessContentSjcq(StrUtil.removeSuffix(StrUtil.removePrefix(details.getUserReportProcessContentSjcq(),"["),"]").split(","));
|
||||
StrUtil.trim(process.getUserReportProcessContentSjcq());
|
||||
}
|
||||
return process;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询在线监测超标问题详情
|
||||
*/
|
||||
@Override
|
||||
public ExcessiveDetailVO getExcessiveDetail(String powerQualityProblemNo) {
|
||||
ExcessiveDetailVO detail = new ExcessiveDetailVO();
|
||||
BeanUtil.copyProperties(issuesSelectOne(powerQualityProblemNo),detail);
|
||||
detail.setOrgName(deptFeignClient.getDeptById(detail.getOrgNo()).getData().getName());
|
||||
LambdaQueryWrapper<RMpOnlineMonitorOverproofProblem> excessiveQuery = new LambdaQueryWrapper<>();
|
||||
excessiveQuery.eq(RMpOnlineMonitorOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RMpOnlineMonitorOverproofProblem excessiveOut = excessiveMapper.selectOne(excessiveQuery);
|
||||
BeanUtil.copyProperties(excessiveOut,detail);
|
||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户投诉问题详情
|
||||
*/
|
||||
@Override
|
||||
public GeneralSurveyVO getGeneralSurveyDetail(String powerQualityProblemNo) {
|
||||
GeneralSurveyVO detail = new GeneralSurveyVO();
|
||||
BeanUtil.copyProperties(issuesSelectOne(powerQualityProblemNo),detail);
|
||||
detail.setOrgName(deptFeignClient.getDeptById(detail.getOrgNo()).getData().getName());
|
||||
LambdaQueryWrapper<RMpGeneralSurveyOverproofProblem> generalSurveyQuery = new LambdaQueryWrapper<>();
|
||||
generalSurveyQuery.eq(RMpGeneralSurveyOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RMpGeneralSurveyOverproofProblem generalSurveyOut = generalSurveyMapper.selectOne(generalSurveyQuery);
|
||||
BeanUtil.copyProperties(generalSurveyOut,detail);
|
||||
detail.setSteadyIndicator(steadyIndicator(generalSurveyOut.getOverLimitTarget()));
|
||||
detail.setTransientIndicators(transientIndicators(generalSurveyOut.getOverLimitTarget()));
|
||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户投诉问题详情
|
||||
*/
|
||||
@Override
|
||||
public ComplaintVO getComplaintDetail(String powerQualityProblemNo) {
|
||||
ComplaintVO detail = new ComplaintVO();
|
||||
BeanUtil.copyProperties(issuesSelectOne(powerQualityProblemNo),detail);
|
||||
detail.setOrgName(deptFeignClient.getDeptById(detail.getOrgNo()).getData().getName());
|
||||
LambdaQueryWrapper<RMpUserComplaint> complaintQuery = new LambdaQueryWrapper<>();
|
||||
complaintQuery.eq(RMpUserComplaint::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RMpUserComplaint complaintOut = complaintMapper.selectOne(complaintQuery);
|
||||
BeanUtil.copyProperties(complaintOut,detail);
|
||||
detail.setSteadyIndicator(steadyIndicator(complaintOut.getAbnormalTarget()));
|
||||
detail.setTransientIndicators(transientIndicators(complaintOut.getAbnormalTarget()));
|
||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||
if (!StrUtil.isEmpty(complaintOut.getPowerGridAffectDev())){
|
||||
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getPowerGridAffectDev(),"["),"]").split(","));
|
||||
StrUtil.trim(detail.getPowerGridAffectDev());
|
||||
}
|
||||
if (!StrUtil.isEmpty(complaintOut.getUserAffectDev())){
|
||||
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(complaintOut.getUserAffectDev(),"["),"]").split(","));
|
||||
StrUtil.trim(detail.getUserAffectDev());
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询运维异常问题详情
|
||||
*/
|
||||
@Override
|
||||
public AbnormalVO getAbnormalDetail(String powerQualityProblemNo) {
|
||||
AbnormalVO detail = new AbnormalVO();
|
||||
BeanUtil.copyProperties(issuesSelectOne(powerQualityProblemNo),detail);
|
||||
detail.setOrgName(deptFeignClient.getDeptById(detail.getOrgNo()).getData().getName());
|
||||
LambdaQueryWrapper<RMpOperationMonitorAbnormal> abnormalQuery = new LambdaQueryWrapper<>();
|
||||
abnormalQuery.eq(RMpOperationMonitorAbnormal::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RMpOperationMonitorAbnormal abnormalOut = abnormalMapper.selectOne(abnormalQuery);
|
||||
BeanUtil.copyProperties(abnormalOut,detail);
|
||||
detail.setSteadyIndicator(steadyIndicator(abnormalOut.getAbnormalTarget()));
|
||||
detail.setTransientIndicators(transientIndicators(abnormalOut.getAbnormalTarget()));
|
||||
RMpElectricQualityProblemFlowDetails flowDetails = flowDetailSelectOne(powerQualityProblemNo);
|
||||
BeanUtil.copyProperties(processFlowDetail(flowDetails),detail);
|
||||
if (!StrUtil.isEmpty(abnormalOut.getPowerGridAffectDev())){
|
||||
detail.setPowerGridAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getPowerGridAffectDev(),"["),"]").split(","));
|
||||
StrUtil.trim(detail.getPowerGridAffectDev());
|
||||
}
|
||||
if (!StrUtil.isEmpty(abnormalOut.getUserAffectDev())){
|
||||
detail.setUserAffectDev(StrUtil.removeSuffix(StrUtil.removePrefix(abnormalOut.getUserAffectDev(),"["),"]").split(","));
|
||||
StrUtil.trim(detail.getUserAffectDev());
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 稳态指标处理
|
||||
*/
|
||||
private String[] steadyIndicator(String target){
|
||||
String[] process = StrUtil.removePrefix(target.split("]\\[")[0],"\\[").split(",");
|
||||
StrUtil.trim(process);
|
||||
return process;
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂态指标处理
|
||||
*/
|
||||
private String[] transientIndicators(String target){
|
||||
String[] process = StrUtil.removeSuffix(target.split("]\\[")[1],"]").split(",");
|
||||
StrUtil.trim(process);
|
||||
return process;
|
||||
}
|
||||
|
||||
/**
|
||||
* 原因分析
|
||||
*/
|
||||
@Override
|
||||
public void reasonAnalysis(ProcessParam processParam) {
|
||||
LocalDateTime local = LocalDateTimeUtil.now();
|
||||
RMpElectricQualityProblemFlowDetails details = new RMpElectricQualityProblemFlowDetails();
|
||||
BeanUtil.copyProperties(processParam,details);
|
||||
details.setDataDateYyfx(local);
|
||||
details.setReportProcessContentYyfx(ArrayUtil.toString(processParam.getReportProcessContentYyfx()));
|
||||
details.setUserReportProcessContentYyfx(ArrayUtil.toString(processParam.getUserReportProcessContentYyfx()));
|
||||
flowDetailsMapper.insert(details);
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo());
|
||||
RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(issuesQuery);
|
||||
issuesOut.setReportProcess(DicDataEnum.CAUSE_ANALYSIS.getCode());
|
||||
issuesMapper.update(issuesOut,issuesQuery);
|
||||
if (DicDataEnum.USER_COMPLAINTS.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpUserComplaint> complaintQuery = new LambdaQueryWrapper<>();
|
||||
complaintQuery.eq(RMpUserComplaint::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo());
|
||||
RMpUserComplaint complaintOut = complaintMapper.selectOne(complaintQuery);
|
||||
complaintOut.setPowerGridAffectDev(ArrayUtil.toString(processParam.getPowerGridAffectDev()));
|
||||
complaintOut.setUserAffectDev(ArrayUtil.toString(processParam.getUserAffectDev()));
|
||||
complaintMapper.update(complaintOut,complaintQuery);
|
||||
}else if (DicDataEnum.DEV_EXCEPTION.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpOperationMonitorAbnormal> abnormalQuery = new LambdaQueryWrapper<>();
|
||||
abnormalQuery.eq(RMpOperationMonitorAbnormal::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo());
|
||||
RMpOperationMonitorAbnormal abnormalOut = abnormalMapper.selectOne(abnormalQuery);
|
||||
abnormalOut.setPowerGridAffectDev(ArrayUtil.toString(processParam.getPowerGridAffectDev()));
|
||||
abnormalOut.setUserAffectDev(ArrayUtil.toString(processParam.getUserAffectDev()));
|
||||
abnormalMapper.update(abnormalOut,abnormalQuery);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计划整改措施、实际采取措施、成效分析
|
||||
*/
|
||||
@Override
|
||||
public void process(ProcessParam processParam, String code) {
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo());
|
||||
RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(issuesQuery);
|
||||
if (DicDataEnum.SUCCESS.getCode().equals(issuesOut.getReportProcessStatus())){
|
||||
LambdaQueryWrapper<RMpElectricQualityProblemFlowDetails> query = new LambdaQueryWrapper<>();
|
||||
query.eq(RMpElectricQualityProblemFlowDetails::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo());
|
||||
RMpElectricQualityProblemFlowDetails details = flowDetailsMapper.selectOne(query);
|
||||
LocalDateTime local = LocalDateTimeUtil.now();
|
||||
if (DicDataEnum.PLAN_MEASURES.getCode().equals(code)){
|
||||
details.setDataDateJhzg(local);
|
||||
details.setReportProcessContentJhzg(ArrayUtil.toString(processParam.getReportProcessContentJhzg()));
|
||||
details.setUserReportProcessContentJhzg(ArrayUtil.toString(processParam.getUserReportProcessContentJhzg()));
|
||||
details.setFileNameJhzg(processParam.getFileNameJhzg());
|
||||
details.setFilePathJhzg(processParam.getFilePathJhzg());
|
||||
}else if (DicDataEnum.ACTUAL_MEASURES.getCode().equals(code)){
|
||||
details.setDataDateSjcq(local);
|
||||
details.setReportProcessContentSjcq(ArrayUtil.toString(processParam.getReportProcessContentSjcq()));
|
||||
details.setUserReportProcessContentSjcq(ArrayUtil.toString(processParam.getUserReportProcessContentSjcq()));
|
||||
details.setFileNameSjcq(processParam.getFileNameSjcq());
|
||||
details.setFilePathSjcq(processParam.getFilePathSjcq());
|
||||
}else if (DicDataEnum.INSIGHTS.getCode().equals(code)){
|
||||
details.setDataDateZlxg(local);
|
||||
details.setDescriptionZlxg(processParam.getDescriptionZlxg());
|
||||
details.setFileNameZlxg(processParam.getFileNameZlxg());
|
||||
details.setFilePathZlxg(processParam.getFilePathZlxg());
|
||||
}
|
||||
flowDetailsMapper.update(details, query);
|
||||
issuesOut.setReportProcess(code);
|
||||
issuesOut.setReportProcessStatus(DicDataEnum.AUDITT.getCode());
|
||||
issuesMapper.update(issuesOut,issuesQuery);
|
||||
}else {
|
||||
throw new BusinessException(ProcessResponseEnum.PROCESS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 问题归档
|
||||
*/
|
||||
@Override
|
||||
public void archive(String powerQualityProblemNo) {
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> query = new LambdaQueryWrapper<>();
|
||||
query.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(query);
|
||||
if (DicDataEnum.INSIGHTS.getCode().equals(issuesOut.getReportProcess())
|
||||
&& DicDataEnum.SUCCESS.getCode().equals(issuesOut.getReportProcessStatus())){
|
||||
issuesOut.setReportProcess(DicDataEnum.ARCHIVED.getCode());
|
||||
issuesMapper.update(issuesOut,query);
|
||||
}else {
|
||||
throw new BusinessException(ProcessResponseEnum.ARCHIVE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
@Override
|
||||
public MinIoUploadResDTO uploadFile(MultipartFile issuesFile) {
|
||||
try {
|
||||
return minIoUtils.upload(issuesFile, minIoProperties.getBucket(), "electricityQuality/");
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(ProcessResponseEnum.UPLOAD_FILE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@Override
|
||||
public String downloadFile(String powerQualityProblemNo,String reportProcess) {
|
||||
LambdaQueryWrapper<RMpElectricQualityProblemFlowDetails> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpElectricQualityProblemFlowDetails::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RMpElectricQualityProblemFlowDetails details = flowDetailsMapper.selectOne(issuesQuery);
|
||||
String filePath = null;
|
||||
if (DicDataEnum.CAUSE_ANALYSIS.getName().equals(reportProcess)){
|
||||
filePath = details.getFilePathYyfx();
|
||||
}else if (DicDataEnum.PLAN_MEASURES.getName().equals(reportProcess)){
|
||||
filePath = details.getFilePathJhzg();
|
||||
}else if (DicDataEnum.ACTUAL_MEASURES.getName().equals(reportProcess)){
|
||||
filePath = details.getFilePathSjcq();
|
||||
}else if (DicDataEnum.INSIGHTS.getName().equals(reportProcess)){
|
||||
filePath = details.getFilePathZlxg();
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除问题
|
||||
*/
|
||||
@Override
|
||||
public void deleteIssues(String powerQualityProblemNo) {
|
||||
LambdaQueryWrapper<RStatElectricQualityProblemFlow> query = new LambdaQueryWrapper<>();
|
||||
query.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(query);
|
||||
if (DicDataEnum.ONLINE.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpOnlineMonitorOverproofProblem> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpOnlineMonitorOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
excessiveMapper.delete(issuesQuery);
|
||||
}else if (DicDataEnum.GENERAL.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpGeneralSurveyOverproofProblem> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpGeneralSurveyOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
generalSurveyMapper.delete(issuesQuery);
|
||||
}else if (DicDataEnum.USER_COMPLAINTS.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpUserComplaint> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpUserComplaint::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
complaintMapper.delete(issuesQuery);
|
||||
}else if (DicDataEnum.DEV_EXCEPTION.getCode().equals(issuesOut.getProblemSources())){
|
||||
LambdaQueryWrapper<RMpOperationMonitorAbnormal> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpOperationMonitorAbnormal::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
abnormalMapper.delete(issuesQuery);
|
||||
}
|
||||
LambdaQueryWrapper<RMpElectricQualityProblemFlowDetails> issuesQuery = new LambdaQueryWrapper<>();
|
||||
issuesQuery.eq(RMpElectricQualityProblemFlowDetails::getPowerQualityProblemNo,powerQualityProblemNo);
|
||||
flowDetailsMapper.delete(issuesQuery);
|
||||
issuesMapper.delete(query);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.api.DistributionMonitorClient;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.minio.config.MinIoProperties;
|
||||
import com.njcn.minio.utils.MinIoUtils;
|
||||
import com.njcn.process.constant.Param;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
import com.njcn.process.mapper.LoadTypeUserManageMapper;
|
||||
import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.RLoadTypeUserManage;
|
||||
import com.njcn.process.pojo.vo.LoadTypeRelationExcel;
|
||||
import com.njcn.process.pojo.vo.LoadTypeUserExcel;
|
||||
import com.njcn.process.pojo.vo.RLoadTypeUserManageVO;
|
||||
import com.njcn.process.service.LoadTypeUserManageService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 干扰源用户管理
|
||||
*
|
||||
* @author qijian
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/11/11 - 9:20
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class LoadTypeUserManageServiceImpl implements LoadTypeUserManageService {
|
||||
|
||||
private final LoadTypeUserManageMapper loadTypeUserManageMapper;
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
private final DistributionMonitorClient distributionMonitorClient;
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
@Resource
|
||||
private MinIoUtils minIoUtils;
|
||||
|
||||
@Resource
|
||||
private MinIoProperties minIoProperties;
|
||||
|
||||
/**
|
||||
* 干扰源用户分页查询
|
||||
* @param loadTypeUserSearchParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<RLoadTypeUserManageVO> getLoadTypeUserList(LoadTypeUserSearchParam loadTypeUserSearchParam){
|
||||
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
||||
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeUserPage(page, loadTypeUserSearchParam);
|
||||
|
||||
//部门处理:根据部门code取名称
|
||||
List<RLoadTypeUserManageVO> list = loadTypeUserPage.getRecords();
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
||||
List<RLoadTypeUserManageVO> resultList = list.stream().map(item -> {
|
||||
RLoadTypeUserManageVO rLoadTypeUserManageVO = new RLoadTypeUserManageVO();
|
||||
BeanUtils.copyProperties(item, rLoadTypeUserManageVO);
|
||||
rLoadTypeUserManageVO.setOrgName(pvTerminalTreeVOMap.get(item.getOrgNo()).getName()); //单位名称
|
||||
return rLoadTypeUserManageVO;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
//返回新的数据组
|
||||
return loadTypeUserPage.setRecords(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询干扰源用户
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public RLoadTypeUserManageVO getLoadTypeUserById(String id) {
|
||||
RLoadTypeUserManage rLoadTypeUserManage = loadTypeUserManageMapper.selectById(id);
|
||||
RLoadTypeUserManageVO rLoadTypeUserManageVO = new RLoadTypeUserManageVO();
|
||||
BeanUtils.copyProperties(rLoadTypeUserManage, rLoadTypeUserManageVO);
|
||||
//文件
|
||||
if (rLoadTypeUserManageVO.getIFilePath() != null){
|
||||
String iFile = minIoUtils.getObjectUrl(minIoProperties.getBucket(), rLoadTypeUserManageVO.getIFilePath(), 7 * 24 * 60 * 60);
|
||||
rLoadTypeUserManageVO.setIFile(iFile);
|
||||
}
|
||||
if (rLoadTypeUserManageVO.getAFilePath() != null){
|
||||
String aFile = minIoUtils.getObjectUrl(minIoProperties.getBucket(), rLoadTypeUserManageVO.getAFilePath(), 7 * 24 * 60 * 60);
|
||||
rLoadTypeUserManageVO.setIFile(aFile);
|
||||
}
|
||||
return rLoadTypeUserManageVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增干扰源用户
|
||||
* @param loadTypeUserParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean addLoadTypeUser(LoadTypeUserParam loadTypeUserParam) {
|
||||
//参数转换
|
||||
RLoadTypeUserManage rLoadTypeUserManage = new RLoadTypeUserManage();
|
||||
BeanUtils.copyProperties(loadTypeUserParam, rLoadTypeUserManage);
|
||||
|
||||
//塞入建档时间
|
||||
Date date = DateUtil.parse(loadTypeUserParam.getRecordTime(), "yyyy-MM-dd HH:mm:ss");
|
||||
rLoadTypeUserManage.setRecordTime(date);
|
||||
loadTypeUserManageMapper.insert(rLoadTypeUserManage);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传干扰源用户入网报告
|
||||
* @param loadTypeUserIUploadParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean uploadLoadTypeUserI(LoadTypeUserIUploadParam loadTypeUserIUploadParam) {
|
||||
|
||||
RLoadTypeUserManage rLoadTypeUserManage = new RLoadTypeUserManage();
|
||||
BeanUtils.copyProperties(loadTypeUserIUploadParam, rLoadTypeUserManage);
|
||||
|
||||
//文件上传到Minio服务器,存入文件名
|
||||
if(loadTypeUserIUploadParam.getFile() != null){
|
||||
MinIoUploadResDTO minIoUploadResDTO = fileToMinio(loadTypeUserIUploadParam.getFile());
|
||||
rLoadTypeUserManage.setIFilePath(minIoUploadResDTO.getMinFileName());
|
||||
rLoadTypeUserManage.setIUploadTime(new Date());
|
||||
}
|
||||
|
||||
//提交:待审核/保存:新建
|
||||
DictData dictData;
|
||||
if(Objects.equals(Param.LOAD_TYPE_USER_SUBMIT,loadTypeUserIUploadParam.getStatus())){
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.AUDIT.getCode()).getData();
|
||||
}else{
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.NEWLY.getCode()).getData();
|
||||
}
|
||||
rLoadTypeUserManage.setIStatus(dictData.getId());
|
||||
rLoadTypeUserManage.setIIsFileUpload(1);
|
||||
loadTypeUserManageMapper.updateById(rLoadTypeUserManage);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联营销用户
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean linkUser(LoadTypeUserAssociateParam loadTypeUserAssociateParam) {
|
||||
RLoadTypeUserManage rLoadTypeUserManage = new RLoadTypeUserManage();
|
||||
//填入数据修改
|
||||
BeanUtils.copyProperties(loadTypeUserAssociateParam, rLoadTypeUserManage);
|
||||
loadTypeUserManageMapper.updateById(rLoadTypeUserManage);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有干扰源用户(与营销系统关联)
|
||||
* @param loadTypeUserSearchParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<RLoadTypeUserManageVO> getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam) {
|
||||
Page<RLoadTypeUserManageVO> page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize());
|
||||
Page<RLoadTypeUserManageVO> loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeRelationPage(page,loadTypeUserSearchParam);
|
||||
|
||||
//部门处理:根据部门code取名称
|
||||
List<RLoadTypeUserManageVO> list = loadTypeUserPage.getRecords();
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
||||
List<RLoadTypeUserManageVO> resultList = list.stream().map(item -> {
|
||||
RLoadTypeUserManageVO rLoadTypeUserManageVO = new RLoadTypeUserManageVO();
|
||||
BeanUtils.copyProperties(item, rLoadTypeUserManageVO);
|
||||
rLoadTypeUserManageVO.setOrgName(pvTerminalTreeVOMap.get(item.getOrgNo()).getName()); //单位名称
|
||||
return rLoadTypeUserManageVO;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
//返回新的数据组
|
||||
return loadTypeUserPage.setRecords(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到Minio
|
||||
*
|
||||
* @param file 文件
|
||||
* @return 成功标记
|
||||
*/
|
||||
private MinIoUploadResDTO fileToMinio(MultipartFile file) {
|
||||
try {
|
||||
//把名称存入数据
|
||||
MinIoUploadResDTO upload = minIoUtils.upload(file, minIoProperties.getBucket(), "loadTypeUser/");
|
||||
return upload;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(ProcessResponseEnum.UPLOAD_FILE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传干扰源用户入网报告
|
||||
* @param loadTypeUserAUploadParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean uploadLoadTypeUserA(LoadTypeUserAUploadParam loadTypeUserAUploadParam) {
|
||||
|
||||
RLoadTypeUserManage rLoadTypeUserManage = new RLoadTypeUserManage();
|
||||
BeanUtils.copyProperties(loadTypeUserAUploadParam, rLoadTypeUserManage);
|
||||
|
||||
//文件上传到Minio服务器,存入文件名
|
||||
if(loadTypeUserAUploadParam.getFile() != null){
|
||||
MinIoUploadResDTO minIoUploadResDTO = fileToMinio(loadTypeUserAUploadParam.getFile());
|
||||
rLoadTypeUserManage.setAFilePath(minIoUploadResDTO.getMinFileName());
|
||||
rLoadTypeUserManage.setAUploadTime(new Date());
|
||||
}
|
||||
|
||||
//提交:待审核/保存:新建
|
||||
DictData dictData;
|
||||
if(Objects.equals(Param.LOAD_TYPE_USER_SUBMIT,loadTypeUserAUploadParam.getStatus())){
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.AUDIT.getCode()).getData();
|
||||
}else{
|
||||
dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.NEWLY.getCode()).getData();
|
||||
}
|
||||
rLoadTypeUserManage.setAStatus(dictData.getId());
|
||||
loadTypeUserManageMapper.updateById(rLoadTypeUserManage);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出未建档干扰源用户管理信息
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LoadTypeUserExcel> exportLoadTypeUserList(List<String> list) {
|
||||
//数据处理
|
||||
LambdaQueryWrapper<RLoadTypeUserManage> queryWrapper = new LambdaQueryWrapper<> ();
|
||||
queryWrapper.in(RLoadTypeUserManage::getId, list);
|
||||
List<RLoadTypeUserManage> rLoadTypeUserManages = loadTypeUserManageMapper.selectList(queryWrapper);
|
||||
//1、部门数据
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
||||
|
||||
//2、取干扰源类型
|
||||
List<DictData> loadTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INTERFERENCE_SOURCE.getCode()).getData();
|
||||
Map<String, DictData> loadTypeMap = loadTypeList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData));
|
||||
|
||||
//3、取入网报告状态
|
||||
List<DictData> iStatusList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ON_NETWORK_STATUS.getCode()).getData();
|
||||
Map<String, DictData> iStatusMap = iStatusList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData));
|
||||
|
||||
List<LoadTypeUserExcel> resultList = rLoadTypeUserManages.stream().map(item -> {
|
||||
LoadTypeUserExcel loadTypeUserExcel = new LoadTypeUserExcel();
|
||||
if (item.getUserName() != null){
|
||||
loadTypeUserExcel.setUserName(item.getUserName());
|
||||
}
|
||||
if (item.getRecordTime() != null){
|
||||
loadTypeUserExcel.setRecordTime(item.getRecordTime());
|
||||
}
|
||||
if (item.getAIsFileUpload() != null){
|
||||
loadTypeUserExcel.setIIsFileUpload(item.getIIsFileUpload() == 0 ? "否" : "是"); //实测报告是否上传
|
||||
}
|
||||
if (item.getOrgNo() != null){
|
||||
loadTypeUserExcel.setOrgName(pvTerminalTreeVOMap.get(item.getOrgNo()).getName()); //单位
|
||||
}
|
||||
if (item.getLoadType() != null){
|
||||
loadTypeUserExcel.setLoadTypeName(loadTypeMap.get(item.getLoadType()).getName()); //入网报告状态
|
||||
}
|
||||
if (item.getIStatus() != null){
|
||||
loadTypeUserExcel.setIStatusName(iStatusMap.get(item.getIStatus()).getName()); //入网报告状态
|
||||
}
|
||||
if (item.getAIsFileUpload() != null){
|
||||
loadTypeUserExcel.setIIsFileUpload(item.getIIsFileUpload() == 0 ? "否" : "是"); //实测报告是否上传
|
||||
}
|
||||
return loadTypeUserExcel;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出干扰源用户常态化管理信息
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LoadTypeRelationExcel> exportLoadTypeRelationList(List<String> list) {
|
||||
//数据处理
|
||||
LambdaQueryWrapper<RLoadTypeUserManage> queryWrapper = new LambdaQueryWrapper<> ();
|
||||
queryWrapper.in(RLoadTypeUserManage::getId, list);
|
||||
List<RLoadTypeUserManage> rLoadTypeUserManages = loadTypeUserManageMapper.selectList(queryWrapper);
|
||||
//1、部门数据
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, PvTerminalTreeVO> pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO));
|
||||
|
||||
//2、取干扰源类型
|
||||
List<DictData> loadTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INTERFERENCE_SOURCE.getCode()).getData();
|
||||
Map<String, DictData> loadTypeMap = loadTypeList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData));
|
||||
|
||||
//3、取实测报告状态
|
||||
List<DictData> aStatusList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ON_NETWORK_STATUS.getCode()).getData();
|
||||
Map<String, DictData> aStatusMap = aStatusList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData));
|
||||
|
||||
List<LoadTypeRelationExcel> resultList = rLoadTypeUserManages.stream().map(item -> {
|
||||
LoadTypeRelationExcel loadTypeRelationExcel = new LoadTypeRelationExcel();
|
||||
if (item.getOrgNo() != null){
|
||||
loadTypeRelationExcel.setOrgName(pvTerminalTreeVOMap.get(item.getOrgNo()).getName());
|
||||
}
|
||||
if (item.getLoadType() != null){
|
||||
loadTypeRelationExcel.setLoadTypeName(loadTypeMap.get(item.getLoadType()).getName());
|
||||
}
|
||||
if (item.getUserName() != null){
|
||||
loadTypeRelationExcel.setUserName(item.getUserName());
|
||||
}
|
||||
if (item.getRelationUserName() != null){
|
||||
loadTypeRelationExcel.setRelationUserName(item.getRelationUserName());
|
||||
}
|
||||
if (item.getAStatus() != null){
|
||||
loadTypeRelationExcel.setAStatusName(aStatusMap.get(item.getIStatus()).getName());
|
||||
}
|
||||
return loadTypeRelationExcel;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanDetailMapper;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlandetailQueryParm;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RGeneralSurveyPlanDetailServiceImpl extends MppServiceImpl<RGeneralSurveyPlanDetailMapper, RGeneralSurveyPlanDetail> implements RGeneralSurveyPlanDetailService{
|
||||
|
||||
|
||||
private @Autowired
|
||||
RGeneralSurveyPlanDetailMapper rGeneralSurveyPlanDetailMapper;
|
||||
/**
|
||||
* @param rGeneralSurveyPlandetailQueryParm
|
||||
* @Description: 根据planNO查询普测计划详情
|
||||
* @Param: [rGeneralSurveyPlandetailQueryParm]
|
||||
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.njcn.process.pojo.vo.RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/15
|
||||
*/
|
||||
@Override
|
||||
public IPage<RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO> queryPlandetail(RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm) {
|
||||
|
||||
IPage<RGeneralSurveyPlanDetail> page = new Page<> (rGeneralSurveyPlandetailQueryParm.getCurrentPage(), rGeneralSurveyPlandetailQueryParm.getPageSize());
|
||||
|
||||
LambdaQueryWrapper<RGeneralSurveyPlanDetail> lambdaQueryWrapper = new LambdaQueryWrapper<> ();
|
||||
lambdaQueryWrapper.eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlandetailQueryParm.getPlanNo ());
|
||||
IPage<RGeneralSurveyPlanDetail> rGeneralSurveyPlanDetailIPage = rGeneralSurveyPlanDetailMapper.selectPage (page, lambdaQueryWrapper);
|
||||
|
||||
return rGeneralSurveyPlanDetailIPage.convert (temp-> BeanUtil.copyProperties (temp, RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO.class));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.minio.bo.MinIoUploadResDTO;
|
||||
import com.njcn.minio.config.MinIoProperties;
|
||||
import com.njcn.minio.utils.MinIoUtils;
|
||||
import com.njcn.process.enums.ProcessResponseEnum;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanDetailMapper;
|
||||
import com.njcn.process.mapper.RGeneralSurveyPlanPOMapper;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanAddParm;
|
||||
import com.njcn.process.pojo.param.RGeneralSurveyPlanQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
|
||||
import com.njcn.process.pojo.param.SurveyResultUploadParam;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.vo.SurveyPlanExcel;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
|
||||
import com.njcn.process.pojo.vo.RGeneralSurveyPlanVO;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanDetailService;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanPOService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/11 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl<RGeneralSurveyPlanPOMapper, RGeneralSurveyPlanPO> implements RGeneralSurveyPlanPOService{
|
||||
|
||||
|
||||
private @Autowired
|
||||
RGeneralSurveyPlanDetailService rGeneralSurveyPlanDetailService;
|
||||
|
||||
private @Autowired
|
||||
RGeneralSurveyPlanPOMapper rGeneralSurveyPlanPOMapper;
|
||||
|
||||
private @Autowired
|
||||
RGeneralSurveyPlanDetailMapper rGeneralSurveyPlanDetailMapper;
|
||||
|
||||
@Resource
|
||||
private MinIoUtils minIoUtils;
|
||||
|
||||
private @Autowired
|
||||
DeptFeignClient deptFeignClient;
|
||||
|
||||
|
||||
@Resource
|
||||
private MinIoProperties minIoProperties;
|
||||
/**
|
||||
* @param rGeneralSurveyPlanAddParm
|
||||
* @Description: addPlan
|
||||
* @Param: [rGeneralSurveyPlanAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/14
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean addPlan(RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm) {
|
||||
|
||||
RGeneralSurveyPlanPO rGeneralSurveyPlanPO = new RGeneralSurveyPlanPO ();
|
||||
BeanUtils.copyProperties (rGeneralSurveyPlanAddParm,rGeneralSurveyPlanPO);
|
||||
/*todo 后期与工作流绑定*/
|
||||
rGeneralSurveyPlanPO.setStatus (0);
|
||||
boolean b = this.saveOrUpdateByMultiId (rGeneralSurveyPlanPO);
|
||||
|
||||
List<RGeneralSurveyPlanAddParm.RGeneralSurveyPlanDetailAddParm> rGeneralSurveyPlanDetailAddParm = rGeneralSurveyPlanAddParm.getRGeneralSurveyPlanDetailAddParm ( );
|
||||
QueryWrapper<RGeneralSurveyPlanDetail> queryWrapper = new QueryWrapper ();
|
||||
queryWrapper.lambda ().eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlanAddParm.getPlanNo ());
|
||||
rGeneralSurveyPlanDetailService.remove (queryWrapper);
|
||||
List<RGeneralSurveyPlanDetail> rGeneralSurveyPlanDetailList = new ArrayList<> ();
|
||||
rGeneralSurveyPlanDetailAddParm.forEach (temp->{
|
||||
RGeneralSurveyPlanDetail rGeneralSurveyPlanDetail = new RGeneralSurveyPlanDetail();
|
||||
BeanUtils.copyProperties (temp, rGeneralSurveyPlanDetail);
|
||||
/*目前时间与计划开始时间,结束时间一致*/
|
||||
rGeneralSurveyPlanDetail.setGeneralSurveyStartTime (rGeneralSurveyPlanAddParm.getPlanStartTime ());
|
||||
rGeneralSurveyPlanDetail.setGeneralSurveyTime (rGeneralSurveyPlanAddParm.getPlanStartTime ());
|
||||
rGeneralSurveyPlanDetail.setGeneralSurveyEndTime (rGeneralSurveyPlanAddParm.getPlanEndTime ());
|
||||
rGeneralSurveyPlanDetail.setPlanNo (rGeneralSurveyPlanAddParm.getPlanNo ());
|
||||
rGeneralSurveyPlanDetail.setGeneralSurveyLeader(rGeneralSurveyPlanAddParm.getLeader ());
|
||||
rGeneralSurveyPlanDetailList.add (rGeneralSurveyPlanDetail);
|
||||
});
|
||||
boolean b1 = rGeneralSurveyPlanDetailService.saveOrUpdateBatchByMultiId (rGeneralSurveyPlanDetailList, 5);
|
||||
|
||||
return b&&b1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rGeneralSurveyPlanQueryParm
|
||||
* @Description: query
|
||||
* @Param: [rGeneralSurveyPlanQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RGeneralSurveyPlanVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/15
|
||||
*/
|
||||
@Override
|
||||
public IPage<RGeneralSurveyPlanVO> query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List<String> statusList ) {
|
||||
IPage<RGeneralSurveyPlanPO> page = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize());
|
||||
IPage<RGeneralSurveyPlanVO> returnpage = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize());
|
||||
|
||||
LambdaQueryWrapper<RGeneralSurveyPlanPO> queryWrapper = new LambdaQueryWrapper<> ();
|
||||
if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm.getOrgNo ())) {
|
||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId (rGeneralSurveyPlanQueryParm.getOrgNo ()).getData ( );
|
||||
|
||||
queryWrapper.in (RGeneralSurveyPlanPO::getOrgNo, data);
|
||||
}
|
||||
if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm. getStatus ())) {
|
||||
queryWrapper.eq (RGeneralSurveyPlanPO::getStatus, rGeneralSurveyPlanQueryParm.getStatus ());
|
||||
}
|
||||
if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm.getIsFileUpload ())) {
|
||||
queryWrapper.eq (RGeneralSurveyPlanPO::getIsFileUpload, rGeneralSurveyPlanQueryParm.getIsFileUpload ());
|
||||
}
|
||||
if (!Objects.isNull (rGeneralSurveyPlanQueryParm.getPlanStartTime ())) {
|
||||
queryWrapper.ge (RGeneralSurveyPlanPO::getPlanStartTime, rGeneralSurveyPlanQueryParm.getPlanStartTime ());
|
||||
}
|
||||
if (!Objects.isNull (rGeneralSurveyPlanQueryParm.getPlanEndTime ())) {
|
||||
queryWrapper.le (RGeneralSurveyPlanPO::getPlanEndTime, rGeneralSurveyPlanQueryParm.getPlanEndTime ());
|
||||
}
|
||||
queryWrapper.in (RGeneralSurveyPlanPO::getStatus, statusList);
|
||||
queryWrapper.orderByAsc (RGeneralSurveyPlanPO::getStatus).orderByDesc (RGeneralSurveyPlanPO::getPlanCreateTime);
|
||||
|
||||
List<RGeneralSurveyPlanPO> rGeneralSurveyPlanPOS = rGeneralSurveyPlanPOMapper.selectPage (page,queryWrapper).getRecords ();
|
||||
if(CollectionUtils.isEmpty (rGeneralSurveyPlanPOS)){
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
//部门处理:根据部门code取名称
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, String> pvTerminalTreeVOMap = dept.stream().
|
||||
collect(Collectors.
|
||||
toMap(PvTerminalTreeVO::getId,
|
||||
PvTerminalTreeVO::getName));
|
||||
|
||||
|
||||
List<String> collect = rGeneralSurveyPlanPOS.stream ( ).map (RGeneralSurveyPlanPO::getPlanNo).collect (Collectors.toList ( ));
|
||||
LambdaQueryWrapper<RGeneralSurveyPlanDetail> lambdaQueryWrapper = new LambdaQueryWrapper<> ();
|
||||
lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, collect);
|
||||
List<RGeneralSurveyPlanDetail> rGeneralSurveyPlanDetails = rGeneralSurveyPlanDetailMapper.selectList (lambdaQueryWrapper);
|
||||
List<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOList = new ArrayList<> ();
|
||||
rGeneralSurveyPlanPOS.forEach (temp ->{
|
||||
RGeneralSurveyPlanVO rGeneralSurveyPlanVO = new RGeneralSurveyPlanVO();
|
||||
BeanUtils.copyProperties (temp, rGeneralSurveyPlanVO);
|
||||
long Busbarcount = rGeneralSurveyPlanDetails.stream ( ).
|
||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||
map (RGeneralSurveyPlanDetail::getBusbarId).distinct ( ).count ( );
|
||||
|
||||
long Subcount = rGeneralSurveyPlanDetails.stream ( ).
|
||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||
map (RGeneralSurveyPlanDetail::getSubId).distinct ( ).count ( );
|
||||
rGeneralSurveyPlanVO.setBusCount (Busbarcount);
|
||||
rGeneralSurveyPlanVO.setSubCount (Subcount);
|
||||
List<RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO> collect1 = rGeneralSurveyPlanDetails.stream ( ).
|
||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||
map (surveyPlanDetail -> {
|
||||
RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO rGeneralSurveyPlanDetailVO = new RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO ( );
|
||||
BeanUtils.copyProperties (surveyPlanDetail, rGeneralSurveyPlanDetailVO);
|
||||
return rGeneralSurveyPlanDetailVO;
|
||||
}).collect (Collectors.toList ( ));
|
||||
rGeneralSurveyPlanVO.setOrgName(pvTerminalTreeVOMap.get(temp.getOrgNo())); //单位名称
|
||||
|
||||
rGeneralSurveyPlanVO.setRGeneralSurveyPlanDetailVOList (collect1);
|
||||
rGeneralSurveyPlanVOList.add (rGeneralSurveyPlanVO);
|
||||
});
|
||||
returnpage.setRecords (rGeneralSurveyPlanVOList);
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param surveyResultUploadParam
|
||||
* @Description: surveyResultUpload
|
||||
* @Param: [surveyResultUploadParam]
|
||||
* @return: boolean
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/18
|
||||
*/
|
||||
@Override
|
||||
public boolean surveyResultUpload(SurveyResultUploadParam surveyResultUploadParam) {
|
||||
boolean result = true;
|
||||
RGeneralSurveyPlanPO rGeneralSurveyPlanPO = new RGeneralSurveyPlanPO();
|
||||
rGeneralSurveyPlanPO.setPlanNo (surveyResultUploadParam.getPlanId ());
|
||||
rGeneralSurveyPlanPO = this.selectByMultiId (rGeneralSurveyPlanPO);
|
||||
String filePath =rGeneralSurveyPlanPO.getFilePath ();
|
||||
Integer fileCount = rGeneralSurveyPlanPO.getFileCount ( );
|
||||
fileCount = Optional.ofNullable (fileCount).orElse (0);
|
||||
for (int i = 0; i < surveyResultUploadParam.getFile ( ).length; i++) {
|
||||
MinIoUploadResDTO minIoUploadResDTO = fileToMinio(surveyResultUploadParam.getFile ( )[i]);
|
||||
filePath=filePath+minIoUploadResDTO.getMinFileName ()+";";
|
||||
fileCount++;
|
||||
}
|
||||
rGeneralSurveyPlanPO.setStatus (4);
|
||||
rGeneralSurveyPlanPO.setFileCount (fileCount);
|
||||
rGeneralSurveyPlanPO.setFilePath (filePath);
|
||||
rGeneralSurveyPlanPO.setIsFileUpload (1);
|
||||
rGeneralSurveyPlanPO.setUploadTime (new Date ());
|
||||
this.saveOrUpdateByMultiId (rGeneralSurveyPlanPO);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param planNo
|
||||
* @Description: surveyResultDownload
|
||||
* @Param: [surveyResultUploadParam]
|
||||
* @return: java.util.List<java.lang.String>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/18
|
||||
*/
|
||||
@Override
|
||||
public List<MinIoUploadResDTO> surveyResultDownload(String planNo) {
|
||||
RGeneralSurveyPlanPO rGeneralSurveyPlanPO = new RGeneralSurveyPlanPO();
|
||||
rGeneralSurveyPlanPO.setPlanNo (planNo);
|
||||
rGeneralSurveyPlanPO = this.selectByMultiId (rGeneralSurveyPlanPO);
|
||||
String filePath = rGeneralSurveyPlanPO.getFilePath ( );
|
||||
if(StringUtils.isEmpty (filePath)){
|
||||
throw new BusinessException(ProcessResponseEnum.DOWNLOAD_FILE_ERROR);
|
||||
}
|
||||
String[] split = filePath.substring (0, filePath.length ( ) - 1).split (";");
|
||||
List<MinIoUploadResDTO> collect = Stream.of (split).map (temp -> {
|
||||
MinIoUploadResDTO dto = new MinIoUploadResDTO("",minIoUtils.getObjectUrl (minIoProperties.getBucket ( ), temp, 7 * 24 * 60 * 60));
|
||||
return dto ;
|
||||
}).collect (Collectors.toList ( ));
|
||||
return collect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: exportSurveyPlan
|
||||
* @Param: []
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.SurveyPlanExcel>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/21
|
||||
*/
|
||||
@Override
|
||||
public List<SurveyPlanExcel> exportSurveyPlan(List<String> planIdList) {
|
||||
List<SurveyPlanExcel> surveyPlanExcels = new ArrayList<> ();
|
||||
LambdaQueryWrapper<RGeneralSurveyPlanPO> queryWrapper = new LambdaQueryWrapper<> ();
|
||||
queryWrapper.in (RGeneralSurveyPlanPO::getPlanNo,planIdList);
|
||||
List<RGeneralSurveyPlanPO> rGeneralSurveyPlanPOS = rGeneralSurveyPlanPOMapper.selectList (queryWrapper);
|
||||
LambdaQueryWrapper<RGeneralSurveyPlanDetail> lambdaQueryWrapper = new LambdaQueryWrapper<> ();
|
||||
lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, planIdList);
|
||||
List<RGeneralSurveyPlanDetail> rGeneralSurveyPlanDetails = rGeneralSurveyPlanDetailMapper.selectList (lambdaQueryWrapper);
|
||||
|
||||
//部门处理:根据部门code取名称
|
||||
List<PvTerminalTreeVO> dept = deptFeignClient.allDeptList().getData();
|
||||
Map<String, String> pvTerminalTreeVOMap = dept.stream().
|
||||
collect(Collectors.
|
||||
toMap(PvTerminalTreeVO::getId,
|
||||
PvTerminalTreeVO::getName));
|
||||
rGeneralSurveyPlanPOS.forEach (temp->{
|
||||
SurveyPlanExcel surveyPlanExcel = new SurveyPlanExcel();
|
||||
BeanUtils.copyProperties (temp, surveyPlanExcel);
|
||||
|
||||
long Busbarcount = rGeneralSurveyPlanDetails.stream ( ).
|
||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||
map (RGeneralSurveyPlanDetail::getBusbarId).distinct ( ).count ( );
|
||||
|
||||
long Subcount = rGeneralSurveyPlanDetails.stream ( ).
|
||||
filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))).
|
||||
map (RGeneralSurveyPlanDetail::getSubId).distinct ( ).count ( );
|
||||
surveyPlanExcel.setBusCount (Busbarcount);
|
||||
surveyPlanExcel.setSubCount (Subcount);
|
||||
surveyPlanExcel.setOrgNo (pvTerminalTreeVOMap.get (surveyPlanExcel.getOrgNo ()));
|
||||
surveyPlanExcels.add (surveyPlanExcel);
|
||||
});
|
||||
|
||||
return surveyPlanExcels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param questionQueryParm
|
||||
* @Description: querySurveyPlanOnQuestion
|
||||
* @Param: [questionQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/30
|
||||
*/
|
||||
@Override
|
||||
public List<RGeneralSurveyPlanDetailOnQuestionVO> querySurveyPlanOnQuestion(SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> rGeneralSurveyPlanDetailOnQuestionVOS = new ArrayList<> ();
|
||||
rGeneralSurveyPlanDetailOnQuestionVOS =rGeneralSurveyPlanDetailMapper.querySurveyPlanOnQuestion(questionQueryParm);
|
||||
|
||||
return rGeneralSurveyPlanDetailOnQuestionVOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param questionQueryParm
|
||||
* @Description: 更具questionQueryParm查计划名称
|
||||
* @Param: [questionQueryParm]
|
||||
* @return: java.util.List<com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm>
|
||||
* @Author: clam
|
||||
* @Date: 2022/12/1
|
||||
*/
|
||||
@Override
|
||||
public List<RGeneralSurveyPlanPO> querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
|
||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId (questionQueryParm.getOrgNo ()).getData ( );
|
||||
|
||||
QueryWrapper<RGeneralSurveyPlanPO> queryWrapper = new QueryWrapper<> ();
|
||||
queryWrapper.select ("plan_name").
|
||||
in ("org_no", data).
|
||||
eq ("DATE_FORMAT(upload_time, '%Y-%m')", new SimpleDateFormat ("yyyy-MM").
|
||||
format (questionQueryParm.getPlanStartTime ()));
|
||||
List<RGeneralSurveyPlanPO> list = this.list (queryWrapper);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件到Minio
|
||||
*
|
||||
* @param file 文件
|
||||
* @return 成功标记
|
||||
*/
|
||||
private MinIoUploadResDTO fileToMinio(MultipartFile file) {
|
||||
try {
|
||||
//把名称存入数据
|
||||
MinIoUploadResDTO upload = minIoUtils.upload(file, minIoProperties.getBucket(), "surveyresult/");
|
||||
return upload;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException (ProcessResponseEnum.UPLOAD_FILE_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ spring:
|
||||
shared-configs:
|
||||
- data-id: share-config.yaml
|
||||
refresh: true
|
||||
- data-Id: share-config-datasource-db.yaml
|
||||
- data-Id: process-config.yaml
|
||||
refresh: true
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
Reference in New Issue
Block a user