This commit is contained in:
caozehui
2025-11-21 10:09:48 +08:00
parent 033330b005
commit ab236cd34f
2 changed files with 8 additions and 2 deletions

View File

@@ -182,7 +182,8 @@ public class SocketContrastResponseService {
FormalTestManager.pstDataType = null;
FormalTestManager.isPstData = false;
FormalTestManager.isWaveCheck = false;
FormalTestManager.isXu = param.getPhaseCheck() == 1 ? true : false;
// FormalTestManager.isXu = param.getPhaseCheck() == 1 ? true : false;
FormalTestManager.isXu = true;
FormalTestManager.nonWaveDataSourceEnum = null;
String[] datasourceIds = FormalTestManager.currentTestPlan.getDatasourceId().split(",");

View File

@@ -71,9 +71,11 @@ public class PqIcdPathServiceImpl extends ServiceImpl<PqIcdPathMapper, PqIcdPath
pqIcdPath.setState(DataStateEnum.ENABLE.getCode());
String commInstallPath = this.getCommInstallPath();
System.out.println("commInstallPath = " + commInstallPath);
long FILE_SIZE_LIMIT = 1 * 1024 * 1024;
MultipartFile mappingFile = param.getMappingFile();
System.out.println("mappingFile = " + ObjectUtil.isNotNull(mappingFile) + " " + !mappingFile.isEmpty());
if (ObjectUtil.isNotNull(mappingFile) && !mappingFile.isEmpty()) {
String mappingFilename = mappingFile.getOriginalFilename();
@@ -87,6 +89,7 @@ public class PqIcdPathServiceImpl extends ServiceImpl<PqIcdPathMapper, PqIcdPath
try {
// 如果文件存在,则先删除
String mappingFilePath = commInstallPath + "\\DeviceControl\\Config\\" + mappingFilename;
System.out.println("mappingFilePath = " + mappingFilePath);
Path path = Paths.get(mappingFilePath);
File file = path.toFile();
if (file.exists()) {
@@ -100,10 +103,12 @@ public class PqIcdPathServiceImpl extends ServiceImpl<PqIcdPathMapper, PqIcdPath
bufferedOutputStream.flush();
bufferedOutputStream.close();
System.out.println("File saved successfully");
} catch (IOException e) {
throw new BusinessException(ReportResponseEnum.FILE_UPLOAD_FAILED);
}
} else {
System.out.println("mappingFile is null or empty");
throw new BusinessException(IcdResponseEnum.FILE_NOT_NULL);
}
@@ -131,7 +136,7 @@ public class PqIcdPathServiceImpl extends ServiceImpl<PqIcdPathMapper, PqIcdPath
String workDir = System.getProperty("user.dir");
// String workDir = "D:\\program\\CN_Gather";
// 获取映射文件存放文件夹
String dirPath = workDir.substring(0, workDir.lastIndexOf("\\")) + "\\9100";
String dirPath = workDir + "\\9100";
return dirPath;
}