public ResponseResult GetRevaluationProject(string userKeyId, string revaluationNo, string projectNo)
        {
            LogHelper.Error(string.Format("调用复估项目详细信息API,userKeyId:{0},revaluationNo:{1}", userKeyId, revaluationNo), null);
            var responseResult = new ResponseResult();

            try
            {
                var user    = UserService.GetUserByKeyId(userKeyId);
                var project = RevaluationService.GetRevaluationItem(revaluationNo, projectNo, user.Id);
                responseResult.Code    = 0;
                responseResult.Message = "success";
                responseResult.Data    = new
                {
                    project.TId,
                    project.BusinessId,
                    project.RevaluationId,
                    project.OperationOrganization,
                    project.BorrowerName,
                    project.CreditBalance,
                    project.FiveCategories,
                    project.ContractExpirationDate,
                    project.PropertyType,
                    project.PledgeAddress,
                    project.InitialEstimateValue,
                    project.InitialEstimateOrganization,
                    project.InitialEstimateTime,
                    project.CustomerAccountManager,
                    project.ContactNumber,
                    project.ProtocolNumber,
                    project.CustomerNumber,
                    project.ProjectNo,
                    project.RevaluationTime,
                    project.RevaluationValue,
                    project.ChangeDescription,
                    project.Remark,
                    project.RevaluationDifference,
                    project.RevaluationIncrease,
                    project.IsConsult,
                    project.IsCancelConsult,
                    project.IsApprove,
                    project.ConsultReply,
                    project.CreateTime
                };
            }
            catch (ServiceException ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = ex.Message;
            }
            catch (Exception ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = ex.Message;
                LogHelper.Error("调用公司复估项目详细信息API错误日志:", ex);
            }
            return(responseResult);
        }
        public ResponseResult RevaluatingProject(string userKeyId, [FromBody] RevaluatingProjectRequest request)
        {
            LogHelper.Error(string.Format("调用复估单个项目API,userKeyId:{0},request:{1}", userKeyId, request.ToJson()), null);
            var responseResult = new ResponseResult();

            try
            {
                if (!request.RevaluationValue.HasValue)
                {
                    throw new ServiceException("复估价值不能为空!");
                }
                if (string.IsNullOrEmpty(request.ChangeDescription))
                {
                    throw new ServiceException("变动说明不能为空!");
                }
                var user    = UserService.GetUserByKeyId(userKeyId);
                var project = RevaluationService.GetRevaluationItem(request.RevalutionNo, request.ProjectNo, user.Id);
                var model   = new RevaluationItemModel()
                {
                    TId = project.TId,
                    RevaluationValue  = request.RevaluationValue,
                    ChangeDescription = request.ChangeDescription,
                    Remark            = request.Remark
                };
                RevaluationService.RevaluatingRevaluationItem(model, user.Id);
                responseResult.Code    = 0;
                responseResult.Message = "success";
            }
            catch (ServiceException ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = ex.Message;
            }
            catch (Exception ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = "error";
                LogHelper.Error("调用复估单个项目API错误日志:", ex);
            }
            return(responseResult);
        }
        public ResponseResult RevaluationConsult(string userKeyId, [FromBody] RevaluationConsultRequest request)
        {
            LogHelper.Error(string.Format("调用复估认可API,userKeyId:{0},request:{1}", userKeyId, request.ToJson()), null);
            var responseResult = new ResponseResult();

            try
            {
                if (!request.IsApprove.HasValue)
                {
                    throw new ServiceException("是否认可不能为空!");
                }
                if (string.IsNullOrEmpty(request.ConsultReply))
                {
                    throw new ServiceException("认可理由不能为空!");
                }
                var user    = UserService.GetUserByKeyId(userKeyId);
                var project = RevaluationService.GetRevaluationItem(request.RevalutionNo, request.ProjectNo, user.Id);
                var model   = new RevaluationItemModel()
                {
                    TId          = project.TId,
                    IsApprove    = request.IsApprove,
                    ConsultReply = request.ConsultReply
                };
                RevaluationService.ApproveRevaluationItem(model, user.Id);
                responseResult.Code    = 0;
                responseResult.Message = "success";
            }
            catch (ServiceException ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = ex.Message;
            }
            catch (Exception ex)
            {
                responseResult.Code    = 1;
                responseResult.Message = "error";
                LogHelper.Error("调用复估认可API错误日志:", ex);
            }
            return(responseResult);
        }