Ejemplo n.º 1
0
 public JsonResult AcceptProject(long id, string note)
 {
     return(ExceptionCatch.Invoke(() =>
     {
         ProjectService.AcceptProject(id, UserHelper.GetCurrentUser().Id, note);
     }));
 }
Ejemplo n.º 2
0
        public ResponseResult AcceptProject(string userKeyId, [FromBody] ProjectBaseRequest request)
        {
            LogHelper.Error(string.Format("调用项目受理API,userKeyId:{0},request:{1}", userKeyId, request.ToJson()), null);
            var responseResult = new ResponseResult();

            try
            {
                var user    = UserService.GetUserByKeyId(userKeyId);
                var project = ProjectService.GetByProjectNo(request.ProjectNo, user.Id);
                ProjectService.AcceptProject(project.Id, user.Id, request.Note);
                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);
        }