From 276ecdded9911bd936c48cc93efb1d6565d7a2db Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 30 Dec 2020 17:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=96=87=E6=8E=A5=E6=94=B6=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E7=9A=84=E6=97=B6=E5=80=99=E7=82=B9=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=84=8F=E6=B2=A1=E6=9C=89=E5=81=9A=E5=A4=84=E7=90=86=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.OA/News/NewsService.cs | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs index 8c7ed29eb..0749d2131 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs @@ -175,30 +175,36 @@ namespace Learun.Application.OA public void ChangeStatusByProcessId(string parameterProcessId, int status) { - if (status == 2) + try { - try - { - var newEntity = this.BaseRepository() - .FindEntity(a => a.F_ProgressId == parameterProcessId); - if (null != newEntity) - { - newEntity.F_Status = "2"; - } - this.BaseRepository().Update(newEntity); - } - catch (Exception ex) + var newEntity = this.BaseRepository() + .FindEntity(a => a.F_ProgressId == parameterProcessId); + if (null != newEntity) { - if (ex is ExceptionEx) + if (status == 2) { - throw; + + newEntity.F_Status = "2"; } else { - throw ExceptionEx.ThrowServiceException(ex); + newEntity.F_Status = "0"; } } + + this.BaseRepository().Update(newEntity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } } } }