微调
This commit is contained in:
@@ -15,6 +15,7 @@ import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.gather.device.device.pojo.param.PqDevParam;
|
||||
import com.njcn.gather.device.device.pojo.po.PqDev;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevExcel;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevVO;
|
||||
import com.njcn.gather.device.device.service.IPqDevService;
|
||||
import com.njcn.gather.device.pojo.enums.DevResponseEnum;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -59,6 +60,17 @@ public class PqDevController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo
|
||||
@GetMapping("/getById")
|
||||
@ApiOperation("根据id查询被检设备")
|
||||
@ApiImplicitParam(name = "id", value = "被检设备id", required = true)
|
||||
public HttpResult<PqDevVO> getById(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getById");
|
||||
LogUtil.njcnDebug(log, "{},查询ID为:{}", methodDescribe, id);
|
||||
PqDevVO result = pqDevService.getPqDevById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(operateType = OperateType.ADD)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增被检设备")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.gather.device.device.pojo.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2024-12-11
|
||||
*/
|
||||
@Getter
|
||||
public enum TimeCheckResultEnum {
|
||||
UNQUALIFY(0, "不合格"),
|
||||
QUALIFY(1, "合格"),
|
||||
UNKNOWN(2, "/");
|
||||
|
||||
private Integer value;
|
||||
private String msg;
|
||||
|
||||
TimeCheckResultEnum(Integer value, String msg) {
|
||||
this.value = value;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -132,14 +132,14 @@ public class PqDevParam {
|
||||
@ApiModelProperty("设备关键信息二维码")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "复检次数,默认为0", required = true)
|
||||
@ApiModelProperty(value = "检测次数,默认为0", required = true)
|
||||
@NotNull(message = DevValidMessage.RECHECK_NUM_NOT_NULL)
|
||||
@Min(value = 0, message = DevValidMessage.RECHECK_NUM_FORMAT_ERROR)
|
||||
private Integer reCheckNum;
|
||||
|
||||
@ApiModelProperty("监测点台账列表")
|
||||
@Valid
|
||||
private List<PqMonitorParam> pqMonitorList;
|
||||
private List<PqMonitorParam> monitorList;
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
|
||||
@@ -153,17 +153,17 @@ public class PqDev extends BaseEntity implements Serializable {
|
||||
private Integer checkState;
|
||||
|
||||
/**
|
||||
* 检测结果(1:合格/0:不合格)
|
||||
* 检测结果
|
||||
*/
|
||||
private Integer checkResult;
|
||||
|
||||
/**
|
||||
* 报告状态(1:生成/0:未生成)
|
||||
* 报告状态
|
||||
*/
|
||||
private Integer reportState;
|
||||
|
||||
/**
|
||||
* 归档状态(1:归档/0:未归档)
|
||||
* 归档状态
|
||||
*/
|
||||
private Integer documentState;
|
||||
|
||||
@@ -178,7 +178,7 @@ public class PqDev extends BaseEntity implements Serializable {
|
||||
private String qrCode;
|
||||
|
||||
/**
|
||||
* 复检次数,默认为0
|
||||
* 检测次数,默认为0
|
||||
*/
|
||||
@TableField(value = "ReCheck_Num")
|
||||
private Integer reCheckNum;
|
||||
@@ -192,5 +192,20 @@ public class PqDev extends BaseEntity implements Serializable {
|
||||
* 检测计划id
|
||||
*/
|
||||
private String planId;
|
||||
|
||||
/**
|
||||
* 守时检测结果(0:不合格, 1:合格)
|
||||
*/
|
||||
private Integer timeCheckResult;
|
||||
|
||||
/**
|
||||
* 是否支持系数校准(0:不支持,1:支持)
|
||||
*/
|
||||
private Integer factorFlag;
|
||||
|
||||
/**
|
||||
* 系数校准结果(0:不合格,1:合格)
|
||||
*/
|
||||
private Integer factorCheckResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public class PqDevExcel implements Serializable {
|
||||
@Excel(name = "关键信息二维码", width = 20, orderNum = "27")
|
||||
private String qrCode;
|
||||
|
||||
@Excel(name = "复检次数", width = 15, orderNum = "28")
|
||||
@Excel(name = "检测次数", width = 15, orderNum = "28")
|
||||
@NotNull(message = DevValidMessage.RECHECK_NUM_NOT_NULL)
|
||||
private Integer reCheckNum;
|
||||
|
||||
@@ -166,6 +166,10 @@ public class PqDevExcel implements Serializable {
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class ContrastImportData extends PqDevExcel {
|
||||
@Excel(name = "设备Id", width = 20, orderNum = "1")
|
||||
@NotBlank(message = DevValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SERIES_REGEX, message = DevValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
|
||||
@Excel(name = "出厂日期(yyyy-MM-dd)", width = 25, format = "yyyy-MM-dd", orderNum = "7")
|
||||
@NotNull(message = DevValidMessage.CREATEDATETIME_NOT_NULL)
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.njcn.gather.device.device.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.njcn.gather.device.monitor.pojo.po.PqMonitor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2024-12-13
|
||||
*/
|
||||
@Data
|
||||
public class PqDevVO {
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String pattern;
|
||||
|
||||
private String devType;
|
||||
|
||||
private Integer devChns;
|
||||
|
||||
private Float devVolt;
|
||||
|
||||
private Float devCurr;
|
||||
|
||||
private String manufacturer;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
private LocalDate createDate;
|
||||
|
||||
private String createId;
|
||||
|
||||
private String hardwareVersion;
|
||||
|
||||
private String softwareVersion;
|
||||
|
||||
private String protocol;
|
||||
|
||||
private String ip;
|
||||
|
||||
private Integer port;
|
||||
|
||||
private Integer encryptionFlag;
|
||||
|
||||
private String series;
|
||||
|
||||
private String devKey;
|
||||
|
||||
private String sampleId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
private LocalDate arrivedDate;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private String gdName;
|
||||
|
||||
private String subName;
|
||||
|
||||
private Integer checkState;
|
||||
|
||||
private Integer checkResult;
|
||||
|
||||
private Integer reportState;
|
||||
|
||||
private Integer documentState;
|
||||
|
||||
private String reportPath;
|
||||
|
||||
private String qrCode;
|
||||
|
||||
private Integer reCheckNum;
|
||||
|
||||
private List<PqMonitor> monitorList;
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package com.njcn.gather.device.device.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.gather.device.device.pojo.enums.TimeCheckResultEnum;
|
||||
import com.njcn.gather.device.device.pojo.param.PqDevParam;
|
||||
import com.njcn.gather.device.device.pojo.po.PqDev;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevExcel;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevVO;
|
||||
import com.njcn.gather.device.plan.pojo.param.AdPlanParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -40,6 +42,15 @@ public interface IPqDevService extends IService<PqDev> {
|
||||
*/
|
||||
boolean updatePqDev(PqDevParam.UpdateParam updateParam);
|
||||
|
||||
/**
|
||||
* 批量更新被检设备守时检测结果
|
||||
*
|
||||
* @param ids 被检设备id列表
|
||||
* @param result 守时检测结果
|
||||
* @return 更新成功返回true,否则返回false
|
||||
*/
|
||||
boolean updatePqDevTimeCheckResult(List<String> ids, TimeCheckResultEnum result);
|
||||
|
||||
/**
|
||||
* 删除被检设备信息
|
||||
*
|
||||
@@ -98,4 +109,12 @@ public interface IPqDevService extends IService<PqDev> {
|
||||
* @return 饼图数据
|
||||
*/
|
||||
List<List<Map<String, Object>>> getPieData(String planId);
|
||||
|
||||
/**
|
||||
* 根据id获取被检设备信息
|
||||
*
|
||||
* @param id 被检设备id
|
||||
* @return
|
||||
*/
|
||||
PqDevVO getPqDevById(String id);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.gather.device.device.service.impl;
|
||||
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -10,11 +11,14 @@ import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.db.mybatisplus.constant.DbConstant;
|
||||
import com.njcn.gather.device.device.mapper.PqDevMapper;
|
||||
import com.njcn.gather.device.device.pojo.enums.TimeCheckResultEnum;
|
||||
import com.njcn.gather.device.device.pojo.param.PqDevParam;
|
||||
import com.njcn.gather.device.device.pojo.po.PqDev;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevExcel;
|
||||
import com.njcn.gather.device.device.pojo.vo.PqDevVO;
|
||||
import com.njcn.gather.device.device.service.IPqDevService;
|
||||
import com.njcn.gather.device.device.util.DeviceUtil;
|
||||
import com.njcn.gather.device.monitor.pojo.po.PqMonitor;
|
||||
import com.njcn.gather.device.monitor.pojo.vo.PqMonitorExcel;
|
||||
import com.njcn.gather.device.monitor.service.IPqMonitorService;
|
||||
import com.njcn.gather.device.plan.pojo.param.AdPlanParam;
|
||||
@@ -58,10 +62,10 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||
} else {
|
||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||
queryWrapper.orderBy(true, false, "pq_dev.Create_Time");
|
||||
queryWrapper.orderBy(true, true, "pq_dev.Create_Time");
|
||||
}
|
||||
} else {
|
||||
queryWrapper.orderBy(true, false, "pq_dev.Create_Time");
|
||||
queryWrapper.orderBy(true, true, "pq_dev.Create_Time");
|
||||
}
|
||||
queryWrapper.eq("pq_dev.state", DataStateEnum.ENABLE.getCode());
|
||||
Page<PqDev> page = this.page(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||
@@ -97,7 +101,9 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
pqDev.setId(id);
|
||||
// 比对式设备添加监测点
|
||||
if (DevConst.PATTERN_CONTRAST.equals(dictDataService.getDictDataById(pqDevParam.getPattern()).getCode())) {
|
||||
pqMonitorService.addPqMonitorByDevId(id, pqDevParam.getPqMonitorList());
|
||||
if (ObjectUtil.isNotEmpty(pqDevParam.getMonitorList())) {
|
||||
pqMonitorService.addPqMonitorByDevId(id, pqDevParam.getMonitorList());
|
||||
}
|
||||
}
|
||||
pqDev.setState(DataStateEnum.ENABLE.getCode());
|
||||
return this.save(pqDev);
|
||||
@@ -115,11 +121,18 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
}
|
||||
// 比对式设备修改监测点
|
||||
if (DevConst.PATTERN_CONTRAST.equals(dictDataService.getDictDataById(updateParam.getPattern()).getCode())) {
|
||||
pqMonitorService.updatePqMonitorByDevId(updateParam.getId(), updateParam.getPqMonitorList());
|
||||
if (ObjectUtil.isNotEmpty(updateParam.getMonitorList())) {
|
||||
pqMonitorService.updatePqMonitorByDevId(updateParam.getId(), updateParam.getMonitorList());
|
||||
}
|
||||
}
|
||||
return this.updateById(pqDev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updatePqDevTimeCheckResult(List<String> ids, TimeCheckResultEnum result) {
|
||||
return this.lambdaUpdate().set(PqDev::getTimeCheckResult, result.getValue()).in(PqDev::getId, ids).update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletePqDev(PqDevParam.DeleteParam param) {
|
||||
if (DevConst.PATTERN_CONTRAST.equals(dictDataService.getDictDataById(param.getPattern()).getCode())) {
|
||||
@@ -134,7 +147,25 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
|
||||
@Override
|
||||
public void downloadTemplate() {
|
||||
ExcelUtil.exportExcel("比对式-被检设备模板.xlsx", "被检设备", PqDevExcel.ContrastImportData.class, new ArrayList<>());
|
||||
Map<String, Object> sheet1 = new HashMap<>();
|
||||
ExportParams exportParams1 = new ExportParams();
|
||||
exportParams1.setSheetName("被检设备");
|
||||
sheet1.put("title", exportParams1);
|
||||
sheet1.put("data", Collections.emptyList());
|
||||
sheet1.put("entity", PqDevExcel.ContrastImportData.class);
|
||||
|
||||
Map<String, Object> sheet2 = new HashMap<>();
|
||||
ExportParams exportParams2 = new ExportParams();
|
||||
exportParams2.setSheetName("监测点台账");
|
||||
sheet2.put("title", exportParams2);
|
||||
sheet2.put("data", Collections.emptyList());
|
||||
sheet2.put("entity", PqMonitorExcel.ImportData.class);
|
||||
|
||||
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||
sheetsList.add(sheet1);
|
||||
sheetsList.add(sheet2);
|
||||
|
||||
ExcelUtil.exportExcel("被检设备模板.xlsx", sheetsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -172,32 +203,42 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
if (DevConst.PATTERN_CONTRAST.equals(dictData.getCode())) {
|
||||
List<PqDevExcel.ContrastExportData> pqDevExcels = BeanUtil.copyToList(pqDevs, PqDevExcel.ContrastExportData.class);
|
||||
|
||||
Map<String, Object> sheet1 = new HashMap<String, Object>();
|
||||
sheet1.put("sheetName", "被检设备");
|
||||
Map<String, Object> sheet1 = new HashMap<>();
|
||||
ExportParams exportParams1 = new ExportParams();
|
||||
exportParams1.setSheetName("被检设备");
|
||||
sheet1.put("title", exportParams1);
|
||||
sheet1.put("data", pqDevExcels);
|
||||
sheet1.put("entity", PqDevExcel.ContrastExportData.class);
|
||||
|
||||
List<PqMonitorExcel> pqMonitorExcels = new ArrayList<>();
|
||||
// for (String devId : pqDevs.stream().map(PqDev::getId).collect(Collectors.toList())) {
|
||||
// List<PqMonitor> pqMonitors = pqMonitorService.listPqMonitorByDevId(devId);
|
||||
// pqMonitors.forEach(pqMonitor -> {
|
||||
// PqMonitorExcel pqMonitorExcel = new PqMonitorExcel();
|
||||
// BeanUtil.copyProperties(pqMonitor, pqMonitorExcel);
|
||||
// pqMonitorExcels.add(pqMonitorExcel);
|
||||
// });
|
||||
// }
|
||||
// todo 监测点可视化
|
||||
List<PqMonitorExcel.ExportData> pqMonitorExcels = new ArrayList<>();
|
||||
|
||||
Map<String, Object> sheet2 = new HashMap<String, Object>();
|
||||
sheet2.put("sheetName", "监测点台账");
|
||||
for (int i = 0; i < pqDevs.size(); i++) {
|
||||
List<PqMonitor> pqMonitors = pqMonitorService.listPqMonitorByDevId(pqDevs.get(i).getId());
|
||||
if (ObjectUtil.isNotEmpty(pqMonitors)) {
|
||||
List<PqMonitorExcel.ExportData> exportData = BeanUtil.copyToList(pqMonitors, PqMonitorExcel.ExportData.class);
|
||||
int finalI = i;
|
||||
exportData.forEach(data -> {
|
||||
// 给监测点台账添加设备名称
|
||||
data.setDevName(pqDevs.get(finalI).getName());
|
||||
data.setPtType(dictDataService.getDictDataById(data.getPtType()).getName());
|
||||
});
|
||||
pqMonitorExcels.addAll(exportData);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> sheet2 = new HashMap<>();
|
||||
ExportParams exportParams2 = new ExportParams();
|
||||
exportParams2.setSheetName("监测点台账");
|
||||
sheet2.put("title", exportParams2);
|
||||
sheet2.put("data", pqMonitorExcels);
|
||||
sheet2.put("entity", PqMonitorExcel.class);
|
||||
sheet2.put("entity", PqMonitorExcel.ExportData.class);
|
||||
|
||||
List<Map<String, Object>> sheetsList = new ArrayList<Map<String, Object>>();
|
||||
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||
sheetsList.add(sheet1);
|
||||
sheetsList.add(sheet2);
|
||||
|
||||
ExcelUtil.exportExcel("被检设备导出数据.xlsx", sheetsList);
|
||||
// ExcelUtil.exportExcel("被检设备导出数据.xlsx", "被检设备", PqDevExcel.ContrastExportData.class, pqDevExcels);
|
||||
} else {
|
||||
List<PqDevExcel.SimulateAndDigitalExportData> pqDevExcels = BeanUtil.copyToList(pqDevs, PqDevExcel.SimulateAndDigitalExportData.class);
|
||||
ExcelUtil.exportExcel("被检设备导出数据.xlsx", "被检设备", PqDevExcel.SimulateAndDigitalExportData.class, pqDevExcels);
|
||||
@@ -279,6 +320,18 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PqDevVO getPqDevById(String id) {
|
||||
PqDev pqDev = this.getById(id);
|
||||
PqDevVO pqDevVO = new PqDevVO();
|
||||
BeanUtil.copyProperties(pqDev, pqDevVO);
|
||||
List<PqMonitor> monitorList = pqMonitorService.listPqMonitorByDevId(id);
|
||||
if (ObjectUtil.isNotEmpty(monitorList)) {
|
||||
pqDevVO.setMonitorList(monitorList);
|
||||
}
|
||||
return pqDevVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测状态饼状图数据
|
||||
*
|
||||
@@ -289,7 +342,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (CheckStateEnum e : CheckStateEnum.values()) {
|
||||
Map<String, Object> temp = new HashMap<>();
|
||||
temp.put("name", e.getMessage());
|
||||
temp.put("name", e.getMsg());
|
||||
temp.put("value", map.getOrDefault(e.getValue(), 0L));
|
||||
result.add(temp);
|
||||
}
|
||||
@@ -306,7 +359,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (CheckResultEnum e : CheckResultEnum.values()) {
|
||||
Map<String, Object> temp = new HashMap<>();
|
||||
temp.put("name", e.getMessage());
|
||||
temp.put("name", e.getMsg());
|
||||
temp.put("value", map.getOrDefault(e.getValue(), 0L));
|
||||
result.add(temp);
|
||||
}
|
||||
@@ -323,7 +376,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for (DevReportStateEnum e : DevReportStateEnum.values()) {
|
||||
Map<String, Object> temp = new HashMap<>();
|
||||
temp.put("name", e.getMessage());
|
||||
temp.put("name", e.getMsg());
|
||||
temp.put("value", map.getOrDefault(e.getValue(), 0L));
|
||||
result.add(temp);
|
||||
}
|
||||
|
||||
@@ -20,19 +20,13 @@ public class PqMonitorParam {
|
||||
@ApiModelProperty(value = "谐波系统监测点ID")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "所属设备ID")
|
||||
@NotBlank(message = DevValidMessage.DEV_ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.DEV_ID_FORMAT_ERROR)
|
||||
private String devId;
|
||||
|
||||
@ApiModelProperty(value = "所属母线")
|
||||
@NotBlank(message = DevValidMessage.BELONG_LINE_NOT_BLANK)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 监测点序号
|
||||
*/
|
||||
// private Integer num;
|
||||
@ApiModelProperty(value = "监测点序号")
|
||||
@NotNull(message = DevValidMessage.MONITOR_NUM_NOT_NULL)
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "PT变比")
|
||||
@NotNull(message = DevValidMessage.PT_NOT_NULL)
|
||||
@@ -42,9 +36,6 @@ public class PqMonitorParam {
|
||||
@NotNull(message = DevValidMessage.CT_NOT_NULL)
|
||||
private Float ct;
|
||||
|
||||
/**
|
||||
* 接线方式,字典表
|
||||
*/
|
||||
@ApiModelProperty(value = "接线方式")
|
||||
@NotBlank(message = DevValidMessage.WIRING_TYPE_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.WIRING_TYPE_FORMAT_ERROR)
|
||||
|
||||
@@ -12,9 +12,8 @@ import java.io.Serializable;
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pq_monitor")
|
||||
public class PqMonitor extends BaseEntity implements Serializable {
|
||||
public class PqMonitor implements Serializable {
|
||||
private static final long serialVersionUID = -97606920356561872L;
|
||||
/**
|
||||
* 监测点ID
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.njcn.gather.device.monitor.pojo.vo;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.gather.device.pojo.constant.DevValidMessage;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -12,18 +14,10 @@ import javax.validation.constraints.Pattern;
|
||||
* @author caozehui
|
||||
* @data 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
public class PqMonitorExcel {
|
||||
|
||||
@Excel(name = "监测点编号", width = 20)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.MONITOR_CODE_FORMAT_ERROR)
|
||||
private String code;
|
||||
|
||||
@Excel(name = "所属设备Id", width = 20)
|
||||
@NotBlank(message = DevValidMessage.DEV_ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.DEV_ID_FORMAT_ERROR)
|
||||
private String devId;
|
||||
|
||||
@Excel(name = "所属母线", width = 20)
|
||||
@Excel(name = "所属母线", width = 20, orderNum = "3")
|
||||
@NotBlank(message = DevValidMessage.BELONG_LINE_NOT_BLANK)
|
||||
private String name;
|
||||
|
||||
@@ -31,16 +25,38 @@ public class PqMonitorExcel {
|
||||
// @NotBlank(message = DevValidMessage.MONITOR_NUM_NOT_BLANK)
|
||||
// private Integer num;
|
||||
|
||||
@Excel(name = "PT变比", width = 20)
|
||||
@Excel(name = "PT变比", width = 20, orderNum = "4")
|
||||
@NotNull(message = DevValidMessage.PT_NOT_NULL)
|
||||
private Float pt;
|
||||
|
||||
@Excel(name = "CT变比", width = 20)
|
||||
@Excel(name = "CT变比", width = 20, orderNum = "5")
|
||||
@NotNull(message = DevValidMessage.CT_NOT_NULL)
|
||||
private Float ct;
|
||||
|
||||
@Excel(name = "接线方式", width = 20)
|
||||
@Excel(name = "接线方式", width = 20, orderNum = "6")
|
||||
@NotBlank(message = DevValidMessage.WIRING_TYPE_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.WIRING_TYPE_FORMAT_ERROR)
|
||||
private String ptType;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ImportData extends PqMonitorExcel {
|
||||
@Excel(name = "所属设备Id", width = 20, orderNum = "1")
|
||||
@NotBlank(message = DevValidMessage.DEV_ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.DEV_ID_FORMAT_ERROR)
|
||||
private String devId;
|
||||
|
||||
@Excel(name = "监测点编号", width = 20, isImportField = "true", orderNum = "1")
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.MONITOR_CODE_FORMAT_ERROR)
|
||||
private String code;
|
||||
}
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ExportData extends PqMonitorExcel {
|
||||
@Excel(name = "所属设备名称", width = 20)
|
||||
@NotBlank(message = DevValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DevValidMessage.NAME_FORMAT_ERROR)
|
||||
private String devName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.gather.device.plan.pojo.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2024-12-12
|
||||
*/
|
||||
@Getter
|
||||
public enum DataSourceEnum {
|
||||
THREE_SENSE_ACTUAL_TIME_DATA("0","3秒实时数据"),
|
||||
|
||||
MINUTE_STATISTICS_MAX("1","分钟统计数据-最大"),
|
||||
MINUTE_STATISTICS_MIN("2","分钟统计数据-最小"),
|
||||
MINUTE_STATISTICS_AVG("3","分钟统计数据-平均"),
|
||||
MINUTE_STATISTICS_CP95("4","分钟统计数据-CP95"),
|
||||
RECORDED_DATA("5","录播数据");
|
||||
|
||||
private String value;
|
||||
private String msg;
|
||||
|
||||
DataSourceEnum(String value, String msg) {
|
||||
this.value = value;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class AdPlanParam {
|
||||
|
||||
@ApiModelProperty(value = "数据源ID列表", required = true)
|
||||
@NotEmpty(message = DevValidMessage.DATASOURCE_ID_NOT_EMPTY)
|
||||
private List<@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.DATASOURCE_ID_FORMAT_ERROR)String> datasourceIds;
|
||||
private List<String> datasourceIds;
|
||||
|
||||
@ApiModelProperty(value = "检测脚本ID", required = true)
|
||||
@NotBlank(message = DevValidMessage.SCRIPT_ID_NOT_BLANK)
|
||||
@@ -128,7 +128,6 @@ public class AdPlanParam {
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public static class BindPlanParam {
|
||||
@ApiModelProperty("检测计划ID")
|
||||
@NotNull(message = DevValidMessage.PLAN_ID_NOT_NULL)
|
||||
|
||||
@@ -4,31 +4,93 @@ import com.njcn.gather.device.plan.pojo.po.AdPlan;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
* @data 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class AdPlanVO extends AdPlan {
|
||||
public class AdPlanVO {
|
||||
|
||||
/**
|
||||
* 检测计划ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 检测计划名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 模式,字典表(数字、模拟、比对)
|
||||
*/
|
||||
private String pattern;
|
||||
|
||||
/**
|
||||
* 父计划ID
|
||||
*/
|
||||
private String fatherPlanId;
|
||||
|
||||
/**
|
||||
* 数据源ID列表
|
||||
*/
|
||||
private List<String> datasourceIds;
|
||||
|
||||
/**
|
||||
* 检测源id
|
||||
*/
|
||||
private List<String> sourceIds;
|
||||
|
||||
/**
|
||||
* 检测源名称
|
||||
*/
|
||||
private List<String> sourceName;
|
||||
|
||||
/**
|
||||
* 检测脚本ID,关联PQ_Script表
|
||||
*/
|
||||
private String scriptId;
|
||||
|
||||
/**
|
||||
* 检测脚本名称
|
||||
*/
|
||||
private String scriptName;
|
||||
|
||||
/**
|
||||
* 误差体系ID,关联PQ_Error_Sys表
|
||||
*/
|
||||
private String errorSysId;
|
||||
|
||||
/**
|
||||
* 误差体系名称
|
||||
*/
|
||||
private String errorSysName;
|
||||
|
||||
/**
|
||||
* 检测源名称
|
||||
* 守时检测
|
||||
*/
|
||||
private String SourceName;
|
||||
private Integer timeCheck;
|
||||
|
||||
/**
|
||||
* 数据源名称
|
||||
* 检测状态,字典表(未检、检测中、检测完成)
|
||||
*/
|
||||
private String datasourceName;
|
||||
private Integer testState;
|
||||
|
||||
/**
|
||||
* 报告生成状态,字典表(未生成、部分生成、全部生成)
|
||||
*/
|
||||
private Integer reportState;
|
||||
|
||||
/**
|
||||
* 检测结果,字典表(符合、不符合)
|
||||
*/
|
||||
private Integer result;
|
||||
|
||||
/**
|
||||
* 自动生成,用于生成数据表后缀
|
||||
*/
|
||||
private Integer code;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.gather.device.device.pojo.enums.TimeCheckResultEnum;
|
||||
import com.njcn.gather.device.device.pojo.param.PqDevParam;
|
||||
import com.njcn.gather.device.device.service.IPqDevService;
|
||||
import com.njcn.gather.device.err.service.IPqErrSysService;
|
||||
@@ -24,7 +25,6 @@ import com.njcn.gather.device.pojo.enums.DevResponseEnum;
|
||||
import com.njcn.gather.device.pojo.enums.PlanReportStateEnum;
|
||||
import com.njcn.gather.device.script.service.IPqScriptService;
|
||||
import com.njcn.gather.device.source.pojo.po.PqSource;
|
||||
import com.njcn.gather.system.dictionary.service.IDictDataService;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -46,7 +46,6 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
private final IPqScriptService pqScriptService;
|
||||
private final IPqErrSysService pqErrSysService;
|
||||
private final IAdPlanSourceService adPlanSourceService;
|
||||
private final IDictDataService dictDataService;
|
||||
private final IPqDevService pqDevService;
|
||||
|
||||
@Override
|
||||
@@ -62,25 +61,19 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
queryWrapper.eq("ad_plan.state", DataStateEnum.ENABLE.getCode());
|
||||
Page<AdPlan> page1 = this.page(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||
List<AdPlan> adPlans = page1.getRecords();
|
||||
List<AdPlanVO> adPlanVOList = BeanUtil.copyToList(adPlans, AdPlanVO.class);
|
||||
List<AdPlanVO> adPlanVOList = adPlans.stream().map(adPlan -> {
|
||||
AdPlanVO adPlanVO = new AdPlanVO();
|
||||
BeanUtil.copyProperties(adPlan, adPlanVO);
|
||||
adPlanVO.setDatasourceIds(Arrays.asList(adPlan.getDatasourceId().split(StrUtil.COMMA)));
|
||||
return adPlanVO;
|
||||
}).collect(Collectors.toList());
|
||||
adPlanVOList.forEach(adPlanVO -> {
|
||||
adPlanVO.setScriptName(pqScriptService.getPqScriptById(adPlanVO.getScriptId()).getName());
|
||||
adPlanVO.setErrorSysName(pqErrSysService.getPqErrSysById(adPlanVO.getErrorSysId()).getName());
|
||||
|
||||
List<PqSource> pqSourceList = adPlanSourceService.listPqSourceByPlanId(adPlanVO.getId());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
pqSourceList.forEach(pqSource -> {
|
||||
sb.append(pqSource.getName()).append(StrUtil.COMMA);
|
||||
});
|
||||
adPlanVO.setSourceName(sb.toString().substring(0, sb.length() - 1));
|
||||
|
||||
sb.delete(0, sb.length());
|
||||
|
||||
String[] dataSourceIds = adPlanVO.getDatasourceId().split(StrUtil.COMMA);
|
||||
for (String dataSourceId : dataSourceIds) {
|
||||
sb.append(dictDataService.getDictDataById(dataSourceId).getName()).append(StrUtil.COMMA);
|
||||
}
|
||||
adPlanVO.setDatasourceName(sb.toString().substring(0, sb.length() - 1));
|
||||
adPlanVO.setSourceIds(pqSourceList.stream().map(PqSource::getId).collect(Collectors.toList()));
|
||||
adPlanVO.setSourceName(pqSourceList.stream().map(PqSource::getName).collect(Collectors.toList()));
|
||||
});
|
||||
|
||||
Page<AdPlanVO> page2 = new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam));
|
||||
@@ -99,6 +92,7 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
String planId = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
adPlan.setId(planId);
|
||||
adPlan.setState(DataStateEnum.ENABLE.getCode());
|
||||
// 默认为顶级检测计划
|
||||
adPlan.setFatherPlanId(DevConst.FATHER_ID);
|
||||
adPlan.setDatasourceId(String.join(StrUtil.COMMA, param.getDatasourceIds()));
|
||||
adPlan.setTestState(CheckStateEnum.UNCHECKED.getValue());
|
||||
@@ -111,9 +105,16 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
|
||||
// 新增检测计划、检测源关联
|
||||
adPlanSourceService.addAdPlanSource(planId, param.getSourceIds());
|
||||
|
||||
if (ObjectUtil.isNotEmpty(param.getDevIds())) {
|
||||
AdPlanParam.BindPlanParam bindPlanParam = new AdPlanParam.BindPlanParam();
|
||||
bindPlanParam.setPlanId(planId);
|
||||
bindPlanParam.setPqDevIds(param.getDevIds());
|
||||
// 新增时,绑定设备
|
||||
pqDevService.bind(new AdPlanParam.BindPlanParam(planId, param.getDevIds()));
|
||||
pqDevService.bind(bindPlanParam);
|
||||
|
||||
// 守时检测
|
||||
pqDevService.updatePqDevTimeCheckResult(param.getDevIds(), TimeCheckResultEnum.UNKNOWN);
|
||||
}
|
||||
|
||||
return this.save(adPlan);
|
||||
}
|
||||
@@ -127,6 +128,13 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
|
||||
// 修改检测计划、检测源关联
|
||||
adPlanSourceService.updateAdPlanSource(param.getId(), param.getSourceIds());
|
||||
if (ObjectUtil.isNotEmpty(param.getDevIds())) {
|
||||
AdPlanParam.BindPlanParam bindPlanParam = new AdPlanParam.BindPlanParam();
|
||||
bindPlanParam.setPlanId(param.getId());
|
||||
bindPlanParam.setPqDevIds(param.getDevIds());
|
||||
// 修改时,修改绑定设备
|
||||
pqDevService.bind(bindPlanParam);
|
||||
}
|
||||
|
||||
return this.updateById(adPlan);
|
||||
}
|
||||
@@ -159,7 +167,7 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
continue;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("name", checkStateEnum.getMessage());
|
||||
map.put("name", checkStateEnum.getMsg());
|
||||
List<Map<String, Object>> children = new ArrayList<>();
|
||||
if (map1.containsKey(checkStateEnum.getValue())) {
|
||||
map1.get(checkStateEnum.getValue()).forEach(adPlan -> {
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface DevValidMessage {
|
||||
|
||||
String ENCRYPTION_NOT_NULL = "是否为加密版本不能为空,请检查encryption参数";
|
||||
|
||||
String RECHECK_NUM_NOT_NULL = "复检次数不能为空,请检查reCheckNum参数";
|
||||
String RECHECK_NUM_NOT_NULL = "检测次数不能为空,请检查reCheckNum参数";
|
||||
|
||||
String PLAN_ID_NOT_NULL = "检测计划ID不能为空,请检查planId参数";
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface DevValidMessage {
|
||||
|
||||
String ENCRYPTION_FLAG_FORMAT_ERROR = "是否为加密版本格式错误,请检查encryptionFlag参数";
|
||||
|
||||
String RECHECK_NUM_FORMAT_ERROR = "复检次数格式错误,请检查recheckNum参数";
|
||||
String RECHECK_NUM_FORMAT_ERROR = "检测次数格式错误,请检查recheckNum参数";
|
||||
|
||||
String PATTERN_FORMAT_ERROR = "模式格式错误,请检查pattern参数";
|
||||
|
||||
@@ -150,8 +150,6 @@ public interface DevValidMessage {
|
||||
|
||||
String DATASOURCE_ID_NOT_EMPTY = "数据源ID不能为空";
|
||||
|
||||
String DATASOURCE_ID_FORMAT_ERROR = "数据源ID格式错误";
|
||||
|
||||
String SCRIPT_ID_NOT_BLANK = "检测脚本ID不能为空";
|
||||
|
||||
String SCRIPT_ID_FORMAT_ERROR = "检测脚本ID格式错误";
|
||||
@@ -183,4 +181,6 @@ public interface DevValidMessage {
|
||||
String DOCUMENT_STATE_FORMAT_ERROR = "归档状态格式错误";
|
||||
|
||||
String MONITOR_CODE_FORMAT_ERROR = "监测点编码格式错误";
|
||||
|
||||
String MONITOR_NUM_NOT_NULL = "监测点序号不能为空";
|
||||
}
|
||||
|
||||
@@ -12,18 +12,18 @@ public enum CheckResultEnum {
|
||||
ACCORD("符合", 1),
|
||||
UNKNOWN("/", 2);
|
||||
|
||||
private final String message;
|
||||
private final Integer value;
|
||||
private final String msg;
|
||||
|
||||
CheckResultEnum(String message, Integer value) {
|
||||
this.message = message;
|
||||
CheckResultEnum(String msg, Integer value) {
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getMsgByValue(Integer value) {
|
||||
for (CheckStateEnum state : CheckStateEnum.values()) {
|
||||
if (state.getValue().equals(value)) {
|
||||
return state.getMessage();
|
||||
return state.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -16,18 +16,18 @@ public enum CheckStateEnum {
|
||||
*/
|
||||
DOCUMENTED("归档", 3);
|
||||
|
||||
private final String message;
|
||||
private final Integer value;
|
||||
private final String msg;
|
||||
|
||||
CheckStateEnum(String message, Integer value) {
|
||||
this.message = message;
|
||||
CheckStateEnum(String msg, Integer value) {
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getMsgByValue(Integer value) {
|
||||
for (CheckStateEnum state : CheckStateEnum.values()) {
|
||||
if (state.getValue().equals(value)) {
|
||||
return state.getMessage();
|
||||
return state.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -11,11 +11,11 @@ public enum DevDocumentStateEnum {
|
||||
UNDOCUMENTED("未归档", 0),
|
||||
DOCUMENTED("归档", 1);
|
||||
|
||||
private final String message;
|
||||
private final Integer value;
|
||||
private final String msg;
|
||||
|
||||
DevDocumentStateEnum(String message, Integer value) {
|
||||
this.message = message;
|
||||
DevDocumentStateEnum(String msg, Integer value) {
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,18 +11,18 @@ public enum DevReportStateEnum {
|
||||
REPORT_STATE_NOT_GENERATED("未生成", 0),
|
||||
REPORT_STATE_GENERATED("已生成", 1);
|
||||
|
||||
private final String message;
|
||||
private final Integer value;
|
||||
private final String msg;
|
||||
|
||||
DevReportStateEnum(String message, Integer value) {
|
||||
this.message = message;
|
||||
DevReportStateEnum(String msg, Integer value) {
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getMsgByValue(Integer value) {
|
||||
for (CheckStateEnum state : CheckStateEnum.values()) {
|
||||
if (state.getValue().equals(value)) {
|
||||
return state.getMessage();
|
||||
return state.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -14,12 +14,12 @@ public enum DevResponseEnum {
|
||||
PQ_DEV_REPEAT("A001007", "重复的被检设备"),
|
||||
PQ_DEV_HAS_MONITOR("A001008", "该设备下关联有监测点,请先移除监测点"),;
|
||||
|
||||
private final String msg;
|
||||
private final String code;
|
||||
|
||||
private final String message;
|
||||
|
||||
DevResponseEnum(String code, String message) {
|
||||
DevResponseEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ public enum PlanReportStateEnum {
|
||||
REPORT_STATE_PARTIALLY_GENERATED("部分生成", 1),
|
||||
REPORT_STATE_ALL_GENERATED("全部生成", 2);
|
||||
|
||||
private final String message;
|
||||
private final Integer value;
|
||||
private final String msg;
|
||||
|
||||
PlanReportStateEnum(String message, Integer value) {
|
||||
this.message = message;
|
||||
PlanReportStateEnum(String msg, Integer value) {
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SysTestConfigParam {
|
||||
@Max(value = 1, message = SystemValidMessage.AUTO_GENERATE_FORMAT_ERROR)
|
||||
private Integer autoGenerate;
|
||||
|
||||
@ApiModelProperty(value = "最大复检次数")
|
||||
@ApiModelProperty(value = "最大检测次数")
|
||||
@NotNull(message = SystemValidMessage.MAX_RECHECK_NOT_NULL)
|
||||
private Integer maxTime;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class SysTestConfig extends BaseEntity implements Serializable {
|
||||
private Integer autoGenerate;
|
||||
|
||||
/**
|
||||
* 最大复检次数,默认3次
|
||||
* 最大检测次数,默认3次
|
||||
*/
|
||||
@TableField("Max_Time")
|
||||
private Integer maxTime;
|
||||
|
||||
@@ -77,7 +77,7 @@ public interface SystemValidMessage {
|
||||
|
||||
String AUTO_GENERATE_NOT_NULL = "是否自动生成不能为空,请检查autoGenerate参数";
|
||||
|
||||
String MAX_RECHECK_NOT_NULL = "最大复检次数不能为空,请检查maxRecheck参数";
|
||||
String MAX_RECHECK_NOT_NULL = "最大检测次数不能为空,请检查maxRecheck参数";
|
||||
|
||||
String DATA_RULE_NOT_BLANK = "数据处理规则不能为空,请检查dataRule参数";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user