public JsonResult RevaluatingRevaluationItem(RevaluationItemModel model) { return(ExceptionCatch.Invoke(() => { RevaluationService.RevaluatingRevaluationItem(model, UserHelper.GetCurrentUser().Id); })); }
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); }