You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. using Shentun.Peis.PatientRegisters;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Shentun.Peis.PlugIns.PatientRegisters
  8. {
  9. public class ImportPatientRegisterPlugInsBase : ThirdPlugInsBase
  10. {
  11. protected Guid CustomerOrgRegisterId;
  12. public ImportPatientRegisterPlugInsBase(Guid thirdInterfaceId) : base(thirdInterfaceId)
  13. {
  14. }
  15. public ImportPatientRegisterPlugInsBase(string parmValue) : base(parmValue)
  16. {
  17. }
  18. public virtual async Task<ImportPatientRegisterByCustomerOrgRegisterIdDto> ImportPatientRegisterByCustomerOrgRegisterIdAsync(Guid customerOrgRegisterId)
  19. {
  20. throw new NotImplementedException();
  21. }
  22. public override Task DoWork()
  23. {
  24. //var loginResult = LoginAsync().Result;
  25. var queryDaysStr = InterfaceConfig.GetSection("Interface").GetSection("Scheduler").GetSection("QueryDays").Value;
  26. var customerOrgRegisterIdStr = InterfaceConfig.GetSection("Interface").GetSection("CustomerOrgRegisterId").Value;
  27. if(!Guid.TryParse(customerOrgRegisterIdStr, out CustomerOrgRegisterId))
  28. {
  29. return Task.CompletedTask;
  30. }
  31. if (string.IsNullOrWhiteSpace(queryDaysStr))
  32. {
  33. queryDaysStr = "1";
  34. }
  35. if (!int.TryParse(queryDaysStr, out int days))
  36. {
  37. days = 1;
  38. }
  39. try
  40. {
  41. var result = ImportPatientRegisterByCustomerOrgRegisterIdAsync(CustomerOrgRegisterId).Result;
  42. }
  43. catch (Exception ex)
  44. {
  45. }
  46. return Task.CompletedTask;
  47. }
  48. }
  49. }