|
@@ -47,6 +47,7 @@ using OASystem.Infrastructure.Repositories.CRM;
|
|
|
using OASystem.Infrastructure.Repositories.Financial;
|
|
using OASystem.Infrastructure.Repositories.Financial;
|
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
|
using OASystem.Infrastructure.Tools;
|
|
using OASystem.Infrastructure.Tools;
|
|
|
|
|
+using OASystem.RedisRepository;
|
|
|
using Quartz.Logging;
|
|
using Quartz.Logging;
|
|
|
using Quartz.Util;
|
|
using Quartz.Util;
|
|
|
using SQLitePCL;
|
|
using SQLitePCL;
|
|
@@ -1179,7 +1180,43 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> GroupItemKeywordSearch(string keyword)
|
|
public async Task<IActionResult> GroupItemKeywordSearch(string keyword)
|
|
|
{
|
|
{
|
|
|
|
|
+ var jw = JsonView(true, "暂无数据");
|
|
|
|
|
+ if (string.IsNullOrEmpty(keyword)) return Ok(jw);
|
|
|
|
|
|
|
|
|
|
+ var expression = Expressionable
|
|
|
|
|
+ .Create<Grp_DelegationInfo>()
|
|
|
|
|
+ .And(x => x.IsDel == 0);
|
|
|
|
|
+
|
|
|
|
|
+ string field = "TeamName,ClientUnit,ClientName";
|
|
|
|
|
+ var groupData = _sqlSugar.Queryable<Grp_DelegationInfo>()
|
|
|
|
|
+ .Where(expression.ToExpression())
|
|
|
|
|
+ .Select(field)
|
|
|
|
|
+ .ToList();
|
|
|
|
|
+
|
|
|
|
|
+ var keywordArray = keyword.ToCharArray();
|
|
|
|
|
+ var matches = groupData
|
|
|
|
|
+ .Where(fullString => !string.IsNullOrWhiteSpace(fullString.TeamName) &&
|
|
|
|
|
+ keywordArray.All(keyword => fullString.TeamName.Contains(keyword)))
|
|
|
|
|
+ .Select(x => new
|
|
|
|
|
+ {
|
|
|
|
|
+ x.TeamName,
|
|
|
|
|
+ x.ClientUnit,
|
|
|
|
|
+ x.ClientName
|
|
|
|
|
+ })
|
|
|
|
|
+ .DistinctBy(x => x.TeamName)
|
|
|
|
|
+ .ToList();
|
|
|
|
|
+
|
|
|
|
|
+ if (matches.Any())
|
|
|
|
|
+ {
|
|
|
|
|
+ jw.Code = StatusCodes.Status200OK;
|
|
|
|
|
+ jw.Msg = "搜索成功";
|
|
|
|
|
+ jw.Data = matches;
|
|
|
|
|
+ jw.Count = matches.Count;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+
|
|
|
|
|
+ #region 智能搜索
|
|
|
//try
|
|
//try
|
|
|
//{
|
|
//{
|
|
|
// // 验证请求参数
|
|
// // 验证请求参数
|
|
@@ -1199,7 +1236,7 @@ namespace OASystem.API.Controllers
|
|
|
// { "ClientUnit", 8 },
|
|
// { "ClientUnit", 8 },
|
|
|
// { "ClientName", 6 }
|
|
// { "ClientName", 6 }
|
|
|
// },
|
|
// },
|
|
|
- // Filters = new List<SearchFilter>()
|
|
|
|
|
|
|
+ // Filters = new List<SearchFilter>()
|
|
|
// {
|
|
// {
|
|
|
// new(){Field = "IsDel",Operator="eq",Value="1" }
|
|
// new(){Field = "IsDel",Operator="eq",Value="1" }
|
|
|
// },
|
|
// },
|
|
@@ -1221,7 +1258,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
|
|
// if (result.Success)
|
|
// if (result.Success)
|
|
|
// {
|
|
// {
|
|
|
- // return Ok(JsonView(true,"搜索成功!", result.Items, result.Items.Count));
|
|
|
|
|
|
|
+ // return Ok(JsonView(true, "搜索成功!", result.Items, result.Items.Count));
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
// return Ok(JsonView(true, $"暂无数据!"));
|
|
// return Ok(JsonView(true, $"暂无数据!"));
|
|
@@ -1232,30 +1269,31 @@ namespace OASystem.API.Controllers
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
- var stopwatch = Stopwatch.StartNew();
|
|
|
|
|
|
|
+ //var stopwatch = Stopwatch.StartNew();
|
|
|
|
|
|
|
|
- if (string.IsNullOrWhiteSpace(keyword))
|
|
|
|
|
- {
|
|
|
|
|
- var result = await GetDefaultResultsAsync();
|
|
|
|
|
- stopwatch.Stop();
|
|
|
|
|
- return Ok(JsonView(true, $"操作成功!耗时:{stopwatch.ElapsedMilliseconds}ms", result, result.Count));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if (string.IsNullOrWhiteSpace(keyword))
|
|
|
|
|
+ //{
|
|
|
|
|
+ // var result = await GetDefaultResultsAsync();
|
|
|
|
|
+ // stopwatch.Stop();
|
|
|
|
|
+ // return Ok(JsonView(true, $"操作成功!耗时:{stopwatch.ElapsedMilliseconds}ms", result, result.Count));
|
|
|
|
|
+ //}
|
|
|
|
|
|
|
|
- // 分析搜索模式
|
|
|
|
|
- var searchAnalysis = AnalyzeSearchPattern(keyword);
|
|
|
|
|
|
|
+ //// 分析搜索模式
|
|
|
|
|
+ //var searchAnalysis = AnalyzeSearchPattern(keyword);
|
|
|
|
|
|
|
|
- if (!searchAnalysis.HasSearchContent)
|
|
|
|
|
- {
|
|
|
|
|
- var result = await GetDefaultResultsAsync();
|
|
|
|
|
- stopwatch.Stop();
|
|
|
|
|
- return Ok(JsonView(true, $"操作成功!耗时:{stopwatch.ElapsedMilliseconds}ms", result, result.Count));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if (!searchAnalysis.HasSearchContent)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // var result = await GetDefaultResultsAsync();
|
|
|
|
|
+ // stopwatch.Stop();
|
|
|
|
|
+ // return Ok(JsonView(true, $"操作成功!耗时:{stopwatch.ElapsedMilliseconds}ms", result, result.Count));
|
|
|
|
|
+ //}
|
|
|
|
|
|
|
|
- // 原生SQL查询
|
|
|
|
|
- var results = await SearchWithNativeSql(searchAnalysis);
|
|
|
|
|
- var results1 = CalculateUnifiedMatchScore(results, searchAnalysis);
|
|
|
|
|
- stopwatch.Stop();
|
|
|
|
|
- return Ok(JsonView(true, $"搜索成功!耗时:{stopwatch.ElapsedMilliseconds}ms", results1, results1.Count));
|
|
|
|
|
|
|
+ //// 原生SQL查询
|
|
|
|
|
+ //var results = await SearchWithNativeSql(searchAnalysis);
|
|
|
|
|
+ //var results1 = CalculateUnifiedMatchScore(results, searchAnalysis);
|
|
|
|
|
+ //stopwatch.Stop();
|
|
|
|
|
+ //return Ok(JsonView(true, $"搜索成功!耗时:{stopwatch.ElapsedMilliseconds}ms", results1, results1.Count));
|
|
|
|
|
+ #endregion
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -5898,11 +5936,11 @@ FROM
|
|
|
companyInfos = companyInfos.Where(x => x.DcId == custInfo.Id).ToList()
|
|
companyInfos = companyInfos.Where(x => x.DcId == custInfo.Id).ToList()
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ //生成文件
|
|
|
string outFilePath = CreatePolandVisaPdf(visaData, polandSavePath, currTempPath);
|
|
string outFilePath = CreatePolandVisaPdf(visaData, polandSavePath, currTempPath);
|
|
|
|
|
|
|
|
filePaths.Add(outFilePath);
|
|
filePaths.Add(outFilePath);
|
|
|
- #region 生成文件
|
|
|
|
|
- #endregion
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
break;
|
|
@@ -6016,7 +6054,7 @@ FROM
|
|
|
SetFieldValue(formFields, "4.Birthday", birthday);
|
|
SetFieldValue(formFields, "4.Birthday", birthday);
|
|
|
|
|
|
|
|
string currentNationality = custInfo.BirthProvince + custInfo.BirthCity;
|
|
string currentNationality = custInfo.BirthProvince + custInfo.BirthCity;
|
|
|
- SetFieldValue(formFields, "CurrentNationality", currentNationality); // 出生地
|
|
|
|
|
|
|
+ SetFieldValue(formFields, "5.CurrentNationality", currentNationality); // 出生地
|
|
|
SetFieldValue(formFields, "CountryBirth", "中国"); // 出生国
|
|
SetFieldValue(formFields, "CountryBirth", "中国"); // 出生国
|
|
|
SetFieldValue(formFields, "CurrentNationalityCountry", "中国"); // 现国籍
|
|
SetFieldValue(formFields, "CurrentNationalityCountry", "中国"); // 现国籍
|
|
|
SetFieldValue(formFields, "NationalityBirth", ""); // 出生时国籍,如与现国籍不同
|
|
SetFieldValue(formFields, "NationalityBirth", ""); // 出生时国籍,如与现国籍不同
|