Browse Source

新增出入境费用数据源接口,优化相关逻辑

在 `GroupsController.cs` 中添加了 `GetEnterExitProvBelongCostDataSource` 方法,返回团组模块的出入境费用省份基础数据源。
修改 `EnterExitCostDraftDto.cs` 中 `ProvinceId` 的默认值为 `122`。
清理 `DelegationInfoRepository.cs` 中的注释和区域标记。
在 `EnterExitCostDraftRepository.cs` 中调整查询逻辑,去除对 `CreateUserId` 的依赖,仅根据 `DraftName` 查询。
LEIYI 1 week ago
parent
commit
2d903c94da

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

@@ -5603,6 +5603,17 @@ FROM
 
         #region 团组经理模块 出入境费用
 
+        /// <summary>
+        /// 团组模块 - 出入境费用 - 省份基础数据源
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GetEnterExitProvBelongCostDataSource()
+        {
+            return Ok(JsonView(await _groupRepository.ProvinceBasicSource()));
+        }
+
         /// <summary>
         /// 团组模块 - 出入境费用 - 基础数据源(团组名称/币种类型)
         /// </summary>

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDraftDto.cs

@@ -47,7 +47,7 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 省份归属Id
         /// </summary>
-        public int ProvinceId { get; set; } = 1408;
+        public int ProvinceId { get; set; } = 122;
 
         /// <summary>
         /// 草稿名称

+ 0 - 4
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -51,9 +51,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //_teamRateRep = teamRateRep;
         }
 
-
-
-
         #region 团组信息 团组详情共享Api
 
         /// <summary>
@@ -250,7 +247,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
         }
 
-
         #region 团组
 
         /// <summary>

+ 3 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostDraftRepository.cs

@@ -319,7 +319,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 {
                     int enterExitId = 0;
 
-                    var isNull = _sqlSugar.Queryable<Grp_EnterExitCostDraft>().Where(it => it.IsDel == 0 && it.CreateUserId == dto.UserId && it.DraftName.Equals(dto.DraftName)).First();
+                    //var isNull = _sqlSugar.Queryable<Grp_EnterExitCostDraft>().Where(it => it.IsDel == 0 && it.CreateUserId == dto.UserId && it.DraftName.Equals(dto.DraftName)).First();
+
+                    var isNull = _sqlSugar.Queryable<Grp_EnterExitCostDraft>().Where(it => it.IsDel == 0 && it.DraftName.Equals(dto.DraftName)).First();
                     if (isNull != null) //修改
                     {
                         enterExitId = isNull.Id;