|
|
@ -53,8 +53,8 @@ public class A8kOptTest { |
|
|
|
|
|
|
|
@Resource |
|
|
|
ProjInfoMgrService projInfoMgrService; |
|
|
|
@Autowired |
|
|
|
private FileMgrService fileMgrService; |
|
|
|
@Resource |
|
|
|
FileMgrService fileMgrService; |
|
|
|
|
|
|
|
@ExtApiFn(name = "归零", group = "测试工具", order = 11) |
|
|
|
public void deviceReset() throws AppException { |
|
|
@ -110,31 +110,32 @@ public class A8kOptTest { |
|
|
|
|
|
|
|
static class OptScanReport { |
|
|
|
public A8kScanCurve optScanCurve; |
|
|
|
public String reportURL; |
|
|
|
public String optReportFileName; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<OptScanReport> optScanReports = new ArrayList<>(); |
|
|
|
|
|
|
|
public void generateOptReport(OptScanResult optScanResult) { |
|
|
|
public void generateOptReport(ProjBuildinInfo info, Integer subProjIndex, OptScanResult optScanResult) throws IOException { |
|
|
|
OptScanReport report = new OptScanReport(); |
|
|
|
report.optScanCurve = createScanCurve1200Point(optScanResult.rawData.rawData); |
|
|
|
report.optScanCurve = createScanCurve1200Point(optScanResult.rawData.rawData); |
|
|
|
report.optReportFileName = fileMgrService.storageOptReport(info.projBaseInfo.projName, info.projBaseInfo.projId, subProjIndex, optScanResult); |
|
|
|
optScanReports.add(report); |
|
|
|
} |
|
|
|
|
|
|
|
public List<OptAlgoAnalysResult> doOptScan(Integer projId) throws AppException { |
|
|
|
@ExtApiFn(name = "光学扫描", group = "光学测试", order = 200) |
|
|
|
public String doOptScan(Integer projId) throws AppException, IOException { |
|
|
|
fileMgrService.clearOptReport(); |
|
|
|
optScanReports.clear(); |
|
|
|
|
|
|
|
ProjBuildinInfo info = projInfoMgrService.getProjBuildInInfo(projId); |
|
|
|
List<OptAlgoAnalysResult> analysResults = new ArrayList<>(); |
|
|
|
ProjBuildinInfo info = projInfoMgrService.getProjBuildInInfo(projId); |
|
|
|
for (int i = 0; i < info.projOptInfos.size(); i++) { |
|
|
|
OptScanResult scanResult = optScanModuleCtrlService.optScan(info.projBaseInfo, info.projOptInfos.get(i), i); |
|
|
|
generateOptReport(scanResult); |
|
|
|
analysResults.add(scanResult.analysResult); |
|
|
|
generateOptReport(info, i, scanResult); |
|
|
|
} |
|
|
|
return analysResults; |
|
|
|
return "扫描完成"; |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "获取光学扫描曲线", group = "光学测试", order = 201) |
|
|
|
public A8kScanCurve getScanCurve(Integer subProjIndex) { |
|
|
|
if (subProjIndex < optScanReports.size()) { |
|
|
|
return optScanReports.get(subProjIndex).optScanCurve; |
|
|
@ -142,11 +143,15 @@ public class A8kOptTest { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "获取光学报告", group = "光学测试", order = 202) |
|
|
|
public String getOptReport(Integer subProjIndex) { |
|
|
|
return "http://127.0.0.1/filemgr/index.html"; |
|
|
|
} |
|
|
|
|
|
|
|
@ExtApiFn(name = "读取项目信息", group = "光学测试", order = 203) |
|
|
|
public ProjBuildinInfo getProjInfo(Integer projId) throws AppException { |
|
|
|
return projInfoMgrService.getProjBuildInInfo(projId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |