|
|
@ -1,11 +1,15 @@ |
|
|
|
package a8k.service.appctrl; |
|
|
|
|
|
|
|
import a8k.constant.AppConstant; |
|
|
|
import a8k.hardware.type.a8kcanprotocol.A8kEcode; |
|
|
|
import a8k.service.appdata.AppProjInfoMgrService; |
|
|
|
import a8k.service.appctrl.type.app_consumables_mgr_service.*; |
|
|
|
import a8k.service.appstate.GStateService; |
|
|
|
import a8k.service.devicedriver.ctrl.ConsumablesScanCtrl; |
|
|
|
import a8k.type.ConsumableGroup; |
|
|
|
import a8k.type.consumables.LarBSGroup; |
|
|
|
import a8k.type.consumables.LittBSGroup; |
|
|
|
import a8k.type.consumables.ReactionPlateGroup; |
|
|
|
import a8k.type.consumables.ScanResultState; |
|
|
|
import a8k.type.exception.AppException; |
|
|
|
import a8k.type.projecttype.A8kReactionFlowType; |
|
|
|
import a8k.type.projecttype.a8kidcard.A8kIdCardInfo; |
|
|
@ -22,14 +26,19 @@ import java.util.Map; |
|
|
|
@Component |
|
|
|
public class ConsumablesScanService { |
|
|
|
static Logger logger = org.slf4j.LoggerFactory.getLogger(ConsumablesScanService.class); |
|
|
|
static final Integer EachConsumableNum = 20; |
|
|
|
|
|
|
|
public static class ConsumablesScanResult { |
|
|
|
public Integer chNum; |
|
|
|
public ScanResultState state; |
|
|
|
public Integer projIndex; |
|
|
|
public String lotId; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
GStateService gstate; |
|
|
|
|
|
|
|
@Resource |
|
|
|
AppProjInfoMgrService appProjMgr; |
|
|
|
|
|
|
|
@Resource |
|
|
|
ConsumablesScanCtrl scanCtrlService; |
|
|
|
|
|
|
@ -111,13 +120,13 @@ public class ConsumablesScanService { |
|
|
|
assert a8kIdCardInfo != null; |
|
|
|
assert reactionType != null; |
|
|
|
|
|
|
|
cState.reactionPlateGroup[ch] = new ReactionPlateGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, EachConsumableNum); |
|
|
|
cState.reactionPlateGroup[ch] = new ReactionPlateGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, AppConstant.CONSUMABLE_NUM); |
|
|
|
if (reactionType.equals(A8kReactionFlowType.ReactionWithLittBS)) { |
|
|
|
cState.littBSGroup[ch] = new LittBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, EachConsumableNum); |
|
|
|
cState.littBSGroup[ch] = new LittBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, AppConstant.CONSUMABLE_NUM); |
|
|
|
cState.larBSGroup[ch] = new LarBSGroup(); |
|
|
|
} else if (reactionType.equals(A8kReactionFlowType.ReactionWithLarBsAndDetection)) { |
|
|
|
cState.littBSGroup[ch] = new LittBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, EachConsumableNum); |
|
|
|
cState.larBSGroup[ch] = new LarBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, EachConsumableNum); |
|
|
|
cState.littBSGroup[ch] = new LittBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, AppConstant.CONSUMABLE_NUM); |
|
|
|
cState.larBSGroup[ch] = new LarBSGroup(result.projIndex, a8kIdCardInfo.projName, result.lotId, a8kIdCardInfo.color, AppConstant.CONSUMABLE_NUM); |
|
|
|
} else { |
|
|
|
throw new RuntimeException("未知的反应流程类型"); |
|
|
|
} |
|
|
|