fix out of index

This commit is contained in:
ls
2025-07-22 23:24:37 +08:00
parent 2f41a2393a
commit d82949cc28

View File

@@ -66,9 +66,16 @@ public class ExperimentTestProcessServiceImpl extends ServiceImpl<ExperimentTest
public void assembleDetails(ExperimentTestProcess experimentTestProcess) {
String testStandardsId = experimentTestProcess.getTestStandardsId();
if (StringUtils.isNotBlank(testStandardsId)) {
String[] split = testStandardsId.split(",");
TestStandards testStandards = testStandardsService.findByRequirements(split[0],split[1]);
experimentTestProcess.setTestStandards(testStandards);
if (StringUtils.contains(testStandardsId, ",")) {
String[] split = testStandardsId.split(",");
TestStandards testStandards = testStandardsService.findByRequirements(split[0], split[1]);
experimentTestProcess.setTestStandards(testStandards);
} else {
TestStandards others = new TestStandards();
others.setId("others");
others.setName("others");
experimentTestProcess.setTestStandards(others);
}
}
String sampleInfoIds = experimentTestProcess.getSampleInfo();
List<ExperimentSampleInfo> sampleInfoList;