Beispiel #1
0
        ///// <summary>
        ///// 职工划卡
        ///// </summary>
        ///// <param name="param"></param>
        ///// <param name="baseParam"></param>
        ///// <returns></returns>
        //public ApiJsonResultData WorkersSettlement(WorkersSettlementParam param, HisBaseParam baseParam)
        //{
        //    //流水号
        //    var settlementNo = new byte[1024];
        //    //自付金额
        //    var selfPayment = new byte[1024];
        //    //账户支付
        //    var accountPayment = new byte[1024];
        //    //返回状态
        //    var resultState = new byte[1024];
        //    //消息
        //    var msg = new byte[1024];
        //    var resultData = new ApiJsonResultData {Success = true};

        //    Logs.LogWriteData(new LogWriteDataParam()
        //    {
        //        JoinJson = JsonConvert.SerializeObject(param),
        //        ReturnJson = JsonConvert.SerializeObject(baseParam),
        //        OperatorId = baseParam.OperatorId

        //    });
        //    try
        //    {
        //        if (param == null)
        //            throw new Exception("职工结算入参不能为空!!!");
        //        if (string.IsNullOrWhiteSpace(baseParam.Account))
        //            throw new Exception("医保账户不能为空!!!");
        //        if (string.IsNullOrWhiteSpace(baseParam.Pwd))
        //            throw new Exception("医保账户密码不能为空!!!");
        //        if (string.IsNullOrWhiteSpace(param.CardPwd))
        //            throw new Exception("卡密码不能为空!!!");
        //        if (string.IsNullOrWhiteSpace(param.Operator))
        //            throw new Exception("经办人不能为空!!!");
        //        if (param.AllAmount<=0)
        //            throw new Exception("划卡金额必须大于0!!!");
        //        if (param.MedicalCategory <= 0)
        //            throw new Exception("划卡类别!!!");

        //        var loginData = WorkersMedicalInsurance.ConnectAppServer_cxjb(baseParam.Account, baseParam.Pwd);
        //        if (loginData != 1) throw new Exception("医保登陆失败!!!");
        //        //var settlementData = WorkersMedicalInsurance.WorkersSettlement
        //        //(1,
        //        // param.CardPwd,
        //        // param.AllAmount.ToString(),
        //        // param.MedicalCategory.ToString(),
        //        // param.Operator,
        //        // settlementNo,
        //        // accountPayment,
        //        // selfPayment,
        //        // resultState,
        //        // msg
        //        //);
        //        //if (settlementData!=0) throw new Exception("职工划卡失败!!!");
        //        //if (CommonHelp.StrToTransCoding(resultState) != "1") throw new Exception(CommonHelp.StrToTransCoding(msg));
        //        //var data = new WorkersSettlementDto()
        //        //{
        //        //    SettlementNo = CommonHelp.StrToTransCoding(settlementNo),
        //        //    AccountPayment = Convert.ToDecimal(CommonHelp.StrToTransCoding(accountPayment)),
        //        //    SelfPayment = Convert.ToDecimal(CommonHelp.StrToTransCoding(selfPayment)),
        //        //};
        //        var accountPaymentData = param.AllAmount > 0 ? Convert.ToDecimal(0.1) : 0;

        //        //resultData.Data = JsonConvert.SerializeObject(data);
        //        ////数据日志存入
        //        //param.CardPwd = "******";
        //        //Logs.LogWriteData(new LogWriteDataParam()
        //        //{
        //        //    JoinJson = JsonConvert.SerializeObject(param),
        //        //    ReturnJson = JsonConvert.SerializeObject(data),
        //        //    OperatorId = baseParam.OperatorId

        //        //});
        //    }
        //    catch (Exception e)
        //    {
        //        resultData.Success = false;
        //        resultData.Message = e.Message;
        //        Logs.LogWrite(new LogParam()
        //        {
        //            Msg = e.Message,
        //            OperatorCode = baseParam.OperatorId,
        //            Params = Logs.ToJson(param),
        //        });

        //    }

        //    return resultData;
        //}
        private ResidentUserInfoDto UserInfoToDto(ResidentUserInfoJsonDto param)
        {
            var resultData = new ResidentUserInfoDto()
            {
                WorkersInsuranceBalance  = param.WorkersInsuranceBalance,
                ResidentInsuranceBalance = param.ResidentInsuranceBalance,
                AdministrativeArea       = param.AdministrativeArea,
                Age                          = param.Age,
                Birthday                     = param.Birthday,
                CommunityName                = param.CommunityName,
                ContactAddress               = param.ContactAddress,
                ContactPhone                 = param.ContactPhone,
                IdCardNo                     = param.IdCardNo,
                InsuranceType                = param.InsuranceType,
                InsuredState                 = param.InsuredState,
                MentorBalance                = param.MentorBalance,
                OverallPaymentBalance        = param.OverallPaymentBalance,
                ReturnState                  = param.ReturnState,
                Msg                          = param.Msg,
                PatientName                  = param.PatientName,
                PatientSex                   = param.PatientSex,
                PersonalCoding               = param.PersonalCoding,
                PersonnelClassification      = param.PersonnelClassification,
                PoorMark                     = param.PoorMark,
                PreferentialTreatmentType    = param.PreferentialTreatmentType,
                ReimbursementStatus          = param.ReimbursementStatus,
                ReimbursementStatusExplain   = param.ReimbursementStatusExplain,
                RescueType                   = param.RescueType,
                SpecialPeopleCognizancePlace = param.SpecialPeopleCognizancePlace
            };

            return(resultData);
        }
Beispiel #2
0
        /// <summary>
        /// 获取个人基础资料
        /// </summary>
        /// <param name="param"></param>
        public ResidentUserInfoDto GetUserInfo(ResidentUserInfoParam param)
        {
            ResidentUserInfoDto resulData = null;
            var xmlStr = XmlHelp.SaveXml(param);

            if (!xmlStr)
            {
                throw new Exception("获取个人基础资料保存参数出错");
            }
            MedicalInsuranceDll.CallService_cxjb("CXJB001");
            var data = XmlHelp.DeSerializerModel(new ResidentUserInfoJsonDto(), true);

            resulData = AutoMapper.Mapper.Map <ResidentUserInfoDto>(data);
            return(resulData);
        }