Browse Source

同步

bjmzak
wxd 2 years ago
parent
commit
82ba772b55
  1. 2
      src/Shentun.Peis.Application.Contracts/SumSuggestionHeaders/SumSuggestionDto.cs
  2. 9
      src/Shentun.Peis.Application/SumSuggestionHeaders/SumSuggestionHeaderAppService.cs
  3. 107
      src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs

2
src/Shentun.Peis.Application.Contracts/SumSuggestionHeaders/SumSuggestionDto.cs

@ -6,6 +6,8 @@ namespace Shentun.Peis.SumSuggestionHeaders
{
public class SumSuggestionDto
{
public Guid PatientRegisterId { get; set; }
/// <summary>
/// 建议标题
/// </summary>

9
src/Shentun.Peis.Application/SumSuggestionHeaders/SumSuggestionHeaderAppService.cs

@ -124,6 +124,7 @@ namespace Shentun.Peis.SumSuggestionHeaders
DisplayOrder = sa.sumSuggestionContentHaveEmpty.DisplayOrder,
SuggestionContent = sa.sumSuggestionContentHaveEmpty.SuggestionContent,
}).OrderBy(o => o.DisplayOrder).Distinct().ToList(),
PatientRegisterId = input.PatientRegisterId
}).OrderBy(o => o.DisplayOrder).ToList();
}
@ -188,7 +189,8 @@ namespace Shentun.Peis.SumSuggestionHeaders
SuggestionContent = x.SuggestionContent,
DisplayOrder = x.DisplayOrder,
}
).ToList()
).ToList(),
PatientRegisterId = input.PatientRegisterId
};
msg.Add(sumSuggestionDto);
}
@ -205,11 +207,14 @@ namespace Shentun.Peis.SumSuggestionHeaders
SuggestionFlag = null,
DisplayOrder = 0,
DiagnosisIds = null,
DiagnosisNames = null
DiagnosisNames = null,
PatientRegisterId = input.PatientRegisterId
});
}
}
return msg;
}

107
src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs

@ -83,31 +83,11 @@ namespace Shentun.Peis.TransToWebPeis
[HttpPost("api/app/TransToWebPeis/TransBaseData")]
public async Task TransBaseDataAsync()
{
//var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType ==
//ThirdInterfaceTypeFlag.TranToWebPeis && o.IsActive == 'Y');
//foreach (var thirdInterface in thirdInterfaces)
//{
// var connectString = GetConnectionStrings(thirdInterface.ParmValue);
// SqlSugarClient WebDb = new SqlSugarClient(new ConnectionConfig()
// {
// ConnectionString = connectString,
// DbType = SqlSugar.DbType.PostgreSQL,
// IsAutoCloseConnection = true
// });
// await TransItemType(WebDb);
// await TransItem(connectString);
// await TransAsbitem(connectString);
// await TransMedicalPackage(connectString);
// await TransDiagnosis(connectString);
//}
var connectString = "Host=10.1.12.140;Port=5432;Database=WebPeis;User ID=postgres;Password=st123;";
var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType ==
ThirdInterfaceTypeFlag.TranToWebPeis);
foreach (var thirdInterface in thirdInterfaces)
{
var connectString = GetConnectionStrings(thirdInterface.ParmValue);
SqlSugarClient WebDb = new SqlSugarClient(new ConnectionConfig()
{
@ -116,6 +96,7 @@ namespace Shentun.Peis.TransToWebPeis
IsAutoCloseConnection = true
});
#region 清理基础数据
//删除
@ -150,27 +131,42 @@ namespace Shentun.Peis.TransToWebPeis
await TransCustomerOrgGroupAsync(WebDb);
await TransCustomerOrgGroupDetailAsync(WebDb);
}
/// <summary>
/// 上传单位信息
/// </summary>
/// <returns></returns>
[HttpPost("api/app/TransToWebPeis/TransCustomerOrg")]
public async Task TransCustomerOrgWithDetailAsync()
{
//customer_org,customer_org_register
}
/// <summary>
/// 上传人员体检信息
/// </summary>
/// <returns></returns>
[HttpPost("api/app/TransToWebPeis/TransPatientRegister")]
public async Task TransPatientRegisterAsync()
{
//patient,patient_register,register_check,register_check_asbitem
//register_check_item,register_check_picture,register_check_summary,register_check_suggestion
//sum_summary_header,sum_summary_content,sum_suggestion_header,sum_suggestion_content,sum_diagnosis,
//var connectString = "Host=10.1.12.140;Port=5432;Database=WebPeis;User ID=postgres;Password=st123;";
//SqlSugarClient WebDb = new SqlSugarClient(new ConnectionConfig()
//{
// ConnectionString = connectString,
// DbType = SqlSugar.DbType.PostgreSQL,
// IsAutoCloseConnection = true
//});
}
///// <summary>
///// 上传单位信息
///// </summary>
///// <returns></returns>
//[HttpPost("api/app/TransToWebPeis/TransCustomerOrg")]
//public async Task TransCustomerOrgWithDetailAsync()
//{
// //customer_org,customer_org_register
//}
///// <summary>
///// 上传人员体检信息
///// </summary>
///// <returns></returns>
//[HttpPost("api/app/TransToWebPeis/TransPatientRegister")]
//public async Task TransPatientRegisterAsync()
//{
// //patient,patient_register,register_check,register_check_asbitem
// //register_check_item,register_check_picture,register_check_summary,register_check_suggestion
// //sum_summary_header,sum_summary_content,sum_suggestion_header,sum_suggestion_content,sum_diagnosis,
//}
/// <summary>
/// 根据人员登记ID上传人员体检信息
/// </summary>
@ -179,7 +175,12 @@ namespace Shentun.Peis.TransToWebPeis
[HttpPost("api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId")]
public async Task TransPatientRegisterByPatientRegisterIdAsync(PatientRegisterIdInputDto input)
{
var connectString = "Host=10.1.12.140;Port=5432;Database=WebPeis;User ID=postgres;Password=st123;";
var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType ==
ThirdInterfaceTypeFlag.TranToWebPeis);
foreach (var thirdInterface in thirdInterfaces)
{
var connectString = GetConnectionStrings(thirdInterface.ParmValue);
SqlSugarClient WebDb = new SqlSugarClient(new ConnectionConfig()
{
@ -187,7 +188,15 @@ namespace Shentun.Peis.TransToWebPeis
DbType = SqlSugar.DbType.PostgreSQL,
IsAutoCloseConnection = true
});
await TransPatientRegisterWithDetailAsync(WebDb, input.PatientRegisterId);
}
}
/// <summary>
/// 撤销上传人员体检信息
@ -317,10 +326,10 @@ namespace Shentun.Peis.TransToWebPeis
await WebDb.Ado.ExecuteCommandAsync("INSERT INTO public.asbitem(asbitem_id, asbitem_name, short_name, for_sex_id, item_type_id," +
"price, device_type_id, is_before_eat, clinical_meaning, default_result," +
"is_picture_rotate, is_check, is_active, simple_code, display_order, concurrency_stamp," +
"creation_time, creator_id, last_modification_time, last_modifier_id, is_web_appoint) values " +
"creation_time, creator_id, last_modification_time, last_modifier_id, is_web_appoint,warn,disease_screening_type_id) values " +
"(@asbitem_id,@asbitem_name,@short_name,@for_sex_id,@item_type_id,@price,@device_type_id::uuid,@is_before_eat,@clinical_meaning," +
"@default_result,@is_picture_rotate,@is_check,@is_active,@simple_code,@display_order,@concurrency_stamp,@creation_time," +
"@creator_id,@last_modification_time,@last_modifier_id,@is_web_appoint)",
"@creator_id,@last_modification_time,@last_modifier_id,@is_web_appoint,@warn,@disease_screening_type_id::uuid)",
new List<SugarParameter>() {
new SugarParameter("asbitem_id",asbitem.Id),
new SugarParameter("asbitem_name",asbitem.DisplayName),
@ -342,7 +351,9 @@ namespace Shentun.Peis.TransToWebPeis
new SugarParameter("creator_id",asbitem.CreatorId),
new SugarParameter("last_modification_time",asbitem.LastModificationTime),
new SugarParameter("last_modifier_id",asbitem.LastModifierId),
new SugarParameter("is_web_appoint",asbitem.IsWebAppoint)
new SugarParameter("is_web_appoint",asbitem.IsWebAppoint),
new SugarParameter("warn",asbitem.Warn),
new SugarParameter("disease_screening_type_id",asbitem.DiseaseScreeningTypeId)
});
//插入明细

Loading…
Cancel
Save