|
@ -1,118 +0,0 @@ |
|
|
package a8k.app.service.exparam; |
|
|
|
|
|
|
|
|
|
|
|
import a8k.app.a8ktype.state.ProjectTaskContext; |
|
|
|
|
|
import a8k.app.service.exparam.base.PipetteGunBindActionType; |
|
|
|
|
|
import a8k.app.service.exparam.base.LLDParamPack; |
|
|
|
|
|
import a8k.app.service.exparam.base.LLFParamPack; |
|
|
|
|
|
import a8k.app.service.param.HbotLargeBottleBSPosMgr; |
|
|
|
|
|
import a8k.app.service.param.HbotSamplePosParamMgr; |
|
|
|
|
|
import a8k.app.service.param.PipetteGunLLDParamMgr; |
|
|
|
|
|
import a8k.app.service.param.PipetteGunLLFParamMgr; |
|
|
|
|
|
import a8k.app.a8ktype.param.type.A8kSamplePos; |
|
|
|
|
|
import a8k.app.a8ktype.param.pipette.PipetteGunLLDThresholdParam; |
|
|
|
|
|
import a8k.app.a8ktype.param.pipette.PipetteGunLLDTypeParam; |
|
|
|
|
|
import a8k.app.a8ktype.device.ConsumableGroup; |
|
|
|
|
|
import a8k.app.a8ktype.device.Pos3d; |
|
|
|
|
|
import jakarta.annotation.Resource; |
|
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
|
|
|
|
@Component |
|
|
|
|
|
public class PipetteGunParamExMgr { |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
PipetteGunLLDParamMgr pipetteGunLLDParamMgr; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
PipetteGunLLFParamMgr pipetteGunLLFParamMgr; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
HbotSamplePosParamMgr hbotSamplePosParamMgr; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
HbotLargeBottleBSPosMgr hbotLargeBottleBSPosMgr; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
HbotConsumableParamMgr hbotConsumableParamMgr; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取液面探测相关参数 |
|
|
|
|
|
* @param type 操作类型 |
|
|
|
|
|
* @param cxt 上下文 |
|
|
|
|
|
* @return 液面探测相关参数 |
|
|
|
|
|
*/ |
|
|
|
|
|
public LLDParamPack getLLDParam(PipetteGunBindActionType type, ProjectTaskContext cxt) { |
|
|
|
|
|
LLDParamPack paramPack = null; |
|
|
|
|
|
switch (type) { |
|
|
|
|
|
case SAMPLE -> { |
|
|
|
|
|
A8kSamplePos samplePos = cxt.getSamplePos(); |
|
|
|
|
|
Pos3d sampleStartPos = hbotSamplePosParamMgr.getSampleStartPos(samplePos); |
|
|
|
|
|
Pos3d sampleEndPos = hbotSamplePosParamMgr.getSampleEndPos(samplePos); |
|
|
|
|
|
|
|
|
|
|
|
paramPack = new LLDParamPack(); |
|
|
|
|
|
paramPack.type = pipetteGunLLDParamMgr.getLLDType(PipetteGunLLDTypeParam.DEFAULT_LLD_TYPE); |
|
|
|
|
|
paramPack.startZ = sampleStartPos.z; |
|
|
|
|
|
paramPack.endZ = sampleEndPos.z; |
|
|
|
|
|
paramPack.cThreshold = pipetteGunLLDParamMgr.getLLDThresholdParam(PipetteGunLLDThresholdParam.DEFAULT_C_THRESHOLD); |
|
|
|
|
|
paramPack.pThreshold = pipetteGunLLDParamMgr.getLLDThresholdParam(PipetteGunLLDThresholdParam.DEFAULT_P_THRESHOLD); |
|
|
|
|
|
} |
|
|
|
|
|
case TAKE_LARGE_BUFFER_SOLUTION -> { |
|
|
|
|
|
ConsumableGroup group = cxt.getConsumable().getGroup(); |
|
|
|
|
|
var sStartPos = hbotLargeBottleBSPosMgr.getLLDStartPos(group); |
|
|
|
|
|
var sEndPos = hbotLargeBottleBSPosMgr.getSamplePosEnd(group); |
|
|
|
|
|
|
|
|
|
|
|
paramPack = new LLDParamPack(); |
|
|
|
|
|
paramPack.type = pipetteGunLLDParamMgr.getLLDType(PipetteGunLLDTypeParam.DEFAULT_LLD_TYPE); |
|
|
|
|
|
paramPack.startZ = sStartPos.z; |
|
|
|
|
|
paramPack.endZ = sEndPos.z; |
|
|
|
|
|
paramPack.cThreshold = pipetteGunLLDParamMgr.getLLDThresholdParam(PipetteGunLLDThresholdParam.DEFAULT_C_THRESHOLD); |
|
|
|
|
|
paramPack.pThreshold = pipetteGunLLDParamMgr.getLLDThresholdParam(PipetteGunLLDThresholdParam.DEFAULT_P_THRESHOLD); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(paramPack, "未知的操作类型"); |
|
|
|
|
|
return paramPack; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取液面跟随相关参数 |
|
|
|
|
|
* @param type 操作类型 |
|
|
|
|
|
* @param cxt 上下文 |
|
|
|
|
|
* @return 液面跟随相关参数 |
|
|
|
|
|
*/ |
|
|
|
|
|
public LLFParamPack getLLFParam(PipetteGunBindActionType type, ProjectTaskContext cxt) { |
|
|
|
|
|
LLFParamPack paramPack = null; |
|
|
|
|
|
switch (type) { |
|
|
|
|
|
// 取样 |
|
|
|
|
|
case MIX_SAMPLE, SAMPLE -> { // |
|
|
|
|
|
A8kSamplePos samplePos = cxt.getSamplePos(); |
|
|
|
|
|
paramPack = new LLFParamPack(); |
|
|
|
|
|
paramPack.llfVel = pipetteGunLLFParamMgr.getSampleLLFVel(samplePos); |
|
|
|
|
|
paramPack.llfStartPos = hbotSamplePosParamMgr.getSampleStartPos(samplePos).z; |
|
|
|
|
|
paramPack.llfEndPos = hbotSamplePosParamMgr.getSampleStartPos(samplePos).z; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
//取大瓶缓冲液 |
|
|
|
|
|
case TAKE_LARGE_BUFFER_SOLUTION -> { // |
|
|
|
|
|
paramPack = new LLFParamPack(); |
|
|
|
|
|
paramPack.llfVel = pipetteGunLLFParamMgr.getLargeBSBottleLlfVel(); |
|
|
|
|
|
paramPack.llfStartPos = hbotConsumableParamMgr.getLargeBufferSamplePos(cxt.getConsumable().getGroup()).z; |
|
|
|
|
|
paramPack.llfEndPos = hbotConsumableParamMgr.getLargeBufferSamplePosEnd(cxt.getConsumable().getGroup()).z; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//混合反应液,分配大瓶缓冲液到探测物质中 |
|
|
|
|
|
case MIX_REACTION_LIQUOR, DISTRIBUTION_LARGE_BUFFER_SOLUTION_PROBE_SUBSTANCE -> { |
|
|
|
|
|
paramPack = new LLFParamPack(); |
|
|
|
|
|
paramPack.llfVel = 0; |
|
|
|
|
|
paramPack.llfStartPos = 0; |
|
|
|
|
|
paramPack.llfEndPos = 0; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(paramPack, "未知的操作类型"); |
|
|
|
|
|
Assert.notNull(paramPack.llfVel, "未知的试管类型"); |
|
|
|
|
|
return paramPack; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|