|
|
|
@ -28,79 +28,79 @@ namespace Shentun.Peis |
|
|
|
_appService = GetRequiredService<BaseDataHandleAppService>(); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task TransferPatientData() |
|
|
|
{ |
|
|
|
//[Fact]
|
|
|
|
//public async Task TransferPatientData()
|
|
|
|
//{
|
|
|
|
|
|
|
|
for (int i = 0; i < 500; i++) |
|
|
|
{ |
|
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) |
|
|
|
{ |
|
|
|
var IsHand = await _appService.TransferPatientData(); |
|
|
|
// for (int i = 0; i < 500; i++)
|
|
|
|
// {
|
|
|
|
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
|
|
|
|
// {
|
|
|
|
// var IsHand = await _appService.TransferPatientData();
|
|
|
|
|
|
|
|
await unitOfWork.CompleteAsync(); |
|
|
|
// await unitOfWork.CompleteAsync();
|
|
|
|
|
|
|
|
_output.WriteLine($"处理{(i + 1) * 1000}"); |
|
|
|
// _output.WriteLine($"处理{(i + 1) * 1000}");
|
|
|
|
|
|
|
|
if (!IsHand) |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if (!IsHand)
|
|
|
|
// {
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task TransferPatientRegisterData() |
|
|
|
{ |
|
|
|
//[Fact]
|
|
|
|
//public async Task TransferPatientRegisterData()
|
|
|
|
//{
|
|
|
|
|
|
|
|
for (int i = 0; i < 3000; i++) |
|
|
|
{ |
|
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) |
|
|
|
{ |
|
|
|
var IsHand = await _appService.TransferPatientRegisterData(); |
|
|
|
// for (int i = 0; i < 3000; i++)
|
|
|
|
// {
|
|
|
|
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
|
|
|
|
// {
|
|
|
|
// var IsHand = await _appService.TransferPatientRegisterData();
|
|
|
|
|
|
|
|
await unitOfWork.CompleteAsync(); |
|
|
|
// await unitOfWork.CompleteAsync();
|
|
|
|
|
|
|
|
_output.WriteLine($"处理{(i + 1) * 1000}"); |
|
|
|
// _output.WriteLine($"处理{(i + 1) * 1000}");
|
|
|
|
|
|
|
|
if (!IsHand) |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if (!IsHand)
|
|
|
|
// {
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task HandPatientRegisterDoctor() |
|
|
|
{ |
|
|
|
//[Fact]
|
|
|
|
//public async Task HandPatientRegisterDoctor()
|
|
|
|
//{
|
|
|
|
|
|
|
|
for (int i = 0; i < 3000; i++) |
|
|
|
{ |
|
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) |
|
|
|
{ |
|
|
|
var IsHand = await _appService.HandPatientRegisterDoctor(); |
|
|
|
// for (int i = 0; i < 3000; i++)
|
|
|
|
// {
|
|
|
|
// using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
|
|
|
|
// {
|
|
|
|
// var IsHand = await _appService.HandPatientRegisterDoctor();
|
|
|
|
|
|
|
|
await unitOfWork.CompleteAsync(); |
|
|
|
// await unitOfWork.CompleteAsync();
|
|
|
|
|
|
|
|
_output.WriteLine($"处理{(i + 1) * 1000}"); |
|
|
|
// _output.WriteLine($"处理{(i + 1) * 1000}");
|
|
|
|
|
|
|
|
if (!IsHand) |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if (!IsHand)
|
|
|
|
// {
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
} |
|
|
|
} |