微调
This commit is contained in:
@@ -983,6 +983,7 @@ public class SocketDevResponseService {
|
||||
}
|
||||
|
||||
|
||||
// key为 检测大项对应的code,value为当前大项的检测结果
|
||||
Map<String, List<DevLineTestResult>> targetTestMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
@@ -1028,6 +1029,7 @@ public class SocketDevResponseService {
|
||||
System.out.println(sourceIssue.getType() + sourceIssue.getIndex() + "当前测试大项已经全部结束》》》》》》》》");
|
||||
//当residueCount为0则认为大项中的小项已经全部跑完,开始组装信息推送给前端
|
||||
List<DevLineTestResult> resultList = new ArrayList<>();
|
||||
// 获取当前检测大项的所有设备的检测结果
|
||||
List<DevLineTestResult> allDevTestList = targetTestMap.get(sourceIssue.getType());
|
||||
Map<String, List<DevLineTestResult>> map = allDevTestList.stream().collect(Collectors.groupingBy(DevLineTestResult::getDeviceId));
|
||||
map.forEach((dev, list) -> {
|
||||
@@ -1059,6 +1061,7 @@ public class SocketDevResponseService {
|
||||
List<SourceIssue> sourceIssueList = SocketManager.getSourceList();
|
||||
if (CollUtil.isNotEmpty(sourceIssueList)) {
|
||||
SourceIssue sourceIssues = SocketManager.getSourceList().get(0);
|
||||
// 如果上一个大项检测完成,则检测下一个大项,并向前端推送消息
|
||||
if (residueCount == 0) {
|
||||
CnSocketUtil.sendToWebSocket(param.getUserPageId(), sourceIssues.getType() + stepBegin, null, new ArrayList<>(), null);
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ public class SocketSourceResponseService {
|
||||
|
||||
String s = param.getUserPageId() + DEV;
|
||||
SourceIssue sourceIssue = SocketManager.getSourceList().get(0);
|
||||
List<String> comm = sourceIssue.getDevValueTypeList();
|
||||
List<String> comm = sourceIssue.getDevValueTypeList(); //形如:类型&小项code这种形式。例如:real$VRMS、real$IRMS
|
||||
System.out.println("向装置下发的参数>>>>>>>>" + comm);
|
||||
socketMsg.setRequestId(SourceOperateCodeEnum.FORMAL_REAL.getValue() + stepTag + sourceIssue.getType());
|
||||
int ignoreCount;
|
||||
|
||||
@@ -21,7 +21,8 @@ public enum ReportResponseEnum {
|
||||
NO_CHECK_DATA("A012010", "没有检测数据,无法生成报告!"),
|
||||
FILE_RENAME_FAILED("A012011", "文件重命名失败"),
|
||||
REPORT_NAME_PATTERN_ERROR("A012012","报告名称格式错误,可包含中文、字母、数字、中划线,长度不能超过50个字符"),
|
||||
REPORT_VERSION_PATTERN_ERROR("A012013","报告版本号格式错误,可包含中文、字母、数字、中划线,点号,长度不能超过50个字符");
|
||||
REPORT_VERSION_PATTERN_ERROR("A012013","报告版本号格式错误,可包含中文、字母、数字、中划线,点号,长度不能超过50个字符"),
|
||||
FILE_SIZE_ERROR("A012014","文件大小不能超过5MB" );
|
||||
|
||||
private String code;
|
||||
private String message;
|
||||
|
||||
@@ -126,6 +126,8 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
|
||||
private final ISysUserService sysUserService;
|
||||
|
||||
private final long FILE_SIZE_LIMIT = 5 * 1024 * 1024;
|
||||
|
||||
@Override
|
||||
public Page<PqReportVO> list(ReportParam.QueryParam queryParam) {
|
||||
QueryWrapper<PqReport> wrapper = new QueryWrapper<>();
|
||||
@@ -263,6 +265,9 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
if (baseOriginalFilename.equals(detailOriginalFilename)) {
|
||||
throw new BusinessException(ReportResponseEnum.FILE_NAME_SAME_ERROR);
|
||||
}
|
||||
if(baseFile.getSize() > FILE_SIZE_LIMIT || detailFile.getSize() > FILE_SIZE_LIMIT){
|
||||
throw new BusinessException(ReportResponseEnum.FILE_SIZE_ERROR);
|
||||
}
|
||||
|
||||
pqReport.setBasePath(newDir + baseOriginalFilename);
|
||||
pqReport.setDetailPath(newDir + detailOriginalFilename);
|
||||
@@ -284,6 +289,9 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
if (!baseFileOriginalFilename.endsWith(".docx")) {
|
||||
throw new BusinessException(ReportResponseEnum.FILE_SUFFIX_ERROR);
|
||||
}
|
||||
if(baseFile.getSize() > FILE_SIZE_LIMIT){
|
||||
throw new BusinessException(ReportResponseEnum.FILE_SIZE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
String detailFileOriginalFilename = "";
|
||||
@@ -292,6 +300,9 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
if (!detailFileOriginalFilename.endsWith(".docx")) {
|
||||
throw new BusinessException(ReportResponseEnum.FILE_SUFFIX_ERROR);
|
||||
}
|
||||
if(detailFile.getSize() > FILE_SIZE_LIMIT){
|
||||
throw new BusinessException(ReportResponseEnum.FILE_SIZE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if (!"".equals(baseFileOriginalFilename) && !"".equals(detailFileOriginalFilename)) {
|
||||
|
||||
Reference in New Issue
Block a user