Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

yuanrf 1 month ago
parent
commit
d9a2a6c593

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

@@ -7686,7 +7686,8 @@ FROM
                     PublicCost = ntf.PublicCost,
                     LastUpdateUserId = ntf.LastUpdateUserId,
                     LastUpdateUserName = u.CnName,
-                    LastUpdateTime = ntf.LastUpdateTime
+                    LastUpdateTime = ntf.LastUpdateTime,
+                    Remark = ntf.Remark
                 })
                 .ToPageListAsync(dto.PageIndex, dto.PageSize, total);
 

+ 30 - 0
OASystem/OASystem.Api/Program.cs

@@ -372,6 +372,24 @@ builder.Services.AddSignalR()
 builder.Services.TryAddSingleton(typeof(CommonService));
 #endregion
 
+#region 健康检查服务
+
+//// 
+//builder.Services.AddHealthChecks()
+//    .AddCheck("ExampleHealthCheck", () =>
+//        HealthCheckResult.Healthy("Everything is OK!"), tags: new[] { "example" });
+
+//// 添加 HealthChecks UI 服务
+//builder.Services.AddHealthChecksUI(setup =>
+//{
+//    setup.SetEvaluationTimeInSeconds(60); // 每 60 秒检查一次
+//    setup.MaximumHistoryEntriesPerEndpoint(50); // 每个端点最多保存 50 条历史记录
+//    setup.SetApiMaxActiveRequests(1); // UI API 的最大并发请求数
+//})
+//.AddInMemoryStorage(); // 使用内存存储健康检查结果
+
+#endregion
+
 var app = builder.Build();
 
 
@@ -455,6 +473,18 @@ app.MapHub<ChatHub>("/ChatHub", options =>
 
 #endregion
 
+#region 配置健康检查端点
+
+// 配置健康检查端点
+//app.MapHealthChecks("/health", new HealthCheckOptions
+//{
+//    Predicate = _ => true, // 包含所有健康检查
+//    ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse // 使用 UI 的响应格式
+//});
+
+
+
+#endregion
 
 app.MapControllerRoute(
     name: "default",

+ 10 - 0
OASystem/OASystem.Api/appsettings.json

@@ -16,6 +16,16 @@
     "/api/login",
     "/api/MarketCustomerResources/NewClientOp"
   ],
+  //"HealthChecksUI": {
+  //  "HealthChecks": [
+  //    {
+  //      "Name": "Example API",
+  //      "Uri": "http://localhost:5256/health"
+  //    }
+  //  ],
+  //  "EvaluationTimeInSeconds": 60,
+  //  "MinimumSecondsBetweenFailureNotifications": 60
+  //},
   "JwtSecurityKey": "48d3f4fe770940a1068052f581536b81", //jwt密钥
   "UseSwagger": "true", //启用Swagger
   "GroupsConfig": {

+ 2 - 0
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -126,6 +126,8 @@ namespace OASystem.Domain.ViewModels.Groups
         /// 最后更新时间 
         /// </summary>
         public DateTime? LastUpdateTime { get; set; }
+
+        public string Remark { get; set; }
     }
 
     /// <summary>

+ 2 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -643,8 +643,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 {
                     var isNul = await _sqlSugar
                         .Queryable<Grp_NationalTravelFee>()
-                        .FirstAsync(x => x.IsDel == 0 && 
-                            x.ProvinceId == info.ProvinceId &&
+                        .FirstAsync(x => x.IsDel == 0 &&
+                            info.ProvinceId == x.ProvinceId &&
                             info.Continent.Contains(dto.Continent) &&
                             info.Country.Contains(dto.Country) &&
                             info.City.Contains(dto.City));