예제 #1
0
        /// <summary>
        /// 显示增值税发票信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO> ShowVatInvoiceProofExt(Guid userId)
        {
            if (userId == Guid.Empty)
            {
                return(new ResultDTO <VatInvoiceProofInfoDTO>()
                {
                    ResultCode = 1, Message = "参数不能为空"
                });
            }
            var query = VatInvoiceProof.ObjectSet().Where(n => n.Id == userId).FirstOrDefault();

            if (query == null)
            {
                return(new ResultDTO <VatInvoiceProofInfoDTO>()
                {
                    ResultCode = 2, Message = "没有可显示的增值税发票"
                });
            }
            var result = new Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO();

            result.Id              = query.Id;
            result.IdentifyNo      = query.IdentifyNo;
            result.PersonalProof   = query.PersonalProof;
            result.Phone           = query.Phone;
            result.CompanyName     = query.CompanyName;
            result.BankCode        = query.BankCode;
            result.BankName        = query.BankName;
            result.BusinessLicence = query.BusinessLicence;
            result.Address         = query.Address;
            result.TaxRegistration = query.TaxRegistration;
            return(new Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO>()
            {
                Data = result, ResultCode = 0, Message = "Success"
            });
        }
예제 #2
0
        /// <summary>
        /// 保存增值税发票资质信息
        /// </summary>
        /// <param name="VatInvoiceProof"></param>
        /// <returns></returns>
        public ResultDTO SaveVatInvoiceProofExt(Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO vatInvoiceP)
        {
            try
            {
                ContextSession  contextSession  = ContextFactory.CurrentThreadContext;
                VatInvoiceProof vatInvoiceProof = VatInvoiceProof.ObjectSet().FirstOrDefault(n => n.Id == vatInvoiceP.Id);
                if (vatInvoiceProof == null)
                {
                    VatInvoiceProof vatInvoiceProo = VatInvoiceProof.CreateVatInvoiceProof();
                    vatInvoiceProo.Id              = vatInvoiceP.Id;
                    vatInvoiceProo.CompanyName     = vatInvoiceP.CompanyName;
                    vatInvoiceProo.Address         = vatInvoiceP.Address;
                    vatInvoiceProo.BankCode        = vatInvoiceP.BankCode;
                    vatInvoiceProo.BankName        = vatInvoiceP.BankName;
                    vatInvoiceProo.BusinessLicence = vatInvoiceP.BusinessLicence;
                    vatInvoiceProo.PersonalProof   = vatInvoiceP.PersonalProof;
                    vatInvoiceProo.Phone           = vatInvoiceP.Phone;
                    vatInvoiceProo.IdentifyNo      = vatInvoiceP.IdentifyNo;
                    vatInvoiceProo.TaxRegistration = vatInvoiceP.TaxRegistration;
                    contextSession.SaveObject(vatInvoiceProo);
                }
                else
                {
                    vatInvoiceProof.EntityState     = System.Data.EntityState.Modified;
                    vatInvoiceProof.Id              = vatInvoiceP.Id;
                    vatInvoiceProof.CompanyName     = vatInvoiceP.CompanyName;
                    vatInvoiceProof.Address         = vatInvoiceP.Address;
                    vatInvoiceProof.BankCode        = vatInvoiceP.BankCode;
                    vatInvoiceProof.BankName        = vatInvoiceP.BankName;
                    vatInvoiceProof.BusinessLicence = vatInvoiceP.BusinessLicence;
                    vatInvoiceProof.PersonalProof   = vatInvoiceP.PersonalProof;
                    vatInvoiceProof.Phone           = vatInvoiceP.Phone;
                    vatInvoiceProof.IdentifyNo      = vatInvoiceP.IdentifyNo;
                    vatInvoiceProof.TaxRegistration = vatInvoiceP.TaxRegistration;
                    contextSession.SaveObject(vatInvoiceProof);
                }

                contextSession.SaveChanges();
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("保存增值税发票资质信息异常。vatInvoiceP:{0}", vatInvoiceP), ex);
                return(new ResultDTO {
                    ResultCode = 1, Message = "Error"
                });
            }
            return(new ResultDTO {
                ResultCode = 0, Message = "Success"
            });
        }
예제 #3
0
        /// <summary>
        /// 保存增值税发票资质信息
        /// </summary>
        /// <param name="VatInvoiceProof"></param>
        /// <returns></returns>
        public ResultDTO SaveVatInvoiceProof(Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO VatInvoiceP)
        {
            //定义返回值
            ResultDTO result;

            try
            {
                //调用代理方法
                result = base.Channel.SaveVatInvoiceProof(VatInvoiceP);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }
예제 #4
0
        /// <summary>
        /// 显示增值税发票信息 金采支付使用
        /// </summary>
        /// <param name="jcActivityId"></param>
        /// <returns></returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO> ShowVatInvoiceProofIIExt(Guid jcActivityId)
        {
            if (jcActivityId == Guid.Empty)
            {
                return(new ResultDTO <VatInvoiceProofInfoDTO>()
                {
                    ResultCode = 1, Message = "参数不能为空"
                });
            }
            var query = TPS.ZPHSV.Instance.GetJCInvoiceByActivityId(jcActivityId);

            if (query == null)
            {
                return(new ResultDTO <VatInvoiceProofInfoDTO>()
                {
                    ResultCode = 2, Message = "没有可显示的增值税发票"
                });
            }
            var result = new Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO
            {
                Id              = query.Data.id,
                IdentifyNo      = query.Data.IdentifyNumber,
                PersonalProof   = "",
                Phone           = query.Data.RegisteredTel,
                CompanyName     = query.Data.HeadValue,
                BankCode        = query.Data.BankAccount,
                BankName        = query.Data.DepositBank,
                BusinessLicence = "",
                Address         = query.Data.RegisteredAddress,
                TaxRegistration = ""
            };

            return(new Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO <Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO>()
            {
                Data = result, ResultCode = 0, Message = "Success"
            });
        }
예제 #5
0
 /// <summary>
 /// 保存增值税发票资质信息
 /// </summary>
 /// <param name="VatInvoiceProof"></param>
 /// <returns></returns>
 public ResultDTO SaveVatInvoiceProof(Jinher.AMP.BTP.Deploy.CustomDTO.VatInvoiceProofInfoDTO VatInvoiceP)
 {
     base.Do();
     return(this.Command.SaveVatInvoiceProof(VatInvoiceP));
 }