예제 #1
0
        public BaseApiResponse <string> Post(SecurityRequest request)
        {
            var response = new BaseApiResponse <string>();

            try
            {
                HatsCase hatsCase = request.RequestData.FromHatsString <HatsCase>();

                if (hatsCase.IsNotNull())
                {
                    var result = new HatsCaseValidator().Validate(hatsCase);
                    if (result.IsNotValid())
                    {
                        response.Status  = StatusEnum.Failed.ToString();
                        response.Message = result.GetErrors().First().Message;
                        return(response);
                    }

                    BaseAudit pendingCase = _baseAuditBll.QueryHatsPending(hatsCase.CaseNum);
                    if (pendingCase.IsNotNull())
                    {
                        pendingCase.EarnestMoney = hatsCase.EarnestMoney;
                        pendingCase.CaseMode     = hatsCase.TransferType;
                        pendingCase.ThirdParty   = hatsCase.ThirdParty;

                        pendingCase.ThirdPartyAuditAmount = hatsCase.TransferAmount;
                        pendingCase.ThirdPartyAuditRate   = hatsCase.TransferInterest;
                        pendingCase.ThirdPartyAuditTerm   = hatsCase.TransferTerm;

                        var isSuccess = _mortgageBll.IntoMortgage(pendingCase, pendingCase.CreateUser);
                        if (isSuccess)
                        {
                            response.Status = StatusEnum.Success.ToString();
                        }
                        else
                        {
                            response.Status  = StatusEnum.Failed.ToString();
                            response.Message = "进入签约失败";
                        }
                    }
                    else
                    {
                        response.Status  = StatusEnum.Failed.ToString();
                        response.Message = "数据已更改";
                    }
                }
                else
                {
                    response.Status  = StatusEnum.Failed.ToString();
                    response.Message = "案件信息为空";
                }
            }
            catch (System.Exception ex)
            {
                response.Status  = StatusEnum.Failed.ToString();
                response.Message = ex.Message;
            }

            return(response);
        }
예제 #2
0
        /// <summary>
        /// 获取第三方资金年利率
        /// </summary>
        /// <param name="baseAudit">案件信息</param>
        /// <returns>年利率</returns>
        private string GetThirdPartyRate(BaseAudit baseAudit)
        {
            //string rate;
            if (baseAudit.ThirdParty != null)
            {
                return(baseAudit.ThirdPartyAuditRate.ToString());
            }
            else
            {
                return(string.Empty);
            }

            //switch (baseAudit.ThirdParty)
            //{
            //    case "-ThirdPlatform-DianRong":
            //        rate = baseAudit.ThirdPartyAuditRate.ToString();
            //        break;
            //    case "-ThirdPlatform-JuCaiMao":
            //        rate = ConfigurationManager.AppSettings["-ThirdPlatform-JuCaiMao"];
            //        break;
            //    case "-ThirdPlatform-MiGang":
            //        rate = ConfigurationManager.AppSettings["-ThirdPlatform-MiGang"];
            //        break;
            //    case "-ThirdPlatform-WaCai":
            //        rate = ConfigurationManager.AppSettings["-ThirdPlatform-WaCai"];
            //        break;
            //    default:
            //        rate = string.Empty;
            //        break;
            //}

            //return rate;
        }
예제 #3
0
 public JsonResult remove(int id = 0)
 {
     try
     {
         BaseAudit model = db.BaseAudits.Find(id);
         if (model != null)
         {
             BoolString validation = model.BeforeDelete(db);
             if (validation.BoolValue)
             {
                 return(Json(new { Message = validation.StringValue }, JsonRequestBehavior.AllowGet));
             }
             db.BaseAudits.Remove(model);
             db.SaveChanges();
             validation = model.AfterDelete(db);
             if (validation.BoolValue)
             {
                 return(Json(new { Message = validation.StringValue }, JsonRequestBehavior.AllowGet));
             }
             return(Json(new { id = model.Execute_at, MessageSucess = "That Audit deleted successfully." }, JsonRequestBehavior.AllowGet));
         }
         return(Json(new { Message = "This record no longer exists" }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { Message = Helper.ModeralException(ex).Replace("@table", "Audit") }, JsonRequestBehavior.AllowGet));
     }
 }
예제 #4
0
        /// <summary>
        /// 保存企业资信信息集合
        /// </summary>
        /// <param name="Collaterals"></param>
        /// <param name="auditId"></param>
        public void SaveEnterpriseCredit(BaseAudit baseAudit, BaseAudit newAudit, RelationEnterpriseAudit oldEnterprise, RelationEnterpriseAudit newEnterprise)
        {
            var entCRList = new List <EnterpriseCredit>();
            var enter     = baseAudit.EnterpriseCredits.Where(t => t.EnterpriseID == oldEnterprise.ID);

            if (!enter.Any())
            {
                return;
            }
            foreach (var model in enter)
            {
                var entity = new EnterpriseCredit();
                entity.ID                 = Guid.NewGuid().ToString();
                entity.BaseAuditID        = newAudit.ID;
                entity.CreditCard         = model.CreditCard;
                entity.CreditInfo         = model.CreditInfo;
                entity.EnterpriseID       = newEnterprise.ID;
                entity.ShareholderDetails = model.ShareholderDetails;
                entity.OtherDetailes      = model.OtherDetailes;
                entity.Sequence           = model.Sequence;

                entCRList.Add(entity); //保存企业资信信息
            }
            enterpriseCreditDAL.AddRange(entCRList);
        }
예제 #5
0
        /// <summary>
        /// 保存被执行人信息集合
        /// </summary>
        /// <param name="enforcementPerson"></param>
        /// <param name="auditId"></param>
        public void SaveEnforcementPerson(BaseAudit baseAudit, BaseAudit newAudit, RelationPersonAudit oldperson, RelationPersonAudit newperson)
        {
            var entCRList = new List <EnforcementPerson>();
            var enforce   = baseAudit.EnforcementPersons.Where(t => t.PersonID == oldperson.ID);

            if (!enforce.Any())
            {
                return;
            }
            foreach (var model in enforce)
            {
                var entity = new EnforcementPerson();
                entity.ID             = Guid.NewGuid().ToString();
                entity.BaseAuditID    = newAudit.ID;
                entity.BadNews        = model.BadNews;
                entity.EnforcementWeb = model.EnforcementWeb;
                entity.LawXP          = model.LawXP;
                entity.ShiXin         = model.ShiXin;
                entity.TrialRecord    = model.TrialRecord;
                entity.PersonID       = newperson.ID;
                entity.Sequence       = model.Sequence;
                entity.AttachmentFile = model.AttachmentFile;

                entCRList.Add(entity); //保存被执行人信息
            }
            enforcementPersonDAL.AddRange(entCRList);
        }
예제 #6
0
        /// <summary>
        /// 保存抵押物信息
        /// </summary>
        /// <param name="Collaterals"></param>
        /// <param name="auditId"></param>
        public IEnumerable <CollateralAudit> SaveCollaterals(BaseAudit baseAudit, BaseAudit newAudit)
        {
            var collList = new List <CollateralAudit>();

            foreach (var model in baseAudit.CollateralAudits)
            {
                CollateralAudit entity = new CollateralAudit();
                // 抵押物信息
                entity.ID             = Guid.NewGuid().ToString();
                entity.AuditID        = newAudit.ID;
                entity.Address        = model.Address;
                entity.BuildingName   = model.BuildingName;
                entity.CollateralType = model.CollateralType;
                entity.HouseNumber    = model.HouseNumber;
                entity.HouseSize      = model.HouseSize;
                entity.RightOwner     = model.RightOwner;
                entity.Sequence       = model.Sequence;
                entity.CompletionDate = model.CompletionDate;
                entity.LandType       = model.LandType;
                entity.HouseType      = model.HouseType;
                // 上传房屋文件保存
                entity.HouseFile = SaveFiles(model.HouseFile, entity.ID, newAudit.ID);

                //保存房屋明细信息集合
                SaveHouseDetail(baseAudit, newAudit, model, entity);
                collList.Add(entity); //保存抵押物信息
            }
            collateralAuditDAL.AddRange(collList);
            return(collList);
        }
예제 #7
0
        /// <summary>
        /// 保存个人资信信息集合
        /// </summary>
        /// <param name="Collaterals"></param>
        /// <param name="auditId"></param>
        public void SaveIndividualCredit(BaseAudit baseAudit, BaseAudit newAudit, RelationPersonAudit oldperson, RelationPersonAudit newperson)
        {
            var indList = new List <IndividualCredit>();

            var indiv = baseAudit.IndividualCredits.Where(t => t.PersonID == oldperson.ID);

            if (!indiv.Any())
            {
                return;
            }
            foreach (var model in indiv)
            {
                var entity = new IndividualCredit();

                entity.ID             = Guid.NewGuid().ToString();
                entity.BaseAuditID    = newAudit.ID;
                entity.CreditCard     = model.CreditCard;
                entity.CreditInfo     = model.CreditInfo;
                entity.OtherCredit    = model.OtherCredit;
                entity.OverdueInfo    = model.OverdueInfo;
                entity.PersonID       = newperson.ID;
                entity.IndividualFile = SaveFiles(model.IndividualFile, entity.ID, newAudit.ID);
                entity.BankFlowFile   = SaveFiles(model.BankFlowFile, entity.ID, newAudit.ID);
                entity.Sequence       = model.Sequence;

                indList.Add(entity); //保存个人资信信息
            }
            individualCreditDAL.AddRange(indList);
        }
예제 #8
0
        /// <summary>
        /// 保存担保人信息集合
        /// </summary>
        /// <param name="guarantor"></param>
        /// <param name="auditId"></param>
        public IEnumerable <Guarantor> SaveGuarantor(BaseAudit baseAudit, BaseAudit newAudit)
        {
            var indList = new List <Guarantor>();

            foreach (var model in baseAudit.Guarantors)
            {
                #region 担保人信息

                var entity = new Guarantor();
                entity.ID             = Guid.NewGuid().ToString();
                entity.BaseAuditID    = newAudit.ID;
                entity.Address        = model.Address;
                entity.ContactNumber  = model.ContactNumber;
                entity.GuarantType    = model.GuarantType;
                entity.IdentityNumber = model.IdentityNumber;
                entity.IdentityType   = model.IdentityType;
                entity.MarriedInfo    = model.MarriedInfo;
                entity.Name           = model.Name;
                entity.RelationType   = model.RelationType;
                entity.Sequence       = model.Sequence;

                indList.Add(entity); //保存担保人信息

                #endregion 担保人信息
            }
            guarantorDAL.AddRange(indList);
            return(indList);
        }
예제 #9
0
        private DateTime?GetCommitTime(BaseAudit curraudit, IEnumerable <BaseAudit> list)
        {
            var nextaudit = list.Where(t => t.Version == curraudit.Version + 1);

            if (nextaudit.Any())
            {
                return(nextaudit.FirstOrDefault().CreateTime);
            }
            return(null);
        }
예제 #10
0
        private void InitData(BaseAudit BaseAuditObject)
        {
            var bll = new UserBLL();

            lblInsertedBy.Text   += bll.Retrieve(BaseAuditObject.InsertBy).UserName;
            lblInsertedDate.Text += BaseAuditObject.InsertDate.ToString("dd-MM-yyyy");
            lblUpdatedBy.Text    += bll.Retrieve(BaseAuditObject.UpdateBy).UserName;
            lblUpdatedDate.Text  += BaseAuditObject.UpdateDate.ToString("dd-MM-yyyy");
            lblUpdateNo.Text     += BaseAuditObject.UpdateNo.ToString();
        }
예제 #11
0
        public BaseAudit CastDB(BaseAuditViewModel model)
        {
            BaseAudit bc = new BaseAudit();

            Com.HSJF.Infrastructure.ExtendTools.ObjectExtend.CopyTo(model, bc);

            // bc.NewCaseNum = model.CaseNum;

            return(bc);
        }
예제 #12
0
        /// <summary>
        /// 编辑签约信息
        /// </summary>
        /// <param name="mortgage">签约信息</param>
        /// <param name="baseAudit">案件基础信息</param>
        /// <param name="createUser">当前用户</param>
        /// <returns>编辑成功与否</returns>
        public bool Edit(PublicMortgage mortgage, BaseAudit baseAudit, string createUser)
        {
            var introduces = _introducerAuditDal.GetAll().Where(p => p.AuditID == baseAudit.ID);

            _introducerAuditDal.DeleteRange(introduces);
            // _baseAuditDal.AcceptAllChange();
            //_mortgageDal.AcceptAllChange();

            return(true);
        }
예제 #13
0
        public JsonResult get(int id)
        {
            BaseAudit model = db.BaseAudits.Find(id);

            if (model != null)
            {
                return(Json(model, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { Message = "This record no longer exists" }, JsonRequestBehavior.AllowGet));
            }
        }
예제 #14
0
        public ActionResult ViewFinishedCase(string id)
        {
            BaseAudit finishedCase = _finishedCaseBll.GetFinishedCase(id);

            var summary = new FinishedCaseSummary
            {
                Id             = finishedCase.ID,
                CaseNum        = finishedCase.CaseNum,
                CaseStatusText = CaseStatusHelper.GetStatsText(finishedCase.CaseStatus)
            };

            return(View(summary));
        }
