jiangjc 1 year ago
parent
commit
5b436814a3
1 changed files with 6 additions and 3 deletions
  1. 6 3
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 6 - 3
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -625,10 +625,13 @@ namespace OASystem.API.Controllers
                     if (updCount > 0 && dto.publishCode == 1) {
 
                         _delegationVisaRep.ChangeDataBase(DBEnum.OA2014DB); //切换到新OA后删除
-                        GroupInfoDto grpDto = new GroupInfoDto() { Id = dto.diId };
-                        var groupData = await _groupRepository.GetGroupInfo(grpDto);
+                        
+                        string sqlDelegation = string.Format(@" Select * From DelegationInfo With(Nolock) Where Id = {0} ", dto.diId);
+                        OA2021_DelegationInfo groupData = _sqlSugar.SqlQueryable<OA2021_DelegationInfo>(sqlDelegation).First();
+                        //GroupInfoDto grpDto = new GroupInfoDto() { Id = dto.diId };
+                        //var groupData = await _groupRepository.GetGroupInfo(grpDto);
                         _delegationVisaRep.ChangeDataBase(DBEnum.OA2023DB); //切换到新OA后删除
-                        if (groupData.Code != 0)
+                        if (groupData == null)
                         {
                             _delegationVisaRep.RollbackTran();
                         }