Exemple #1
0
        //把转换为action point
        public ActionPoint GelStepToActionPoint(T_GelStep gel_step, TestStepEnum type)
        {
            if (gel_step.StepClass == TestStepEnum.FPYT && gel_step.GetLiquidInfo().IsDetector&& type != TestStepEnum.MixLiquid && type != TestStepEnum.SpuLiquid)
            {
                type = TestStepEnum.FollowAbsLiquid;
            }
            ActionPoint action_point = new ActionPoint(-1, -1, -1, type);
            var         resmanager   = ResManager.getInstance();
            var         exp_pack     = ((ExperimentPackage)gel_step.ExperPackage);

            if (gel_step.StepClass == TestStepEnum.FPYT)
            {
                //是否为混合
                bool is_mix     = gel_step.is_mix;
                var  fpytinfo   = gel_step.GetFpytInfo();
                var  liquidinfo = gel_step.GetLiquidInfo();
                action_point.deep         = (int)liquidinfo.Deep;
                action_point.deepspeed    = (int)liquidinfo.DeeSpeed;
                action_point.detectordeep = (int)liquidinfo.DetectorDeep;
                action_point.tube         = (int)(fpytinfo.TubeValue >> gel_step.SampleIndex);
                action_point.capacity     = (int)liquidinfo.Vol;
                action_point.absbspeed    = (int)liquidinfo.AbsSpeed;
                action_point.spuspeed     = (int)liquidinfo.SpuSpeed;
                action_point.backcapacity = (int)liquidinfo.BackCapacity;
                action_point.backspeed    = (int)liquidinfo.BackCapacitySpeed;
                action_point.mixtimes     = (int)(gel_step.is_spu?fpytinfo.MixTimes:0);
                action_point.mixdeep      = (int)fpytinfo.MixDeep;
                action_point.spucapacity  = (int)fpytinfo.Vol;
                if (action_point.type == TestStepEnum.AbsLiquid || action_point.type == TestStepEnum.FollowAbsLiquid)
                {
                    ResInfoData abs_tager = null;//吸取的液体
                    if (liquidinfo.LiquidType == "病人红细胞" || liquidinfo.LiquidType == "病人血清")
                    {
                        abs_tager = resmanager.GetResByCode(exp_pack.GetSampleCode(gel_step.SampleIndex), "T_BJ_SampleRack");
                    }
                    else
                    {
                        abs_tager = resmanager.GetResByCode(liquidinfo.LiquidType, "T_BJ_AgentiaWarehouse");
                    }
                    System.Diagnostics.Debug.Assert(abs_tager != null);
                    action_point.x = abs_tager.InjectorX;
                    action_point.y = abs_tager.InjectorY;
                    action_point.z = abs_tager.InjectorZ;
                }
                else if (action_point.type == TestStepEnum.MixLiquid)
                {
                    //查找deep盘
                    ResInfoData deep_plane = resmanager.GetResByCode(gel_step.MixCode, "T_BJ_DeepPlate");
                    if (deep_plane == null)
                    {
                        //deep_plane = resmanager.GetFreeDeepPlate(5);
                        deep_plane = resmanager.GetResByCode("null", "T_BJ_DeepPlate");
                        deep_plane.Values[deep_plane.CountX, deep_plane.CountY] = deep_plane;
                    }
                    System.Diagnostics.Debug.Assert(deep_plane != null);
                    if (deep_plane.FindCode(gel_step.MixCode, false) == false)
                    {
                        deep_plane.AddCode(gel_step.MixCode);
                    }
                    action_point.x = deep_plane.InjectorX;
                    action_point.y = deep_plane.InjectorY;
                    action_point.z = deep_plane.InjectorZ;
                }
                else if (action_point.type == TestStepEnum.SpuLiquid)
                {
                    //查找gel卡
                    ResInfoData gel_seat = resmanager.GetResByCode(exp_pack.GetGelMask(), "T_BJ_GelSeat");
                    System.Diagnostics.Debug.Assert(gel_seat != null);
                    action_point.x        = gel_seat.InjectorX;
                    action_point.y        = gel_seat.InjectorY;
                    action_point.z        = gel_seat.InjectorZ;
                    action_point.tube_gap = gel_seat.InjectorGap;
                }
            }
            return(action_point);
        }