using Newtonsoft.Json.Linq;
using PTMedicalInsurance.Common;
using PTMedicalInsurance.Variables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PTMedicalInsurance.Business.Core.SelfServiceMachine.Process.ReadCard
{
    class VerifyCardPassword : AbstractProcess
    {
        public override CallResult Process(JObject input)
        {
            #region【住院正式结算前调用社保卡验密】
            CardReader_GS CardRead_GS = new CardReader_GS();
            if ((Global.pat.mdtrtcertType == "03") && (Global.pat.insuplc_admdvs.Substring(0, 2) == "62"))
            {
                if (CardRead_GS.VerifyPIN(out outParam) != 0)
                {
                    return Exception("社保卡验密异常iVerifyPIN失败 ");
                }
            }
            outParam = input.ToString();
            return Success();
            #endregion
        }
    }
}
