表单提交
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package com.njcn.oss.utils;
|
package com.njcn.oss.utils;
|
||||||
|
|
||||||
import cn.hutool.core.text.CharPool;
|
|
||||||
import cn.hutool.core.text.StrPool;
|
|
||||||
import com.njcn.common.config.GeneralInfo;
|
import com.njcn.common.config.GeneralInfo;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.huawei.obs.util.OBSUtil;
|
import com.njcn.huawei.obs.util.OBSUtil;
|
||||||
@@ -21,9 +19,11 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -81,6 +81,31 @@ public class FileStorageUtil {
|
|||||||
return filePath;
|
return filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 上传MultipartFile文件,
|
||||||
|
* @author hongawen
|
||||||
|
* @date 2023/3/7 22:48
|
||||||
|
* @param multipartFile 文件源
|
||||||
|
* @param dir 服务器文件存放路径
|
||||||
|
* @param flag 是否保留原始文件名
|
||||||
|
*/
|
||||||
|
public String uploadMultipart(MultipartFile multipartFile, String dir,boolean flag) {
|
||||||
|
String filePath;
|
||||||
|
if (generalInfo.getBusinessFileStorage() == GeneralConstant.HUAWEI_OBS) {
|
||||||
|
filePath = dir + minIoUtils.minFileName(multipartFile.getOriginalFilename());
|
||||||
|
obsUtil.uploadMultipart(multipartFile, filePath);
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
//把名称存入数据
|
||||||
|
MinIoUploadResDTO minIoUploadResDTO = minIoUtils.upload(multipartFile, minIossProperties.getBucket(), dir,flag);
|
||||||
|
filePath = minIoUploadResDTO.getMinFileName();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BusinessException(OssResponseEnum.UPLOAD_FILE_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 上传InputStream流,
|
* 上传InputStream流,
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.user;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/10 18:16【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SupervisionDevMainReportParam {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报人
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "填报人")
|
||||||
|
private String reporter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报日期
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "填报日期")
|
||||||
|
private LocalDate reportDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报部门
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "填报部门")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程预期投产日期
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工程预期投产日期")
|
||||||
|
private LocalDate expectedProductionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属地市
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属地市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户状态
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户状态")
|
||||||
|
private String userStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户名称")
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收检验报告
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "验收检验报告")
|
||||||
|
private String acceptanceInspectionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收检验报告单
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "验收检验报告单")
|
||||||
|
private String acceptanceInspectionReportSingle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 型式实验报告
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "型式实验报告")
|
||||||
|
private String typeExperimentReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂检验报告
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "出厂检验报告")
|
||||||
|
private String factoryInspectionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性能检测报告
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "性能检测报告")
|
||||||
|
private String performanceTestReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息安全检测报告
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "信息安全检测报告")
|
||||||
|
private String informationSecurityTestReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他附件
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "其他附件")
|
||||||
|
private String otherAttachments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例的编号")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("发起人自选审批人 Map")
|
||||||
|
private Map<String, List<String>> startUserSelectAssignees;
|
||||||
|
|
||||||
|
private SupervisionTempDeviceReportParam supervisionTempDeviceReportParam;
|
||||||
|
|
||||||
|
private SupervisionTempLineReportParam supervisionTempLineReportParam;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class SupervisionDevMainReportParamUpdate extends SupervisionDevMainReportParam {
|
||||||
|
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
private String Id;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.user;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@ApiModel(description="临时台账信息")
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SupervisionTempDeviceReportParam {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属供电公司
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="所属供电公司")
|
||||||
|
private String powerCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属变电站
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="所属变电站")
|
||||||
|
private String substation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站电压等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="变电站电压等级")
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测终端编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测终端编码")
|
||||||
|
private String monitoringTerminalCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测终端名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测终端名称")
|
||||||
|
private String monitoringTerminalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压互感器类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="电压互感器类型")
|
||||||
|
private String voltageTransformerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端接线方式类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="终端接线方式类型")
|
||||||
|
private String terminalWiringMethodType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中性点接线方式
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="中性点接线方式")
|
||||||
|
private String neutralPointWiringMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家设备编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="厂家设备编号")
|
||||||
|
private String manufacturerDeviceNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端IP
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="终端IP")
|
||||||
|
private String terminalIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="终端型号")
|
||||||
|
private String terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 端口
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="端口")
|
||||||
|
private String terminalPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属前置机
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="所属前置机")
|
||||||
|
private String frontEndMachine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次终端检测时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="本次终端检测时间")
|
||||||
|
private LocalDateTime currentTerminalDetectionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下次终端定检时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="下次终端定检时间")
|
||||||
|
private LocalDateTime nextTerminalInspectionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 识别码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="识别码")
|
||||||
|
private String identificationCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端秘钥
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="终端秘钥")
|
||||||
|
private String terminalSecretKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="经度")
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="纬度")
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端模型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="终端模型")
|
||||||
|
private String terminalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="数据类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="通讯状态")
|
||||||
|
private String communicationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SIM卡号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="SIM卡号")
|
||||||
|
private String simCardNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投运时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="投运时间")
|
||||||
|
private LocalDateTime commissioningTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="数据更新时间")
|
||||||
|
private LocalDateTime dataUpdateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对时功能
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="对时功能")
|
||||||
|
private String timeSyncFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电镀功能
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="电镀功能")
|
||||||
|
private String electroplatingFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测装置安装位置
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测装置安装位置")
|
||||||
|
private String monitoringDeviceInstallationPosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 召换标志
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="召换标志")
|
||||||
|
private String summonFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警功能
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="告警功能")
|
||||||
|
private String alarmFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="合同号")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
package com.njcn.supervision.pojo.param.user;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@ApiModel(description="临时监测点信息")
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class SupervisionTempLineReportParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点电压等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点电压等级")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接入母线
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="接入母线")
|
||||||
|
private String connectedBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短路容量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="短路容量")
|
||||||
|
private Float shortCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协议容量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="协议容量")
|
||||||
|
private Float dealCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备容量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="设备容量")
|
||||||
|
private Float devCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基准容量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="基准容量")
|
||||||
|
private Float standardCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CT变比
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="CT变比")
|
||||||
|
private Float ctRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PT变比
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="PT变比")
|
||||||
|
private Float ptRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点编号")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量间隔
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="测量间隔")
|
||||||
|
private Integer timeInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="干扰源类型")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="干扰源类别")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点性质
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点性质")
|
||||||
|
private String pointNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否参与统计
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="是否参与统计")
|
||||||
|
private Boolean isStatistical;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点对象名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点对象名称")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧变电站
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="电网侧变电站")
|
||||||
|
private String powerSubstationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否并网点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="是否并网点")
|
||||||
|
private Boolean isGridConnectionPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点运行状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="监测点运行状态")
|
||||||
|
private String operationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主接线图
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="主接线图")
|
||||||
|
private String mainWiringDiagram;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差上限
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="电压偏差上限")
|
||||||
|
private Float voltageDeviationUpperLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差下限
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="电压偏差下限")
|
||||||
|
private Float voltageDeviationLowerLimit;
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/10 18:16【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_dev_main_report")
|
||||||
|
public class SupervisionDevMainReportPO extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报人
|
||||||
|
*/
|
||||||
|
@TableField(value = "reporter")
|
||||||
|
private String reporter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "report_date")
|
||||||
|
private LocalDate reportDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 填报部门
|
||||||
|
*/
|
||||||
|
@TableField(value = "org_id")
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程预期投产日期
|
||||||
|
*/
|
||||||
|
@TableField(value = "expected_production_date")
|
||||||
|
private LocalDate expectedProductionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属地市
|
||||||
|
*/
|
||||||
|
@TableField(value = "city")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_status")
|
||||||
|
private String userStatus;
|
||||||
|
/**
|
||||||
|
* 关联用户id
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "user_name")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收检验报告
|
||||||
|
*/
|
||||||
|
@TableField(value = "acceptance_inspection_report")
|
||||||
|
private String acceptanceInspectionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收检验报告单
|
||||||
|
*/
|
||||||
|
@TableField(value = "acceptance_inspection_report_single")
|
||||||
|
private String acceptanceInspectionReportSingle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 型式实验报告
|
||||||
|
*/
|
||||||
|
@TableField(value = "type_experiment_report")
|
||||||
|
private String typeExperimentReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出厂检验报告
|
||||||
|
*/
|
||||||
|
@TableField(value = "factory_inspection_report")
|
||||||
|
private String factoryInspectionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性能检测报告
|
||||||
|
*/
|
||||||
|
@TableField(value = "performance_test_report")
|
||||||
|
private String performanceTestReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信息安全检测报告
|
||||||
|
*/
|
||||||
|
@TableField(value = "information_security_test_report")
|
||||||
|
private String informationSecurityTestReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他附件
|
||||||
|
*/
|
||||||
|
@TableField(value = "other_attachments")
|
||||||
|
private String otherAttachments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "process_instance_id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
|
*/
|
||||||
|
@TableField(value = "`status`")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
@TableField(value = "`State`")
|
||||||
|
private Integer state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_temp_device_report")
|
||||||
|
public class SupervisionTempDeviceReport {
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属供电公司
|
||||||
|
*/
|
||||||
|
@TableField(value = "power_company")
|
||||||
|
private String powerCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属变电站
|
||||||
|
*/
|
||||||
|
@TableField(value = "substation")
|
||||||
|
private String substation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站电压等级
|
||||||
|
*/
|
||||||
|
@TableField(value = "substation_voltage_level")
|
||||||
|
private String substationVoltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测终端编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "monitoring_terminal_code")
|
||||||
|
private String monitoringTerminalCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测终端名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "monitoring_terminal_name")
|
||||||
|
private String monitoringTerminalName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压互感器类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "voltage_transformer_type")
|
||||||
|
private String voltageTransformerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端接线方式类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_wiring_method_type")
|
||||||
|
private String terminalWiringMethodType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中性点接线方式
|
||||||
|
*/
|
||||||
|
@TableField(value = "neutral_point_wiring_method")
|
||||||
|
private String neutralPointWiringMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家
|
||||||
|
*/
|
||||||
|
@TableField(value = "manufacturer")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂家设备编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "manufacturer_device_number")
|
||||||
|
private String manufacturerDeviceNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端IP
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_ip")
|
||||||
|
private String terminalIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端型号
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_type")
|
||||||
|
private String terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 端口
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_port")
|
||||||
|
private String terminalPort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属前置机
|
||||||
|
*/
|
||||||
|
@TableField(value = "front_end_machine")
|
||||||
|
private String frontEndMachine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次终端检测时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "current_terminal_detection_time")
|
||||||
|
private LocalDateTime currentTerminalDetectionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下次终端定检时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "next_terminal_inspection_time")
|
||||||
|
private LocalDateTime nextTerminalInspectionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 识别码
|
||||||
|
*/
|
||||||
|
@TableField(value = "identification_code")
|
||||||
|
private String identificationCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端秘钥
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_secret_key")
|
||||||
|
private String terminalSecretKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
@TableField(value = "longitude")
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
@TableField(value = "latitude")
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 终端模型
|
||||||
|
*/
|
||||||
|
@TableField(value = "terminal_model")
|
||||||
|
private String terminalModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "data_type")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "communication_status")
|
||||||
|
private String communicationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SIM卡号
|
||||||
|
*/
|
||||||
|
@TableField(value = "sim_card_number")
|
||||||
|
private String simCardNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 投运时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "commissioning_time")
|
||||||
|
private LocalDateTime commissioningTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据更新时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "data_update_time")
|
||||||
|
private LocalDateTime dataUpdateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对时功能
|
||||||
|
*/
|
||||||
|
@TableField(value = "time_sync_function")
|
||||||
|
private Integer timeSyncFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电镀功能
|
||||||
|
*/
|
||||||
|
@TableField(value = "electroplating_function")
|
||||||
|
private Integer electroplatingFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测装置安装位置
|
||||||
|
*/
|
||||||
|
@TableField(value = "monitoring_device_installation_position")
|
||||||
|
private String monitoringDeviceInstallationPosition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 召换标志
|
||||||
|
*/
|
||||||
|
@TableField(value = "summon_flag")
|
||||||
|
private String summonFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警功能
|
||||||
|
*/
|
||||||
|
@TableField(value = "alarm_function")
|
||||||
|
private String alarmFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同号
|
||||||
|
*/
|
||||||
|
@TableField(value = "contract_number")
|
||||||
|
private String contractNumber;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@ApiModel(description="")
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "supervision_temp_line_report")
|
||||||
|
public class SupervisionTempLineReport {
|
||||||
|
@TableId(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_name")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点电压等级
|
||||||
|
*/
|
||||||
|
@TableField(value = "voltage_level")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接入母线
|
||||||
|
*/
|
||||||
|
@TableField(value = "connected_bus")
|
||||||
|
private String connectedBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短路容量
|
||||||
|
*/
|
||||||
|
@TableField(value = "short_capacity")
|
||||||
|
private Float shortCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协议容量
|
||||||
|
*/
|
||||||
|
@TableField(value = "deal_capacity")
|
||||||
|
private Float dealCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备容量
|
||||||
|
*/
|
||||||
|
@TableField(value = "dev_capacity")
|
||||||
|
private Float devCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基准容量
|
||||||
|
*/
|
||||||
|
@TableField(value = "standard_capacity")
|
||||||
|
private Float standardCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CT变比
|
||||||
|
*/
|
||||||
|
@TableField(value = "ct_ratio")
|
||||||
|
private Float ctRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PT变比
|
||||||
|
*/
|
||||||
|
@TableField(value = "pt_ratio")
|
||||||
|
private Float ptRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点编号
|
||||||
|
*/
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量间隔
|
||||||
|
*/
|
||||||
|
@TableField(value = "time_interval")
|
||||||
|
private Integer timeInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类型
|
||||||
|
*/
|
||||||
|
@TableField(value = "Load_Type")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源类别
|
||||||
|
*/
|
||||||
|
@TableField(value = "Business_Type")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点性质
|
||||||
|
*/
|
||||||
|
@TableField(value = "point_nature")
|
||||||
|
private String pointNature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否参与统计
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_statistical")
|
||||||
|
private Boolean isStatistical;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点对象名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "Obj_Name")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电网侧变电站
|
||||||
|
*/
|
||||||
|
@TableField(value = "Power_Substation_Name")
|
||||||
|
private String powerSubstationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否并网点
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_grid_connection_point")
|
||||||
|
private Boolean isGridConnectionPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点运行状态
|
||||||
|
*/
|
||||||
|
@TableField(value = "operation_status")
|
||||||
|
private String operationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主接线图
|
||||||
|
*/
|
||||||
|
@TableField(value = "main_wiring_diagram")
|
||||||
|
private String mainWiringDiagram;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差上限
|
||||||
|
*/
|
||||||
|
@TableField(value = "voltage_deviation_upper_limit")
|
||||||
|
private Float voltageDeviationUpperLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差下限
|
||||||
|
*/
|
||||||
|
@TableField(value = "voltage_deviation_lower_limit")
|
||||||
|
private Float voltageDeviationLowerLimit;
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.njcn.supervision.controller.dev;
|
||||||
|
|
||||||
|
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.supervision.pojo.param.user.SupervisionDevMainReportParam;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionDevMainReportPOService;
|
||||||
|
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.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源用户管理
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/11/11 - 9:20
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/deVReport")
|
||||||
|
@Api(tags = "电能质量监测装置设备管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DeVReportManageController extends BaseController {
|
||||||
|
|
||||||
|
private final SupervisionDevMainReportPOService supervisionDevMainReportPOService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.ADD)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增电能质量监测装置设备")
|
||||||
|
@ApiImplicitParam(name = "supervisionDevMainReportParam", value = "实体参数", required = true)
|
||||||
|
public HttpResult<String> addDevReport(@RequestBody @Validated SupervisionDevMainReportParam supervisionDevMainReportParam){
|
||||||
|
String methodDescribe = getMethodDescribe("userReportParam");
|
||||||
|
String devReportId = supervisionDevMainReportPOService.addDevReport(supervisionDevMainReportParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devReportId, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.ADD)
|
||||||
|
@PostMapping("/auditDevReport")
|
||||||
|
@ApiOperation("修改电能质量监测装置设备")
|
||||||
|
@ApiImplicitParam(name = "supervisionDevMainReportParamUpdate", value = "实体参数", required = true)
|
||||||
|
public HttpResult<Boolean> auditDevReport(@RequestBody @Validated SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate supervisionDevMainReportParamUpdate){
|
||||||
|
String methodDescribe = getMethodDescribe("auditDevReport");
|
||||||
|
boolean res = supervisionDevMainReportPOService.auditDevReport(supervisionDevMainReportParamUpdate);
|
||||||
|
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/removeDevReport")
|
||||||
|
@ApiOperation("移除电能质量监测装置设备")
|
||||||
|
public HttpResult<Boolean> removeDevReport(@RequestParam("ids") List<String> ids){
|
||||||
|
String methodDescribe = getMethodDescribe("removeDevReport");
|
||||||
|
Boolean flag = supervisionDevMainReportPOService.removeDevReport(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.njcn.supervision.controller.user;
|
package com.njcn.supervision.controller.user;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.bpm.pojo.po.BpmForm;
|
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
@@ -16,7 +15,6 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -76,7 +74,6 @@ public class UserReportManageController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/removeUserReport")
|
@PostMapping("/removeUserReport")
|
||||||
@ApiOperation("查询干扰源用户")
|
@ApiOperation("查询干扰源用户")
|
||||||
@ApiImplicitParam(name = "userReportQueryParm", value = "参数", required = true)
|
|
||||||
public HttpResult<Boolean> removeUserReport(@RequestParam("ids") List<String> ids){
|
public HttpResult<Boolean> removeUserReport(@RequestParam("ids") List<String> ids){
|
||||||
String methodDescribe = getMethodDescribe("removeUserReport");
|
String methodDescribe = getMethodDescribe("removeUserReport");
|
||||||
Boolean flag = userReportPOService.removeUserReport(ids);
|
Boolean flag = userReportPOService.removeUserReport(ids);
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.njcn.supervision.mapper.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionDevMainReportPO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/10 18:16【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionDevMainReportPOMapper extends BaseMapper<SupervisionDevMainReportPO> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.supervision.mapper.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempDeviceReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempDeviceReportMapper extends BaseMapper<SupervisionTempDeviceReport> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.njcn.supervision.mapper.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempLineReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempLineReportMapper extends BaseMapper<SupervisionTempLineReport> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.dev.SupervisionDevMainReportPOMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.dev.SupervisionDevMainReportPO">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_dev_main_report-->
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="reporter" jdbcType="VARCHAR" property="reporter" />
|
||||||
|
<result column="report_date" jdbcType="DATE" property="reportDate" />
|
||||||
|
<result column="org_id" jdbcType="VARCHAR" property="orgId" />
|
||||||
|
<result column="expected_production_date" jdbcType="DATE" property="expectedProductionDate" />
|
||||||
|
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||||
|
<result column="user_status" jdbcType="VARCHAR" property="userStatus" />
|
||||||
|
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||||
|
<result column="acceptance_inspection_report" jdbcType="VARCHAR" property="acceptanceInspectionReport" />
|
||||||
|
<result column="acceptance_inspection_report_single" jdbcType="VARCHAR" property="acceptanceInspectionReportSingle" />
|
||||||
|
<result column="type_experiment_report" jdbcType="VARCHAR" property="typeExperimentReport" />
|
||||||
|
<result column="factory_inspection_report" jdbcType="VARCHAR" property="factoryInspectionReport" />
|
||||||
|
<result column="performance_test_report" jdbcType="VARCHAR" property="performanceTestReport" />
|
||||||
|
<result column="information_security_test_report" jdbcType="VARCHAR" property="informationSecurityTestReport" />
|
||||||
|
<result column="other_attachments" jdbcType="VARCHAR" property="otherAttachments" />
|
||||||
|
<result column="process_instance_id" jdbcType="VARCHAR" property="processInstanceId" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, reporter, report_date, org_id, expected_production_date, city, user_status, user_name,
|
||||||
|
acceptance_inspection_report, acceptance_inspection_report_single, type_experiment_report,
|
||||||
|
factory_inspection_report, performance_test_report, information_security_test_report,
|
||||||
|
other_attachments, process_instance_id, `status`, Create_By, Create_Time, Update_By,
|
||||||
|
Update_Time, `State`
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.dev.SupervisionTempDeviceReportMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.dev.SupervisionTempDeviceReport">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_temp_device_report-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="power_company" jdbcType="VARCHAR" property="powerCompany" />
|
||||||
|
<result column="substation" jdbcType="VARCHAR" property="substation" />
|
||||||
|
<result column="substation_voltage_level" jdbcType="VARCHAR" property="substationVoltageLevel" />
|
||||||
|
<result column="monitoring_terminal_code" jdbcType="VARCHAR" property="monitoringTerminalCode" />
|
||||||
|
<result column="monitoring_terminal_name" jdbcType="VARCHAR" property="monitoringTerminalName" />
|
||||||
|
<result column="voltage_transformer_type" jdbcType="VARCHAR" property="voltageTransformerType" />
|
||||||
|
<result column="terminal_wiring_method_type" jdbcType="VARCHAR" property="terminalWiringMethodType" />
|
||||||
|
<result column="neutral_point_wiring_method" jdbcType="VARCHAR" property="neutralPointWiringMethod" />
|
||||||
|
<result column="manufacturer" jdbcType="VARCHAR" property="manufacturer" />
|
||||||
|
<result column="manufacturer_device_number" jdbcType="VARCHAR" property="manufacturerDeviceNumber" />
|
||||||
|
<result column="terminal_ip" jdbcType="VARCHAR" property="terminalIp" />
|
||||||
|
<result column="terminal_type" jdbcType="VARCHAR" property="terminalType" />
|
||||||
|
<result column="terminal_port" jdbcType="VARCHAR" property="terminalPort" />
|
||||||
|
<result column="front_end_machine" jdbcType="VARCHAR" property="frontEndMachine" />
|
||||||
|
<result column="current_terminal_detection_time" jdbcType="TIMESTAMP" property="currentTerminalDetectionTime" />
|
||||||
|
<result column="next_terminal_inspection_time" jdbcType="TIMESTAMP" property="nextTerminalInspectionTime" />
|
||||||
|
<result column="identification_code" jdbcType="VARCHAR" property="identificationCode" />
|
||||||
|
<result column="terminal_secret_key" jdbcType="VARCHAR" property="terminalSecretKey" />
|
||||||
|
<result column="longitude" jdbcType="DECIMAL" property="longitude" />
|
||||||
|
<result column="latitude" jdbcType="DECIMAL" property="latitude" />
|
||||||
|
<result column="terminal_model" jdbcType="VARCHAR" property="terminalModel" />
|
||||||
|
<result column="data_type" jdbcType="VARCHAR" property="dataType" />
|
||||||
|
<result column="communication_status" jdbcType="VARCHAR" property="communicationStatus" />
|
||||||
|
<result column="sim_card_number" jdbcType="VARCHAR" property="simCardNumber" />
|
||||||
|
<result column="commissioning_time" jdbcType="TIMESTAMP" property="commissioningTime" />
|
||||||
|
<result column="data_update_time" jdbcType="TIMESTAMP" property="dataUpdateTime" />
|
||||||
|
<result column="time_sync_function" jdbcType="VARCHAR" property="timeSyncFunction" />
|
||||||
|
<result column="electroplating_function" jdbcType="VARCHAR" property="electroplatingFunction" />
|
||||||
|
<result column="monitoring_device_installation_position" jdbcType="VARCHAR" property="monitoringDeviceInstallationPosition" />
|
||||||
|
<result column="summon_flag" jdbcType="VARCHAR" property="summonFlag" />
|
||||||
|
<result column="alarm_function" jdbcType="VARCHAR" property="alarmFunction" />
|
||||||
|
<result column="contract_number" jdbcType="VARCHAR" property="contractNumber" />
|
||||||
|
<result column="Create_By" jdbcType="CHAR" property="createBy" />
|
||||||
|
<result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="Update_By" jdbcType="CHAR" property="updateBy" />
|
||||||
|
<result column="Update_Time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="State" jdbcType="BIT" property="state" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, power_company, substation, substation_voltage_level, monitoring_terminal_code,
|
||||||
|
monitoring_terminal_name, voltage_transformer_type, terminal_wiring_method_type,
|
||||||
|
neutral_point_wiring_method, manufacturer, manufacturer_device_number, terminal_ip,
|
||||||
|
terminal_type, terminal_port, front_end_machine, current_terminal_detection_time,
|
||||||
|
next_terminal_inspection_time, identification_code, terminal_secret_key, longitude,
|
||||||
|
latitude, terminal_model, data_type, communication_status, sim_card_number, commissioning_time,
|
||||||
|
data_update_time, time_sync_function, electroplating_function, monitoring_device_installation_position,
|
||||||
|
summon_flag, alarm_function, contract_number, Create_By, Create_Time, Update_By,
|
||||||
|
Update_Time, `State`
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.supervision.mapper.dev.SupervisionTempLineReportMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.njcn.supervision.pojo.po.dev.SupervisionTempLineReport">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table supervision_temp_line_report-->
|
||||||
|
<result column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="line_name" jdbcType="VARCHAR" property="lineName" />
|
||||||
|
<result column="voltage_level" jdbcType="VARCHAR" property="voltageLevel" />
|
||||||
|
<result column="connected_bus" jdbcType="VARCHAR" property="connectedBus" />
|
||||||
|
<result column="short_capacity" jdbcType="REAL" property="shortCapacity" />
|
||||||
|
<result column="deal_capacity" jdbcType="REAL" property="dealCapacity" />
|
||||||
|
<result column="dev_capacity" jdbcType="REAL" property="devCapacity" />
|
||||||
|
<result column="standard_capacity" jdbcType="REAL" property="standardCapacity" />
|
||||||
|
<result column="ct_ratio" jdbcType="REAL" property="ctRatio" />
|
||||||
|
<result column="pt_ratio" jdbcType="REAL" property="ptRatio" />
|
||||||
|
<result column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||||
|
<result column="time_interval" jdbcType="INTEGER" property="timeInterval" />
|
||||||
|
<result column="Load_Type" jdbcType="VARCHAR" property="loadType" />
|
||||||
|
<result column="Business_Type" jdbcType="VARCHAR" property="businessType" />
|
||||||
|
<result column="point_nature" jdbcType="VARCHAR" property="pointNature" />
|
||||||
|
<result column="is_statistical" jdbcType="BIT" property="isStatistical" />
|
||||||
|
<result column="Obj_Name" jdbcType="VARCHAR" property="objName" />
|
||||||
|
<result column="Power_Substation_Name" jdbcType="VARCHAR" property="powerSubstationName" />
|
||||||
|
<result column="is_grid_connection_point" jdbcType="BIT" property="isGridConnectionPoint" />
|
||||||
|
<result column="operation_status" jdbcType="VARCHAR" property="operationStatus" />
|
||||||
|
<result column="main_wiring_diagram" jdbcType="VARCHAR" property="mainWiringDiagram" />
|
||||||
|
<result column="voltage_deviation_upper_limit" jdbcType="REAL" property="voltageDeviationUpperLimit" />
|
||||||
|
<result column="voltage_deviation_lower_limit" jdbcType="REAL" property="voltageDeviationLowerLimit" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, line_name, voltage_level, connected_bus, short_capacity, deal_capacity, dev_capacity,
|
||||||
|
standard_capacity, ct_ratio, pt_ratio, line_id, time_interval, Load_Type, Business_Type,
|
||||||
|
point_nature, is_statistical, Obj_Name, Power_Substation_Name, is_grid_connection_point,
|
||||||
|
operation_status, main_wiring_diagram, voltage_deviation_upper_limit, voltage_deviation_lower_limit
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.supervision.service.dev;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.supervision.pojo.param.user.SupervisionDevMainReportParam;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionDevMainReportPO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/10 18:10【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionDevMainReportPOService extends IService<SupervisionDevMainReportPO>{
|
||||||
|
|
||||||
|
|
||||||
|
String addDevReport(SupervisionDevMainReportParam supervisionDevMainReportParam);
|
||||||
|
|
||||||
|
boolean auditDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate supervisionDevMainReportParamUpdate);
|
||||||
|
|
||||||
|
Boolean removeDevReport(List<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.supervision.service.dev;
|
||||||
|
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempDeviceReport;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempDeviceReportService extends IService<SupervisionTempDeviceReport>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.supervision.service.dev;
|
||||||
|
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempLineReport;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempLineReportService extends IService<SupervisionTempLineReport>{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.njcn.supervision.service.dev.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.supervision.enums.FlowStatusEnum;
|
||||||
|
import com.njcn.supervision.mapper.dev.SupervisionDevMainReportPOMapper;
|
||||||
|
import com.njcn.supervision.pojo.param.user.SupervisionDevMainReportParam;
|
||||||
|
import com.njcn.supervision.pojo.param.user.SupervisionTempDeviceReportParam;
|
||||||
|
import com.njcn.supervision.pojo.param.user.SupervisionTempLineReportParam;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionDevMainReportPO;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempDeviceReport;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempLineReport;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionDevMainReportPOService;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionTempDeviceReportService;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionTempLineReportService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/10 18:10【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<SupervisionDevMainReportPOMapper, SupervisionDevMainReportPO> implements SupervisionDevMainReportPOService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息建档对应的流程定义 KEY
|
||||||
|
*/
|
||||||
|
//todo 修改成建设阶段流程图key
|
||||||
|
public static final String PROCESS_KEY = "build_user_info";
|
||||||
|
|
||||||
|
private final BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
|
private final SupervisionTempDeviceReportService supervisionTempDeviceReportService;
|
||||||
|
private final SupervisionTempLineReportService supervisionTempLineReportService;
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public String addDevReport(SupervisionDevMainReportParam supervisionDevMainReportParam) {
|
||||||
|
|
||||||
|
//判断干扰源用户是否绑定
|
||||||
|
checkUserId(supervisionDevMainReportParam, false);
|
||||||
|
SupervisionDevMainReportPO supervisionDevMainReportPO = new SupervisionDevMainReportPO();
|
||||||
|
BeanUtils.copyProperties(supervisionDevMainReportParam, supervisionDevMainReportPO);
|
||||||
|
supervisionDevMainReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
this.save(supervisionDevMainReportPO);
|
||||||
|
String id = supervisionDevMainReportPO.getId();
|
||||||
|
//存储临时终端信息
|
||||||
|
SupervisionTempDeviceReportParam supervisionTempDeviceReportParam = supervisionDevMainReportParam.getSupervisionTempDeviceReportParam();
|
||||||
|
SupervisionTempDeviceReport supervisionTempDeviceReportPO = new SupervisionTempDeviceReport();
|
||||||
|
BeanUtils.copyProperties(supervisionTempDeviceReportParam, supervisionTempDeviceReportPO);
|
||||||
|
supervisionTempDeviceReportPO.setId(id);
|
||||||
|
supervisionTempDeviceReportService.save(supervisionTempDeviceReportPO);
|
||||||
|
//存储临时监测点信息
|
||||||
|
SupervisionTempLineReportParam supervisionTempLineReportParam = supervisionDevMainReportParam.getSupervisionTempLineReportParam();
|
||||||
|
SupervisionTempLineReport supervisionTempLineReport = new SupervisionTempLineReport();
|
||||||
|
BeanUtils.copyProperties(supervisionTempLineReportParam, supervisionTempLineReport);
|
||||||
|
supervisionTempDeviceReportPO.setId(id);
|
||||||
|
supervisionTempLineReportService.save(supervisionTempLineReport);
|
||||||
|
// 发起 BPM 流程
|
||||||
|
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||||
|
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||||
|
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_KEY);
|
||||||
|
bpmProcessInstanceCreateReqDTO.setBusinessKey(id);
|
||||||
|
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(supervisionDevMainReportParam.getStartUserSelectAssignees());
|
||||||
|
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||||
|
String processInstanceId = bpmProcessFeignClient.createProcessInstance(supervisionDevMainReportPO.getCreateBy(),bpmProcessInstanceCreateReqDTO).getData();
|
||||||
|
// 将工作流的编号,更新到流程单中
|
||||||
|
supervisionDevMainReportPO.setProcessInstanceId(processInstanceId);
|
||||||
|
this.baseMapper.updateById(supervisionDevMainReportPO);
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean auditDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate supervisionDevMainReportParamUpdate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean removeDevReport(List<String> ids) {
|
||||||
|
// this.lambdaUpdate().set(SupervisionDevMainReportPO::getState,)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 判断干扰源用户是否绑定设备,如果重复则提示干扰源用户已经设备
|
||||||
|
* @Param: supervisionDevMainReportParam终端详情 isExcludeSelf是否排除自己,一般新增不排除,更新时需要排除自己
|
||||||
|
* @return: void
|
||||||
|
* @Author: clam
|
||||||
|
* @Date: 2024/5/11
|
||||||
|
*/
|
||||||
|
private void checkUserId(SupervisionDevMainReportParam supervisionDevMainReportParam, boolean isExcludeSelf) {
|
||||||
|
LambdaQueryWrapper<SupervisionDevMainReportPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper
|
||||||
|
.eq(SupervisionDevMainReportPO::getUserId, supervisionDevMainReportParam.getUserId())
|
||||||
|
.eq(SupervisionDevMainReportPO::getState, DataStateEnum.ENABLE.getCode());
|
||||||
|
//更新的时候,需排除当前记录
|
||||||
|
if (isExcludeSelf) {
|
||||||
|
|
||||||
|
lambdaQueryWrapper.ne(SupervisionDevMainReportPO::getId, supervisionDevMainReportParam.getId());
|
||||||
|
|
||||||
|
}
|
||||||
|
List<SupervisionDevMainReportPO> list = this.baseMapper.selectList(lambdaQueryWrapper);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
//过滤已取消的申请
|
||||||
|
list = list.stream()
|
||||||
|
.filter(userReportPO -> !userReportPO.getStatus().equals(FlowStatusEnum.CANCEL.getCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
//如果还存在,则说明有人申请过了
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
throw new BusinessException(supervisionDevMainReportParam.getUserName().concat(",扰源用户").concat(list.get(0).getReporter()).concat("绑定"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.supervision.service.dev.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.supervision.mapper.dev.SupervisionTempDeviceReportMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempDeviceReport;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionTempDeviceReportService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SupervisionTempDeviceReportServiceImpl extends ServiceImpl<SupervisionTempDeviceReportMapper, SupervisionTempDeviceReport> implements SupervisionTempDeviceReportService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.supervision.service.dev.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import java.util.List;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.supervision.mapper.dev.SupervisionTempLineReportMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.dev.SupervisionTempLineReport;
|
||||||
|
import com.njcn.supervision.service.dev.SupervisionTempLineReportService;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/5/11 14:07【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SupervisionTempLineReportServiceImpl extends ServiceImpl<SupervisionTempLineReportMapper, SupervisionTempLineReport> implements SupervisionTempLineReportService{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -121,27 +121,37 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean auditUserReport(UserReportParam.UserReportUpdate userReportUpdate) {
|
public boolean auditUserReport(UserReportParam.UserReportUpdate userReportUpdate) {
|
||||||
|
//判断工程名称是否有重复的
|
||||||
|
checkProjectName(userReportUpdate, true);
|
||||||
|
|
||||||
String id = userReportUpdate.getId();
|
String id = userReportUpdate.getId();
|
||||||
UserReportPO byId = this.getById(id);
|
UserReportPO byId = this.getById(id);
|
||||||
BeanUtils.copyProperties(userReportUpdate, byId);
|
BeanUtils.copyProperties(userReportUpdate, byId);
|
||||||
this.updateById(byId);
|
this.updateById(byId);
|
||||||
if (Objects.equals(userReportUpdate.getUserType(), "1") ||
|
if (CollectionUtil.newArrayList(
|
||||||
Objects.equals(userReportUpdate.getUserType(), "2")) {
|
UserNatureEnum.BUILD_POWER_GRID.getCode(),
|
||||||
|
UserNatureEnum.EXTEND_POWER_GRID.getCode()
|
||||||
|
).contains(byId.getUserType())) {
|
||||||
|
//电网工程类用户额外数据
|
||||||
UserReportProjectPO userReportProjectPO = userReportProjectPOService.getById(id);
|
UserReportProjectPO userReportProjectPO = userReportProjectPOService.getById(id);
|
||||||
BeanUtils.copyProperties(userReportUpdate.getUserReportProjectPO(), userReportProjectPO, getNullPropertyNames(userReportUpdate.getUserReportProjectPO()));
|
BeanUtils.copyProperties(userReportUpdate.getUserReportProjectPO(), userReportProjectPO, getNullPropertyNames(userReportUpdate.getUserReportProjectPO()));
|
||||||
userReportProjectPOService.updateById(userReportProjectPO);
|
userReportProjectPOService.updateById(userReportProjectPO);
|
||||||
} else if (Objects.equals(userReportUpdate.getUserType(), "3") ||
|
} else if ( CollectionUtil.newArrayList(
|
||||||
Objects.equals(userReportUpdate.getUserType(), "4")) {
|
UserNatureEnum.BUILD_NON_LINEAR_LOAD.getCode(),
|
||||||
|
UserNatureEnum.EXTEND_NON_LINEAR_LOAD.getCode(),
|
||||||
|
UserNatureEnum.BUILD_NEW_ENERGY_POWER_STATION.getCode(),
|
||||||
|
UserNatureEnum.EXTEND_NEW_ENERGY_POWER_STATION.getCode()
|
||||||
|
).contains(byId.getUserType())) {
|
||||||
UserReportSubstationPO userReportSubstationPO = userReportSubstationPOService.getById(id);
|
UserReportSubstationPO userReportSubstationPO = userReportSubstationPOService.getById(id);
|
||||||
BeanUtils.copyProperties(userReportUpdate.getUserReportSubstationPO(), userReportSubstationPO, getNullPropertyNames(userReportUpdate.getUserReportSubstationPO()));
|
BeanUtils.copyProperties(userReportUpdate.getUserReportSubstationPO(), userReportSubstationPO, getNullPropertyNames(userReportUpdate.getUserReportSubstationPO()));
|
||||||
userReportSubstationPOService.updateById(userReportSubstationPO);
|
userReportSubstationPOService.updateById(userReportSubstationPO);
|
||||||
} else if (Objects.equals(userReportUpdate.getUserType(), "5")) {
|
} else if (UserNatureEnum.SENSITIVE_USER.getCode().equals(byId.getUserType())) {
|
||||||
UserReportSensitivePO userReportSensitivePO = userReportSensitivePOService.getById(id);
|
UserReportSensitivePO userReportSensitivePO = userReportSensitivePOService.getById(id);
|
||||||
BeanUtils.copyProperties(userReportUpdate.getUserReportSensitivePO(), userReportSensitivePO, getNullPropertyNames(userReportUpdate.getUserReportSensitivePO()));
|
BeanUtils.copyProperties(userReportUpdate.getUserReportSensitivePO(), userReportSensitivePO, getNullPropertyNames(userReportUpdate.getUserReportSensitivePO()));
|
||||||
userReportSensitivePOService.updateById(userReportSensitivePO);
|
userReportSensitivePOService.updateById(userReportSensitivePO);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -592,6 +592,23 @@ public enum DicDataEnum {
|
|||||||
QINGHUANGDAO("秦皇岛市","qinghuangdao"),
|
QINGHUANGDAO("秦皇岛市","qinghuangdao"),
|
||||||
FENGFENGRESERVE("风光储","fengfengreserve"),
|
FENGFENGRESERVE("风光储","fengfengreserve"),
|
||||||
EXTRA_HIGH_PRESSURE("超高压","extra_high_pressure"),
|
EXTRA_HIGH_PRESSURE("超高压","extra_high_pressure"),
|
||||||
|
|
||||||
|
//行业类型-冀北
|
||||||
|
TRAFFIC("交通","Traffic"),
|
||||||
|
METALLURGY("冶金","Metallurgy"),
|
||||||
|
MACHINERY("机械","Machinery"),
|
||||||
|
CHEMICAL_INDUSTRY("化工","Chemical_Industry"),
|
||||||
|
MANUFACTURING("制造","Manufacturing"),
|
||||||
|
SHIPBUILDING("造船","Shipbuilding"),
|
||||||
|
UTILITIES("公用事业","Utilities"),
|
||||||
|
POWER_PLANT("电厂","Power_Plant"),
|
||||||
|
COMMERCE("商业","Commerce"),
|
||||||
|
MUNICIPAL("市政","Municipal"),
|
||||||
|
CIVILIAN("民用","Civilian"),
|
||||||
|
ELECTRONICS("电子","Electronics"),
|
||||||
|
COMMUNICATION("通讯","Communication"),
|
||||||
|
ELECTRIC_POWER("电力","Electric_Power"),
|
||||||
|
OTHER_INDUSTRY("其他","Other_Industry"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|||||||
@@ -132,7 +132,9 @@ public enum DicDataTypeEnum {
|
|||||||
|
|
||||||
CARRY_CAPCITYUSER_MODE("用户模式","carry_capcity_user_mode"),
|
CARRY_CAPCITYUSER_MODE("用户模式","carry_capcity_user_mode"),
|
||||||
LOCAL_MUNICIPALITY("所属地市","local_municipality"),
|
LOCAL_MUNICIPALITY("所属地市","local_municipality"),
|
||||||
;
|
INDUSTRY_TYPE_JB("行业类型-冀北","industry_type_jb"),
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,18 +30,41 @@ public enum DicTreeEnum {
|
|||||||
Electrolytic_Load("电解负荷","2309"),
|
Electrolytic_Load("电解负荷","2309"),
|
||||||
|
|
||||||
//冀北主要非线性设备类型
|
//冀北主要非线性设备类型
|
||||||
Nonlinear_Load_User("非线性负荷用户","nonlinear_load_user"),
|
/**
|
||||||
New_Energy_Power("新能源发电","new_energy_power"),
|
* 类型 类别 名称 所属行业 主要关注的电能质量指标
|
||||||
Converter_Station("换流站","converter_station"),
|
* 非线性负荷用户 电气化铁路 电气化铁路 交通 谐波、电压波动和闪变、负序、电压偏差
|
||||||
|
* 城市轨道交通 有轨及无轨电车、地铁、轻轨 交通 谐波、电压波动和闪变
|
||||||
|
* 电动汽车充电站 电动汽车充电站 交通 谐波
|
||||||
|
* 电加热负荷 交流电弧炉 冶金、机械 谐波(间谐波)、电压波动和闪变、负序
|
||||||
|
* 直流电弧炉、精炼炉 冶金、机械 谐波(间谐波)、电压波动和闪变
|
||||||
|
* 电热炉 冶金、机械、化工 谐波、电压波动和闪变、负序
|
||||||
|
* 中频炉 冶金、机械、化工 谐波、电压波动和闪变
|
||||||
|
* 单(多)晶硅(锗)生产设备 制造 谐波
|
||||||
|
* 轧机 交、直流轧机 冶金 谐波(间谐波)、电压波动和闪变
|
||||||
|
* 电解负荷 电解设备 冶金、机械、化工 谐波、电压波动和闪变
|
||||||
|
* 电焊负荷 电焊机 冶金、机械、造船 谐波、电压波动和闪变
|
||||||
|
* 起重负荷 电铲、升降机、门吊等 冶金、机械等 谐波、电压波动和闪变
|
||||||
|
* 变频调速负荷 变频电机、水泵 公用事业、电厂、冶金、化工等 谐波、电压波动和闪变
|
||||||
|
* 其他 变频空调、大型电梯、节能照明设备 商业、市政、民用等 谐波
|
||||||
|
* UPS、开关电源、逆变电源 电子、通讯等 谐波
|
||||||
|
* 新能源发电 风电场 风力发电机 电力 闪变、谐波(间谐波)、电压偏差
|
||||||
|
* 光伏电站 光伏发电系统 电力 谐波、闪变
|
||||||
|
* 换流站 换流站 换流器 电力 谐波、电压波动
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Nonlinear_Load_User_JB("非线性负荷用户","Nonlinear_Load_User_JB"),
|
||||||
|
New_Energy_Power_JB("新能源发电","New_Energy_Power_JB"),
|
||||||
|
Converter_Station_JB("换流站","Converter_Station_JB"),
|
||||||
|
|
||||||
//非线性负荷用户
|
//非线性负荷用户
|
||||||
Electrified_Railway_JB("电气化铁路","Electrified_Railway_JB"),
|
Electrified_Railway_JB("电气化铁路","Electrified_Railway_JB"),
|
||||||
|
Electrified_Railway_Name_JB("电气化铁路","Electrified_Railway_Name_JB"),
|
||||||
|
|
||||||
Urban_Rail_Transit_JB("城市轨道交通","Urban_Rail_Transit_JB"),
|
Urban_Rail_Transit_JB("城市轨道交通","Urban_Rail_Transit_JB"),
|
||||||
Subways_Light_Rail_JB("有轨及无轨电车、地铁、轻轨","Urban_Rail_Transit_JB"),
|
Subways_Light_Rail_JB("有轨及无轨电车、地铁、轻轨","Subways_Light_Rail_JB"),
|
||||||
|
|
||||||
Charging_Stations_For_Electric_JB("电动汽车充电站","Charging_Stations_For_Electric_JB"),
|
Charging_Stations_For_Electric_JB("电动汽车充电站","Charging_Stations_For_Electric_JB"),
|
||||||
|
Charging_Stations_Name_JB("电动汽车充电站","Charging_Stations_Name_JB"),
|
||||||
|
|
||||||
Electric_Heating_Load_JB("电加热负荷","Electric_Heating_Load_JB"),
|
Electric_Heating_Load_JB("电加热负荷","Electric_Heating_Load_JB"),
|
||||||
|
|
||||||
@@ -49,18 +72,40 @@ public enum DicTreeEnum {
|
|||||||
Furnace_JB("直流电弧炉、精炼炉","Furnace_JB"),
|
Furnace_JB("直流电弧炉、精炼炉","Furnace_JB"),
|
||||||
Electric_Heater_JB("电热炉","Electric_Heater_JB"),
|
Electric_Heater_JB("电热炉","Electric_Heater_JB"),
|
||||||
Frequency_Furnace_JB("中频炉","Frequency_Furnace_JB"),
|
Frequency_Furnace_JB("中频炉","Frequency_Furnace_JB"),
|
||||||
Production_Equipment("单(多)晶硅(锗)生产设备","Production_Equipment"),
|
Production_Equipment_JB("单(多)晶硅(锗)生产设备","Production_Equipment_JB"),
|
||||||
|
|
||||||
Rolling_Mill_JB("轧机","Rolling_Mill_JB"),
|
Rolling_Mill_JB("轧机","Rolling_Mill_JB"),
|
||||||
|
Ac_DC_Rolling_Mill_JB("交、直流轧机","Ac_DC_Rolling_Mill_JB"),
|
||||||
|
|
||||||
Electrolytic_Load_JB("电解负荷","Electrolytic_Load_JB"),
|
Electrolytic_Load_JB("电解负荷","Electrolytic_Load_JB"),
|
||||||
|
Electrolytic_Equipment_JB("电解设备","Electrolytic_Equipment_JB"),
|
||||||
|
|
||||||
Welding_Load_JB("电焊负荷","Welding_Load_JB"),
|
Welding_Load_JB("电焊负荷","Welding_Load_JB"),
|
||||||
|
Welding_Machine_JB("电焊机","Welding_Machine_JB"),
|
||||||
|
|
||||||
Lifting_Load_JB("起重负荷","Lifting_Load_JB"),
|
Lifting_Load_JB("起重负荷","Lifting_Load_JB"),
|
||||||
|
Electric_Shovel_JB("电铲、升降机、门吊等","Electric_Shovel_JB"),
|
||||||
|
|
||||||
|
|
||||||
Variable_Frequency_Speed_Control_Load_JB("变频调速负荷","Variable_Frequency_Speed_Control_Load_JB"),
|
Variable_Frequency_Speed_Control_Load_JB("变频调速负荷","Variable_Frequency_Speed_Control_Load_JB"),
|
||||||
other_JB("其他","nonlinear_load_user"),
|
Variable_Frequency_Water_Pump_JB("变频电机、水泵","Variable_Frequency_Water_Pump_JB"),
|
||||||
|
|
||||||
|
|
||||||
|
Other_JB("其他","other_JB"),
|
||||||
|
Equipment_JB("变频空调、大型电梯、节能照明设备","Equipment_JB"),
|
||||||
|
Power_Source_JB("UPS、开关电源、逆变电源","Power_Source_JB"),
|
||||||
|
|
||||||
|
|
||||||
Wind_Farms_JB("风电场","Wind_Farms_JB"),
|
Wind_Farms_JB("风电场","Wind_Farms_JB"),
|
||||||
|
Wind_Turbine_JB("风力发电机","Wind_Turbine_JB"),
|
||||||
|
|
||||||
|
|
||||||
Power_Station_JB("光伏电站","Power_Station_JB"),
|
Power_Station_JB("光伏电站","Power_Station_JB"),
|
||||||
|
Power_System_JB("光伏发电系统","Power_System_JB"),
|
||||||
|
|
||||||
Converter_JB("换流站","Converter_JB"),
|
Converter_JB("换流站","Converter_JB"),
|
||||||
|
Current_Converter_JB("换流器","Current_Converter_JB"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -11,9 +11,25 @@ import java.io.Serializable;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class FileVO implements Serializable {
|
public class FileVO implements Serializable {
|
||||||
|
|
||||||
|
//全名 路径+文件名
|
||||||
private String name;
|
private String name;
|
||||||
|
//文件名
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
|
public FileVO( String name,String url){
|
||||||
|
this.name = name;
|
||||||
|
this.fileName = getFileName(name);
|
||||||
|
this.url = url;
|
||||||
|
|
||||||
|
}
|
||||||
|
public static String getFileName(String filePath) {
|
||||||
|
int index = filePath.lastIndexOf("/");
|
||||||
|
if (index == -1) {
|
||||||
|
return filePath; // 如果没有/,则返回整个路径
|
||||||
|
} else {
|
||||||
|
return filePath.substring(index + 1); // 截取最后一个/后面的部分作为文件名
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
package com.njcn.system.controller;
|
package com.njcn.system.controller;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.oss.constant.OssPath;
|
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
import com.njcn.system.pojo.vo.FileVO;
|
import com.njcn.system.pojo.vo.FileVO;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,13 +38,14 @@ public class FileController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("文件上传")
|
@ApiOperation("文件上传")
|
||||||
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
||||||
public HttpResult<FileVO> upload(@RequestParam(value = "file") MultipartFile file, @RequestParam("path") String path) {
|
public HttpResult<FileVO> upload(@RequestParam(value = "file") MultipartFile file, @RequestParam("path") String path,@RequestParam(defaultValue = "true") Boolean isReserveName) {
|
||||||
String methodDescribe = getMethodDescribe("upload");
|
String methodDescribe = getMethodDescribe("upload");
|
||||||
String ossPath = fileStorageUtil.uploadMultipart(file, path);
|
String ossPath = fileStorageUtil.uploadMultipart(file, path,isReserveName);
|
||||||
String url = fileStorageUtil.getFileUrl(ossPath);
|
String url = fileStorageUtil.getFileUrl(ossPath);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new FileVO(ossPath,url), methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new FileVO(ossPath,url), methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("删除文件服务器文件")
|
@ApiOperation("删除文件服务器文件")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||||
@@ -70,6 +69,14 @@ public class FileController extends BaseController {
|
|||||||
String methodDescribe = getMethodDescribe("getFileUrl");
|
String methodDescribe = getMethodDescribe("getFileUrl");
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, fileStorageUtil.getFileUrl(filePath), methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, fileStorageUtil.getFileUrl(filePath), methodDescribe);
|
||||||
}
|
}
|
||||||
|
@ApiOperation("获取文件的一个短期url及文件名")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@RequestMapping(value = "/getFileVO", method = RequestMethod.GET)
|
||||||
|
public HttpResult<FileVO> getFileVO(String filePath) {
|
||||||
|
String methodDescribe = getMethodDescribe("getFileVO");
|
||||||
|
String url = fileStorageUtil.getFileUrl(filePath);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new FileVO(filePath,url), methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.njcn.system.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.system.enums.EventResponseEnum;
|
import com.njcn.system.enums.EventResponseEnum;
|
||||||
import com.njcn.system.enums.TemplateTreeEnum;
|
import com.njcn.system.enums.TemplateTreeEnum;
|
||||||
@@ -11,12 +10,8 @@ import com.njcn.system.mapper.DicMapper;
|
|||||||
import com.njcn.system.pojo.constant.DicState;
|
import com.njcn.system.pojo.constant.DicState;
|
||||||
import com.njcn.system.pojo.param.DicParam;
|
import com.njcn.system.pojo.param.DicParam;
|
||||||
import com.njcn.system.pojo.po.Dic;
|
import com.njcn.system.pojo.po.Dic;
|
||||||
import com.njcn.system.pojo.po.EventTemplate;
|
|
||||||
import com.njcn.system.pojo.vo.DicVO;
|
import com.njcn.system.pojo.vo.DicVO;
|
||||||
import com.njcn.system.service.IDicService;
|
import com.njcn.system.service.IDicService;
|
||||||
import com.njcn.user.pojo.constant.FunctionState;
|
|
||||||
import com.njcn.user.pojo.param.FunctionParam;
|
|
||||||
import com.njcn.user.pojo.po.Function;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|||||||
Reference in New Issue
Block a user