|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.dreamworks.boditech.controller; |
|
|
|
import com.dreamworks.boditech.controller.entity.ApiResponse; |
|
|
|
import com.dreamworks.boditech.entity.*; |
|
|
|
import com.dreamworks.boditech.entity.parameter.ParamBatchDeleteById; |
|
|
|
import com.dreamworks.boditech.entity.parameter.ParamEmergencyTaskSave; |
|
|
|
import com.dreamworks.boditech.entity.parameter.ParamTestSearch; |
|
|
|
import com.dreamworks.boditech.entity.parameter.ParamTestTubeRackTaskSave; |
|
|
@ -173,14 +174,6 @@ public class TestController extends BaseController { |
|
|
|
List<MdbTest> tests = this.testService.testSearch(params); |
|
|
|
for ( MdbTest test : tests ) { |
|
|
|
Map<String,Object> item = MyCommon.objectToMap(test); |
|
|
|
Long letfTime = test.incubateStartedAt + test.incubateTime - System.currentTimeMillis(); |
|
|
|
if ( letfTime < 0 ) { |
|
|
|
letfTime = 0L; |
|
|
|
} |
|
|
|
letfTime /= 1000; |
|
|
|
Integer sec = (int)(letfTime % 60); |
|
|
|
Integer min = (int)(letfTime / 60); |
|
|
|
item.put("incubateLeftTime", String.format("%02d:%02d", min, sec)); |
|
|
|
item.put("results", MyCommon.jsonToObject(test.result, List.class)); |
|
|
|
list.add(item); |
|
|
|
} |
|
|
@ -193,6 +186,13 @@ public class TestController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/batch-delete") |
|
|
|
public ApiResponse batchDelete( @RequestBody ParamBatchDeleteById params ) { |
|
|
|
this.testService.testBatchDeleteById(params); |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/test/test-tube-rack-status-get") |
|
|
|
public ApiResponse testTubeRackStatusGet() { |
|
|
|
MdbTestTubeRackTestTask task = this.testService.testTubeRackTaskCurrentGet(); |
|
|
|