public MortgageController() { _mortgagePush = new MortgagePush(); _auditBll = new BaseAuditBll(); _mortgageDal = new MortgageDAL(); _baseAuditDal = new BaseAuditDAL(); _mortgageBll = new MortgageBll(); _salesGroupBll = new SalesGroupBll(); }
public AfterCaseController() { _auditDal = new BaseAuditDAL(); _salesGroupDal = new SalesGroupDAL(); _relationPersonAuditDal = new RelationPersonAuditDAL(); _lendingDal = new LendingDAL(); _mortgageBll = new MortgageBll(); _dictionaryBll = new DictionaryBLL(); symm = new SymmCrypto(_Key, _IV); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult GetCaseDetails(string id) { var response = new BaseResponse <CaseAllDetailsViewModel>(); var ch = new AuditController.AuditHelper(); var baseAuditDal = new BaseAuditDAL(); var lendal = new LendingDAL(); var dicdal = new DictionaryDAL(); var sales = new SalesManDAL(); var lendvm = new LendingViewModel(); var mortgagevm = new PublicMortgageViewModel(); var mortgageBll = new MortgageBll(); var caseallmodel = new CaseAllDetailsViewModel(); var baseauditvm = ch.FindByID(id, CurrentUser); if (baseauditvm != null) { var ahp = new AuditHisHelper(); var list = baseAuditDal.GetListByCaseNum(baseauditvm.CaseNum); baseauditvm.AuditHistory = ahp.GetHistory(list); } var mort = mortgageBll.QueryById(id); if (mort != null) { mortgagevm = mortgagevm.CastModel(mort); mortgagevm.ContractFileName = GetFiles(mortgagevm.ContractFile); mortgagevm.OtherFileName = GetFiles(mortgagevm.OtherFile); mortgagevm.FourFileName = GetFiles(mortgagevm.FourFile); mortgagevm.RepaymentAttorneyFileName = GetFiles(mortgagevm.RepaymentAttorneyFile); mortgagevm.PowerAttorneyFileName = GetFiles(mortgagevm.PowerAttorneyFile); mortgagevm.CollectionFileName = GetFiles(mortgagevm.CollectionFile); } var lend = lendal.Get(id); if (lend != null) { lendvm = lendvm.CastModel(lend); lendvm.LendFileName = GetFiles(lendvm.LendFile); lendvm.IsActivitieRateText = dicdal.GetText(lendvm.IsActivitieRate.ToString()); lendvm.CaseModeText = dicdal.GetText(lendvm.CaseMode); lendvm.ThirdPartyText = dicdal.GetText(lendvm.ThirdParty); lendvm.AuditTermText = dicdal.GetText(lendvm.AuditTerm); lendvm.SalesIDText = sales.FindBySalesID(lendvm.SalesID) == null ? null : sales.FindBySalesID(lendvm.SalesID).Name; } caseallmodel.Baseauditvm = baseauditvm; caseallmodel.Mortgagevm = mortgagevm; caseallmodel.Lendingvm = lendvm; response.Status = "Success"; response.Data = caseallmodel; return(Json(response, JsonRequestBehavior.AllowGet)); }
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); }
public LendingConfirmationController() { _mortgageBll = new MortgageBll(); _lendingBll = new LendingBll(); }
/// <summary> /// 赋值 /// </summary> /// <returns></returns> public ImportData SetDataValue(BaseAuditViewModel baseAudit) { MortgageBll mortage = new MortgageBll(); ImportData importData = new ImportData(); RelationPersonAuditViewModel ownPerson = baseAudit.RelationPersonAudits == null ? null : baseAudit.RelationPersonAudits.SingleOrDefault(S => S.Name == baseAudit.BorrowerName); PublicMortgage mortgage = mortage.Query(baseAudit.CaseNum); if (mortgage != null) { importData.pactNo = mortgage.ContractNo; importData.pactAmt = mortgage.ContractAmount == null ? 0 : Convert.ToDecimal(mortage.Query(baseAudit.CaseNum).ContractAmount); importData.endDate = mortgage.ContractDate.ToString(); } else { importData.pactNo = ""; importData.pactAmt = 0; } if (ownPerson != null) { importData.custName = baseAudit.BorrowerName; importData.idType = ownPerson.IdentificationType; importData.idNo = ownPerson.IdentificationNumber; importData.birth = ownPerson.Birthday.ToString(); importData.marriage = ownPerson.MaritalStatus; if (ownPerson.ContactAudits != null) { if (ownPerson.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-HomeNumber") != null) { importData.telNo = ownPerson.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-HomeNumber").ContactNumber; importData.homeTel = ownPerson.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-HomeNumber").ContactNumber; } else { importData.telNo = ""; } if (ownPerson.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone") != null) { importData.phoneNo = ownPerson.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone").ContactNumber; } else { importData.phoneNo = ""; } } if (ownPerson.AddressAudits != null && ownPerson.AddressAudits.SingleOrDefault(S => S.AddressType == "-AddressType-HomeAddress") != null) { importData.postAddr = ownPerson.AddressAudits.SingleOrDefault(S => S.AddressType == "-AddressType-HomeAddress").AddressInfo; importData.homeAddr = ownPerson.AddressAudits.SingleOrDefault(S => S.AddressType == "-AddressType-HomeAddress").AddressInfo; } if (baseAudit.RelationPersonAudits != null && baseAudit.RelationPersonAudits.SingleOrDefault(S => S.RelationType == "-PersonType-JieKuanRenPeiOu") != null) { RelationPersonAuditViewModel peiou = baseAudit.RelationPersonAudits.SingleOrDefault(S => S.RelationType == "-PersonType-JieKuanRenPeiOu"); importData.mateName = peiou.Name; importData.mateIdtype = peiou.IdentificationType; importData.mateIdno = peiou.IdentificationNumber; if (peiou.ContactAudits != null && peiou.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone") != null) { importData.mateTel = peiou.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone").ContactNumber; } } } importData.custType = "99"; importData.sex = "9"; importData.edu = "99"; importData.degree = "9"; importData.homeArea = "000000"; importData.income = 0; importData.projNo = ""; importData.prdtNo = ""; importData.feeTotal = 0; importData.lnRate = baseAudit.AuditRate == null ? 0 : Convert.ToDecimal(baseAudit.AuditRate); importData.appArea = "000000"; importData.appUse = baseAudit.Purpose; importData.termMon = 0; importData.termDay = 0; importData.vouType = "2"; importData.payType = "01"; importData.vonAmt = 0; #region 账户 List <ImportAccount> accountList = new List <ImportAccount>(); decimal acAmt = mortgage == null ? 0 : mortgage.ContractAmount == null ? 0 : Convert.ToDecimal(mortgage.ContractAmount); accountList.Add(new ImportAccount() { acUse = "1", acAmt = acAmt, acType = "?", acno = baseAudit.BankCard, acName = baseAudit.OpeningSite, bankCode = "", bankSite = baseAudit.OpeningBank }); accountList.Add(new ImportAccount() { acUse = "2", acAmt = acAmt, acType = "?", acno = baseAudit.BankCard, acName = baseAudit.OpeningSite, bankCode = "", bankSite = baseAudit.OpeningBank }); importData.importAccounts = accountList; #endregion #region 押品 List <Gage> gageList = new List <Gage>(); if (baseAudit.CollateralAudits != null) { foreach (CollateralAuditViewModel collateral in baseAudit.CollateralAudits) { Gage gage = new Gage(); HouseDetailViewModel houseDetail = baseAudit.HouseDetails == null ? null : baseAudit.HouseDetails.SingleOrDefault(S => S.CollateralID == collateral.ID); gage.gcustName = collateral.RightOwner; if (baseAudit.RelationPersonAudits != null && baseAudit.RelationPersonAudits.SingleOrDefault(S => S.Name == collateral.RightOwner) != null) { gage.gcustIdtype = baseAudit.RelationPersonAudits.SingleOrDefault(S => S.Name == collateral.RightOwner).IdentificationType; gage.gcustIdno = baseAudit.RelationPersonAudits.SingleOrDefault(S => S.Name == collateral.RightOwner).IdentificationNumber; } gage.gType = "213"; gage.gName = collateral.BuildingName; gage.gDesc = ""; if (houseDetail != null && houseDetail.EstimateSources != null && houseDetail.EstimateSources.Count() > 0) { gage.gValue = Convert.ToDecimal((houseDetail.EstimateSources.Take(1) as EstimateSourceViewModel).RushEstimate); } gage.gLicno = collateral.HouseNumber; gage.gLicType = "01"; gageList.Add(gage); } } importData.gages = gageList; #endregion #region 共同借款人 && 借款关联人 List <listCom> coms = new List <listCom>(); List <listRel> rels = new List <listRel>(); var relationPersons = baseAudit.RelationPersonAudits; if (relationPersons != null) { foreach (RelationPersonAuditViewModel item in relationPersons) { if (item.IsCoBorrower == 1) { listCom com = new listCom(); com.comName = item.Name; com.comIdtype = item.IdentificationType; com.comIdno = item.IdentificationNumber; if (item.ContactAudits != null && item.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone") != null) { com.comTel = item.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone").ContactNumber; } else { com.comTel = ""; } coms.Add(com); listRel rel = new listRel(); rel.relName = item.Name; rel.relIdtype = item.IdentificationType; rel.relIdno = item.IdentificationNumber; if (item.ContactAudits != null && item.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone") != null) { rel.relTel = item.ContactAudits.SingleOrDefault(S => S.ContactType == "-ContactType-MobilePhone").ContactNumber; } else { rel.relTel = ""; } rels.Add(rel); } } } importData.listComs = coms; #endregion importData.ifCar = "2"; importData.ifCarCred = "2"; importData.ifRoom = "2"; importData.ifMort = "2"; importData.ifCard = "2"; importData.cardAmt = 0; importData.ifApp = "2"; importData.ifId = "2"; importData.ifPact = "1"; importData.prePactNo = ""; return(importData); }
public HatsCaseController() { _baseAuditBll = new BaseAuditBll(); _mortgageBll = new MortgageBll(); }