コード例 #1
0
        public rtnMessage standardApproval([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://www.like18.com")] inMessage inMessage)
        {
            object[] results = this.Invoke("standardApproval", new object[] {
                inMessage
            });

            return((rtnMessage)(results[0]));
        }
コード例 #2
0
 /// <remarks/>
 public void standardApprovalAsync(inMessage inMessage, object userState)
 {
     if ((this.standardApprovalOperationCompleted == null))
     {
         this.standardApprovalOperationCompleted = new System.Threading.SendOrPostCallback(this.OnstandardApprovalOperationCompleted);
     }
     this.InvokeAsync("standardApproval", new object[] {
         inMessage
     }, this.standardApprovalOperationCompleted, userState);
 }
コード例 #3
0
 /// <remarks/>
 public void standardApprovalAsync(inMessage inMessage)
 {
     this.standardApprovalAsync(inMessage, null);
 }
コード例 #4
0
 /// <remarks/>
 public System.IAsyncResult BeginstandardApproval(inMessage inMessage, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginInvoke("standardApproval", new object[] {
         inMessage
     }, callback, asyncState));
 }
コード例 #5
0
        /// <summary>
        /// 投保
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public IssuingResultEntity Issue(IssueEntity entity)
        {
            IssuingResultEntity result = new IssuingResultEntity();
            inMessage           msg    = new inMessage();

            try
            {
                BirthAndGender birthAndGender;
                birthAndGender        = Common.GetBirthAndSex(entity.ID);
                entity.Birthday       = birthAndGender.Birth;
                entity.Gender         = birthAndGender.Gender;
                msg.applicantCertType = "1";//身份证
            }
            catch
            {
                entity.Birthday       = DateTime.Parse("1901-1-1");
                entity.Gender         = Gender.Male;
                msg.applicantCertType = GetIdType(entity.IDType);//护照
            }

            msg.agencyID     = config[1];                                                           //用户名:"bjjingji";
            msg.outerOrderID = entity.CaseNo;
            msg.productCode  = entity.EffectiveDate.Date == DateTime.Today ? config[2] : config[3]; //可保当日的产品代码:"9971";次日:9982
            if (entity.EffectiveDate.Date == DateTime.Today)
            {
                //当日起保的产品不做了
                result.Trace.ErrorMsg = "下单失败!";
                result.Trace.Detail   = "该款产品不支持当日下单、当日起保。";
                return(result);
            }
            msg.policyBeginDate = entity.EffectiveDate;
            msg.unitCount       = 1;           //投保一份

            msg.applicantName   = entity.Name; //投保人
            msg.applicantMobile = entity.PhoneNumber;

            msg.applicantCercCode = entity.ID;
            msg.applicantSex      = entity.Gender == Gender.Male ? "1" : "0";
            msg.applicantBirth    = entity.Birthday;

            msg.insuredName     = msg.applicantName;
            msg.insuredMobile   = msg.applicantMobile;
            msg.insuredCertType = msg.applicantCertType;
            msg.insuredCercCode = msg.applicantCercCode;
            msg.insuredSex      = msg.applicantSex;
            msg.insuredBirth    = msg.applicantBirth;
            msg.insurantNexus   = "01";//投保人和被保人关系:本人

            try
            {
                rtnMessage ret = ws.standardApproval(msg);
                if (ret == null)
                {
                    throw new Exception("WebService返回为空!");
                }
                if (ret.returnCode != "S000")
                {
                    Common.LogIt("like8:" + ret.returnMessage);

                    if (ret.returnCode == "F011")//returnMessage.Contains("重复投保")
                    {
                        //result.PolicyNo = entity.CaseNo;
                        return(result);
                    }

                    result.Trace.ErrorMsg = ret.returnMessage;
                    result.Trace.Detail   = ret.returnCode;
                }
                else
                {
                    result.PolicyNo = ret.policyNumber;
                }
            }
            catch
            {
                Common.LogIt(ws.Url);
                throw;
            }

            return(result);
        }