添加日志

parent 3b806fa3
...@@ -163,7 +163,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al ...@@ -163,7 +163,7 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
if (_evn.IsEnvironment("Localhost")) if (_evn.IsEnvironment("Localhost"))
_allotService.Generate(allot, email); _allotService.Generate(allot, email);
else else
BackgroundJob.Enqueue(() => _allotService.Generate(allot, email)); BackgroundJob.Schedule(() => _allotService.Generate(allot, email), TimeSpan.FromSeconds(1));
//_allotService.Generate(allot, email); //_allotService.Generate(allot, email);
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email)); ////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /> <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="MySql.Data" Version="8.0.15" /> <PackageReference Include="MySql.Data" Version="8.0.15" />
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.15" /> <PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.15" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
......
...@@ -515,6 +515,12 @@ ...@@ -515,6 +515,12 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.GuaranteeController.UnitType">
<summary>
医院核算单元
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.HospitalController.GetHospitalList"> <member name="M:Performance.Api.Controllers.HospitalController.GetHospitalList">
<summary> <summary>
获取当前登录用户管辖医院列表 获取当前登录用户管辖医院列表
......
...@@ -1133,6 +1133,11 @@ ...@@ -1133,6 +1133,11 @@
费用名称 费用名称
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.DrugpropRequest.ChargeType">
<summary>
费用类别
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeRequest.ID"> <member name="P:Performance.DtoModels.EmployeeRequest.ID">
<summary> <summary>
...@@ -1830,6 +1835,31 @@ ...@@ -1830,6 +1835,31 @@
药占比对应系数 药占比对应系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.GuaranteeResponse.AllotId">
<summary>
</summary>
</member>
<member name="P:Performance.DtoModels.GuaranteeResponse.Priority">
<summary>
优先级
</summary>
</member>
<member name="P:Performance.DtoModels.GuaranteeResponse.UnitType">
<summary>
核算单元类型 1 医生组 2 护理组 3 医技组
</summary>
</member>
<member name="P:Performance.DtoModels.GuaranteeResponse.Target">
<summary>
保底科室
</summary>
</member>
<member name="P:Performance.DtoModels.GuaranteeResponse.Source">
<summary>
保底来源科室
</summary>
</member>
<member name="P:Performance.DtoModels.IncomeResponse.SheetNameKeyword"> <member name="P:Performance.DtoModels.IncomeResponse.SheetNameKeyword">
<summary> <summary>
关键字匹配 关键字匹配
......
...@@ -725,6 +725,11 @@ ...@@ -725,6 +725,11 @@
费用名称 费用名称
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.cof_drugtype.ChargeType">
<summary>
费用类别
</summary>
</member>
<member name="T:Performance.EntityModels.cof_guarantee"> <member name="T:Performance.EntityModels.cof_guarantee">
<summary> <summary>
保底科室配置 保底科室配置
......
...@@ -106,11 +106,7 @@ public List<cof_guarantee> GuarantUpdate(GuaranteeRequest request) ...@@ -106,11 +106,7 @@ public List<cof_guarantee> GuarantUpdate(GuaranteeRequest request)
if (guaranteeList == null) if (guaranteeList == null)
throw new PerformanceException("提交数据无效"); throw new PerformanceException("提交数据无效");
var filterList = perforCofguaranteeRepository.GetEntities(t => t.AllotId == guarantee.AllotId && t.UnitType == request.UnitType && t.Target == request.Target); var filterList = perforCofguaranteeRepository.GetEntities(t => t.AllotId == guarantee.AllotId && t.UnitType == request.UnitType && t.Target == request.Target);
<<<<<<< HEAD
if ((filterList != null && filterList.Count > 0) && (request.UnitType != guarantee.UnitType || request.Target != guarantee.Target))
=======
if (request.UnitType != guarantee.UnitType && filterList != null && filterList.Count > 0) if (request.UnitType != guarantee.UnitType && filterList != null && filterList.Count > 0)
>>>>>>> 50ad63f... 保底配置修改-过滤重复数据
throw new PerformanceException($"[{((UnitType)request.UnitType).ToString()}]已存在\"{request.Target}\",请重新选择"); throw new PerformanceException($"[{((UnitType)request.UnitType).ToString()}]已存在\"{request.Target}\",请重新选择");
#region 修改优先级 #region 修改优先级
......
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -9,13 +10,22 @@ namespace Performance.Services ...@@ -9,13 +10,22 @@ namespace Performance.Services
{ {
public class AllotLogHub : Hub public class AllotLogHub : Hub
{ {
private readonly ILogger<AllotLogHub> logger;
public AllotLogHub(ILogger<AllotLogHub> logger)
{
this.logger = logger;
}
public override Task OnConnectedAsync() public override Task OnConnectedAsync()
{ {
logger.LogDebug($"日志推送 连接{Context.ConnectionId}");
return base.OnConnectedAsync(); return base.OnConnectedAsync();
} }
public override Task OnDisconnectedAsync(Exception exception) public override Task OnDisconnectedAsync(Exception exception)
{ {
var connectionId = Context.ConnectionId; var connectionId = Context.ConnectionId;
logger.LogDebug($"日志推送 断开连接{connectionId}");
//1 查询用户分组信息 //1 查询用户分组信息
var groupName = ""; var groupName = "";
...@@ -26,6 +36,7 @@ public override Task OnDisconnectedAsync(Exception exception) ...@@ -26,6 +36,7 @@ public override Task OnDisconnectedAsync(Exception exception)
RedisHelper.HDel("AllotLogGroup", connectionId); RedisHelper.HDel("AllotLogGroup", connectionId);
} }
logger.LogDebug($"日志推送 断开连接{connectionId}-{groupName}");
//3 分组中删除用户 //3 分组中删除用户
Groups.RemoveFromGroupAsync(connectionId, groupName); Groups.RemoveFromGroupAsync(connectionId, groupName);
return base.OnDisconnectedAsync(exception); return base.OnDisconnectedAsync(exception);
...@@ -39,7 +50,7 @@ public override Task OnDisconnectedAsync(Exception exception) ...@@ -39,7 +50,7 @@ public override Task OnDisconnectedAsync(Exception exception)
//1 向数据库中插入用户及分组信息 //1 向数据库中插入用户及分组信息
RedisHelper.HSet("AllotLogGroup", connectionId, groupName); RedisHelper.HSet("AllotLogGroup", connectionId, groupName);
logger.LogDebug($"日志推送 添加用户组{connectionId}-{groupName}");
//2 将用户插入分组 //2 将用户插入分组
await Groups.AddToGroupAsync(connectionId, groupName); await Groups.AddToGroupAsync(connectionId, groupName);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment