微调
This commit is contained in:
@@ -85,8 +85,6 @@ public interface DevValidMessage {
|
||||
String STANDARD_TIME_NOT_BLANK = "标准推行时间不能为空,请检查standardTime参数";
|
||||
|
||||
String SCRIPT_TYPE_FORMAT_ERROR = "检测脚本类型格式错误,请检查scriptType参数";
|
||||
String SCRIPT_VOLT_FORMAT_ERROR = "检测脚本额定电压格式错误,请检查scriptType参数";
|
||||
String SCRIPT_CURR_FORMAT_ERROR = "检测脚本额定电流格式错误,请检查scriptType参数";
|
||||
|
||||
String DEV_LEVEL_NOT_BLANK = "设备等级不能为空,请检查devLevel参数";
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ import java.util.List;
|
||||
public class PqDevParam {
|
||||
|
||||
@ApiModelProperty(value = "名称", required = true)
|
||||
//@NotBlank(message = DevValidMessage.NAME_NOT_BLANK)
|
||||
//@Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DevValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "设备模式,字典表(数字、模拟、比对)", required = true)
|
||||
@@ -37,13 +35,9 @@ public class PqDevParam {
|
||||
private String devType;
|
||||
|
||||
@ApiModelProperty(value = "设备厂家,字典表", required = true)
|
||||
//@NotBlank(message = DevValidMessage.MANUFACTURER_NOT_BLANK)
|
||||
//@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.MANUFACTURER_FORMAT_ERROR)
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty(value = "出厂日期", required = true)
|
||||
//@NotBlank(message = DevValidMessage.CREATEDATETIME_NOT_NULL)
|
||||
//@DateTimeStrValid(format = "yyyy-MM-dd", message = DevValidMessage.CREATEDATETIME_FORMAT_ERROR)
|
||||
private String createDate;
|
||||
|
||||
@ApiModelProperty(value = "设备序列号", required = true)
|
||||
@@ -51,11 +45,9 @@ public class PqDevParam {
|
||||
private String createId;
|
||||
|
||||
@ApiModelProperty(value = "固件版本", required = true)
|
||||
//@NotBlank(message = DevValidMessage.FIRMWARE_NOT_BLANK)
|
||||
private String hardwareVersion;
|
||||
|
||||
@ApiModelProperty(value = "软件版本", required = true)
|
||||
//@NotBlank(message = DevValidMessage.SOFTWARE_NOT_BLANK)
|
||||
private String softwareVersion;
|
||||
|
||||
@ApiModelProperty(value = "通讯协议", required = true)
|
||||
@@ -123,9 +115,6 @@ public class PqDevParam {
|
||||
|
||||
@ApiModelProperty("icdId")
|
||||
private String icdId;
|
||||
//
|
||||
// @ApiModelProperty("power")
|
||||
// private String power;
|
||||
|
||||
@ApiModelProperty("预投计划")
|
||||
private String preinvestmentPlan;
|
||||
@@ -141,26 +130,6 @@ public class PqDevParam {
|
||||
@NotBlank(message = DevValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
|
||||
// @ApiModelProperty("检测状态")
|
||||
// @Min(value = 0, message = DevValidMessage.CHECK_STATE_FORMAT_ERROR)
|
||||
// @Max(value = 3, message = DevValidMessage.CHECK_STATE_FORMAT_ERROR)
|
||||
// private Integer checkState;
|
||||
//
|
||||
// @ApiModelProperty("检测结果")
|
||||
// @Min(value = 0, message = DevValidMessage.CHECK_RESULT_FORMAT_ERROR)
|
||||
// @Max(value = 2, message = DevValidMessage.CHECK_RESULT_FORMAT_ERROR)
|
||||
// private Integer checkResult;
|
||||
//
|
||||
// @ApiModelProperty("报告状态")
|
||||
// @Min(value = 0, message = DevValidMessage.REPORT_STATE_FORMAT_ERROR)
|
||||
// @Max(value = 2, message = DevValidMessage.REPORT_STATE_FORMAT_ERROR)
|
||||
// private Integer reportState;
|
||||
//
|
||||
// @ApiModelProperty("归档状态")
|
||||
// @Min(value = 0, message = DevValidMessage.DOCUMENT_STATE_FORMAT_ERROR)
|
||||
// @Max(value = 1, message = DevValidMessage.DOCUMENT_STATE_FORMAT_ERROR)
|
||||
// private Integer documentState;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,7 +139,6 @@ public class PqDevParam {
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class QueryParam extends BaseParam {
|
||||
@ApiModelProperty("名称")
|
||||
// @Pattern(regexp = PatternRegex.DEV_NAME_REGEX, message = DevValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "设备模式,字典表(数字、模拟、比对)")
|
||||
@@ -180,7 +148,6 @@ public class PqDevParam {
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("检测计划ID")
|
||||
//@Pattern(regexp = PatternRegex.SYSTEM_ID, message = DevValidMessage.PLAN_ID_FORMAT_ERROR)
|
||||
private String planId;
|
||||
|
||||
@ApiModelProperty("检测状态列表")
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.njcn.gather.device.service.IPqDevService;
|
||||
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
||||
import com.njcn.gather.monitor.service.IPqMonitorService;
|
||||
import com.njcn.gather.storage.service.DetectionDataDealService;
|
||||
import com.njcn.gather.system.cfg.pojo.enums.SceneEnum;
|
||||
import com.njcn.gather.system.cfg.pojo.po.SysTestConfig;
|
||||
import com.njcn.gather.system.cfg.service.ISysTestConfigService;
|
||||
import com.njcn.gather.system.dictionary.pojo.po.DictData;
|
||||
@@ -591,13 +592,16 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
@Override
|
||||
public void exportDev(PqDevParam.QueryParam queryParam) {
|
||||
String currrentScene = sysTestConfigService.getCurrrentScene();
|
||||
switch (currrentScene) {
|
||||
case "0":
|
||||
SceneEnum sceneEnum = SceneEnum.getSceneEnum(currrentScene);
|
||||
switch (sceneEnum) {
|
||||
case PROVINCE_PLATFORM:
|
||||
this.exportProvinceDev(queryParam);
|
||||
break;
|
||||
case "1":
|
||||
case LEAVE_FACTORY_TEST:
|
||||
this.exportCNDev(queryParam);
|
||||
break;
|
||||
case SELF_TEST:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -606,13 +610,16 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
@Override
|
||||
public void downloadTemplate() {
|
||||
String currrentScene = sysTestConfigService.getCurrrentScene();
|
||||
switch (currrentScene) {
|
||||
case "0":
|
||||
SceneEnum sceneEnum = SceneEnum.getSceneEnum(currrentScene);
|
||||
switch (sceneEnum) {
|
||||
case PROVINCE_PLATFORM:
|
||||
this.downloadProvinceDevTemplate();
|
||||
break;
|
||||
case "1":
|
||||
case LEAVE_FACTORY_TEST:
|
||||
this.downloadCNDevTemplate();
|
||||
break;
|
||||
case SELF_TEST:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -622,13 +629,16 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
@Override
|
||||
public void importDev(MultipartFile file, String patternId, String planId, HttpServletResponse response) {
|
||||
String currrentScene = sysTestConfigService.getCurrrentScene();
|
||||
switch (currrentScene) {
|
||||
case "0":
|
||||
SceneEnum sceneEnum = SceneEnum.getSceneEnum(currrentScene);
|
||||
switch (sceneEnum) {
|
||||
case PROVINCE_PLATFORM:
|
||||
this.importProvinceDev(file, patternId, planId, response);
|
||||
break;
|
||||
case "1":
|
||||
case LEAVE_FACTORY_TEST:
|
||||
this.importCNDev(file, patternId, planId, response);
|
||||
break;
|
||||
case SELF_TEST:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user