diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/controller/TerminalBaseController.java b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/controller/TerminalBaseController.java index 868027c89..3e1ffebe0 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/controller/TerminalBaseController.java +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/controller/TerminalBaseController.java @@ -76,11 +76,11 @@ public class TerminalBaseController extends BaseController { throw new BusinessException(DeviceResponseEnum.DEVICE_REPETITION); } //校验装置是否存在重复ip - List devIp = listDev.stream().map(DeviceParam::getIp).collect(Collectors.toList()); + /*List 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) { diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java index 93ac478d5..b062ef520 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/DeviceMapper.java @@ -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; @@ -30,7 +29,8 @@ public interface DeviceMapper extends BaseMapper { * @author cdf * @date 2022/12/26 */ - List getDeviceBySubId(@Param("subId") String subId,@Param("ip") String ip,@Param("port") Integer port); + List getDeviceBySubId(@Param("subId") String subId,@Param("ip") String ip,@Param("port") Integer port,@Param("devId")String devId); + /** * 获取监测点台账信息 diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml index d0c0d787e..b803a40fe 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/mapper/mapping/DeviceMapper.xml @@ -3,13 +3,16 @@ - 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} + + and a.id != #{devId} + diff --git a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/TerminalBaseServiceImpl.java b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/TerminalBaseServiceImpl.java index 0484eb4ea..ebc5679d8 100644 --- a/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/TerminalBaseServiceImpl.java +++ b/pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/TerminalBaseServiceImpl.java @@ -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 imple //用于记录装置id String devIdIndex; //监测点序号 - List listLineNum = Stream.of(1, 2, 3, 4, 5, 6).collect(Collectors.toList()); + List listLineNum = Stream.of(1, 2, 3, 4, 5, 6,7,8,9,10).collect(Collectors.toList()); //母线序号 - List listVoltageNum = Stream.of(1, 2, 3, 4, 5, 6).collect(Collectors.toList()); + List 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 imple } } - //一台装置母线最多6路 + //一台装置母线最多10路 if (StrUtil.isBlank(subVoltage.getSubvIndex())) { voltageNum++; } @@ -282,10 +280,10 @@ public class TerminalBaseServiceImpl extends ServiceImpl 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 imple throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_NAME, String.join(";", stringList)); } } - List devIpList = addTerminalParam.getDeviceParam().stream().filter((dev -> dev.getDevIndex() == null)).map(DeviceParam::getIp).collect(Collectors.toList()); + List devIpList = addTerminalParam.getDeviceParam().stream().filter((dev -> dev.getDevIndex() == null)).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(devIpList)) { - List deviceListIpRes = lineMapper.getDeviceBySubId(subIndex, devIpList); + for(DeviceParam deviceParam : devIpList){ + List 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 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 imple } //IP校验 - List devIpList = devList.stream() - .filter(item -> item.getUpdateFlag() == 1) - .map(DeviceParam::getIp).collect(Collectors.toList()); + List 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 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 imple throw new BusinessException(DeviceResponseEnum.DEVICE_SAME_NAME, "重复装置:" + String.join(";", repeatDevNames)); } //校验装置ip - List deviceIpList = lineMapper.getDeviceBySubIdForUpdate(deviceValid.getPid(), devIpList, devIndexList); - if (CollectionUtil.isNotEmpty(deviceIpList)) { - List 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 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 imple if (Objects.isNull(temp)) { temp = assembleLine(deviceName, LineBaseEnum.DEVICE_LEVEL.getCode(), pids.get(LineBaseEnum.SUB_LEVEL.getCode()), pids); this.baseMapper.insert(temp); - List existIp = deviceMapper.getDeviceBySubId(pids.get(LineBaseEnum.SUB_LEVEL.getCode()),oracleTerminalExcel.getIp(),oracleTerminalExcel.getPort()); + List 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())) { diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/constant/Param.java b/pqs-process/process-api/src/main/java/com/njcn/process/constant/Param.java new file mode 100644 index 000000000..42d3ad290 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/constant/Param.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/enums/ProcessResponseEnum.java b/pqs-process/process-api/src/main/java/com/njcn/process/enums/ProcessResponseEnum.java new file mode 100644 index 000000000..c9c6d818f --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/enums/ProcessResponseEnum.java @@ -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; + } +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/dto/PublicDTO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/dto/PublicDTO.java new file mode 100644 index 000000000..9136383c7 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/dto/PublicDTO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/AbnormalParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/AbnormalParam.java new file mode 100644 index 000000000..57cae98f9 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/AbnormalParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ComplaintParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ComplaintParam.java new file mode 100644 index 000000000..d446bb0ec --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ComplaintParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ExcessiveParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ExcessiveParam.java new file mode 100644 index 000000000..15bc8ad88 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ExcessiveParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/GeneralSurveyParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/GeneralSurveyParam.java new file mode 100644 index 000000000..5d0433819 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/GeneralSurveyParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/IssuesParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/IssuesParam.java new file mode 100644 index 000000000..a698dcab9 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/IssuesParam.java @@ -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; + + + + + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAUploadParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAUploadParam.java new file mode 100644 index 000000000..a0446a2d4 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAUploadParam.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAssociateParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAssociateParam.java new file mode 100644 index 000000000..5f68720b8 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserAssociateParam.java @@ -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; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserIUploadParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserIUploadParam.java new file mode 100644 index 000000000..b930bbf5b --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserIUploadParam.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserParam.java new file mode 100644 index 000000000..7bf3cdde4 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserParam.java @@ -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; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserSearchParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserSearchParam.java new file mode 100644 index 000000000..882c514b6 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/LoadTypeUserSearchParam.java @@ -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; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ProcessParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ProcessParam.java new file mode 100644 index 000000000..47c41ca7a --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/ProcessParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/PublicParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/PublicParam.java new file mode 100644 index 000000000..2de7fa48c --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/PublicParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/QueryIssuesParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/QueryIssuesParam.java new file mode 100644 index 000000000..f534e5e13 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/QueryIssuesParam.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java new file mode 100644 index 000000000..187c936b7 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanAddParm.java @@ -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; + @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; + + } + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java new file mode 100644 index 000000000..910f26724 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlanQueryParm.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java new file mode 100644 index 000000000..d32bb6154 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/RGeneralSurveyPlandetailQueryParm.java @@ -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; + + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java new file mode 100644 index 000000000..760e7432b --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyPlanQuestionQueryParm.java @@ -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; + + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java new file mode 100644 index 000000000..e9b7d4439 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/param/SurveyResultUploadParam.java @@ -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; + + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java new file mode 100644 index 000000000..2e503281f --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanDetail.java @@ -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; +} \ No newline at end of file diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java new file mode 100644 index 000000000..1c8ea8f29 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RGeneralSurveyPlanPO.java @@ -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; +} \ No newline at end of file diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RLoadTypeUserManage.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RLoadTypeUserManage.java new file mode 100644 index 000000000..5c62670a2 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RLoadTypeUserManage.java @@ -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; +} + diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpElectricQualityProblemFlowDetails.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpElectricQualityProblemFlowDetails.java new file mode 100644 index 000000000..02914eedf --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpElectricQualityProblemFlowDetails.java @@ -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; + +/** + *

+ * 电能质量问题流程详情表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpGeneralSurveyOverproofProblem.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpGeneralSurveyOverproofProblem.java new file mode 100644 index 000000000..2ccd33bfd --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpGeneralSurveyOverproofProblem.java @@ -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; + +/** + *

+ * 普测超标问题详情表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOnlineMonitorOverproofProblem.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOnlineMonitorOverproofProblem.java new file mode 100644 index 000000000..1d5d22b09 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOnlineMonitorOverproofProblem.java @@ -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; + +/** + *

+ * 在线监测超标问题详情表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOperationMonitorAbnormal.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOperationMonitorAbnormal.java new file mode 100644 index 000000000..4149a32b0 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpOperationMonitorAbnormal.java @@ -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; + +/** + *

+ * 运维监控异常详情表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpUserComplaint.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpUserComplaint.java new file mode 100644 index 000000000..7cec190a8 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RMpUserComplaint.java @@ -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; + +/** + *

+ * 用户投诉详情表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RStatElectricQualityProblemFlow.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RStatElectricQualityProblemFlow.java new file mode 100644 index 000000000..079fd3ada --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/RStatElectricQualityProblemFlow.java @@ -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; + +/** + *

+ * 电能质量问题流程表 + *

+ * + * @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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/AbnormalVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/AbnormalVO.java new file mode 100644 index 000000000..a25a3f95b --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/AbnormalVO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ComplaintVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ComplaintVO.java new file mode 100644 index 000000000..c0cc56635 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ComplaintVO.java @@ -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; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ExcessiveDetailVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ExcessiveDetailVO.java new file mode 100644 index 000000000..c1b1a424d --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ExcessiveDetailVO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/FlowDetailVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/FlowDetailVO.java new file mode 100644 index 000000000..3c7de4018 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/FlowDetailVO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/GeneralSurveyVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/GeneralSurveyVO.java new file mode 100644 index 000000000..363ac8e4c --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/GeneralSurveyVO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/IssuesVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/IssuesVO.java new file mode 100644 index 000000000..e95f6678a --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/IssuesVO.java @@ -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; + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeRelationExcel.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeRelationExcel.java new file mode 100644 index 000000000..9ebb6a012 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeRelationExcel.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeUserExcel.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeUserExcel.java new file mode 100644 index 000000000..5174a201d --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/LoadTypeUserExcel.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ProcessVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ProcessVO.java new file mode 100644 index 000000000..aefc3ef75 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/ProcessVO.java @@ -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; +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanDetailOnQuestionVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanDetailOnQuestionVO.java new file mode 100644 index 000000000..fe5ac18bf --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanDetailOnQuestionVO.java @@ -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; + + +} \ No newline at end of file diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java new file mode 100644 index 000000000..401cf8feb --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RGeneralSurveyPlanVO.java @@ -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 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; + + } + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RLoadTypeUserManageVO.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RLoadTypeUserManageVO.java new file mode 100644 index 000000000..bdbf6b784 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/RLoadTypeUserManageVO.java @@ -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; + +} + diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java new file mode 100644 index 000000000..15e4a2a3c --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java @@ -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; + + +} diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/utils/PublicDataUtils.java b/pqs-process/process-api/src/main/java/com/njcn/process/utils/PublicDataUtils.java new file mode 100644 index 000000000..cb9881f82 --- /dev/null +++ b/pqs-process/process-api/src/main/java/com/njcn/process/utils/PublicDataUtils.java @@ -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/etc/timezone diff --git a/pqs-process/process-boot/pom.xml b/pqs-process/process-boot/pom.xml index ac86c0a17..3a8227bf2 100644 --- a/pqs-process/process-boot/pom.xml +++ b/pqs-process/process-boot/pom.xml @@ -21,7 +21,7 @@ com.njcn - prepare-api + process-api ${project.version} @@ -60,11 +60,48 @@ event-api ${project.version} + + com.njcn common-minio ${project.version} + + + me.tongfei + progressbar + 0.5.3 + + + + com.squareup.okhttp3 + okhttp + 4.8.1 + + + + io.minio + minio + 8.2.1 + + + com.squareup.okhttp3 + okhttp + + + + + com.github.jeffreyning + mybatisplus-plus + 1.5.1-RELEASE + compile + + + com.belerweb + pinyin4j + 2.5.1 + @@ -91,38 +128,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + com.spotify + docker-maven-plugin + 1.0.0 + + + build-image + ${docker.operate} + + build + + + + + + http://${docker.repostory} + + ${docker.repostory}/${docker.registry.name}/${project.artifactId} + + latest + + ${docker.url} + ${basedir}/ + + + /ROOT + ${project.build.directory} + ${project.build.finalName}.jar + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/ProcessApplication.java b/pqs-process/process-boot/src/main/java/com/njcn/process/ProcessApplication.java index 494de5864..77b88204b 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/ProcessApplication.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/ProcessApplication.java @@ -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) { diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/ElectricityQualityIssuesController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/ElectricityQualityIssuesController.java new file mode 100644 index 000000000..027e5b3a1 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/ElectricityQualityIssuesController.java @@ -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 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 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 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 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> getIssues(@RequestBody @Validated QueryIssuesParam queryIssuesParam){ + String methodDescribe = getMethodDescribe("getIssues"); + Page 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 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 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 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 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 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 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 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 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 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 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 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 deleteIssues(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){ + String methodDescribe = getMethodDescribe("deleteIssues"); + issuesService.deleteIssues(powerQualityProblemNo); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/LoadTypeUserManageController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/LoadTypeUserManageController.java new file mode 100644 index 000000000..e208c591a --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/LoadTypeUserManageController.java @@ -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> getLoadTypeUserList(@RequestBody @Validated LoadTypeUserSearchParam loadTypeUserSearchParam){ + String methodDescribe = getMethodDescribe("getLoadTypeUserList"); + Page 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 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 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 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 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 exportLoadTypeUserList(HttpServletResponse response, @RequestBody List list) { + String methodDescribe = getMethodDescribe("exportLoadTypeUserList"); + String fileName = "未建档干扰源用户管理信息.xls"; + List 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> getLoadTypeRelationList(@RequestBody @Validated LoadTypeUserSearchParam loadTypeUserSearchParam){ + String methodDescribe = getMethodDescribe("getLoadTypeRelationList"); + Page 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 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 exportLoadTypeRelationList(HttpServletResponse response, @RequestBody List list) { + String methodDescribe = getMethodDescribe("exportLoadTypeRelationList"); + String fileName = "导出干扰源用户常态化管理信息.xls"; + List 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; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java new file mode 100644 index 000000000..db147ae3f --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/RGeneralSurveyPlanController.java @@ -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 + * @Author: clam + * @Date: 2022/11/22 + */ + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/addPlan") + @ApiOperation("新增/修改普测计划") + @ApiImplicitParam(name = "rGeneralSurveyPlanAddParm", value = "新增普测计划参数", required = true) + public HttpResult 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> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ + String methodDescribe = getMethodDescribe("queryPlan"); + + IPage 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> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ + String methodDescribe = getMethodDescribe("queryPlanAudit"); + + IPage 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> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){ + String methodDescribe = getMethodDescribe("queryPlanResult"); + + IPage 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> queryPlandetail(@Validated @RequestBody RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm){ + String methodDescribe = getMethodDescribe("queryPlandetail"); + + IPage 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 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> surveyResultDownload(@RequestParam("planNo") String planNo ){ + String methodDescribe = getMethodDescribe("surveyResultDownload"); + List downloadUrls = rGeneralSurveyPlanPOService.surveyResultDownload(planNo); + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, downloadUrls, methodDescribe); + + } + + @ResponseBody + @ApiOperation("导出普测计划信息") + @PostMapping(value = "exportSurveyPlan") + @ApiImplicitParam(name = "planIdList", value = "普测计划详情查询参数", required = true) + public HttpResult exportSurveyPlan(HttpServletResponse response,@RequestBody List planIdList) { + String methodDescribe = getMethodDescribe("exportSurveyPlan"); + String fileName = "普测计划信息.xls"; + List 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> querySurveyPlanOnQuestion(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) { + String methodDescribe = getMethodDescribe("querySurveyPlanOnQuestion"); + + List list= rGeneralSurveyPlanPOService.querySurveyPlanOnQuestion(questionQueryParm); + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + + } + + @ResponseBody + @ApiOperation("普测计划名称查询") + @PostMapping(value = "querySurveyPlanName") + @ApiImplicitParam(name = "questionQueryParm", value = "普测计划名称查询参数", required = true) + public HttpResult> querySurveyPlanName(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) { + String methodDescribe = getMethodDescribe("querySurveyPlanName"); + + List list= rGeneralSurveyPlanPOService.querySurveyPlanName(questionQueryParm); + + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe); + + } + + + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/LoadTypeUserManageMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/LoadTypeUserManageMapper.java new file mode 100644 index 000000000..dc1f53c25 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/LoadTypeUserManageMapper.java @@ -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 { + + /** + * 干扰源用户分页查询 + * @param page 分页参数 + * @param loadTypeUserSearchParam 入参 + * @return 结果 + */ + Page getLoadTypeUserPage(IPage page, @Param("loadTypeUserSearchParam") LoadTypeUserSearchParam loadTypeUserSearchParam); + + /** + * 干扰源用户分页查询 + * @param page 分页参数 + * @param loadTypeUserSearchParam 入参 + * @return 结果 + */ + Page getLoadTypeRelationPage(IPage page, @Param("loadTypeUserSearchParam") LoadTypeUserSearchParam loadTypeUserSearchParam); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java new file mode 100644 index 000000000..816ad606b --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanDetailMapper.java @@ -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 { + @Select ({""}) + List querySurveyPlanOnQuestion(@Param("questionQueryParm") SurveyPlanQuestionQueryParm questionQueryParm); +} \ No newline at end of file diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanPOMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanPOMapper.java new file mode 100644 index 000000000..f9dfbc9ed --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RGeneralSurveyPlanPOMapper.java @@ -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 { + +} \ No newline at end of file diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpElectricQualityProblemFlowDetailsMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpElectricQualityProblemFlowDetailsMapper.java new file mode 100644 index 000000000..9956401f0 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpElectricQualityProblemFlowDetailsMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.RMpElectricQualityProblemFlowDetails; + +/** + *

+ * 电能质量问题流程详情表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RMpElectricQualityProblemFlowDetailsMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpGeneralSurveyOverproofProblemMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpGeneralSurveyOverproofProblemMapper.java new file mode 100644 index 000000000..2de56b09a --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpGeneralSurveyOverproofProblemMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.RMpGeneralSurveyOverproofProblem; + +/** + *

+ * 普测超标问题详情表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RMpGeneralSurveyOverproofProblemMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOnlineMonitorOverproofProblemMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOnlineMonitorOverproofProblemMapper.java new file mode 100644 index 000000000..d9bf51448 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOnlineMonitorOverproofProblemMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.RMpOnlineMonitorOverproofProblem; + +/** + *

+ * 在线监测超标问题详情表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RMpOnlineMonitorOverproofProblemMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOperationMonitorAbnormalMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOperationMonitorAbnormalMapper.java new file mode 100644 index 000000000..173c32b90 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpOperationMonitorAbnormalMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.RMpOperationMonitorAbnormal; + +/** + *

+ * 运维监控异常详情表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RMpOperationMonitorAbnormalMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpUserComplaintMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpUserComplaintMapper.java new file mode 100644 index 000000000..d6b13e2ad --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RMpUserComplaintMapper.java @@ -0,0 +1,16 @@ +package com.njcn.process.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.njcn.process.pojo.po.RMpUserComplaint; + +/** + *

+ * 用户投诉详情表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RMpUserComplaintMapper extends BaseMapper { + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RStatElectricQualityProblemFlowMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RStatElectricQualityProblemFlowMapper.java new file mode 100644 index 000000000..413daba31 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/RStatElectricQualityProblemFlowMapper.java @@ -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; + +/** + *

+ * 电能质量问题流程表 Mapper 接口 + *

+ * + * @author xiaoyao + * @since 2022-11-14 + */ +public interface RStatElectricQualityProblemFlowMapper extends BaseMapper { + + List getIssues(@Param("param") QueryIssuesParam param, @Param("dateBegin") String dateBegin, @Param("dateEnd") String dateEnd); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/LoadTypeUserManageMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/LoadTypeUserManageMapper.xml new file mode 100644 index 000000000..2677ffd5d --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/LoadTypeUserManageMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanDetailMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanDetailMapper.xml new file mode 100644 index 000000000..ed402a7ab --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanDetailMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanPOMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanPOMapper.xml new file mode 100644 index 000000000..9b366b75f --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RGeneralSurveyPlanPOMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpElectricQualityProblemFlowDetailsMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpElectricQualityProblemFlowDetailsMapper.xml new file mode 100644 index 000000000..d26e25b2e --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpElectricQualityProblemFlowDetailsMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpGeneralSurveyOverproofProblemMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpGeneralSurveyOverproofProblemMapper.xml new file mode 100644 index 000000000..2797ded3d --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpGeneralSurveyOverproofProblemMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOnlineMonitorOverproofProblemMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOnlineMonitorOverproofProblemMapper.xml new file mode 100644 index 000000000..ad46d6226 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOnlineMonitorOverproofProblemMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOperationMonitorAbnormalMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOperationMonitorAbnormalMapper.xml new file mode 100644 index 000000000..d22c56eb9 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpOperationMonitorAbnormalMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpUserComplaintMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpUserComplaintMapper.xml new file mode 100644 index 000000000..008feda94 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RMpUserComplaintMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RStatElectricQualityProblemFlowMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RStatElectricQualityProblemFlowMapper.xml new file mode 100644 index 000000000..afdfbc2eb --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/RStatElectricQualityProblemFlowMapper.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/IssuesService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/IssuesService.java new file mode 100644 index 000000000..8eb53d01f --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/IssuesService.java @@ -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 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); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/LoadTypeUserManageService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/LoadTypeUserManageService.java new file mode 100644 index 000000000..d9c398024 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/LoadTypeUserManageService.java @@ -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 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 getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam); + + /** + * 上传干扰源用户实测报告 + * @param loadTypeUserAUploadParam + * @return + */ + boolean uploadLoadTypeUserA(LoadTypeUserAUploadParam loadTypeUserAUploadParam); + + /** + * 导出未建档干扰源用户管理信息 + * @param list + * @return + */ + List exportLoadTypeUserList(List list); + + /** + * 导出干扰源用户常态化管理信息 + * @param list + * @return + */ + List exportLoadTypeRelationList(List list); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanDetailService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanDetailService.java new file mode 100644 index 000000000..aa8ee0018 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanDetailService.java @@ -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 { + + /** + * @Description: 根据planNO查询普测计划详情 + * @Param: [rGeneralSurveyPlandetailQueryParm] + * @return: com.baomidou.mybatisplus.core.metadata.IPage + * @Author: clam + * @Date: 2022/11/15 + */ + IPage queryPlandetail(RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java new file mode 100644 index 000000000..c345a1a5a --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/RGeneralSurveyPlanPOService.java @@ -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{ + + /** + * @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 + * @Author: clam + * @Date: 2022/11/15 + */ + IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List 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 + * @Author: clam + * @Date: 2022/11/18 + */ + List surveyResultDownload(String planNo); + /** + * @Description: exportSurveyPlan + * @Param: [] + * @return: java.util.List + * @Author: clam + * @Date: 2022/11/21 + */ + List exportSurveyPlan(List planIdList); + /** + * @Description: querySurveyPlanOnQuestion + * @Param: [questionQueryParm] + * @return: java.util.List + * @Author: clam + * @Date: 2022/11/30 + */ + List querySurveyPlanOnQuestion(SurveyPlanQuestionQueryParm questionQueryParm); + /** + * @Description: 更具questionQueryParm查计划名称 + * @Param: [questionQueryParm] + * @return: java.util.List + * @Author: clam + * @Date: 2022/12/1 + */ + List querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm); +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/IssuesServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/IssuesServiceImpl.java new file mode 100644 index 000000000..3a468ced1 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/IssuesServiceImpl.java @@ -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 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 getIssues(QueryIssuesParam param) { + Page 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 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 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> partition = Lists.partition(out, param.getPageSize()); + List issuesVOS = partition.get(param.getPageNum() - 1); + page.setRecords(issuesVOS); + } + return page; + } + + /** + * 问题基本信息查询 + */ + private RStatElectricQualityProblemFlow issuesSelectOne(String powerQualityProblemNo){ + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,powerQualityProblemNo); + return issuesMapper.selectOne(issuesQuery); + } + + /** + * 填报流程详情查询 + */ + private RMpElectricQualityProblemFlowDetails flowDetailSelectOne(String powerQualityProblemNo){ + LambdaQueryWrapper 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 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 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 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 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 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 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 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 issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,processParam.getPowerQualityProblemNo()); + RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(issuesQuery); + if (DicDataEnum.SUCCESS.getCode().equals(issuesOut.getReportProcessStatus())){ + LambdaQueryWrapper 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 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 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 query = new LambdaQueryWrapper<>(); + query.eq(RStatElectricQualityProblemFlow::getPowerQualityProblemNo,powerQualityProblemNo); + RStatElectricQualityProblemFlow issuesOut = issuesMapper.selectOne(query); + if (DicDataEnum.ONLINE.getCode().equals(issuesOut.getProblemSources())){ + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RMpOnlineMonitorOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo); + excessiveMapper.delete(issuesQuery); + }else if (DicDataEnum.GENERAL.getCode().equals(issuesOut.getProblemSources())){ + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RMpGeneralSurveyOverproofProblem::getPowerQualityProblemNo,powerQualityProblemNo); + generalSurveyMapper.delete(issuesQuery); + }else if (DicDataEnum.USER_COMPLAINTS.getCode().equals(issuesOut.getProblemSources())){ + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RMpUserComplaint::getPowerQualityProblemNo,powerQualityProblemNo); + complaintMapper.delete(issuesQuery); + }else if (DicDataEnum.DEV_EXCEPTION.getCode().equals(issuesOut.getProblemSources())){ + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RMpOperationMonitorAbnormal::getPowerQualityProblemNo,powerQualityProblemNo); + abnormalMapper.delete(issuesQuery); + } + LambdaQueryWrapper issuesQuery = new LambdaQueryWrapper<>(); + issuesQuery.eq(RMpElectricQualityProblemFlowDetails::getPowerQualityProblemNo,powerQualityProblemNo); + flowDetailsMapper.delete(issuesQuery); + issuesMapper.delete(query); + } + +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/LoadTypeUserManageServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/LoadTypeUserManageServiceImpl.java new file mode 100644 index 000000000..70b1d97b0 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/LoadTypeUserManageServiceImpl.java @@ -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 getLoadTypeUserList(LoadTypeUserSearchParam loadTypeUserSearchParam){ + Page page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize()); + Page loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeUserPage(page, loadTypeUserSearchParam); + + //部门处理:根据部门code取名称 + List list = loadTypeUserPage.getRecords(); + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO)); + List 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 getLoadTypeRelationList(LoadTypeUserSearchParam loadTypeUserSearchParam) { + Page page = new Page<>(loadTypeUserSearchParam.getPageNum(), loadTypeUserSearchParam.getPageSize()); + Page loadTypeUserPage = loadTypeUserManageMapper.getLoadTypeRelationPage(page,loadTypeUserSearchParam); + + //部门处理:根据部门code取名称 + List list = loadTypeUserPage.getRecords(); + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO)); + List 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 exportLoadTypeUserList(List list) { + //数据处理 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> (); + queryWrapper.in(RLoadTypeUserManage::getId, list); + List rLoadTypeUserManages = loadTypeUserManageMapper.selectList(queryWrapper); + //1、部门数据 + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO)); + + //2、取干扰源类型 + List loadTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INTERFERENCE_SOURCE.getCode()).getData(); + Map loadTypeMap = loadTypeList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData)); + + //3、取入网报告状态 + List iStatusList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ON_NETWORK_STATUS.getCode()).getData(); + Map iStatusMap = iStatusList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData)); + + List 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 exportLoadTypeRelationList(List list) { + //数据处理 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> (); + queryWrapper.in(RLoadTypeUserManage::getId, list); + List rLoadTypeUserManages = loadTypeUserManageMapper.selectList(queryWrapper); + //1、部门数据 + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, pvTerminalTreeVO -> pvTerminalTreeVO)); + + //2、取干扰源类型 + List loadTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INTERFERENCE_SOURCE.getCode()).getData(); + Map loadTypeMap = loadTypeList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData)); + + //3、取实测报告状态 + List aStatusList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ON_NETWORK_STATUS.getCode()).getData(); + Map aStatusMap = aStatusList.stream().collect(Collectors.toMap(DictData::getId, dictData -> dictData)); + + List 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; + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanDetailServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanDetailServiceImpl.java new file mode 100644 index 000000000..2a5bee0c3 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanDetailServiceImpl.java @@ -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 implements RGeneralSurveyPlanDetailService{ + + + private @Autowired + RGeneralSurveyPlanDetailMapper rGeneralSurveyPlanDetailMapper; + /** + * @param rGeneralSurveyPlandetailQueryParm + * @Description: 根据planNO查询普测计划详情 + * @Param: [rGeneralSurveyPlandetailQueryParm] + * @return: com.baomidou.mybatisplus.core.metadata.IPage + * @Author: clam + * @Date: 2022/11/15 + */ + @Override + public IPage queryPlandetail(RGeneralSurveyPlandetailQueryParm rGeneralSurveyPlandetailQueryParm) { + + IPage page = new Page<> (rGeneralSurveyPlandetailQueryParm.getCurrentPage(), rGeneralSurveyPlandetailQueryParm.getPageSize()); + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<> (); + lambdaQueryWrapper.eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlandetailQueryParm.getPlanNo ()); + IPage rGeneralSurveyPlanDetailIPage = rGeneralSurveyPlanDetailMapper.selectPage (page, lambdaQueryWrapper); + + return rGeneralSurveyPlanDetailIPage.convert (temp-> BeanUtil.copyProperties (temp, RGeneralSurveyPlanVO.RGeneralSurveyPlanDetailVO.class)); + + } +} diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java new file mode 100644 index 000000000..65a458745 --- /dev/null +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java @@ -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 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 rGeneralSurveyPlanDetailAddParm = rGeneralSurveyPlanAddParm.getRGeneralSurveyPlanDetailAddParm ( ); + QueryWrapper queryWrapper = new QueryWrapper (); + queryWrapper.lambda ().eq (RGeneralSurveyPlanDetail::getPlanNo, rGeneralSurveyPlanAddParm.getPlanNo ()); + rGeneralSurveyPlanDetailService.remove (queryWrapper); + List 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 + * @Author: clam + * @Date: 2022/11/15 + */ + @Override + public IPage query(RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm,List statusList ) { + IPage page = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize()); + IPage returnpage = new Page<> (rGeneralSurveyPlanQueryParm.getCurrentPage(), rGeneralSurveyPlanQueryParm.getPageSize()); + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> (); + if (!StringUtils.isEmpty (rGeneralSurveyPlanQueryParm.getOrgNo ())) { + List 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 rGeneralSurveyPlanPOS = rGeneralSurveyPlanPOMapper.selectPage (page,queryWrapper).getRecords (); + if(CollectionUtils.isEmpty (rGeneralSurveyPlanPOS)){ + return returnpage; + } + + //部门处理:根据部门code取名称 + List dept = deptFeignClient.allDeptList().getData(); + Map pvTerminalTreeVOMap = dept.stream(). + collect(Collectors. + toMap(PvTerminalTreeVO::getId, + PvTerminalTreeVO::getName)); + + + List collect = rGeneralSurveyPlanPOS.stream ( ).map (RGeneralSurveyPlanPO::getPlanNo).collect (Collectors.toList ( )); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<> (); + lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, collect); + List rGeneralSurveyPlanDetails = rGeneralSurveyPlanDetailMapper.selectList (lambdaQueryWrapper); + List 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 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 + * @Author: clam + * @Date: 2022/11/18 + */ + @Override + public List 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 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 + * @Author: clam + * @Date: 2022/11/21 + */ + @Override + public List exportSurveyPlan(List planIdList) { + List surveyPlanExcels = new ArrayList<> (); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<> (); + queryWrapper.in (RGeneralSurveyPlanPO::getPlanNo,planIdList); + List rGeneralSurveyPlanPOS = rGeneralSurveyPlanPOMapper.selectList (queryWrapper); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<> (); + lambdaQueryWrapper.in (RGeneralSurveyPlanDetail::getPlanNo, planIdList); + List rGeneralSurveyPlanDetails = rGeneralSurveyPlanDetailMapper.selectList (lambdaQueryWrapper); + + //部门处理:根据部门code取名称 + List dept = deptFeignClient.allDeptList().getData(); + Map 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 + * @Author: clam + * @Date: 2022/11/30 + */ + @Override + public List querySurveyPlanOnQuestion(SurveyPlanQuestionQueryParm questionQueryParm) { + List rGeneralSurveyPlanDetailOnQuestionVOS = new ArrayList<> (); + rGeneralSurveyPlanDetailOnQuestionVOS =rGeneralSurveyPlanDetailMapper.querySurveyPlanOnQuestion(questionQueryParm); + + return rGeneralSurveyPlanDetailOnQuestionVOS; + } + + /** + * @param questionQueryParm + * @Description: 更具questionQueryParm查计划名称 + * @Param: [questionQueryParm] + * @return: java.util.List + * @Author: clam + * @Date: 2022/12/1 + */ + @Override + public List querySurveyPlanName(SurveyPlanQuestionQueryParm questionQueryParm) { + + List data = deptFeignClient.getDepSonIdtByDeptId (questionQueryParm.getOrgNo ()).getData ( ); + + QueryWrapper 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 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); + } + } +} diff --git a/pqs-process/process-boot/src/main/resources/bootstrap.yml b/pqs-process/process-boot/src/main/resources/bootstrap.yml index 61a5f15e8..fc483810b 100644 --- a/pqs-process/process-boot/src/main/resources/bootstrap.yml +++ b/pqs-process/process-boot/src/main/resources/bootstrap.yml @@ -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