예제 #15
0
        /// <summary>
        /// 获取案件详情
        /// </summary>
        /// <param name="id">案件ID</param>
        /// <returns>案件信息</returns>
        public ActionResult GetFinishedCase(string id)
        {
            BaseAudit finishedCase = _finishedCaseBll.GetFinishedCase(id);

            var viewModel = Map(finishedCase);

            var response = new BaseResponse <FinishedCaseViewModel>()
            {
                Data   = viewModel,
                Status = "Success"
            };

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
예제 #16
0
        public JsonResult update(int id, BaseAudit model)
        {
            BoolString validation = model.BeforeEdit(db);

            if (validation.BoolValue)
            {
                return(Json(new { Message = validation.StringValue }));
            }
            db.Entry(model).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            validation = model.AfterEdit(db);
            if (validation.BoolValue)
            {
                return(Json(new { Message = validation.StringValue }));
            }
            return(Json(new { id = model.Execute_at, MessageSucess = "That Audit saved successfully." }));
        }
예제 #17
0
        public JsonResult create(BaseAudit model)
        {
            BoolString validation = model.BeforeSave(db);

            if (validation.BoolValue)
            {
                return(Json(new { Message = validation.StringValue }));
            }
            db.BaseAudits.Add(model);
            db.SaveChanges();
            validation = model.AfterSave(db);
            if (validation.BoolValue)
            {
                return(Json(new { Message = validation.StringValue }));
            }
            return(Json(new { id = model.Execute_at, MessageSucess = "That Audit saved successfully." }));
        }
예제 #18
0
        /// <summary>
        /// 映射签约信息到viewmodel
        /// </summary>
        /// <param name="baseAudit">基础案件信息</param>
        /// <param name="publicMortgage">签约信息</param>
        /// <returns>新的签约ViewModel</returns>
        public static PublicMortgageViewModel MapToViewModel(BaseAudit baseAudit, PublicMortgage publicMortgage)
        {
            var mortgage = new PublicMortgageViewModel();

            if (publicMortgage.IsNotNull())
            {
                mortgage = Mapper.Map <PublicMortgage, PublicMortgageViewModel>(publicMortgage);
            }
            if (mortgage != null)
            {
                mortgage.AuditAmount    = baseAudit.AuditAmount;
                mortgage.CaseNum        = baseAudit.NewCaseNum;
                mortgage.CaseStatus     = baseAudit.CaseStatus;
                mortgage.CaseStatusText = CaseStatusHelper.GetStatsText(baseAudit.CaseStatus);
                mortgage.IsCurrent      = baseAudit.CaseStatus == CaseStatus.PublicMortgage;

                mortgage.OpeningBank = baseAudit.OpeningBank;
                mortgage.OpeningSite = baseAudit.OpeningSite;
                mortgage.BankCard    = baseAudit.BankCard;

                mortgage.ServiceCharge     = baseAudit.ServiceCharge;
                mortgage.ServiceChargeRate = baseAudit.ServiceChargeRate;
                mortgage.Deposit           = baseAudit.Deposit;
                mortgage.DepositDate       = baseAudit.DepositDate;
                mortgage.IsActivitieRate   = baseAudit.IsActivitieRate;
                //更新第三方信息
                mortgage.CaseMode              = baseAudit.CaseMode;
                mortgage.ThirdParty            = baseAudit.ThirdParty;
                mortgage.ThirdPartyAuditAmount = baseAudit.ThirdPartyAuditAmount;
                mortgage.ThirdPartyAuditRate   = baseAudit.ThirdPartyAuditRate;
                mortgage.ThirdPartyAuditTerm   = baseAudit.ThirdPartyAuditTerm;
                //失败理由
                mortgage.RejectReason = baseAudit.RejectReason;

                mortgage.LenderName = baseAudit.LenderName;

                baseAudit.IntroducerAudits.IfNotNull(t =>
                {
                    mortgage.Introducer = baseAudit.IntroducerAudits.Select(p => p.MaptoIntroduceAuditViewModel()).ToList().OrderBy(b => b.Sequence);
                });

                return(mortgage);
            }
            return(mortgage);
        }
예제 #19
0
        private IEnumerable <IntroducerAuditViewModel> GetIntroducer(BaseAudit baseAudit)
        {
            var introducer = new IntroducerAuditDAL();

            var introducerAudit     = introducer.FindByAuditID(baseAudit.ID);
            var introducerAuditList = introducerAudit.Select(model =>
                                                             new IntroducerAuditViewModel
            {
                ID            = model.ID,
                Account       = model.Account,
                AccountBank   = model.AccountBank,
                AuditID       = baseAudit.ID,
                Contract      = model.Contract,
                Name          = model.Name,
                RebateAmmount = model.RebateAmmount,
                RebateRate    = model.RebateRate,
                Sequence      = model.Sequence
            }).ToList();

            return(introducerAuditList.OrderBy(p => p.Sequence).ToList());
        }
예제 #20
0
        public BaseAuditViewModel CastModel(BaseAudit model)
        {
            BaseAuditViewModel bcvm = new BaseAuditViewModel();

            Framework.DAL.Audit.BaseAuditDAL baseAuditDal = new Framework.DAL.Audit.BaseAuditDAL();
            var saleGroups = new SalesGroupBll().GetAll().ToList();

            Infrastructure.ExtendTools.ObjectExtend.CopyTo(model, bcvm);
            if (bcvm == null || model == null)
            {
                return(null);
            }
            MortgageBll mortgageBll = new MortgageBll();
            var         mortgage    = mortgageBll.QueryById(model.ID);

            bcvm.OtherFileIsupload = "未上传";
            if (mortgage != null)
            {
                bcvm.OtherFileIsupload = mortgage.OtherFile != "" ? "已上传" : "未上传";
            }
            bcvm.CaseNum = model.NewCaseNum;
            if (model.NewCaseNum != null)
            {
                var caseStatus = baseAuditDal.GetbyCaseNum(model.NewCaseNum).CaseStatus;
                bcvm.CaseStatus     = caseStatus ?? "";
                bcvm.CaseStatusText = caseStatus == null ? "" : Helper.CaseStatusHelper.GetStatsText(caseStatus);
            }
            else
            {
                bcvm.CaseStatusText = "";
            }

            if (bcvm.SalesGroupID != null)
            {
                bcvm.SalesGroupText = saleGroups.Single(x => x.ID == bcvm.SalesGroupID).Name;
            }

            return(bcvm);
        }
예제 #21
0
        public string ActionTest(BaseAudit curraudit, IEnumerable <BaseAudit> list)
        {
            var nextaudit = list.FirstOrDefault(t => t.Version == curraudit.Version + 1);
            var lastaudit = list.FirstOrDefault(t => t.Version == curraudit.Version - 1);

            if (nextaudit == null)
            {
                return(string.Empty);
            }
            if (nextaudit.CaseStatus == CaseStatus.CloseCase)
            {
                return("拒绝");
            }
            else if (nextaudit.CaseStatus == CaseStatus.ClosePublic)
            {
                return("关闭");
            }
            else if (lastaudit != null && (lastaudit.CaseStatus == nextaudit.CaseStatus) && nextaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.FirstAudit && lastaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.FirstAudit)
            {
                return("退回");
            }
            else if (lastaudit != null && lastaudit.CaseStatus == CaseStatus.SecondAudit && nextaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.FirstAudit && curraudit.CaseStatus == CaseStatus.HatsPending)
            {
                return("退回");
            }
            else if (lastaudit != null && (lastaudit.CaseStatus == nextaudit.CaseStatus) && nextaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.SecondAudit && lastaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.SecondAudit)
            {
                return("通过");
            }
            else if (lastaudit != null && (lastaudit.CaseStatus == nextaudit.CaseStatus) && nextaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.PublicMortgage && lastaudit.CaseStatus == Com.HSJF.Framework.DAL.CaseStatus.PublicMortgage)
            {
                return("退回");
            }
            else
            {
                return("通过");
            }
        }
        public static void OnCreate(SqlCommand sqlCommand, BaseAudit BaseAuditObject)
        {
            if (BaseAuditObject.InsertBy == default(int))
            {
                sqlCommand.Parameters.AddWithValue("InsertBy", DBNull.Value);
            }
            else
            {
                sqlCommand.Parameters.AddWithValue("InsertBy", BaseAuditObject.InsertBy);
            }

            if (BaseAuditObject.InsertDate == default(DateTime))
            {
                sqlCommand.Parameters.AddWithValue("InsertDate", DBNull.Value);
            }
            else
            {
                sqlCommand.Parameters.AddWithValue("InsertDate", BaseAuditObject.InsertDate);
            }

            if (BaseAuditObject.UpdateBy == default(int))
            {
                sqlCommand.Parameters.AddWithValue("UpdateBy", BaseAuditObject.InsertBy);
            }
            else
            {
                sqlCommand.Parameters.AddWithValue("UpdateBy", BaseAuditObject.UpdateBy);
            }

            if (BaseAuditObject.UpdateDate == default(DateTime))
            {
                sqlCommand.Parameters.AddWithValue("UpdateDate", BaseAuditObject.InsertDate);
            }
            else
            {
                sqlCommand.Parameters.AddWithValue("UpdateDate", BaseAuditObject.UpdateDate);
            }
        }
예제 #23
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);
        }
