GuiderApplication.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using DataTransmission.Enum;
  2. using SnapshotWinFormsApp.Application.Dtos;
  3. using SnapshotWinFormsApp.Application.Interfaces;
  4. using SnapshotWinFormsApp.Entities.NewHotline;
  5. using SnapshotWinFormsApp.Entities.OldHotline;
  6. using SnapshotWinFormsApp.Repository;
  7. using SnapshotWinFormsApp.Repository.Enum;
  8. using SnapshotWinFormsApp.Repository.Interfaces;
  9. using SnapshotWinFormsApp.Tools;
  10. using SqlSugar;
  11. using System;
  12. using System.Collections.Generic;
  13. using System.ComponentModel;
  14. using System.Linq;
  15. using System.Text;
  16. using System.Threading.Tasks;
  17. namespace SnapshotWinFormsApp.Application;
  18. //[Description("导入网格员")]
  19. //public class GuiderApplication : ImportApplicationBase<Flow03_PushContent, Citizen, int, Flow03_PushContentDto>, IImportApplication
  20. //{
  21. // private readonly ITargetRepository<Citizen> _userRepo;
  22. // public GuiderApplication(CreateInstanceInDto inDto) : base(inDto)
  23. // {
  24. // _userRepo = new TargetRepository<Citizen>(inDto);
  25. // }
  26. // public override ISugarQueryable<Flow03_PushContentDto> GetSourceList()
  27. // {
  28. // return _sourceRepo.Queryable()
  29. // .Where(m => m.MemberMobile != null && m.MemberName != null)
  30. // .Select(m => new Flow03_PushContentDto(), true)
  31. // .Distinct();
  32. // //.GroupBy(m => new { m.MemberName, m.MemberMobile });
  33. // }
  34. // public override async Task<bool> HasOldDataAsync(Flow03_PushContentDto item, CancellationToken token)
  35. // {
  36. // var userId = await _userRepo.Queryable()
  37. // .Where(m => m.PhoneNumber == item.MemberMobile)
  38. // .Select(m => m.Id)
  39. // .FirstAsync(token);
  40. // return userId.IsNullOrEmpty();
  41. // }
  42. // public override async Task<Citizen> GetTargetAsync(Flow03_PushContentDto source, CancellationToken token)
  43. // {
  44. // var userInfo = new Citizen
  45. // {
  46. // PhoneNumber = source.MemberMobile.Replace("\t", ""),
  47. // Name = source.MemberName.Replace("\t", ""),
  48. // CitizenType = EReadPackUserType.Guider,
  49. // IdentityType = EIdentityType.Citizen
  50. // };
  51. // return await Task.FromResult(userInfo);
  52. // }
  53. //}