Browse Source

插件锁

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
380f3f66f5
  1. 8
      src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs
  2. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs
  3. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs
  4. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs
  5. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs
  6. 2
      test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs

8
src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs

@ -128,20 +128,20 @@ namespace Shentun.Peis.PlugIns
throw new ArgumentException("数据连接设置中的DbType不能为空");
}
InterfaceDbType = InterfaceDbType.ToLower();
Logger.LogInformation("数据库类型:" + InterfaceDbType);
//Logger.LogInformation("数据库类型:" + InterfaceDbType);
if (InterfaceDbType == "sqlserver")
{
Logger.LogInformation("调用sqlserver:" + InterfaceDbType);
//Logger.LogInformation("调用sqlserver:" + InterfaceDbType);
conn = new SqlConnection(InterfaceConnctionStr);
}
else if (InterfaceDbType == "postgres")
{
Logger.LogInformation("调用postgres:" + InterfaceDbType);
//Logger.LogInformation("调用postgres:" + InterfaceDbType);
conn = new NpgsqlConnection(InterfaceConnctionStr);
}
else if (InterfaceDbType == "oracle")
{
Logger.LogInformation("调用oracle:" + InterfaceDbType);
//Logger.LogInformation("调用oracle:" + InterfaceDbType);
conn = new OracleConnection(InterfaceConnctionStr);
}
else

6
src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs

@ -28,8 +28,8 @@ namespace Shentun.Peis.Schedulers
public virtual void DoWork(Guid interfaceId)
{
if (_isRunning) return;
lock (lockObject)
{
//lock (lockObject)
//{
_isRunning = true;
try
{
@ -78,7 +78,7 @@ namespace Shentun.Peis.Schedulers
}
_isRunning = false;
return;
}
//}
}
public void DoWork()
{

6
src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs

@ -26,8 +26,8 @@ namespace Shentun.Peis.Schedulers
public virtual void DoWork(Guid interfaceId)
{
if (_isRunning) return;
lock (lockObject)
{
//lock (lockObject)
//{
_isRunning = true;
try
{
@ -76,7 +76,7 @@ namespace Shentun.Peis.Schedulers
}
_isRunning = false;
return;
}
//}
}
public void DoWork()
{

6
src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs

@ -26,8 +26,8 @@ namespace Shentun.Peis.Schedulers
public virtual void DoWork(Guid interfaceId)
{
if (_isRunning) return;
lock (lockObject)
{
//lock (lockObject)
//{
_isRunning = true;
try
{
@ -76,7 +76,7 @@ namespace Shentun.Peis.Schedulers
}
_isRunning = false;
return;
}
//}
}
public void DoWork()

6
src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs

@ -22,8 +22,8 @@ namespace Shentun.Peis.Schedulers
public virtual void DoWork(Guid interfaceId)
{
if (_isRunning) return;
lock (lockObject)
{
//lock (lockObject)
//{
_isRunning = true;
try
{
@ -71,7 +71,7 @@ namespace Shentun.Peis.Schedulers
}
_isRunning = false;
return;
}
//}
}
public void DoWork()
{

2
test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs

@ -77,7 +77,7 @@ namespace Shentun.Peis
{
await _appService.ImportResultByPatientRegisterIdAsync(new PatientRegisterIdInputDto()
{
PatientRegisterId = new Guid("3a128196-ec34-aa17-0a04-b4bb6bafc752")
PatientRegisterId = new Guid("3a127c60-bf8f-e6d9-9db0-817d217e0ff1")
});
await unitOfWork.CompleteAsync();
}

Loading…
Cancel
Save