Exemplo n.º 1
0
        /// <summary>
        /// 确认签约要件
        /// </summary>
        /// <param name="caseid">案件ID,并非案件号</param>
        /// <returns></returns>
        public async Task <bool> ConfrimPublic(string id, string createUser, string description)
        {
            var         audit = _baseAuditDal.Get(id);
            MortgageDAL mort  = new MortgageDAL();

            if (audit == null)
            {
                return(false);
            }
            var morimodel = mort.GetPublic(id);

            if (morimodel == null)
            {
                return(false);
            }
            audit.Description = description;

            AuditHelp ah = new AuditHelp();
            var       publicMortgageDto = new PublicMortgageDto();

            Infrastructure.ExtendTools.ObjectExtend.CopyTo(morimodel, publicMortgageDto);
            publicMortgageDto.LenderName  = audit.LenderName;
            publicMortgageDto.CaseNum     = audit.NewCaseNum;
            publicMortgageDto.OpeningBank = audit.OpeningBank;
            publicMortgageDto.OpeningSite = audit.OpeningSite;
            publicMortgageDto.BankCard    = audit.BankCard;
            if (audit.IntroducerAudits != null && audit.IntroducerAudits.Any())
            {
                foreach (var r in audit.IntroducerAudits)
                {
                    var newIntro = new IntroducerAudit();
                    Infrastructure.ExtendTools.ObjectExtend.CopyTo(r, newIntro);
                    publicMortgageDto.Introducer.Add(newIntro);
                }
            }

            UserDAL ud    = new UserDAL();
            var     contr = await ud.FindById(morimodel.ContractPerson);

            publicMortgageDto.ContractPersonText = contr.DisplayName;
            MortgagePush _mortgagePush = new MortgagePush();
            var          pushResult    = _mortgagePush.PushToHats(publicMortgageDto);

            if (!pushResult.IsSuccess)
            {
                return(false);
            }
            var newid = ah.CopyBaseAudit(audit, createUser, CaseStatus.Lending, false);

            _mortgageDal.CopyPublic(morimodel, newid, createUser);
            //pub.ID = newid;
            //pub.CreateUser = createUser;
            //_mortgageDal.Add(pub);
            _mortgageDal.AcceptAllChange();
            return(true);
        }
Exemplo n.º 2
0
        public void SaveIntroducers <T>(ICollection <Introducer> collaterals, string auditId)
            where T : class, new()
        {
            Type type = typeof(T);

            if (type.Equals(typeof(IntroducerAudit)))
            {
                IntroducerAuditDAL IntroducerDAL = new IntroducerAuditDAL();
                foreach (var model in collaterals)
                {
                    #region 介绍人信息

                    IntroducerAudit IntroducerModel = new IntroducerAudit()
                    {
                        ID            = Guid.NewGuid().ToString(),
                        AuditID       = auditId,
                        Name          = model.Name,
                        Contract      = model.Contract,
                        RebateAmmount = model.RebateAmmount,
                        RebateRate    = model.RebateRate,
                        Account       = model.Account,
                        AccountBank   = model.AccountBank,
                        Sequence      = model.Sequence
                    };

                    #endregion 介绍人信息

                    IntroducerDAL.Add(IntroducerModel); //保存介绍人信息
                }
            }
            else if (type.Equals(typeof(Introducer)))
            {
                IntroducerDAL IntroducerDAL = new IntroducerDAL();
                foreach (var model in collaterals)
                {
                    #region 介绍人信息

                    Introducer IntroducerModel = new Introducer()
                    {
                        ID            = Guid.NewGuid().ToString(),
                        Name          = model.Name,
                        Contract      = model.Contract,
                        RebateAmmount = model.RebateAmmount,
                        RebateRate    = model.RebateRate,
                        Account       = model.Account,
                        AccountBank   = model.AccountBank,
                        CaseID        = auditId,
                        Sequence      = model.Sequence
                    };

                    #endregion 介绍人信息

                    IntroducerDAL.Add(IntroducerModel); //保存介绍人信息
                }
            }
        }
Exemplo n.º 3
0
 public static IntroducerAuditViewModel MaptoIntroduceAuditViewModel(this IntroducerAudit entity)
 {
     return(new IntroducerAuditViewModel
     {
         ID = entity.ID,
         Name = entity.Name,
         Contract = entity.Contract,
         RebateAmmount = entity.RebateAmmount,
         RebateRate = entity.RebateRate,
         Account = entity.Account,
         AccountBank = entity.AccountBank,
         AuditID = entity.AuditID,
         Sequence = entity.Sequence
     });
 }
Exemplo n.º 4
0
        /// <summary>
        /// 保存介绍人信息
        /// </summary>
        /// <param name="Collaterals"></param>
        /// <param name="auditId"></param>
        public IEnumerable <IntroducerAudit> SaveIntroducers(BaseAudit baseAudit, BaseAudit newAudit)
        {
            var IntroducerAuditList = new List <IntroducerAudit>();

            foreach (var model in baseAudit.IntroducerAudits)
            {
                IntroducerAudit Introducer = new IntroducerAudit();
                // 介绍人信息
                Introducer.ID            = Guid.NewGuid().ToString();
                Introducer.AuditID       = newAudit.ID;
                Introducer.Contract      = model.Contract;
                Introducer.Name          = model.Name;
                Introducer.RebateAmmount = model.RebateAmmount;
                Introducer.RebateRate    = model.RebateRate;
                Introducer.Account       = model.Account;
                Introducer.AccountBank   = model.AccountBank;
                Introducer.Sequence      = model.Sequence;

                IntroducerAuditList.Add(Introducer); //保存抵押物信息
            }
            IntroducerAuditDAL.AddRange(IntroducerAuditList);
            return(IntroducerAuditList);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 保存介绍人信息
        /// </summary>
        /// <param name="Collaterals"></param>
        /// <param name="auditId"></param>
        public void SaveIntroducers(ICollection <Introducer> collaterals, string auditId)
        {
            IntroducerAuditDAL IntroducerDAL = new IntroducerAuditDAL();

            foreach (var model in collaterals)
            {
                #region 介绍人信息

                IntroducerAudit IntroducerModel = new IntroducerAudit();
                IntroducerModel.ID            = Guid.NewGuid().ToString();
                IntroducerModel.AuditID       = auditId;
                IntroducerModel.Name          = model.Name;
                IntroducerModel.Contract      = model.Contract;
                IntroducerModel.RebateAmmount = model.RebateAmmount;
                IntroducerModel.RebateRate    = model.RebateRate;
                IntroducerModel.Account       = model.Account;
                IntroducerModel.AccountBank   = model.AccountBank;
                IntroducerModel.Sequence      = model.Sequence;

                #endregion 介绍人信息

                IntroducerDAL.Add(IntroducerModel); //保存介绍人信息
            }
        }