예제 #24
0
        /// <summary>
        /// 提交签约信息
        /// </summary>
        /// <param name="entity">签约信息</param>
        /// <param name="auditEntity">案件基础信息</param>
        /// <param name="creatUser">当前用户</param>
        /// <returns>是否签约成功</returns>
        public bool SubmitCase(PublicMortgage entity, BaseAudit auditEntity, string creatUser)
        {
            AuditHelp ah = new AuditHelp();

            //2016-09-09 在确认签约要件之后再解锁
            var introduces = _introducerAuditDal.GetAll().Where(p => p.AuditID == auditEntity.ID);

            _introducerAuditDal.DeleteRange(introduces);

            //  auditEntity.CreateTime = DateTime.Now;
            //  auditEntity.CreateUser = creatUser;

            // 2016-09-09 修改,进入 确认签约要件
            var newid = ah.CopyBaseAudit(auditEntity, creatUser, CaseStatus.ConfrimPublic, false);
            var pub   = CopyPublic(entity);

            pub.ID         = newid;
            pub.CreateUser = creatUser;
            //entity.ID = id;
            _mortgageDal.Add(pub);
            _mortgageDal.AcceptAllChange();

            return(true);
        }
예제 #25
0
        /// <summary>
        /// 保存工商税务信息集合
        /// </summary>
        /// <param name="industryCommerceTax"></param>
        /// <param name="auditId"></param>
        public void SaveIndustryCommerceTax(BaseAudit baseAudit, BaseAudit newAudit, RelationEnterpriseAudit oldEnterprise, RelationEnterpriseAudit newEnterprise)
        {
            var indList = new List <IndustryCommerceTax>();
            var indTax  = baseAudit.IndustryCommerceTaxs.Where(t => t.EnterpriseID == oldEnterprise.ID);

            if (!indTax.Any())
            {
                return;
            }
            foreach (var model in indTax)
            {
                var entity = new IndustryCommerceTax();
                entity.ID               = Guid.NewGuid().ToString();
                entity.BaseAuditID      = newAudit.ID;
                entity.ActualManagement = model.ActualManagement;
                entity.AnnualInspection = model.AnnualInspection;
                entity.Description      = model.Description;
                entity.EnterpriseID     = newEnterprise.ID;
                entity.Sequence         = model.Sequence;

                indList.Add(entity); //保存工商税务信息
            }
            industryCommerceTaxDAL.AddRange(indList);
        }
예제 #26
0
 /// <summary>
 /// 提交到放款
 /// </summary>
 /// <param name="lendingCase">放款案件</param>
 /// <param name="creatUser">创建人</param>
 public bool SubmitLending(BaseAudit lendingCase, string creatUser)
 {
     return(_baseAuditDal.ReturnAudit(lendingCase, creatUser, CaseStatus.Lending));
 }
예제 #27
0
 /// <summary>
 /// 进入审核
 /// </summary>
 /// <param name="audit">案件信息</param>
 /// <param name="userName">用户名</param>
 /// <returns>成功与否</returns>
 public bool IntoMortgage(BaseAudit audit, string userName)
 {
     return(_baseAuditDal.ReturnAudit(audit, userName, CaseStatus.PublicMortgage));
 }
예제 #28
0
        public void InsertHisCase()
        {
            var migDAL        = new MigTDAL();
            var personDAL     = new RelationPersonAuditDAL();
            var salesGroupDAL = new SalesGroupDAL();
            var miglist       = migDAL.GetAll();

            if (miglist.Any())
            {
                var salesGroups = salesGroupDAL.GetAll().ToList();

                int i = 1;
                foreach (var mig in miglist)
                {
                    var audit = new BaseAudit();
                    audit.ID      = Guid.NewGuid().ToString();
                    audit.CaseNum = i.ToString("d6");

                    audit.BorrowerName = mig.CO2;
                    audit.BankCard     = mig.CO30;
                    // 所属分公司名称 新的案件编号
                    switch (mig.CO4)
                    {
                    case "北京泓申":
                        audit.SalesGroupID = salesGroups.First(x => x.Name == "北京泓申投资管理有限公司").ID;
                        audit.DistrictID   = salesGroups.First(x => x.Name == "北京泓申投资管理有限公司").DistrictID;
                        audit.SalesID      = "bff3003c-bfcb-4c34-898d-c9799db56e68";

                        break;

                    case "诚驰":
                        audit.SalesGroupID = salesGroups.First(x => x.Name == "上海诚驰泓申投资管理有限公司").ID;
                        audit.DistrictID   = salesGroups.First(x => x.Name == "上海诚驰泓申投资管理有限公司").DistrictID;
                        audit.SalesID      = "0d17d335-6c79-4130-82d5-16173c142911";

                        break;

                    case "上海泓申":
                        audit.SalesGroupID = salesGroups.First(x => x.Name == "上海泓申投资管理有限公司").ID;
                        audit.DistrictID   = salesGroups.First(x => x.Name == "上海泓申投资管理有限公司").DistrictID;
                        audit.SalesID      = "34965801-2ba7-4a80-a40b-7aff4f5c36a7";
                        break;

                    case "铉宇":
                        audit.SalesGroupID = salesGroups.First(x => x.Name == "上海铉宇金融信息服务有限公司").ID;
                        audit.DistrictID   = salesGroups.First(x => x.Name == "上海铉宇金融信息服务有限公司").DistrictID;
                        audit.SalesID      = "f68acef9-b478-4ab0-ac43-ccaf6bf77988";
                        break;

                    case "银携":
                        audit.SalesGroupID = salesGroups.First(x => x.Name == "上海银携投资管理有限公司").ID;
                        audit.DistrictID   = salesGroups.First(x => x.Name == "上海银携投资管理有限公司").DistrictID;
                        audit.SalesID      = "028bcc6f-dc7d-4994-9f2e-196b5cf974ad";

                        break;

                    default:
                        audit.NewCaseNum = "HIS" + "-" + audit.CaseNum;
                        break;
                    }
                    audit.EarnestMoney = string.IsNullOrEmpty(mig.CO7) ? (decimal?)null : Convert.ToDecimal(mig.CO7);
                    audit.LenderName   = mig.CO8;
                    audit.NewCaseNum   = "HIS" + "-" + audit.CaseNum;
                    // 客户贷款期数
                    switch (mig.CO9)
                    {
                    case "1": audit.Term = "-LoanTerm-1M"; break;

                    case "2": audit.Term = "-LoanTerm-2M"; break;

                    case "3": audit.Term = "-LoanTerm-3M"; break;

                    case "4": audit.Term = "-LoanTerm-4M"; break;

                    case "5": audit.Term = "-LoanTerm-5M"; break;

                    case "6": audit.Term = "-LoanTerm-6M"; break;

                    case "12": audit.Term = "-LoanTerm-12M"; break;

                    case "24": audit.Term = "-LoanTerm-24M"; break;

                    default:
                        audit.Term = "-LoanTerm-2M"; break;
                        break;
                    }
                    audit.AuditTerm = audit.Term;

                    audit.LendingDate = string.IsNullOrEmpty(mig.CO10) ? default(DateTime?) : Convert.ToDateTime(mig.CO10);
                    audit.PaymentDate = string.IsNullOrEmpty(mig.CO11) ? default(DateTime?) : Convert.ToDateTime(mig.CO11);
                    audit.LoanAmount  = string.IsNullOrEmpty(mig.CO13) ? default(decimal?) : Convert.ToDecimal(mig.CO13);
                    audit.AuditAmount = audit.LoanAmount;

                    audit.AnnualRate = string.IsNullOrEmpty(mig.CO14) ? null : (decimal?)Convert.ToDecimal(mig.CO14);
                    audit.AuditRate  = audit.AnnualRate;

                    // 资金方名称
                    switch (mig.CO18)
                    {
                    case "点融": audit.ThirdParty = "-ThirdPlatform-DianRong"; break;

                    case "聚财猫": audit.ThirdParty = "-ThirdPlatform-JuCaiMao"; break;

                    case "米缸": audit.ThirdParty = "-ThirdPlatform-MiGang"; break;

                    case "诺亚": audit.ThirdParty = "-ThirdPlatform-NuoYa"; break;

                    case "挖财": audit.ThirdParty = "-ThirdPlatform-WaCai"; break;

                    default:
                        break;
                    }
                    audit.ThirdPartyAuditRate   = string.IsNullOrEmpty(mig.CO19) ? null : (decimal?)Convert.ToDecimal(mig.CO19);
                    audit.ThirdPartyAuditAmount = string.IsNullOrEmpty(mig.CO28) ? null : (decimal?)Convert.ToDecimal(mig.CO28);
                    switch (mig.CO27)
                    {
                    case "1": audit.ThirdPartyAuditTerm = "-LoanTerm-1M"; break;

                    case "2": audit.ThirdPartyAuditTerm = "-LoanTerm-2M"; break;

                    case "3": audit.ThirdPartyAuditTerm = "-LoanTerm-3M"; break;

                    case "4": audit.ThirdPartyAuditTerm = "-LoanTerm-4M"; break;

                    case "5": audit.ThirdPartyAuditTerm = "-LoanTerm-5M"; break;

                    case "6": audit.ThirdPartyAuditTerm = "-LoanTerm-6M"; break;

                    case "12": audit.ThirdPartyAuditTerm = "-LoanTerm-12M"; break;

                    case "24": audit.ThirdPartyAuditTerm = "-LoanTerm-24M"; break;

                    default:
                        break;
                    }
                    // 贷款模式
                    switch (mig.CO20)
                    {
                    case "居间": audit.CaseMode = "-CaseMode-JuJian"; break;

                    case "债转": audit.CaseMode = "-CaseMode-ZhaiZhuan"; break;

                    default: audit.CaseMode = "-CaseMode-ZiYouZiJin"; break;
                    }

                    audit.OpeningBank = mig.CO23;
                    audit.BankCard    = mig.CO26;
                    audit.CaseDetail  = mig.CO30;
                    audit.CreateTime  = DateTime.Now;
                    audit.CreateUser  = "******";
                    audit.CaseStatus  = "After";



                    var person = new RelationPersonAudit();
                    person.ID           = Guid.NewGuid().ToString();
                    person.AuditID      = audit.ID;
                    person.Name         = mig.CO2;
                    person.RelationType = "-PersonType-JieKuanRen";
                    switch (mig.CO5)
                    {
                    case "香港居民身份证":
                        person.IdentificationType = "-DocType-HongKong";
                        break;

                    case "身份证":
                        person.IdentificationType = "-DocType-IDCard";
                        break;

                    case "台湾同胞来往内地通行证":
                        person.IdentificationType = "-DocType-Taiwan";
                        break;

                    default:
                        person.IdentificationType = "-DocType-Passport";
                        break;
                    }


                    person.IdentificationNumber = mig.CO6;

                    personDAL.Add(person);

                    var lend    = new Com.HSJF.Framework.EntityFramework.Model.Lending.Lending();
                    var lenddal = new LendingDAL();
                    lend.ID       = audit.ID;
                    lend.Borrower = audit.BorrowerName;
                    //lend.ContactNumber = mig.CO0;
                    lend.ContractAmount = audit.AuditAmount;
                    lend.CreateTime     = DateTime.Now.ToShortDateString();
                    lend.CreateUser     = "******";
                    lend.CustomerName   = audit.BorrowerName;
                    lend.LendTime       = audit.LendingDate;
                    lend.PaymentDay     = string.IsNullOrEmpty(mig.CO12) ? default(int?) : Convert.ToInt32(mig.CO12);
                    lenddal.Add(lend);

                    _baseAuditDal.Add(audit);
                    mig.Status = audit.NewCaseNum;
                    migDAL.Update(mig);
                    i++;
                }
            }
            _baseAuditDal.AcceptAllChange();
            migDAL.AcceptAllChange();
        }
예제 #29
0
        /// <summary>
        /// 进件提交审核
        /// </summary>
        /// <param name="caseId">进件ID</param>
        /// <param name="creatUser">创建人</param>
        /// <returns></returns>

        public bool SubmitBaseCase(string caseId, string creatUser)
        {
            var baseCase = Get(caseId);//进件信息

            if (baseCase != null)
            {
                BaseAuditDAL baseAuditDal = new BaseAuditDAL();

                #region 审核主表信息

                BaseAudit baseAudit = new BaseAudit();

                baseAudit.ID                = Guid.NewGuid().ToString();
                baseAudit.Version           = 0;
                baseAudit.BorrowerName      = baseCase.BorrowerName;
                baseAudit.CaseNum           = baseCase.CaseNum;
                baseAudit.NewCaseNum        = baseCase.NewCaseNum;
                baseAudit.AnnualRate        = baseCase.AnnualRate;
                baseAudit.CaseType          = baseCase.CaseType;
                baseAudit.CreateTime        = DateTime.Now;
                baseAudit.CreateUser        = creatUser;
                baseAudit.LoanAmount        = baseCase.LoanAmount;
                baseAudit.DistrictID        = baseCase.DistrictID;
                baseAudit.SalesGroupID      = baseCase.SalesGroupID;
                baseAudit.SalesID           = baseCase.SalesID;
                baseAudit.CaseStatus        = CaseStatus.FirstAudit;
                baseAudit.Term              = baseCase.Term;
                baseAudit.OpeningBank       = baseCase.OpeningBank;
                baseAudit.OpeningSite       = baseCase.OpeningSite;
                baseAudit.BankCard          = baseCase.BankCard;
                baseAudit.ServiceCharge     = baseCase.ServiceCharge;
                baseAudit.ServiceChargeRate = baseCase.ServiceChargeRate;
                baseAudit.Deposit           = baseCase.Deposit;
                baseAudit.DepositDate       = baseCase.DepositDate;
                baseAudit.IsActivitieRate   = baseCase.IsActivitieRate;
                baseAudit.PaymentFactor     = baseCase.PaymentFactor; //还款来源
                baseAudit.Purpose           = baseCase.Purpose;       //借款用途
                baseAuditDal.Add(baseAudit);

                #endregion 审核主表信息

                #region 保存抵押物信息

                SaveCollaterals <CollateralAudit>(baseCase.Collaterals, baseAudit.ID);

                #endregion 保存抵押物信息

                #region 保存关系人信息集合

                SaveRelationPersons <RelationPersonAudit>(baseCase.RelationPersons, baseAudit.ID);

                #endregion 保存关系人信息集合

                #region 保存介绍人信息集合

                SaveIntroducers <IntroducerAudit>(baseCase.Introducers, baseAudit.ID);

                #endregion 保存介绍人信息集合

                baseAuditDal.AcceptAllChange();

                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #30
0
 public void Update(BaseAudit baseAudit)
 {
     _auditDal.Update(baseAudit);
     _auditDal.SaveChanges();
 }