|
|
@@ -2371,16 +2371,37 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
|
|
|
#region 本地数据源(商邀资料)
|
|
|
|
|
|
+ var datas = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
|
|
|
+ .Where(x => x.IsDel == 0)
|
|
|
+ .Select(x => new {
|
|
|
+ x.Id,
|
|
|
+ x.Country
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ var decryptDatas = new List<Res_InvitationOfficialActivityData>();
|
|
|
+ foreach (var item in datas)
|
|
|
+ {
|
|
|
+ decryptDatas.Add(new() {
|
|
|
+ Id = item.Id,
|
|
|
+ Country = AesEncryptionHelper.Decrypt(item.Country)
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ var localDatas = decryptDatas.Where(x=> !string.IsNullOrEmpty(x.Country) && entryInfo.TargetCountry.Contains(x.Country)).ToList();
|
|
|
+
|
|
|
+ var localDataIds = localDatas.Select(x => x.Id).ToList();
|
|
|
+
|
|
|
var rawData = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>()
|
|
|
- .Where(x => x.IsDel == 0 && x.Country.Equals(entryInfo.TargetCountry))
|
|
|
+ .Where(x => localDataIds.Contains(x.Id))
|
|
|
.ToListAsync();
|
|
|
|
|
|
- // 解密
|
|
|
+ // 解密 集合大于十条数据则取前10条数据
|
|
|
localInvDatas = rawData.AsParallel().AsOrdered().Select(item => new InvitationAIInfo
|
|
|
{
|
|
|
Guid = Guid.NewGuid().ToString("N"),
|
|
|
Source = 0, // 明确来源标识
|
|
|
- Region = entryInfo.OriginUnit,
|
|
|
+ Region = entryInfo.TargetCountry,
|
|
|
NameCn = AesEncryptionHelper.Decrypt(item.UnitName),
|
|
|
Address = AesEncryptionHelper.Decrypt(item.Address),
|
|
|
Scope = AesEncryptionHelper.Decrypt(item.Field),
|
|
|
@@ -2389,7 +2410,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
Email = AesEncryptionHelper.Decrypt(item.Email),
|
|
|
OperatedAt = DateTime.Now,
|
|
|
Operator = operatorName,
|
|
|
- }).ToList();
|
|
|
+ }).Take(10).ToList();
|
|
|
|
|
|
#endregion
|
|
|
|