8 changed files with 152 additions and 52 deletions
-
35src/main/java/com/dreamworks/boditech/controller/DeviceController.java
-
39src/main/java/com/dreamworks/boditech/controller/IdChipController.java
-
78src/main/java/com/dreamworks/boditech/controller/TestController.java
-
9src/main/java/com/dreamworks/boditech/driver/consumable/CsmTestCardManager.java
-
14src/main/java/com/dreamworks/boditech/entity/ParamTestEmergencyAppend.java
-
3src/main/java/com/dreamworks/boditech/entity/ParamTestRegularAppend.java
-
6src/main/java/com/dreamworks/boditech/entity/ParamTestRegularAppendTask.java
-
20src/main/java/com/dreamworks/boditech/service/DeviceService.java
@ -0,0 +1,39 @@ |
|||||
|
package com.dreamworks.boditech.controller; |
||||
|
import com.dreamworks.boditech.controller.entity.ApiResponse; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Controller |
||||
|
public class IdChipController extends BaseController { |
||||
|
@ResponseBody |
||||
|
@RequestMapping("/api/id-chip/search") |
||||
|
public ApiResponse search() { |
||||
|
List<Map<String,Object>> list = new ArrayList<>(); |
||||
|
for ( int i=0; i<10; i++ ) { |
||||
|
Map<String,Object> item = new HashMap<>(); |
||||
|
item.put("item","NT-proBNP"); |
||||
|
item.put("lotCode", "123456"); |
||||
|
item.put("expireDate","2012-12-15"); |
||||
|
item.put("version", "5"); |
||||
|
list.add(item); |
||||
|
} |
||||
|
|
||||
|
return this.success(Map.of( |
||||
|
"totalCount", 100, |
||||
|
"list",list |
||||
|
)); |
||||
|
} |
||||
|
|
||||
|
@ResponseBody |
||||
|
@RequestMapping("/api/id-chip/batch-delete") |
||||
|
public ApiResponse batchDelete() { |
||||
|
return this.success(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
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 org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
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 ParamTestEmergencyAppend param) { |
||||
|
// this.deviceService.testEmergencyAppend(param); |
||||
|
return this.success(); |
||||
|
} |
||||
|
|
||||
|
@ResponseBody |
||||
|
@PostMapping("/api/test/regular-append") |
||||
|
public ApiResponse testRegularAppend(@RequestBody ParamTestRegularAppend param ) { |
||||
|
// this.deviceService.regularTaskAppend(param); |
||||
|
return this.success(); |
||||
|
} |
||||
|
|
||||
|
@ResponseBody |
||||
|
@PostMapping("/api/test/search") |
||||
|
public ApiResponse search( @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(Map.of( |
||||
|
"totalCount", "100", |
||||
|
"list", list |
||||
|
)); |
||||
|
} |
||||
|
} |
@ -1,13 +1,9 @@ |
|||||
package com.dreamworks.boditech.entity; |
package com.dreamworks.boditech.entity; |
||||
public class ParamTestEmergencyAppend { |
public class ParamTestEmergencyAppend { |
||||
// sample tube barcode |
|
||||
public String barcode; |
|
||||
// user id |
|
||||
public String patientId; |
|
||||
// project name |
|
||||
public String projectName; |
|
||||
// blood type |
|
||||
public String bloodType; |
|
||||
// position |
|
||||
public String position; |
public String position; |
||||
|
public String barcode; |
||||
|
public String sampleUid; |
||||
|
public String sampleType; |
||||
|
public Integer projectId; |
||||
|
public String processType; |
||||
} |
} |
@ -1,6 +1,7 @@ |
|||||
package com.dreamworks.boditech.entity; |
package com.dreamworks.boditech.entity; |
||||
import java.util.List; |
import java.util.List; |
||||
public class ParamTestRegularAppend { |
public class ParamTestRegularAppend { |
||||
|
public String id; |
||||
// tasks |
// tasks |
||||
public List<ParamTestRegularAppendTask> tasks; |
|
||||
|
public List<ParamTestRegularAppendTask> tubes; |
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue