修改BA的擦写,补充公司名处理和合约号的处理

master
jianghaiqing 6 months ago
parent f37a24c856
commit 3a8b70f5e0

@ -345,6 +345,18 @@ namespace DAJYun.Application
if (!string.IsNullOrWhiteSpace(repStr))
{
if (Regex.IsMatch(s, $"{repStr}(\\.\\,\\sLTD\\.)"))
{
string currS = Regex.Match(s, $"{repStr}(\\.\\,\\sLTD\\.)").Value;
if (!string.IsNullOrWhiteSpace(currS))
{
ReplaceText(page, currS, "");
logger.LogInformation($"PDF 擦除长名称信息{currS} 成功");
}
}
ReplaceText(page, repStr, "");
logger.LogInformation($"PDF 擦除信息{repStr} 成功");
@ -372,7 +384,8 @@ namespace DAJYun.Application
}
if (Regex.IsMatch(s, "合约号\\:\\s+(\\w|\\s)+(?=Customer\\sCommodity)") || Regex.IsMatch(s, "Service\\sContract\\:\\s+(\\w|\\s)+(?=Customer\\sCommodity)"))
if (Regex.IsMatch(s, "合约号\\:\\s+(\\w|\\s)+(?=Customer\\sCommodity)") || Regex.IsMatch(s, "Service\\sContract\\:\\s+(\\w|\\s)+(?=Customer\\sCommodity)")
|| Regex.IsMatch(s, "Service\\sContract\\:\\s+(\\w|\\s)+(?=Cargo\\sDetail)"))
{
string findStr = Regex.Match(s, "合约号\\:\\s+(\\w|\\s)+(?=Customer\\sCommodity)").Value;
@ -385,6 +398,13 @@ namespace DAJYun.Application
repStr = Regex.Match(findStr, "(?<=Service\\sContract\\:)(\\w|\\s)+").Value?.Trim();
}
if (string.IsNullOrWhiteSpace(repStr))
{
findStr = Regex.Match(s, "Service\\sContract\\:\\s+(\\w|\\s)+(?=Cargo\\sDetail)").Value;
repStr = Regex.Match(findStr, "(?<=Service\\sContract\\:)(\\w|\\s)+").Value?.Trim();
}
if (!string.IsNullOrWhiteSpace(repStr))
{
ReplaceText(page, repStr, "");

@ -63,7 +63,7 @@ namespace DAJYun.Application.TaskManagePlatDomain
string s = model.Main.textContent;
//1.先读公司信息
string compEndRegx = "^([a-zA-Z]).*?((CO\\.\\,\\sLTD\\.)|(CO\\.\\,LTD)|(CORP\\.\\,LIMITED)|(SA\\sDE\\sCV)|\\bSAS\\b|\\bSA\\b|\\bLTDA\\b|\\bSAC\\b|\\bEIRL\\b|(SA\\sde\\sCV)|(\\bLTDA\\.)|(\\bCORPORATION\\b)|(S\\.A\\.\\sde\\sC\\.V\\.)|(CORP\\.)|(SDN(\\.|\\s)BHD)|(S\\.A\\.C\\.))";
string compEndRegx = "^([a-zA-Z]).*?((CO\\.\\,\\sLTD\\.)|(CO\\.\\,LTD)|(CORP\\.\\,LIMITED)|(SA\\sDE\\sCV)|\\bSAS\\b|\\bSA\\b|\\bLTDA\\b|\\bSAC\\b|\\bEIRL\\b|(SA\\sde\\sCV)|(\\bLTDA\\.)|(\\bCORPORATION\\b)|(S\\.A\\.\\sde\\sC\\.V\\.)|(CORP\\.)|(SDN(\\.|\\s)BHD)|(S\\.A\\.C\\.)|(S\\.A\\.C))";
string telStr = string.Empty;
string faxStr = string.Empty;

Loading…
Cancel
Save