|
|
@ -1,7 +1,9 @@ |
|
|
|
package com.dreamworks.boditech.controller; |
|
|
|
import com.dreamworks.boditech.controller.entity.ApiResponse; |
|
|
|
import com.dreamworks.boditech.entity.ParamTestEmergencyAppend; |
|
|
|
import com.dreamworks.boditech.entity.ParamTestRegularAppend; |
|
|
|
import com.dreamworks.boditech.entity.MdbTestTubeRackTestTask; |
|
|
|
import com.dreamworks.boditech.entity.parameter.ParamTestTubeRackTaskSave; |
|
|
|
import com.dreamworks.boditech.service.TestService; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
@ -12,53 +14,14 @@ import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
@Controller |
|
|
|
public class TestController extends BaseController { |
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/list") |
|
|
|
public ApiResponse list(@RequestBody Map<String,Object> params) { |
|
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
|
for (int i = 0; i < 20; i++) { |
|
|
|
Map<String,Object> item = new HashMap<>(); |
|
|
|
item.put("recordUUID", "202110-01"); |
|
|
|
item.put("samplePID", "ABCD1234"); |
|
|
|
item.put("sampleUID", "016"); |
|
|
|
item.put("projectName", "hsCRP"); |
|
|
|
item.put("lotCode", "1234567890"); |
|
|
|
item.put("tubeIndex", "05"); |
|
|
|
item.put("tubeType", "WB"); |
|
|
|
item.put("sampleType", "FB"); |
|
|
|
item.put("incubateStartedAt", "2012-12-15 00:00:44"); |
|
|
|
item.put("incubateTime", "3600"); |
|
|
|
item.put("status", "INUSE"); |
|
|
|
item.put("slotIndex", Integer.toString(i)); |
|
|
|
list.add(item); |
|
|
|
} |
|
|
|
return this.success(list); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/emergency-append") |
|
|
|
public ApiResponse testEmergencyAppend( @RequestBody Object param) { |
|
|
|
// this.deviceService.testEmergencyAppend(param); |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/test-tube-rack-append") |
|
|
|
public ApiResponse testRegularAppend(@RequestBody ParamTestRegularAppend param ) { |
|
|
|
// this.deviceService.regularTaskAppend(param); |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/test-tube-rack-batch-delete") |
|
|
|
public ApiResponse testTubeRackBatchDelete( @RequestBody Map<String,Object> params ) { |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
@Resource |
|
|
|
private TestService testService; |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/test-tube-rack-save") |
|
|
|
public ApiResponse testTubeRackSave( @RequestBody Map<String,Object> params ) { |
|
|
|
return this.success(Map.of("id", 10)); |
|
|
|
public ApiResponse testTubeRackTaskSave(@RequestBody ParamTestTubeRackTaskSave param ) { |
|
|
|
MdbTestTubeRackTestTask task = this.testService.testTubeRackTaskSave(param); |
|
|
|
return this.success(task); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
@ -87,7 +50,7 @@ public class TestController extends BaseController { |
|
|
|
tube.put("projects", projects); |
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
tube.put("sampleType","FB"); |
|
|
|
tube.put("sampleType","WB"); |
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
tubes.add(tube); |
|
|
@ -117,7 +80,7 @@ public class TestController extends BaseController { |
|
|
|
tube.put("projects", projects); |
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
tube.put("sampleType","FB"); |
|
|
|
tube.put("sampleType","WB"); |
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
tubes2.add(tube); |
|
|
@ -127,7 +90,7 @@ public class TestController extends BaseController { |
|
|
|
|
|
|
|
Map<String,Object> item3 = new HashMap<>(); |
|
|
|
item3.put("id", 3); |
|
|
|
item3.put("status", "WAITING"); |
|
|
|
item3.put("status", "CONFIGURING"); |
|
|
|
item3.put("tubeTypeDetectType", "AUTO"); |
|
|
|
item3.put("tubeType", ""); |
|
|
|
item3.put("editable", true); |
|
|
@ -147,7 +110,7 @@ public class TestController extends BaseController { |
|
|
|
tube.put("projects", projects); |
|
|
|
tube.put("sampleTypeDetectType", "MANUAL"); |
|
|
|
tube.put("sampleUid", "016"); |
|
|
|
tube.put("sampleType","FB"); |
|
|
|
tube.put("sampleType","WB"); |
|
|
|
tube.put("barCode", "123456789"); |
|
|
|
tube.put("preprocess", Map.of("preprocess",true)); |
|
|
|
tubes3.add(tube); |
|
|
@ -158,6 +121,54 @@ public class TestController extends BaseController { |
|
|
|
return this.success(list); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/list") |
|
|
|
public ApiResponse list(@RequestBody Map<String,Object> params) { |
|
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
|
for (int i = 0; i < 20; i++) { |
|
|
|
Map<String,Object> item = new HashMap<>(); |
|
|
|
item.put("recordUUID", "202110-01"); |
|
|
|
item.put("samplePID", "ABCD1234"); |
|
|
|
item.put("sampleUID", "016"); |
|
|
|
item.put("projectName", "hsCRP"); |
|
|
|
item.put("lotCode", "1234567890"); |
|
|
|
item.put("tubeIndex", "05"); |
|
|
|
item.put("tubeType", "WB"); |
|
|
|
item.put("sampleType", "FB"); |
|
|
|
item.put("incubateStartedAt", "2012-12-15 00:00:44"); |
|
|
|
item.put("incubateTime", "3600"); |
|
|
|
item.put("status", "INUSE"); |
|
|
|
item.put("slotIndex", Integer.toString(i)); |
|
|
|
list.add(item); |
|
|
|
} |
|
|
|
return this.success(list); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/emergency-append") |
|
|
|
public ApiResponse testEmergencyAppend( @RequestBody Object param) { |
|
|
|
// this.deviceService.testEmergencyAppend(param); |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@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-update") |
|
|
|
public ApiResponse testTubeRackUpdate( @RequestBody Map<String,Object> params ) { |
|
|
|