1.技术监督通用文件表调整
2.终端检测导入功能调整 3.技术监督计划增加其他附件上传
This commit is contained in:
@@ -2,14 +2,10 @@ package com.njcn.poi.excel;
|
|||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.util.CharsetUtil;
|
import cn.hutool.core.util.CharsetUtil;
|
||||||
import com.njcn.web.utils.HttpServletUtil;
|
import com.njcn.web.utils.HttpServletUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.hssf.usermodel.DVConstraint;
|
|
||||||
import org.apache.poi.hssf.usermodel.HSSFDataValidation;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||||
import org.apache.poi.ss.util.CellReference;
|
import org.apache.poi.ss.util.CellReference;
|
||||||
@@ -22,8 +18,6 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -181,8 +175,6 @@ public class ExcelUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
workbook.write(outputStream);
|
workbook.write(outputStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(">>> 导出数据异常:{}", e.getMessage());
|
log.error(">>> 导出数据异常:{}", e.getMessage());
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import javax.validation.constraints.NotBlank;
|
|||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class SensitiveReportExcel implements Serializable {
|
public class SensitiveReportExcel implements Serializable {
|
||||||
@@ -55,9 +54,8 @@ public class SensitiveReportExcel implements Serializable {
|
|||||||
// private String orgId;
|
// private String orgId;
|
||||||
|
|
||||||
|
|
||||||
@Excel(name = "工程预期投产日期", width = 30)
|
@Excel(name = "工程预期投产日期(yyyy-MM-dd)", width = 30)
|
||||||
//@NotBlank(message = "工程预期投产日期不能为空")
|
private String expectedProductionDate;
|
||||||
private LocalDate expectedProductionDate;
|
|
||||||
|
|
||||||
@Excel(name = "电压等级", width = 30)
|
@Excel(name = "电压等级", width = 30)
|
||||||
//@NotBlank(message = "电压等级不能为空")
|
//@NotBlank(message = "电压等级不能为空")
|
||||||
|
|||||||
@@ -3,13 +3,10 @@ package com.njcn.supervision.pojo.dto;
|
|||||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class SensitiveUserSExcel implements Serializable {
|
public class SensitiveUserSExcel implements Serializable {
|
||||||
@@ -60,10 +57,9 @@ public class SensitiveUserSExcel implements Serializable {
|
|||||||
// private String orgId;
|
// private String orgId;
|
||||||
|
|
||||||
|
|
||||||
@Excel(name = "工程预期投产日期", width = 30)
|
@Excel(name = "工程预期投产日期(yyyy-MM-dd)", width = 30)
|
||||||
//@NotBlank(message = "工程预期投产日期不能为空")
|
//@NotBlank(message = "工程预期投产日期不能为空")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
private String expectedProductionDate;
|
||||||
private LocalDate expectedProductionDate;
|
|
||||||
|
|
||||||
@Excel(name = "电压等级", width = 30)
|
@Excel(name = "电压等级", width = 30)
|
||||||
//@NotBlank(message = "电压等级不能为空")
|
//@NotBlank(message = "电压等级不能为空")
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
package com.njcn.supervision.pojo.dto;
|
package com.njcn.supervision.pojo.dto;
|
||||||
|
|
||||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
@@ -26,14 +22,12 @@ import java.time.LocalDateTime;
|
|||||||
public class SupervisionDevMainReportExcel {
|
public class SupervisionDevMainReportExcel {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程预期投产日期
|
* 工程预期投产日期
|
||||||
*/
|
*/
|
||||||
@Excel(name = "*工程预期投产日期(yyyy-MM-dd)", width = 30)
|
@Excel(name = "*工程预期投产日期(yyyy-MM-dd)", width = 30, height = 6)
|
||||||
@NotBlank(message = "不能为空")
|
@NotBlank(message = "不能为空")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
private String expectedProductionDate;
|
||||||
private LocalDate expectedProductionDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属地市
|
* 所属地市
|
||||||
@@ -107,19 +101,15 @@ public class SupervisionDevMainReportExcel {
|
|||||||
/**
|
/**
|
||||||
* 投运时间
|
* 投运时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "*投运时间(yyyy-MM-dd HH:mm:ss)", width = 30)
|
@Excel(name = "*投运时间(yyyy-MM-dd HH:mm:ss)", width = 40)
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
@NotBlank(message = "投运时间不能为空")
|
@NotBlank(message = "投运时间不能为空")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private String commissioningTime;
|
||||||
private LocalDateTime commissioningTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据更新时间
|
* 数据更新时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "数据更新时间(yyyy-MM-dd HH:mm:ss)", width = 30)
|
@Excel(name = "数据更新时间(yyyy-MM-dd HH:mm:ss)", width = 40)
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
private String dataUpdateTime;
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private LocalDateTime dataUpdateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属前置机
|
* 所属前置机
|
||||||
@@ -131,9 +121,9 @@ public class SupervisionDevMainReportExcel {
|
|||||||
/**
|
/**
|
||||||
* 监测终端安装位置
|
* 监测终端安装位置
|
||||||
*/
|
*/
|
||||||
@Excel(name = "*监测终端安装位置", width = 30, replace = {"电网侧_0", "用户侧_1", "_0"})
|
@Excel(name = "*监测终端安装位置", width = 30, replace = {"电网侧_0", "用户侧_1"})
|
||||||
@NotBlank(message = "监测终端安装位置不能为空")
|
@NotBlank(message = "监测终端安装位置不能为空")
|
||||||
private String monitoringDeviceInstallationPosition;
|
private String monitoringDeviceInstallationPosition = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 识别码
|
* 识别码
|
||||||
@@ -150,14 +140,14 @@ public class SupervisionDevMainReportExcel {
|
|||||||
/**
|
/**
|
||||||
* 终端模型
|
* 终端模型
|
||||||
*/
|
*/
|
||||||
@Excel(name = "终端模型", width = 30, replace = {"虚拟终端_0", "实际终端_1", "离线_2", "_1"})
|
@Excel(name = "终端模型", width = 30, replace = {"虚拟终端_0", "实际终端_1", "离线_2"})
|
||||||
private String terminalModel;
|
private String terminalModel = "1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据类型
|
* 数据类型
|
||||||
*/
|
*/
|
||||||
@Excel(name = "数据类型", width = 30, replace = {"暂态系统_0", "稳态系统_1", "两个系统_2", "_2"})
|
@Excel(name = "数据类型", width = 30, replace = {"暂态系统_0", "稳态系统_1", "两个系统_2"})
|
||||||
private String dataType;
|
private String dataType = "2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端接线方式类型
|
* 终端接线方式类型
|
||||||
@@ -177,11 +167,9 @@ public class SupervisionDevMainReportExcel {
|
|||||||
/**
|
/**
|
||||||
* 本次终端检测时间
|
* 本次终端检测时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "*本次终端检测时间(yyyy-MM-dd HH:mm:ss)", width = 30)
|
@Excel(name = "*本次终端检测时间(yyyy-MM-dd HH:mm:ss)", width = 40)
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
@NotBlank(message = "本次终端检测时间不能为空")
|
@NotBlank(message = "本次终端检测时间不能为空")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private String currentTerminalDetectionTime;
|
||||||
private LocalDateTime currentTerminalDetectionTime;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -212,33 +200,32 @@ public class SupervisionDevMainReportExcel {
|
|||||||
* SIM卡号
|
* SIM卡号
|
||||||
*/
|
*/
|
||||||
@Excel(name = "SIM卡号", width = 30)
|
@Excel(name = "SIM卡号", width = 30)
|
||||||
@NotBlank(message = "不能为空")
|
|
||||||
private String simCardNumber;
|
private String simCardNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对时功能
|
* 对时功能
|
||||||
*/
|
*/
|
||||||
@Excel(name = "对时功能", width = 30, replace = {"关闭_0", "开启_1", "_0"})
|
@Excel(name = "对时功能", width = 30, replace = {"关闭_0", "开启_1"})
|
||||||
private String timeSyncFunction;
|
private String timeSyncFunction = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电镀功能
|
* 电镀功能
|
||||||
*/
|
*/
|
||||||
@Excel(name = "电镀功能", width = 30, replace = {"关闭_0", "开启_1", "_0"})
|
@Excel(name = "电镀功能", width = 30, replace = {"关闭_0", "开启_1"})
|
||||||
private String electroplatingFunction;
|
private String electroplatingFunction = "0";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 召换标志
|
* 召换标志
|
||||||
*/
|
*/
|
||||||
@Excel(name = "召换标志", width = 30, replace = {"周期触发_0", "变位触发_1", "_0"})
|
@Excel(name = "召换标志", width = 30, replace = {"周期触发_0", "变位触发_1"})
|
||||||
private String summonFlag;
|
private String summonFlag = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 告警功能
|
* 告警功能
|
||||||
*/
|
*/
|
||||||
@Excel(name = "告警功能", width = 30, replace = {"否_0", "是_1", "_0"})
|
@Excel(name = "告警功能", width = 30, replace = {"否_0", "是_1"})
|
||||||
private String alarmFunction;
|
private String alarmFunction = "0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同号
|
* 合同号
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ public class SurveyTestParam implements Serializable {
|
|||||||
@ApiModelProperty(value = "技术监督报告")
|
@ApiModelProperty(value = "技术监督报告")
|
||||||
private String supervisionReport;
|
private String supervisionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他报告
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "其他报告")
|
||||||
|
private String otherReport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否有问题 0 没有问题 1 有问题
|
* 是否有问题 0 没有问题 1 有问题
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,45 +1,51 @@
|
|||||||
package com.njcn.supervision.pojo.po.file;
|
package com.njcn.supervision.pojo.po.file;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import java.io.Serializable;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 用户档案信息表
|
* 用户档案信息表
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author wr
|
* @author wr
|
||||||
* @since 2024-08-14
|
* @since 2024-08-14
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Data
|
||||||
@Setter
|
|
||||||
@TableName("supervision_file_url")
|
@TableName("supervision_file_url")
|
||||||
public class FileUrl extends BaseEntity {
|
public class FileUrl extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* id(对应表数据id一样)
|
* id(对应表数据id一样)
|
||||||
*/
|
*/
|
||||||
private String id;
|
@MppMultiId
|
||||||
|
@TableField(value = "supervision_Id")
|
||||||
|
private String supervisionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字段名称
|
* 字段名称
|
||||||
*/
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件地址
|
* 文件地址
|
||||||
*/
|
*/
|
||||||
|
@TableField(value = "url")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-删除 1-正常
|
* 状态:0-删除 1-正常
|
||||||
*/
|
*/
|
||||||
private Integer state;
|
@TableField(value = "state")
|
||||||
|
private Integer state = 1;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -72,6 +69,12 @@ public class SurveyTest extends BaseEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String supervisionReport;
|
private String supervisionReport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他报告
|
||||||
|
*/
|
||||||
|
private String otherReport;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否有问题 0 没有问题 1 有问题
|
* 是否有问题 0 没有问题 1 有问题
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -175,4 +175,8 @@ public class SupervisionDevMainReportVO {
|
|||||||
|
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0:系统建档 1:外部导入
|
||||||
|
*/
|
||||||
|
private Integer importType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ public class FileUrlController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@GetMapping("/addOrUpdateFile")
|
@PostMapping("/addOrUpdateFile")
|
||||||
@ApiOperation("批量添加和修改文件信息")
|
@ApiOperation("批量添加和修改文件信息")
|
||||||
public HttpResult<Boolean> addOrUpdateFile(List<FileUrl> list) {
|
public HttpResult<Boolean> addOrUpdateFile(@RequestBody List<FileUrl> list) {
|
||||||
String methodDescribe = getMethodDescribe("addOrUpdateFile");
|
String methodDescribe = getMethodDescribe("addOrUpdateFile");
|
||||||
Boolean b = fileUrlService.addOrUpdateFile(list);
|
Boolean b = fileUrlService.addOrUpdateFile(list);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.njcn.web.controller.BaseController;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RequestMapping("/userReportRenewal")
|
@RequestMapping("width = 30,height = 60Renewal")
|
||||||
@Api(tags = "干扰源常态化管理信息更新")
|
@Api(tags = "干扰源常态化管理信息更新")
|
||||||
public class UserReportRenewalController extends BaseController {
|
public class UserReportRenewalController extends BaseController {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.supervision.mapper.file;
|
package com.njcn.supervision.mapper.file;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
import com.njcn.supervision.pojo.po.file.FileUrl;
|
import com.njcn.supervision.pojo.po.file.FileUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,6 +11,6 @@ import com.njcn.supervision.pojo.po.file.FileUrl;
|
|||||||
* @author wr
|
* @author wr
|
||||||
* @since 2024-08-14
|
* @since 2024-08-14
|
||||||
*/
|
*/
|
||||||
public interface FileUrlMapper extends BaseMapper<FileUrl> {
|
public interface FileUrlMapper extends MppBaseMapper<FileUrl> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.text.StrPool;
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -447,7 +448,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
params.setSheetNum(1);
|
params.setSheetNum(1);
|
||||||
List<SupervisionDevMainReportExcel> devExcels = new ArrayList<>();
|
List<SupervisionDevMainReportExcel> devExcels = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
ExcelImportResult<SupervisionDevMainReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveUserSExcel.class, params);
|
ExcelImportResult<SupervisionDevMainReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SupervisionDevMainReportExcel.class, params);
|
||||||
//如果存在非法数据,将不合格的数据导出
|
//如果存在非法数据,将不合格的数据导出
|
||||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法数据.xlsx", response);
|
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法数据.xlsx", response);
|
||||||
@@ -489,7 +490,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
//todo 需要根据变电站id进行匹配
|
//todo 需要根据变电站id进行匹配
|
||||||
LambdaQueryWrapper<SupervisionTempDeviceReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SupervisionTempDeviceReport> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper
|
lambdaQueryWrapper
|
||||||
.eq(SupervisionTempDeviceReport::getSubstation, dev.getSubstation())
|
.eq(SupervisionTempDeviceReport::getSubstationName, dev.getSubstation())
|
||||||
.eq(SupervisionTempDeviceReport::getTerminalIp, dev.getTerminalIp());
|
.eq(SupervisionTempDeviceReport::getTerminalIp, dev.getTerminalIp());
|
||||||
List<SupervisionTempDeviceReport> list = supervisionTempDeviceReportService.getBaseMapper().selectList(lambdaQueryWrapper);
|
List<SupervisionTempDeviceReport> list = supervisionTempDeviceReportService.getBaseMapper().selectList(lambdaQueryWrapper);
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
@@ -518,7 +519,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
List<String> DeptIds = deptS.stream().filter(x -> x.getName().equals(dev.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
List<String> DeptIds = deptS.stream().filter(x -> x.getName().equals(dev.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
||||||
po.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
po.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
||||||
|
|
||||||
po.setExpectedProductionDate(dev.getExpectedProductionDate());
|
po.setExpectedProductionDate(DateUtil.parseDate(dev.getExpectedProductionDate()).toLocalDateTime().toLocalDate());
|
||||||
po.setCity(PubUtil.getDicById(dev.getCity(), jiBeiArea));
|
po.setCity(PubUtil.getDicById(dev.getCity(), jiBeiArea));
|
||||||
po.setUserStatus("1");
|
po.setUserStatus("1");
|
||||||
// po.setAcceptanceInspectionReport();
|
// po.setAcceptanceInspectionReport();
|
||||||
@@ -531,11 +532,9 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
po.setImportType(1);
|
po.setImportType(1);
|
||||||
po.setStatus(2);
|
po.setStatus(2);
|
||||||
po.setState(DataStateEnum.ENABLE.getCode());
|
po.setState(DataStateEnum.ENABLE.getCode());
|
||||||
this.save(po);
|
|
||||||
//终端基础信息
|
//终端基础信息
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
SupervisionTempDeviceReport devDetails = new SupervisionTempDeviceReport();
|
SupervisionTempDeviceReport devDetails = new SupervisionTempDeviceReport();
|
||||||
devDetails.setId(po.getId());
|
|
||||||
if(deptMap.containsKey(dev.getPowerCompany())){
|
if(deptMap.containsKey(dev.getPowerCompany())){
|
||||||
devDetails.setPowerCompany(deptMap.get(dev.getPowerCompany()));
|
devDetails.setPowerCompany(deptMap.get(dev.getPowerCompany()));
|
||||||
devDetails.setPowerCompany(deptMap.get(dev.getPowerCompany()));
|
devDetails.setPowerCompany(deptMap.get(dev.getPowerCompany()));
|
||||||
@@ -545,7 +544,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
//todo 需要根据变电站id进行匹配
|
//todo 需要根据变电站id进行匹配
|
||||||
// devDetails.setCustomSubstationFlag();
|
// devDetails.setCustomSubstationFlag();
|
||||||
// devDetails.setSubstation();
|
// devDetails.setSubstation();
|
||||||
// devDetails.setSubstationName();
|
devDetails.setSubstationName(dev.getSubstation());
|
||||||
// devDetails.setSubstationVoltageLevel();
|
// devDetails.setSubstationVoltageLevel();
|
||||||
// devDetails.setLongitude();
|
// devDetails.setLongitude();
|
||||||
// devDetails.setLatitude();
|
// devDetails.setLatitude();
|
||||||
@@ -591,16 +590,16 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
}else{
|
}else{
|
||||||
msg.append("所属前置机不存在!");
|
msg.append("所属前置机不存在!");
|
||||||
}
|
}
|
||||||
devDetails.setCurrentTerminalDetectionTime(dev.getCurrentTerminalDetectionTime());
|
devDetails.setCurrentTerminalDetectionTime(DateUtil.parseDate(dev.getCurrentTerminalDetectionTime()).toLocalDateTime());
|
||||||
devDetails.setNextTerminalInspectionTime(dev.getCurrentTerminalDetectionTime().plusYears(5));
|
devDetails.setNextTerminalInspectionTime(DateUtil.parseDate(dev.getCurrentTerminalDetectionTime()).toLocalDateTime().plusYears(5));
|
||||||
devDetails.setIdentificationCode(dev.getIdentificationCode());
|
devDetails.setIdentificationCode(dev.getIdentificationCode());
|
||||||
devDetails.setTerminalSecretKey(dev.getTerminalSecretKey());
|
devDetails.setTerminalSecretKey(dev.getTerminalSecretKey());
|
||||||
devDetails.setTerminalModel(dev.getTerminalModel());
|
devDetails.setTerminalModel(dev.getTerminalModel());
|
||||||
devDetails.setDataType(dev.getDataType());
|
devDetails.setDataType(dev.getDataType());
|
||||||
devDetails.setCommunicationStatus("0");
|
devDetails.setCommunicationStatus("0");
|
||||||
devDetails.setSimCardNumber(dev.getSimCardNumber());
|
devDetails.setSimCardNumber(dev.getSimCardNumber());
|
||||||
devDetails.setCommissioningTime(dev.getCommissioningTime());
|
devDetails.setCommissioningTime(DateUtil.parseDate(dev.getCommissioningTime()).toLocalDateTime());
|
||||||
devDetails.setDataUpdateTime(dev.getDataUpdateTime());
|
devDetails.setDataUpdateTime(StrUtil.isNotBlank(dev.getDataUpdateTime())?DateUtil.parseDate(dev.getDataUpdateTime()).toLocalDateTime():null);
|
||||||
devDetails.setTimeSyncFunction(Integer.parseInt(dev.getTimeSyncFunction()));
|
devDetails.setTimeSyncFunction(Integer.parseInt(dev.getTimeSyncFunction()));
|
||||||
devDetails.setElectroplatingFunction(Integer.parseInt(dev.getElectroplatingFunction()));
|
devDetails.setElectroplatingFunction(Integer.parseInt(dev.getElectroplatingFunction()));
|
||||||
devDetails.setMonitoringDeviceInstallationPosition(dev.getMonitoringDeviceInstallationPosition());
|
devDetails.setMonitoringDeviceInstallationPosition(dev.getMonitoringDeviceInstallationPosition());
|
||||||
@@ -621,6 +620,8 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
devMsgList.add(sensitiveUserExcelMsg);
|
devMsgList.add(sensitiveUserExcelMsg);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
this.save(po);
|
||||||
|
devDetails.setId(po.getId());
|
||||||
supervisionTempDeviceReportService.saveOrUpdate(devDetails);
|
supervisionTempDeviceReportService.saveOrUpdate(devDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.supervision.service.file;
|
package com.njcn.supervision.service.file;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
import com.njcn.supervision.pojo.po.file.FileUrl;
|
import com.njcn.supervision.pojo.po.file.FileUrl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
* @author wr
|
* @author wr
|
||||||
* @since 2024-08-14
|
* @since 2024-08-14
|
||||||
*/
|
*/
|
||||||
public interface IFileUrlService extends IService<FileUrl> {
|
public interface IFileUrlService extends IMppService<FileUrl> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id获取全部数据
|
* 根据id获取全部数据
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.njcn.supervision.service.file.impl;
|
package com.njcn.supervision.service.file.impl;
|
||||||
|
|
||||||
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.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.supervision.mapper.file.FileUrlMapper;
|
import com.njcn.supervision.mapper.file.FileUrlMapper;
|
||||||
import com.njcn.supervision.pojo.po.file.FileUrl;
|
import com.njcn.supervision.pojo.po.file.FileUrl;
|
||||||
import com.njcn.supervision.service.file.IFileUrlService;
|
import com.njcn.supervision.service.file.IFileUrlService;
|
||||||
@@ -18,15 +18,15 @@ import java.util.List;
|
|||||||
* @since 2024-08-14
|
* @since 2024-08-14
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class FileUrlServiceImpl extends ServiceImpl<FileUrlMapper, FileUrl> implements IFileUrlService {
|
public class FileUrlServiceImpl extends MppServiceImpl<FileUrlMapper, FileUrl> implements IFileUrlService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<FileUrl> getFileUrlList(String id) {
|
public List<FileUrl> getFileUrlList(String id) {
|
||||||
return this.list(new LambdaQueryWrapper<FileUrl>().eq(FileUrl::getId, id));
|
return this.list(new LambdaQueryWrapper<FileUrl>().eq(FileUrl::getSupervisionId, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean addOrUpdateFile(List<FileUrl> list) {
|
public Boolean addOrUpdateFile(List<FileUrl> list) {
|
||||||
return this.saveOrUpdateBatch(list);
|
return this.saveOrUpdateBatchByMultiId(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -743,7 +743,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
List<String> DeptIds = data.stream().filter(x -> x.getName().equals(userExcel.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
List<String> DeptIds = data.stream().filter(x -> x.getName().equals(userExcel.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
||||||
userReportPO.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
userReportPO.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
||||||
|
|
||||||
userReportPO.setExpectedProductionDate(userExcel.getExpectedProductionDate());
|
userReportPO.setExpectedProductionDate(DateUtil.parseDate(userExcel.getExpectedProductionDate()).toLocalDateTime().toLocalDate());
|
||||||
userReportPO.setUserType(UserNatureEnum.SENSITIVE_USER.getCode());
|
userReportPO.setUserType(UserNatureEnum.SENSITIVE_USER.getCode());
|
||||||
//所属地市
|
//所属地市
|
||||||
userReportPO.setCity(userExcel.getCity());
|
userReportPO.setCity(userExcel.getCity());
|
||||||
@@ -942,7 +942,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
List<String> DeptIds = data.stream().filter(x -> x.getName().equals(reportExcel.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
List<String> DeptIds = data.stream().filter(x -> x.getName().equals(reportExcel.getCity())).map(DeptDTO::getId).collect(Collectors.toList());
|
||||||
userReportPO.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
userReportPO.setOrgId(CollUtil.isNotEmpty(DeptIds)?DeptIds.get(0):RequestUtil.getDeptIndex());
|
||||||
|
|
||||||
userReportPO.setExpectedProductionDate(reportExcel.getExpectedProductionDate());
|
userReportPO.setExpectedProductionDate(DateUtil.parseDate(reportExcel.getExpectedProductionDate()).toLocalDateTime().toLocalDate());
|
||||||
userReportPO.setUserType(reportExcel.getUserType());
|
userReportPO.setUserType(reportExcel.getUserType());
|
||||||
//所属地市
|
//所属地市
|
||||||
userReportPO.setCity(reportExcel.getCity());
|
userReportPO.setCity(reportExcel.getCity());
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ public class ConfigController extends BaseController {
|
|||||||
String methodDescribe = getMethodDescribe("getSysConfigData");
|
String methodDescribe = getMethodDescribe("getSysConfigData");
|
||||||
LogUtil.njcnDebug(log, "{}", methodDescribe, methodDescribe);
|
LogUtil.njcnDebug(log, "{}", methodDescribe, methodDescribe);
|
||||||
List<Config> res = iConfigService.getList();
|
List<Config> res = iConfigService.getList();
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(res)) {
|
if (CollectionUtils.isEmpty(res)) {
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -340,8 +340,15 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearHistoryLog() {
|
public void clearHistoryLog() {
|
||||||
LocalDate nowDate = LocalDate.now();
|
Config config = iConfigService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getState, DataStateEnum.ENABLE.getCode()));
|
||||||
LocalDate agoDate = nowDate.minusMonths(clearHistoryLog).with(TemporalAdjusters.firstDayOfMonth());
|
Integer logTime;
|
||||||
|
if(ObjectUtil.isNotNull(config)){
|
||||||
|
logTime = config.getLogTime();
|
||||||
|
}else{
|
||||||
|
logTime = clearHistoryLog;
|
||||||
|
}
|
||||||
|
LocalDateTime nowDate = LocalDateTime.now();
|
||||||
|
LocalDateTime agoDate = nowDate.minusMonths(logTime).with(TemporalAdjusters.firstDayOfMonth());
|
||||||
String date = agoDate.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
String date = agoDate.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
||||||
|
|
||||||
QueryWrapper<UserLog> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<UserLog> queryWrapper = new QueryWrapper<>();
|
||||||
|
|||||||
@@ -61,6 +61,6 @@ runTake:
|
|||||||
|
|
||||||
#清除日志月份
|
#清除日志月份
|
||||||
clear:
|
clear:
|
||||||
num: 1
|
num: 3
|
||||||
mqtt:
|
mqtt:
|
||||||
client-id: @artifactId@${random.value}
|
client-id: @artifactId@${random.value}
|
||||||
|
|||||||
Reference in New Issue
Block a user