public ResponseDocAudit DocAudit([FromBody] RequestDocAudit request) { try { DocBLL bll = new DocBLL(); return(bll.DocAudit(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }
/// <summary> /// 凭证审核 /// </summary> /// <param name="request"></param> /// <returns></returns> public ResponseDocAudit DocAudit(RequestDocAudit request) { ResponseDocAudit res = new ResponseDocAudit(); using (cnn = GetConnection()) { var ts = cnn.BeginTransaction(); try { string sql = @"update tks_fas_doc set checkStatus=2 where id=@Id and checkStatus=1"; cnn.Execute(sql, new { Id = request.Data.Id }, ts); ts.Commit(); res.IsSuccess = true; res.Message = "审核成功"; return(res); } catch (Exception ex) { ts.Rollback(); return(this.DealException(res, ex) as ResponseDocAudit); } } }