Browse Source

收费

bjmzak
DESKTOP-G961P6V\Zhh 1 year ago
parent
commit
a262fe1be3
  1. 2
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ChargeRequests/Hzcy/ChargeRequestPlugInsHzcy.cs
  2. 12
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ChargeRequestPlugInsHzcyTest.cs
  3. 11
      src/Shentun.ColumnReferencePlugIns/ChargeRequests/ChargeRequestPlugInsBase.cs

2
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ChargeRequests/Hzcy/ChargeRequestPlugInsHzcy.cs

@ -238,7 +238,7 @@ namespace Shentun.Peis.PlugIns.Extensions.ChargeRequests.Hzcy
} }
public override Task DoWork() public override Task DoWork()
{ {
var queryDaysStr = InterfaceConfig.GetSection("Scheduler").GetSection("QueryDays").Value;
var queryDaysStr = InterfaceConfig.GetSection("Interface").GetSection("Scheduler").GetSection("QueryDays").Value;
if (string.IsNullOrWhiteSpace(queryDaysStr)) if (string.IsNullOrWhiteSpace(queryDaysStr))
{ {
queryDaysStr = "1"; queryDaysStr = "1";

12
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ChargeRequestPlugInsHzcyTest.cs

@ -27,6 +27,18 @@ namespace Shentun.Peis.PlugIns.Extensions.Test
await input.SyncChargeRequestFlagFromInterfaceAsync(new Guid("3a12e00d-7c60-64a8-c02d-1ba915cc601e")); await input.SyncChargeRequestFlagFromInterfaceAsync(new Guid("3a12e00d-7c60-64a8-c02d-1ba915cc601e"));
}
[Fact]
public async Task DoWork()
{
var input = new ChargeRequestPlugInsHzcy(new Guid("1c8cb151-cbc6-4ab5-b50b-0644bf2d515c"));
var loginResult = input.LoginAsync().Result;
await input.DoWork();
} }
} }
} }

11
src/Shentun.ColumnReferencePlugIns/ChargeRequests/ChargeRequestPlugInsBase.cs

@ -166,10 +166,12 @@ where patient.id = patient_register.patient_id and
{ {
using (DbConnection conn = new NpgsqlConnection(AppConnctionStr)) using (DbConnection conn = new NpgsqlConnection(AppConnctionStr))
{ {
var trans = conn.BeginTransaction();
await conn.OpenAsync();
using (var trans = await conn.BeginTransactionAsync())
{
try try
{ {
//加ConcurrencyStamp,以防止并发
string sql; string sql;
sql = @" update charge_request set charge_request_flag =" + chargeRequestFlag + sql = @" update charge_request set charge_request_flag =" + chargeRequestFlag +
@" where id = @ChargeRequestId and concurrency_stamp = @ConcurrencyStamp @" where id = @ChargeRequestId and concurrency_stamp = @ConcurrencyStamp
@ -210,14 +212,15 @@ where patient.id = patient_register.patient_id and
} }
trans.Commit();
await trans.CommitAsync();
} }
catch (Exception ex) catch (Exception ex)
{ {
trans.Rollback();
await trans.RollbackAsync();
throw ex; throw ex;
} }
}
} }
} }

Loading…
Cancel
Save