Browse Source

1、三公费用->境外用车谢姐调整;
2、三公费用->机票费用提示由2小时更改为5分钟;

Lyyyi 15 hours ago
parent
commit
3db55754d4

+ 10 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -10962,6 +10962,8 @@ FROM
                 return Ok(JsonView(false, "团组出访国家信息为空"));
             }
 
+            var currencies = await GeneralMethod.EnterExitCostOVFeeUsedCurrencyAsync(groupId);
+
             var currencyData = await _sqlSugar.Queryable<Sys_SetData>()
                 .Where(x => x.IsDel == 0 && x.STid == 66)
                 .ToListAsync();
@@ -10997,6 +10999,11 @@ FROM
                     otherPrice = parentInfo.OtherPrice1 + parentInfo.OtherPrice2;
                 }
 
+                //当前币种汇率值
+                var currRate = 1.0000M;
+                var currencyInfo = currencies.FirstOrDefault(x => x.CurrencyCode == currencyName);
+                if (currencyInfo != null) currRate = currencyInfo.Rate;
+
                 overseaVehicleCityDatas.add(new
                 {
                     item.Id,
@@ -11008,6 +11015,7 @@ FROM
                     otherPrice,
                     currency = parentInfo?.Currency ?? 0,
                     currencyName,
+                    currRate,
                     LastUpdateUserName = sysUers.FirstOrDefault(x => x.Id == item.LastUpdateUserId)?.CnName ?? "-",
                     item.LastUpdateTime,
                     item.Remark
@@ -11022,9 +11030,9 @@ FROM
                 defAirportTransferCoeff = Def_AirportTransferCoeff, //接送机默认报价系数
                 defServiceCount = Def_ServiceCount,                 //接送机默认服务次数
                 defTrainCoeff = Def_TrainCoeff,                     //火车默认报价系数
-                defPullCartCoeff = Def_PullCartCoeff,               //拉车默认报价系数
+                defPullCartCoeff = Def_PullCartCoeff,               //拉车默认报价系数
                 defCityFlightCoeff = Def_CityFlightCoeff,           //城市机票默认报价系数
-                Currencies = await GeneralMethod.EnterExitCostOVFeeUsedCurrencyAsync(groupId),
+                Currencies = currencies,
                 data = overseaVehicleCityDatas
             };
 

+ 5 - 3
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -4328,6 +4328,7 @@ namespace OASystem.API.OAMethodLib
                     CurrencyCode = sd.Name.ToUpper(),
                     CurrencyName = sd.Remark
                 })
+                .Distinct()
                 .ToListAsync();
 
             //出入境费用存储的币种及汇率
@@ -4344,6 +4345,8 @@ namespace OASystem.API.OAMethodLib
             //合并已使用币种及汇率
             infos.ForEach(x =>
             {
+                if (x.CurrencyCode.Equals("CNY")) x.Rate = 1.0000M;
+
                 var eexCurrencyInfo = eexCurrencyInfos.Where(y => y.CurrencyCode == x.CurrencyCode).FirstOrDefault();
                 if (eexCurrencyInfo != null)
                 {
@@ -5938,8 +5941,8 @@ namespace OASystem.API.OAMethodLib
             result = kimiApiResult_JObject["content"].ToString();
             if (!string.IsNullOrEmpty(result))
             {
-                TimeSpan ts = TimeSpan.FromHours(2); //过期时间 2 小时
-                await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>(redisKeyName, result, ts);//string 存
+                TimeSpan expiry = TimeSpan.FromMinutes(5);  // 5分钟
+                await RedisRepository.RedisFactory.CreateRedisRepository().StringSetAsync<string>(redisKeyName, result, expiry);//string 存
             }
 
             return result;
@@ -6637,7 +6640,6 @@ namespace OASystem.API.OAMethodLib
         }
         #endregion
 
-
         #region 动态参数字符串格式化
 
         /// <summary>

+ 4 - 2
OASystem/OASystem.Api/OASystem.API.csproj

@@ -9,11 +9,13 @@
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <NoWarn>$(NoWarn);1591;701;1702;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <NoWarn>1701;1702;1591;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
+    <GenerateDocumentationFile>true</GenerateDocumentationFile>
+    <NoWarn>$(NoWarn);1591;701;1702;8618;1570;8603;8604;8602;8600;0168;8601;1998;</NoWarn>
   </PropertyGroup>
 
   <ItemGroup>

+ 4 - 1
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -1409,6 +1409,9 @@ namespace OASystem.Domain.ViewModels.Groups
 
     public class CityIntervalBase
     {
+        /// <summary>
+        /// 序号
+        /// </summary>
         public int No { get; set; }
 
         /// <summary>
@@ -1422,7 +1425,7 @@ namespace OASystem.Domain.ViewModels.Groups
         public decimal Coefficient { get; set; }
 
         /// <summary>
-        /// 国家、城市 成本币种
+        /// 成本币种
         /// </summary>
         public string CurrencyName { get; set; }
 

+ 1 - 1
OASystem/OASystem.Domain/ViewModels/JsonView.cs

@@ -20,7 +20,7 @@ public class JsonView
     /// <summary>
     /// 数据
     /// </summary>
-    public object? Data { get; set; } = new { };
+    public object? Data { get; set; }
 
     public JsonView() { }
     public JsonView(bool isSuccess, string msg)

+ 5 - 1
OASystem/OASystem.Domain/ViewModels/Resource/OverseaVehicleView.cs

@@ -68,7 +68,7 @@ namespace OASystem.Domain.ViewModels.Resource
     public class OverseaVehicleInfoView : OverseaVehicleView
     {
         /// <summary>
-        /// 洲名称
+        /// 洲名称
         /// </summary>
         public string ContinentName { get; set; }
 
@@ -127,21 +127,25 @@ namespace OASystem.Domain.ViewModels.Resource
         /// <summary>
         /// 车型名称
         /// </summary>
+        /// <example>七座</example>
         public string CarTypeName { get; set; }
 
         /// <summary>
         /// 服务类型
         /// </summary>
+        /// <example>1</example>
         public VehicleServiceTypeEnum ServiceType { get; set; }
 
         /// <summary>
         /// 价格
         /// </summary>
+        /// <example>2000.50</example>
         public decimal Price { get; set; }
 
         /// <summary>
         /// 备注
         /// </summary>
+        /// <example>默认备注</example>
         public string Remark { get; set; }
     }