示例#1
0
        /// <summary>
        /// 主区域入场记录
        /// </summary>
        /// <param name="args"></param>
        /// <param name="rst"></param>
        private void FindMainAreaIorecord(InputAgs args, ResultAgs rst)
        {
            string errorMsg = "";
            var    iorecord = ParkIORecordServices.GetNoExitIORecordByCardNo(args.AreadInfo.PKID, args.CardInfo.Usercard.CardNo, out errorMsg);

            if (iorecord == null) //根据卡找未找到 可能是进场固定转临停 这个时候根据车牌找记录 找到后更新进出记录
            {
                iorecord = ParkIORecordServices.GetNoExitIORecordByPlateNumber(args.AreadInfo.PKID, args.CardInfo.OwnerPlateNumber.PlateNo, out errorMsg);
                if (iorecord != null)
                {
                    iorecord.CarTypeID = args.CarTypeInfo.CarTypeID;
                    iorecord.CardNo    = args.CardInfo.Usercard.CardNo;
                    iorecord.CardNumb  = args.CardInfo.Usercard.CardNumb;
                    iorecord.CarTypeID = args.CarTypeInfo.CarTypeID;
                    ParkIORecordServices.ModifyIORecord(iorecord, out errorMsg);
                    //SynchroService.UpLoadModle<ParkIORecord>(iorecord);
                }
            }
            if (iorecord != null && !iorecord.IsExit)
            {
                args.IORecord = iorecord;
                if (!iorecord.CarModelID.IsEmpty() && (iorecord.CarModelID.IsEmpty() || (!iorecord.CarModelID.IsEmpty() && args.CarModel.CarModelID != iorecord.CarModelID)))
                {
                    args.CarModel = ParkCarModelServices.QueryByRecordId(iorecord.CarModelID);
                }
                rst.InDate            = args.IORecord.EntranceTime;
                rst.OutDate           = args.Plateinfo.TriggerTime;
                rst.ResCode           = ResultCode.OutOK;
                rst.InOutBaseCardType = BaseCarType.MonthlyRent;
            }
            else
            {
                if (args.CarTypeInfo.CarNoLike == YesOrNo.Yes)
                {
                    rst.ResCode           = ResultCode.OnFindNo;
                    rst.InOutBaseCardType = BaseCarType.MonthlyRent;
                }
                else
                {
                    if (args.CarTypeInfo.RepeatOut == YesOrNo.No)
                    {
                        rst.ResCode = ResultCode.RepeatOut;
                    }
                    else
                    {
                        rst.ResCode           = ResultCode.OutOK;
                        rst.InOutBaseCardType = BaseCarType.MonthlyRent;
                    }
                }
            }
        }
示例#2
0
        private void CheckMainAreaRepeatOut(InputAgs args, ResultAgs rst)
        {
            string errorMsg = "";
            var    iorecord = ParkIORecordServices.GetNoExitIORecordByCardNo(args.AreadInfo.PKID, args.CardInfo.Usercard.CardNo, out errorMsg);

            if (iorecord == null)//可能是进场后再添加的储值卡
            {
                iorecord = ParkIORecordServices.GetNoExitIORecordByPlateNumber(args.AreadInfo.PKID, args.Plateinfo.PlayPlateNmber, out errorMsg);
                if (iorecord != null)
                {
                    iorecord.CarTypeID = args.CarTypeInfo.CarTypeID;
                    iorecord.CardNo    = args.CardInfo.Usercard.CardNo;
                    iorecord.CardNumb  = args.CardInfo.Usercard.CardNumb;
                    iorecord.CarTypeID = args.CarTypeInfo.CarTypeID;
                    ParkIORecordServices.ModifyIORecord(iorecord, out errorMsg);
                    //SynchroService.UpLoadModle(iorecord);
                }
            }
            if (iorecord != null && !iorecord.IsExit)
            {
                args.IORecord = iorecord;
                if (!iorecord.CarModelID.IsEmpty() && (iorecord.CarModelID.IsEmpty() || (!iorecord.CarModelID.IsEmpty() && args.CarModel.CarModelID != iorecord.CarModelID)))
                {
                    args.CarModel = ParkCarModelServices.QueryByRecordId(iorecord.CarModelID);
                }
                rst.InDate            = args.IORecord.EntranceTime;
                rst.OutDate           = args.Plateinfo.TriggerTime;
                rst.ResCode           = ResultCode.OutOK;
                rst.InOutBaseCardType = BaseCarType.StoredValueCar;
            }
            else if (args.CarTypeInfo.CarNoLike == YesOrNo.Yes)
            {
                rst.ResCode           = ResultCode.OnFindNo;
                rst.InOutBaseCardType = BaseCarType.StoredValueCar;
            }
            else
            {
                if (args.CarTypeInfo.RepeatOut == YesOrNo.No)
                {
                    rst.ResCode = ResultCode.RepeatOut;
                }
                else
                {
                    rst.ResCode           = ResultCode.OutOK;
                    rst.InOutBaseCardType = BaseCarType.StoredValueCar;
                }
            }
        }
示例#3
0
        private void CheckMainAreaRepeatOut(InputAgs args, ResultAgs rst)
        {
            string       errorMsg = "";
            ParkIORecord iorecord = null;

            if (args.CardInfo != null)
            {
                iorecord = ParkIORecordServices.GetNoExitIORecordByCardNo(args.AreadInfo.PKID, args.CardInfo.Usercard.CardNo, out errorMsg);
            }
            else
            {
                iorecord = ParkIORecordServices.GetNoExitIORecordByPlateNumber(args.AreadInfo.PKID, args.Plateinfo.LicenseNum, out errorMsg);
            }
            rst.InOutBaseCardType = args.CarTypeInfo.BaseTypeID;
            if ((iorecord == null || iorecord.IsExit) && args.CarTypeInfo.RepeatOut == YesOrNo.No)
            {
                rst.ResCode = ResultCode.RepeatOut;
            }
        }
示例#4
0
        private void CheckMainAreaRepeatOut(InputAgs args, ResultAgs rst)
        {
            string       errorMsg = "";
            ParkIORecord isfindno = null;

            if (args.CardInfo != null)
            {
                isfindno = ParkIORecordServices.GetNoExitIORecordByCardNo(args.AreadInfo.PKID, args.CardInfo.Usercard.CardNo, out errorMsg);
            }
            else
            {
                isfindno = ParkIORecordServices.GetNoExitIORecordByPlateNumber(args.AreadInfo.PKID, args.Plateinfo.LicenseNum, out errorMsg);
            }
            if (isfindno != null)
            {
                args.IORecord = isfindno;
                if (!isfindno.CarModelID.IsEmpty() && (isfindno.CarModelID.IsEmpty() || (!isfindno.CarModelID.IsEmpty() && (args.CarModel != null && args.CarModel.CarModelID != isfindno.CarModelID))))
                {
                    args.CarModel = ParkCarModelServices.QueryByRecordId(isfindno.CarModelID);
                }

                var list = ParkCarModelServices.QueryByParkingId(args.AreadInfo.PKID);
                foreach (var item in list)
                {
                    if (item.PlateColor.ToInt() != 0 && item.PlateColor.ToInt() == args.Plateinfo.CarModelType)
                    {
                        args.CarModel = item;
                        break;
                    }
                }
                if (args.CarModel == null)
                {
                    //获取卡对应的车类型
                    var carmode = ParkCarModelServices.GetDefaultCarModel(args.AreadInfo.PKID, out errorMsg);
                    if (carmode != null)
                    {
                        args.CarModel = carmode;
                    }
                }

                rst.InDate            = args.IORecord.EntranceTime;
                rst.OutDate           = args.Plateinfo.TriggerTime;
                rst.ResCode           = ResultCode.OutOK;
                rst.InOutBaseCardType = BaseCarType.TempCar;
            }
            else if (rst.IsPoliceFree)
            {
                rst.ResCode           = ResultCode.OutOK;
                rst.InOutBaseCardType = BaseCarType.TempCar;
            }
            else if (args.CarTypeInfo.CarNoLike == YesOrNo.Yes)//是否模糊识别
            {
                rst.ResCode           = ResultCode.OnFindNo;
                rst.InOutBaseCardType = BaseCarType.TempCar;
            }
            else //重复出场判断
            {
                if (args.CarTypeInfo.RepeatOut == YesOrNo.No)
                {
                    rst.ResCode = ResultCode.RepeatOut;
                }
                else
                {
                    rst.ResCode           = ResultCode.OutOK;
                    rst.InOutBaseCardType = BaseCarType.TempCar;
                }
            }
        }