8 changed files with 182 additions and 19 deletions
-
5src/main/java/a8k/constant/AppConstant.java
-
8src/main/java/a8k/dbservice/type/ReactionResultRecord.java
-
85src/main/java/a8k/service/appctrl/action/opt/PLATE_OPT_SCAN.java
-
61src/main/java/a8k/service/appdata/AppReactionResultMgrService.java
-
19src/main/java/a8k/service/appstate/GStateService.java
-
5src/main/java/a8k/service/appstate/OptScanModuleStateMgrService.java
-
13src/main/java/a8k/type/ReactionResult.java
-
5src/main/java/a8k/type/reaction_result_type/ReactionResultStatus.java
@ -0,0 +1,85 @@ |
|||||
|
package a8k.service.appctrl.action.opt; |
||||
|
|
||||
|
import a8k.OS; |
||||
|
import a8k.dbservice.type.ReactionResultRecord; |
||||
|
import a8k.service.appctrl.CondtionMgrService; |
||||
|
import a8k.service.appctrl.action.base.A8kActionStepType; |
||||
|
import a8k.service.appctrl.action.base.A8kStepAction; |
||||
|
import a8k.service.appdata.AppReactionResultMgrService; |
||||
|
import a8k.service.appstate.GStateService; |
||||
|
import a8k.service.appstate.IncubationPlateMgrService; |
||||
|
import a8k.service.appstate.OptScanModuleStateMgrService; |
||||
|
import a8k.service.appstate.TubeProcessStateMgrService; |
||||
|
import a8k.service.appstate.resource.A8kPublicResourceType; |
||||
|
import a8k.service.appstate.type.IncubationSubTank; |
||||
|
import a8k.service.appstate.type.MainFlowCtrlState; |
||||
|
import a8k.service.appstate.type.state.IncubationSubTankState; |
||||
|
import a8k.type.ReactionResult; |
||||
|
import a8k.type.exception.AppException; |
||||
|
import a8k.type.reaction_result_type.ReactionResultStatus; |
||||
|
import jakarta.annotation.PostConstruct; |
||||
|
import jakarta.annotation.Resource; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 处理错误的试管 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PLATE_OPT_SCAN extends A8kStepAction { |
||||
|
static Logger logger = LoggerFactory.getLogger(PLATE_OPT_SCAN.class); |
||||
|
|
||||
|
PLATE_OPT_SCAN() { |
||||
|
super(A8kActionStepType.PLATE_OPT_SCAN); |
||||
|
} |
||||
|
|
||||
|
@Resource |
||||
|
GStateService gstate; |
||||
|
@Resource |
||||
|
CondtionMgrService cms; |
||||
|
@Resource |
||||
|
IncubationPlateMgrService incubationPlateMgrService; |
||||
|
@Resource |
||||
|
OptScanModuleStateMgrService optScanModuleStateMgrService; |
||||
|
@Resource |
||||
|
TubeProcessStateMgrService tubeProcessStateMgrService; |
||||
|
@Resource |
||||
|
AppReactionResultMgrService appReactionResultMgrService; |
||||
|
|
||||
|
|
||||
|
MainFlowCtrlState mfcs; |
||||
|
|
||||
|
@PostConstruct |
||||
|
void init() { |
||||
|
mfcs = gstate.mainFlowCtrlState; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override public void doaction() throws AppException { |
||||
|
optScanModuleStateMgrService.startScanPlate(); |
||||
|
logger.info("扫描板夹"); |
||||
|
//记录扫描结果 |
||||
|
|
||||
|
//修改板夹状态 |
||||
|
optScanModuleStateMgrService.dropPlate(); |
||||
|
|
||||
|
appReactionResultMgrService.addRecord(optScanModuleStateMgrService.getCurProjProcessContext(), |
||||
|
new ReactionResult(ReactionResultStatus.SUCCESS, "12.8 mg/L"), |
||||
|
new ReactionResult(ReactionResultStatus.ERROR_RESULT_OUT_OF_RANGE, "")); |
||||
|
} |
||||
|
|
||||
|
@Override public Boolean checkCondition() { |
||||
|
Boolean cond1 = cms.isCanDoAction(); |
||||
|
Boolean cond2 = !optScanModuleStateMgrService.isEmpty(); |
||||
|
return cond1 && cond2; |
||||
|
} |
||||
|
|
||||
|
@Override public List<A8kPublicResourceType> getResourceList() { |
||||
|
return List.of( |
||||
|
A8kPublicResourceType.OPTModule |
||||
|
); |
||||
|
} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package a8k.type; |
||||
|
|
||||
|
import a8k.type.reaction_result_type.ReactionResultStatus; |
||||
|
|
||||
|
public class ReactionResult { |
||||
|
public ReactionResultStatus status = ReactionResultStatus.DISABLED; |
||||
|
public String result = ""; |
||||
|
|
||||
|
public ReactionResult(ReactionResultStatus status, String result) { |
||||
|
this.status = status; |
||||
|
this.result = result; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue