提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+30 -1
View File
@@ -1810,4 +1810,33 @@ namespace Lskj.AutoCreatWord
// 创建新的 DataTable 用于存储分组结果
DataTable groupedTable = selectTable.Clone();
foreach (var group in groupedData)
{
// 将动态键拆分成各个部分,并添加到新行
object[] keyParts = Regex.Split(group.Key.Key, separator);
DataRow newRow = groupedTable.NewRow();
for (int i = 0; i < keyParts.Length; i++)
{
newRow[groupByColumns[i]] = keyParts[i];
}
groupedTable.Rows.Add(newRow);
}
dataTable = groupedTable;
}
}
catch (Exception)
{
}
}
/// <summary>
///word表格数据配置的集合
/// </summary>
protected class GridTarGet
{
public string number;
public Section targetSection;
public Table targetTable;
public int rowIndex;
}
}
}
+27 -1
View File
@@ -121,4 +121,30 @@ namespace Lskj.AutoWordFile
AutoCreatWord.CreateWordUtil.DbOperator = new Lskj.Data.ADO.Template.DbTemplate(string.Format("server={0};database={1};persist security info=true;user id=lserpAdmin;password=lserp110;max pool size = 512;", DBConfig.Instance.ServerName, DBConfig.Instance.DataBase), "system.data.sqlclient");
string[] masterSqls = Model.MasterSql.Trim('^').Split('^');
List<DataSet> dataSets = new List<DataSet>();
for
foreach (string masterSql in masterSqls)
{
if (string.IsNullOrEmpty(masterSql)) continue;
dataSets.Add(SqlHelper.ExecuteDataSet(masterSql));
}
AutoCreatWord.CreateWordUtil.Create(mainTempPath, menuTempPath, Model.MenuTempArray, dataSets, savePdfPath, SystemInfo.Instance.OAUrl, out string msg);
cts.Cancel();
if (this.InvokeRequired)
{
this.Invoke(new Action(() =>
{
progressBar1.Value = 100;
Process.Start(savePdfPath);
Close();
}));
}
});
crateTask.Start();
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
Close();
}
}
}
}