|
@@ -1,20 +1,10 @@
|
|
|
using Aspose.Cells;
|
|
|
-using Aspose.Cells.Charts;
|
|
|
using Aspose.Words;
|
|
|
using Aspose.Words.Drawing;
|
|
|
using Aspose.Words.Tables;
|
|
|
using DiffMatchPatch;
|
|
|
-using EyeSoft.Collections.Generic;
|
|
|
-using EyeSoft.IO;
|
|
|
-using Google.Protobuf.WellKnownTypes;
|
|
|
using Microsoft.AspNetCore.SignalR;
|
|
|
-using MySqlX.XDevAPI.Relational;
|
|
|
-using NetUV.Core.Handles;
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
-using NPOI.POIFS.Crypt.Dsig;
|
|
|
-using NPOI.POIFS.Properties;
|
|
|
-using NPOI.SS.Format;
|
|
|
-using NPOI.SS.Formula.Functions;
|
|
|
using NPOI.SS.UserModel;
|
|
|
using NPOI.SS.Util;
|
|
|
using NPOI.XSSF.UserModel;
|
|
@@ -34,10 +24,8 @@ using OASystem.Domain.Dtos.Groups;
|
|
|
using OASystem.Domain.Entities.Customer;
|
|
|
using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
-using OASystem.Domain.ViewModels;
|
|
|
using OASystem.Domain.ViewModels.Financial;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
-using OASystem.Domain.ViewModels.Statistics;
|
|
|
using OASystem.Infrastructure.Repositories.CRM;
|
|
|
using OASystem.Infrastructure.Repositories.Financial;
|
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
@@ -45,23 +33,14 @@ using OfficeOpenXml;
|
|
|
using Org.BouncyCastle.Asn1.Ocsp;
|
|
|
using Org.BouncyCastle.Utilities.Encoders;
|
|
|
using Quartz.Util;
|
|
|
-using SqlSugar;
|
|
|
using SqlSugar.Extensions;
|
|
|
using System.Collections;
|
|
|
using System.Data;
|
|
|
-using System.Data.OleDb;
|
|
|
using System.Diagnostics;
|
|
|
using System.Globalization;
|
|
|
-using System.IO;
|
|
|
using System.IO.Compression;
|
|
|
-using System.Net.Http;
|
|
|
-using System.Reflection.PortableExecutable;
|
|
|
-using System.Security.Cryptography;
|
|
|
-using Ubiety.Dns.Core;
|
|
|
-using static NPOI.POIFS.Crypt.CryptoFunctions;
|
|
|
using static OASystem.API.OAMethodLib.JWTHelper;
|
|
|
using static OASystem.Infrastructure.Repositories.Groups.AirTicketResRepository;
|
|
|
-using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
|
|
|
using Bookmark = Aspose.Words.Bookmark;
|
|
|
using Cell = Aspose.Words.Tables.Cell;
|
|
|
using Table = Aspose.Words.Tables.Table;
|
|
@@ -11522,7 +11501,7 @@ FROM
|
|
|
return finalString.ToString();
|
|
|
}
|
|
|
|
|
|
- public class tagContent
|
|
|
+ private class tagContent
|
|
|
{
|
|
|
public DateTime Date { get; set; }
|
|
|
|
|
@@ -11542,6 +11521,23 @@ FROM
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private List<string> ExtractContentBetweenTags(string input, string tag)
|
|
|
+ {
|
|
|
+ List<string> results = new List<string>();
|
|
|
+
|
|
|
+ // 构造正则表达式,匹配形如 [++]内容[++] 的部分
|
|
|
+ string pattern = $@"{Regex.Escape(tag)}(.*?){Regex.Escape(tag)}";
|
|
|
+ MatchCollection matches = Regex.Matches(input, pattern);
|
|
|
+
|
|
|
+ foreach (System.Text.RegularExpressions.Match match in matches)
|
|
|
+ {
|
|
|
+ // 提取匹配的内容(在两个标记之间的部分)
|
|
|
+ results.Add(match.Groups[1].Value);
|
|
|
+ }
|
|
|
+
|
|
|
+ return results;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 导出行程单
|
|
|
/// </summary>
|
|
@@ -11602,6 +11598,9 @@ FROM
|
|
|
_travelList = _sqlSugar.Queryable<Grp_TravelList>().Where(x => x.Diid == diid && x.IsDel == 0 && x.Issel == 1).ToList();
|
|
|
}
|
|
|
|
|
|
+ // 指定的文字
|
|
|
+ var targetTextDic = new Dictionary<string, List<string>>();
|
|
|
+
|
|
|
//创建数据源Table
|
|
|
DataTable dtSource = new DataTable();
|
|
|
dtSource.Columns.Add("Days", typeof(string));
|
|
@@ -11614,7 +11613,11 @@ FROM
|
|
|
foreach (var item in _travelList)
|
|
|
{
|
|
|
|
|
|
- item.Trip = item.Trip.Replace(tagContent.TagFormat.Item1, string.Empty).Replace(tagContent.TagFormat.Item2, string.Empty);
|
|
|
+ targetTextDic.Add(item.Date, ExtractContentBetweenTags(item.Trip, "[++]"));
|
|
|
+
|
|
|
+ item.Trip = item.Trip.Replace(tagContent.TagFormat.Item1, string.Empty)
|
|
|
+ .Replace(tagContent.TagFormat.Item2, string.Empty)
|
|
|
+ .Replace("[++]", string.Empty);
|
|
|
|
|
|
DataRow dr = dtSource.NewRow();
|
|
|
dr["Days"] = item.Days;
|