Browse Source

增强权限验证和草稿信息查询功能

在 `GroupsController.cs` 中添加了权限验证注释,并使用 `_mapper` 映射 `eecInfo` 到 `EnterExitCostMobileParentInfoView`。

在 `EnterExitCostDraftRepository.cs` 中新增代码以获取草稿查看用户,并添加 SQL 查询以获取出入境费用草稿的详细信息,包括国家、城市、货币代码和备注等字段。
LEIYI 1 week ago
parent
commit
ac632a2a87

+ 4 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -9222,6 +9222,10 @@ FROM
             mobileInfo.DiId = dto.DiId;
             mobileInfo.Currencys = await EnterExitCostMobileGetCurrencyInit();
             if (eecInfo == null) return Ok(mobileInfo);
+            //验证查看、操作权限
+
+
+
 
             mobileInfo = _mapper.Map<EnterExitCostMobileParentInfoView>(eecInfo);
 

+ 6 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostDraftRepository.cs

@@ -89,6 +89,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         return result;
                     }
 
+                    enterExitCostInfoView.ViewUsers = await _sqlSugar
+                        .Queryable<Grp_EnterExitCostDraftPermission>()
+                        .Where(x => x.DraftId == id)
+                        .Select(x => x.UserId)
+                        .ToArrayAsync();
+
 
                     var dayAndCostDraftSql = string.Format(@"Select ntf.Country,ntf.City,ssd.Name CurremcyCode,ssd.Remark CurrencyName,gdac.* From Grp_DayAndCostDraft gdac
                                                         Left Join Grp_NationalTravelFee ntf On ntf.Id = gdac.NationalTravelFeeId