|
@ -50,25 +50,112 @@ public class TestController extends BaseController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
|
|
|
@PostMapping("/api/test/test-tube-rack-batch-delete") |
|
|
|
|
|
public ApiResponse testTubeRackBatchDelete( @RequestBody Map<String,Object> params ) { |
|
|
|
|
|
return this.success(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
@PostMapping("/api/test/test-tube-rack-save") |
|
|
|
|
|
public ApiResponse testTubeRackSave( @RequestBody Map<String,Object> params ) { |
|
|
|
|
|
return this.success(Map.of("id", 10)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
@PostMapping("/api/test/test-tube-rack-list") |
|
|
@PostMapping("/api/test/test-tube-rack-list") |
|
|
public ApiResponse testTubeRackList( @RequestBody Map<String,Object> params ) { |
|
|
public ApiResponse testTubeRackList( @RequestBody Map<String,Object> params ) { |
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
for ( int i=0; i<2; i++ ) { |
|
|
|
|
|
Map<String,Object> item = new HashMap<>(); |
|
|
|
|
|
item.put("tubeIndex", Integer.toString(i)); |
|
|
|
|
|
item.put("tubeType", "WB"); |
|
|
|
|
|
item.put("sampleType", "FB"); |
|
|
|
|
|
item.put("projectIds", new int[]{1,2,3,4,5}); |
|
|
|
|
|
item.put("barCode", "123456"); |
|
|
|
|
|
item.put("sampleUid", "123"); |
|
|
|
|
|
item.put("appendBy", "manual"); |
|
|
|
|
|
item.put("status", "WAITING"); |
|
|
|
|
|
item.put("locked", false); |
|
|
|
|
|
item.put("editable", true); |
|
|
|
|
|
list.add(item); |
|
|
|
|
|
|
|
|
Map<String,Object> item = new HashMap<>(); |
|
|
|
|
|
item.put("id", 1); |
|
|
|
|
|
item.put("status", "WAITING"); |
|
|
|
|
|
item.put("tubeTypeDetectType", "AUTO"); |
|
|
|
|
|
item.put("tubeType", ""); |
|
|
|
|
|
item.put("editable", false); |
|
|
|
|
|
List<Map<String,Object>> tubes = new ArrayList<>(); |
|
|
|
|
|
for ( int i=0; i<10; i++ ) { |
|
|
|
|
|
Map<String,Object> tube = new HashMap<>(); |
|
|
|
|
|
tube.put("tubeIndex", Integer.toString(i)); |
|
|
|
|
|
tube.put("projectDetectType", "MANUAL"); |
|
|
|
|
|
List<Map<String,Object>> projects = new ArrayList<>(); |
|
|
|
|
|
for ( int pi=0; pi<3; pi++ ) { |
|
|
|
|
|
Map<String,Object> project = new HashMap<>(); |
|
|
|
|
|
project.put("id", Integer.toString(i)); |
|
|
|
|
|
project.put("name", "hsCRP"); |
|
|
|
|
|
project.put("color", "red"); |
|
|
|
|
|
projects.add(project); |
|
|
|
|
|
} |
|
|
|
|
|
tube.put("projects", projects); |
|
|
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
|
|
tube.put("sampleType","FB"); |
|
|
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
|
|
tubes.add(tube); |
|
|
} |
|
|
} |
|
|
|
|
|
item.put("tubes", tubes); |
|
|
|
|
|
list.add(item); |
|
|
|
|
|
|
|
|
return this.success(); |
|
|
|
|
|
|
|
|
Map<String,Object> item2 = new HashMap<>(); |
|
|
|
|
|
item2.put("id", 2); |
|
|
|
|
|
item2.put("status", "WAITING"); |
|
|
|
|
|
item2.put("tubeTypeDetectType", "AUTO"); |
|
|
|
|
|
item2.put("tubeType", ""); |
|
|
|
|
|
item2.put("editable", false); |
|
|
|
|
|
List<Map<String,Object>> tubes2 = new ArrayList<>(); |
|
|
|
|
|
for ( int i=0; i<10; i++ ) { |
|
|
|
|
|
Map<String,Object> tube = new HashMap<>(); |
|
|
|
|
|
tube.put("tubeIndex", Integer.toString(i)); |
|
|
|
|
|
tube.put("projectDetectType", "MANUAL"); |
|
|
|
|
|
List<Map<String,Object>> projects = new ArrayList<>(); |
|
|
|
|
|
for ( int pi=0; pi<1; pi++ ) { |
|
|
|
|
|
Map<String,Object> project = new HashMap<>(); |
|
|
|
|
|
project.put("id", Integer.toString(i)); |
|
|
|
|
|
project.put("name", "hsCRP"); |
|
|
|
|
|
project.put("color", "red"); |
|
|
|
|
|
projects.add(project); |
|
|
|
|
|
} |
|
|
|
|
|
tube.put("projects", projects); |
|
|
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
|
|
tube.put("sampleType","FB"); |
|
|
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
|
|
tubes2.add(tube); |
|
|
|
|
|
} |
|
|
|
|
|
item2.put("tubes", tubes); |
|
|
|
|
|
list.add(item2); |
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> item3 = new HashMap<>(); |
|
|
|
|
|
item3.put("id", 3); |
|
|
|
|
|
item3.put("status", "WAITING"); |
|
|
|
|
|
item3.put("tubeTypeDetectType", "AUTO"); |
|
|
|
|
|
item3.put("tubeType", ""); |
|
|
|
|
|
item3.put("editable", true); |
|
|
|
|
|
List<Map<String,Object>> tubes3 = new ArrayList<>(); |
|
|
|
|
|
for ( int i=0; i<10; i++ ) { |
|
|
|
|
|
Map<String,Object> tube = new HashMap<>(); |
|
|
|
|
|
tube.put("tubeIndex", Integer.toString(i)); |
|
|
|
|
|
tube.put("projectDetectType", "MANUAL"); |
|
|
|
|
|
List<Map<String,Object>> projects = new ArrayList<>(); |
|
|
|
|
|
for ( int pi=0; pi<1; pi++ ) { |
|
|
|
|
|
Map<String,Object> project = new HashMap<>(); |
|
|
|
|
|
project.put("id", Integer.toString(i)); |
|
|
|
|
|
project.put("name", "hsCRP"); |
|
|
|
|
|
project.put("color", "red"); |
|
|
|
|
|
projects.add(project); |
|
|
|
|
|
} |
|
|
|
|
|
tube.put("projects", projects); |
|
|
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
|
|
tube.put("sampleType","FB"); |
|
|
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
|
|
tubes3.add(tube); |
|
|
|
|
|
} |
|
|
|
|
|
item3.put("tubes", tubes); |
|
|
|
|
|
list.add(item3); |
|
|
|
|
|
|
|
|
|
|
|
return this.success(list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|