コード例 #1
0
        public static bool Init()
        {
            BusinessFacade.His.Common.CommonFacade cf = new BusinessFacade.His.Common.CommonFacade();
            cf.RemotingLogin();
            int zone = cf.GetServerDateZone();

            LogService.GlobalDebugMessage("时区:" + zone);
            Skynet.Framework.Common.TimeSync.SyncTime(cf.GetServerDateTime(), zone);

            UpdateSystemConfig();

            //return true;
            //初始化硬件
            switch (AutoHostConfig.ReadCardType)
            {
            case "XUHUI":
                //Thread.Sleep(200);
                StringBuilder sbinput   = new StringBuilder("<invoke name=\"READCARDALLOWCARDIN\"><arguments></arguments></invoke>");
                string        strResult = AutoServiceSDK.SDK.XuHuiInterface_DLL.XmlTcp(sbinput, 0);
                Skynet.LoggingService.LogService.GlobalInfoMessage("调用XmlTcp允许进卡方法返回:" + strResult + ",输出参数:" + sbinput.ToString());
                break;

            default:
                break;
            }

            //卡类型
            CardTypesFacade cardTypesFacade = new CardTypesFacade();

            dsCardType = cardTypesFacade.FindByTypeName(SkyComm.getvalue("发卡卡类型"));
            if (dsCardType == null || dsCardType.Tables[0].Rows.Count == 0)
            {
                SkynetMessage.MsgInfo("发卡机的卡类型维护不正确,请与管理员联系!");
            }

            //费用类别
            ChargeKindFacade cktype = new ChargeKindFacade();

            FeeType = SkyComm.getvalue("发卡费用类别");
            DataSet dscktype = cktype.FindChargeKindByName(SkyComm.getvalue("发卡费用类别"));

            if (dscktype.Tables[0].Rows.Count < 0)
            {
                SkynetMessage.MsgInfo("发卡机的卡类型维护不正确,请与管理员联系!");
            }
            else
            {
                FeeTypeID = dscktype.Tables[0].Rows[0]["CHARGEKINDID"].ToString();
            }

            //获取银行卡预存,现金预存的配置
            AddMoneyCashMode = SkyComm.getvalue("现金预存充值方式");
            AddMoneyPosMode  = SkyComm.getvalue("银行预存充值方式");
            return(login());
        }
コード例 #2
0
        public string GetPatiantInfo()
        {
            CardAuthorizationFacade theCardAuthorizationFacade = new CardAuthorizationFacade();

            SkyComm.eCardAuthorizationData = (CardAuthorizationData)theCardAuthorizationFacade.SelectPatientAndCardInfoByCardID(SkyComm.cardInfoStruct.CardNo);
            if (SkyComm.eCardAuthorizationData.Tables[0].Rows.Count == 0)
            {
                //SkyComm.ShowMessageInfo("卡号无效! 卡号:" + SkyComm.cardInfoStruct.CardNo);
                return("卡号无效!");
            }
            string CardID = SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CARDID].ToString();

            if (!string.IsNullOrEmpty(CardID))
            {
                if (Convert.ToInt32(SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CIRCUIT_STATE]) == 1)
                {
                    SkyComm.ShowMessageInfo("此卡已挂失不能使用!");
                    return("此卡已挂失不能使用!");
                }
                if (Convert.ToInt32(SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CIRCUIT_STATE]) == 2)
                {
                    SkyComm.ShowMessageInfo("此卡已注销不能使用!");
                    return("此卡已注销不能使用!");
                }
                DataSet dsType = new CardTypesFacade().FindByPrimaryKey(SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0]["TYPEID"].ToString());
                if (dsType.Tables[0].Rows[0]["IS_FEECHARGING_CARD"].ToString() == "1")
                {
                    return("此卡为不储值卡,不能使用!");
                }
            }
            else
            {
                return("此卡信息不存在!");
            }
            if (SkyComm.eCardAuthorizationData == null || SkyComm.eCardAuthorizationData.Tables[0].Rows.Count <= 0)
            {
                return("读取病人信息失败!");
            }

            int IS_FEECHARGING_CARD = -1;

            IS_FEECHARGING_CARD = Convert.ToInt32(SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["IS_FEECHARGING_CARD"]);
            SkyComm.cardInfoStruct.Is_FEECHARGING_CARD = IS_FEECHARGING_CARD;
            SkyComm.cardInfoStruct.CardTypeID          = Convert.ToInt32(SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["TYPEID"]);
            SkyComm.DiagnoseID = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
            if (SystemInfo.SystemConfigs["院内就诊卡模式"].DefaultValue.ToString() != "2")
            {
                SkyComm.cardBlance = DecimalRound.Round(theCardAuthorizationFacade.FindCardBalance(SkyComm.DiagnoseID), 2);
            }
            else
            {
                SkyComm.cardBlance = DecimalRound.Round(theCardAuthorizationFacade.FindCardBalance_New(SkyComm.DiagnoseID, SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["ACCOUNT_ID"].ToString()), 2);
            }
            CardSavingFacade cf = new CardSavingFacade();

            if (SystemInfo.SystemConfigs["院内就诊卡模式"].DefaultValue.ToString() != "2")
            {
                SkyComm.cardallmoney = cf.FindBalanceMoneyByDiagnoseID(SkyComm.DiagnoseID);
            }
            else
            {
                SkyComm.cardallmoney = cf.FindBalanceMoneyByDiagnoseID_New(SkyComm.DiagnoseID, SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["ACCOUNT_ID"].ToString());
            }
            return("");
        }