diff --git a/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java b/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java index ae8673b49..c2324d19d 100644 --- a/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java +++ b/pqs-common/common-oss/src/main/java/com/njcn/oss/utils/FileStorageUtil.java @@ -1,7 +1,5 @@ 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.pojo.exception.BusinessException; import com.njcn.huawei.obs.util.OBSUtil; @@ -21,9 +19,11 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; 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.UUID; /** * @author hongawen @@ -81,6 +81,31 @@ public class FileStorageUtil { 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流, * @author hongawen diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionDevMainReportParam.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionDevMainReportParam.java new file mode 100644 index 000000000..b0c956928 --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionDevMainReportParam.java @@ -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> startUserSelectAssignees; + + private SupervisionTempDeviceReportParam supervisionTempDeviceReportParam; + + private SupervisionTempLineReportParam supervisionTempLineReportParam; + + @Data + @EqualsAndHashCode(callSuper = true) + public static class SupervisionDevMainReportParamUpdate extends SupervisionDevMainReportParam { + + @ApiModelProperty("id") + private String Id; + + } +} \ No newline at end of file diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempDeviceReportParam.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempDeviceReportParam.java new file mode 100644 index 000000000..5819f1041 --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempDeviceReportParam.java @@ -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; + + +} \ No newline at end of file diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempLineReportParam.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempLineReportParam.java new file mode 100644 index 000000000..ed54adcef --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/param/user/SupervisionTempLineReportParam.java @@ -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; +} \ No newline at end of file diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionDevMainReportPO.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionDevMainReportPO.java new file mode 100644 index 000000000..f8533edc2 --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionDevMainReportPO.java @@ -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; +} \ No newline at end of file diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempDeviceReport.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempDeviceReport.java new file mode 100644 index 000000000..12e8c054d --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempDeviceReport.java @@ -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; + + +} \ No newline at end of file diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempLineReport.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempLineReport.java new file mode 100644 index 000000000..165e27b5c --- /dev/null +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/po/dev/SupervisionTempLineReport.java @@ -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; +} \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/dev/DeVReportManageController.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/dev/DeVReportManageController.java new file mode 100644 index 000000000..e0d111081 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/dev/DeVReportManageController.java @@ -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 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 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 removeDevReport(@RequestParam("ids") List ids){ + String methodDescribe = getMethodDescribe("removeDevReport"); + Boolean flag = supervisionDevMainReportPOService.removeDevReport(ids); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe); + } + +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/user/UserReportManageController.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/user/UserReportManageController.java index 900661589..1897974bf 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/user/UserReportManageController.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/controller/user/UserReportManageController.java @@ -1,7 +1,6 @@ package com.njcn.supervision.controller.user; 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.constant.OperateType; 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.ApiOperation; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; @@ -76,7 +74,6 @@ public class UserReportManageController extends BaseController { @OperateInfo(info = LogEnum.BUSINESS_COMMON) @PostMapping("/removeUserReport") @ApiOperation("查询干扰源用户") - @ApiImplicitParam(name = "userReportQueryParm", value = "参数", required = true) public HttpResult removeUserReport(@RequestParam("ids") List ids){ String methodDescribe = getMethodDescribe("removeUserReport"); Boolean flag = userReportPOService.removeUserReport(ids); diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionDevMainReportPOMapper.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionDevMainReportPOMapper.java new file mode 100644 index 000000000..f63fcdbff --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionDevMainReportPOMapper.java @@ -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 { +} \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempDeviceReportMapper.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempDeviceReportMapper.java new file mode 100644 index 000000000..2ea396df3 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempDeviceReportMapper.java @@ -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 { +} \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempLineReportMapper.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempLineReportMapper.java new file mode 100644 index 000000000..20a7ed51c --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/SupervisionTempLineReportMapper.java @@ -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 { +} \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionDevMainReportPOMapper.xml b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionDevMainReportPOMapper.xml new file mode 100644 index 000000000..b570e6bf7 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionDevMainReportPOMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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` + + \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempDeviceReportMapper.xml b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempDeviceReportMapper.xml new file mode 100644 index 000000000..78a5a86e6 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempDeviceReportMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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` + + \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempLineReportMapper.xml b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempLineReportMapper.xml new file mode 100644 index 000000000..6174cec9c --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/mapper/dev/mapping/SupervisionTempLineReportMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionDevMainReportPOService.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionDevMainReportPOService.java new file mode 100644 index 000000000..420e83795 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionDevMainReportPOService.java @@ -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{ + + + String addDevReport(SupervisionDevMainReportParam supervisionDevMainReportParam); + + boolean auditDevReport(SupervisionDevMainReportParam.SupervisionDevMainReportParamUpdate supervisionDevMainReportParamUpdate); + + Boolean removeDevReport(List ids); +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempDeviceReportService.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempDeviceReportService.java new file mode 100644 index 000000000..220262407 --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempDeviceReportService.java @@ -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{ + + +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempLineReportService.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempLineReportService.java new file mode 100644 index 000000000..3737ec48a --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/SupervisionTempLineReportService.java @@ -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{ + + +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionDevMainReportPOServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionDevMainReportPOServiceImpl.java new file mode 100644 index 000000000..f969829da --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionDevMainReportPOServiceImpl.java @@ -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 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 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 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 lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper + .eq(SupervisionDevMainReportPO::getUserId, supervisionDevMainReportParam.getUserId()) + .eq(SupervisionDevMainReportPO::getState, DataStateEnum.ENABLE.getCode()); + //更新的时候,需排除当前记录 + if (isExcludeSelf) { + + lambdaQueryWrapper.ne(SupervisionDevMainReportPO::getId, supervisionDevMainReportParam.getId()); + + } + List 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("绑定")); + } + } + } +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempDeviceReportServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempDeviceReportServiceImpl.java new file mode 100644 index 000000000..e61aeac3a --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempDeviceReportServiceImpl.java @@ -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 implements SupervisionTempDeviceReportService{ + +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempLineReportServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempLineReportServiceImpl.java new file mode 100644 index 000000000..83497916e --- /dev/null +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/dev/impl/SupervisionTempLineReportServiceImpl.java @@ -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 implements SupervisionTempLineReportService{ + +} diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/user/impl/UserReportPOServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/user/impl/UserReportPOServiceImpl.java index acc8e37c8..de92e6b66 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/user/impl/UserReportPOServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/user/impl/UserReportPOServiceImpl.java @@ -121,27 +121,37 @@ public class UserReportPOServiceImpl extends ServiceImpl upload(@RequestParam(value = "file") MultipartFile file, @RequestParam("path") String path) { + public HttpResult upload(@RequestParam(value = "file") MultipartFile file, @RequestParam("path") String path,@RequestParam(defaultValue = "true") Boolean isReserveName) { String methodDescribe = getMethodDescribe("upload"); - String ossPath = fileStorageUtil.uploadMultipart(file, path); + String ossPath = fileStorageUtil.uploadMultipart(file, path,isReserveName); String url = fileStorageUtil.getFileUrl(ossPath); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new FileVO(ossPath,url), methodDescribe); } + @ApiOperation("删除文件服务器文件") @OperateInfo(info = LogEnum.BUSINESS_COMMON) @RequestMapping(value = "/delete", method = RequestMethod.POST) @@ -70,6 +69,14 @@ public class FileController extends BaseController { String methodDescribe = getMethodDescribe("getFileUrl"); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, fileStorageUtil.getFileUrl(filePath), methodDescribe); } + @ApiOperation("获取文件的一个短期url及文件名") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @RequestMapping(value = "/getFileVO", method = RequestMethod.GET) + public HttpResult getFileVO(String filePath) { + String methodDescribe = getMethodDescribe("getFileVO"); + String url = fileStorageUtil.getFileUrl(filePath); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new FileVO(filePath,url), methodDescribe); + } } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/DicServiceImpl.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/DicServiceImpl.java index 8f6371be6..c8541f4cc 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/DicServiceImpl.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/DicServiceImpl.java @@ -3,7 +3,6 @@ package com.njcn.system.service.impl; import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.system.enums.EventResponseEnum; 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.param.DicParam; 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.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.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils;