/// <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); }
public bool RejectCase(string id, Infrastructure.Identity.Model.User user) { AuditHelp ah = new AuditHelp(); BaseAuditDAL bad = new BaseAuditDAL(); var baseaduit = bad.GetAuthorizeAndSelf(id, user); if (baseaduit != null && baseaduit.CaseStatus == CaseStatus.Lending) { // baseaduit.CreateUser = createUser; ah.CopyBaseAudit(baseaduit, user.UserName, CaseStatus.SpecialClose); return(true); } return(false); }
public bool SubmitCase(PublicMortgage entity, string description, string creatUser) { this.Update(entity); AuditHelp ah = new AuditHelp(); BaseAuditDAL bad = new BaseAuditDAL(); var baseaduit = bad.Get(entity.ID); if (baseaduit != null && baseaduit.CaseStatus == CaseStatus.PublicMortgage) { // baseaduit.CreateTime = DateTime.Now; // baseaduit.CreateUser = creatUser; baseaduit.Description = description; ah.CopyBaseAudit(baseaduit, creatUser, CaseStatus.Lending); return(true); } return(false); }
public bool RejectCase(string id, string createUser, string Description, string RejectReason) { AuditHelp ah = new AuditHelp(); BaseAuditDAL bad = new BaseAuditDAL(); var baseaduit = bad.Get(id); if (baseaduit != null && baseaduit.CaseStatus == CaseStatus.PublicMortgage) { // baseaduit.CreateTime = DateTime.Now; baseaduit.Description = Description; baseaduit.RejectReason = RejectReason; // baseaduit.CreateUser = createUser; bad.Update(baseaduit); ah.CopyBaseAudit(baseaduit, createUser, CaseStatus.ClosePublic); return(true); } return(false); }
public bool RejectPublic(string id, string createUser, string Description) { var ah = new AuditHelp(); var bad = new BaseAuditDAL(); var baseaduit = bad.Get(id); var morimodel = GetPublic(id); if (baseaduit == null || baseaduit.CaseStatus != CaseStatus.ConfrimPublic) { return(false); } if (morimodel == null) { return(false); } baseaduit.Description = Description; var newid = ah.CopyBaseAudit(baseaduit, createUser, CaseStatus.PublicMortgage, false); CopyPublic(morimodel, newid, createUser); AcceptAllChange(); return(true); }
/// <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); }