예제 #1
0
        /// <summary>
        /// 签约拒绝只读页面
        /// </summary>
        /// <returns></returns>
        public ActionResult RejectMortgageReadonly(string id)
        {
            var bad    = new BaseAuditDAL();
            var entity = bad.GetAuthorizeAndSelf(id, CurrentUser);

            if (entity == null)
            {
                return(RedirectToAction("Failed", "Home"));
            }
            var jingbanren = WebConfigurationManager.AppSettings["jinbanren"];
            var viewModel  = new PublicMortgageViewModel();

            if (id.IsNullOrWhiteSpace() || id.IsNullOrWhiteSpace())
            {
                return(RedirectToAction("Error", "Home"));
            }

            var mortgage  = _mortgageBll.QueryById(id);
            var auditCase = _auditBll.QueryLeatestById(id);

            viewModel = MortgageMapper.MapToViewModel(auditCase, mortgage);

            if (mortgage.IsNull())
            {
                viewModel.ID = id;
            }

            ViewBag.ID = id;
            // 经办人,并且去除admin用户
            ViewBag.PublicUsers = GetUserByPermission(CaseStatus.PublicMortgage)
                                  .Where(u => !jingbanren.Contains(u.UserName)).ToList();

            return(View(viewModel));
        }
예제 #2
0
        public ActionResult GetPublicMortgage(string id)
        {
            var viewModel = new PublicMortgageViewModel();
            var response  = new BaseResponse <PublicMortgageViewModel>();

            var mortgage  = _mortgageBll.QueryById(id);
            var auditCase = _auditBll.QueryLeatestById(id);

            viewModel = MortgageMapper.MapToViewModel(auditCase, mortgage);

            if (mortgage.IsNull())
            {
                viewModel.ID = id;
                var ahp  = new AuditHisHelper();
                var list = _baseAuditDal.GetListByCaseNum(viewModel.CaseNum);
                viewModel.AuditHistory = ahp.GetHistory(list);
            }
            else
            {
                viewModel.ContractFileName = GetFiles(viewModel.ContractFile);
                viewModel.OtherFileName    = GetFiles(viewModel.OtherFile);
                viewModel.FourFileName     = GetFiles(viewModel.FourFile);
                //viewModel.NoteFileName = GetFiles(viewModel.NoteFile);
                //viewModel.ReceiptFileName = GetFiles(viewModel.ReceiptFile);
                //viewModel.UndertakingFileName = GetFiles(viewModel.UndertakingFile);
                //viewModel.ContactConfirmFileName = GetFiles(viewModel.ContactConfirmFile);
                viewModel.RepaymentAttorneyFileName = GetFiles(viewModel.RepaymentAttorneyFile);
                viewModel.PowerAttorneyFileName     = GetFiles(viewModel.PowerAttorneyFile);
                viewModel.CollectionFileName        = GetFiles(viewModel.CollectionFile);

                var ahp  = new AuditHisHelper();
                var list = _baseAuditDal.GetListByCaseNum(viewModel.CaseNum);
                viewModel.AuditHistory = ahp.GetHistory(list);
            }

            response.Data   = viewModel;
            response.Status = "Success";
            return(Json(response, JsonRequestBehavior.AllowGet));
        }