|
@@ -176,10 +176,42 @@ namespace wispro.sp.winClient
|
|
|
(string.IsNullOrEmpty(returnFile) ? 0 : 1) +
|
|
|
(string.IsNullOrEmpty(finalFile) ? 0 : 1);
|
|
|
|
|
|
+
|
|
|
+ //continue;
|
|
|
+
|
|
|
DebugLog($"{DateTime.Now}\t{iIndex}/{table.Rows.Count}\t{CaseNo}\t{(string.IsNullOrEmpty(draftFile) ? 0 : 1)}\t{(string.IsNullOrEmpty(returnFile) ? 0 : 1)}\t{(string.IsNullOrEmpty(finalFile) ? 0 : 1)}");
|
|
|
|
|
|
if (i > 1 && returnFile != null)
|
|
|
{
|
|
|
+ #region 将文件复制到保存文件夹中
|
|
|
+ string strSavePath = "d:\\CaseFiles";
|
|
|
+
|
|
|
+ string strCaseFilePath = Path.Combine(strSavePath, caseInfo.CaseNo);
|
|
|
+ if (!Directory.Exists(strCaseFilePath))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(strCaseFilePath);
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(draftFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(draftFile);
|
|
|
+
|
|
|
+ File.Copy(draftFile, Path.Combine(strCaseFilePath, $"草稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(returnFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(returnFile);
|
|
|
+
|
|
|
+ File.Copy(returnFile, Path.Combine(strCaseFilePath, $"返稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(finalFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(finalFile);
|
|
|
+
|
|
|
+ File.Copy(finalFile, Path.Combine(strCaseFilePath, $"定稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
CompareFiles(draftFile, returnFile, finalFile, caseInfo);
|
|
|
|
|
|
if (!(caseInfo.DRRAll == null && caseInfo.RFRAll == null))
|
|
@@ -243,22 +275,22 @@ namespace wispro.sp.winClient
|
|
|
{
|
|
|
CompareDocx docx = new CompareDocx();
|
|
|
docx.Compare(tmpdraftFile, tmpreturnFile);
|
|
|
- if (docx.FulltextResult.oldWordCount > 0)
|
|
|
+ if (docx.FulltextResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.DRRFulltext = docx.FulltextResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.AbstractResult.oldWordCount > 0)
|
|
|
+ if (docx.AbstractResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.DRRAbstract = docx.AbstractResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.ClaimResult.oldWordCount > 0)
|
|
|
+ if (docx.ClaimResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.DRRCalim = docx.ClaimResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.AllStringResult.oldWordCount > 0)
|
|
|
+ if (docx.AllStringResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.DRRAll = docx.AllStringResult;
|
|
|
}
|
|
@@ -269,22 +301,22 @@ namespace wispro.sp.winClient
|
|
|
CompareDocx docx = new CompareDocx();
|
|
|
docx.Compare(tmpreturnFile, tmpfinalFile);
|
|
|
|
|
|
- if (docx.FulltextResult.oldWordCount > 0)
|
|
|
+ if (docx.FulltextResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.RFRFulltext = docx.FulltextResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.AbstractResult.oldWordCount > 0)
|
|
|
+ if (docx.AbstractResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.RFRAbstract = docx.AbstractResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.ClaimResult.oldWordCount > 0)
|
|
|
+ if (docx.ClaimResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.RFRCalim = docx.ClaimResult;
|
|
|
}
|
|
|
|
|
|
- if (docx.AllStringResult.oldWordCount > 0)
|
|
|
+ if (docx.AllStringResult?.oldWordCount > 0)
|
|
|
{
|
|
|
caseInfo.RFRAll = docx.AllStringResult;
|
|
|
}
|
|
@@ -348,7 +380,7 @@ namespace wispro.sp.winClient
|
|
|
{
|
|
|
if (MessageBox.Show("获取前一天所有的完成案件,并比较文档?", "提示框", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
|
|
{
|
|
|
- compareCaseFile(DateTime.Parse("2024-12-01"),DateTime.Now);
|
|
|
+ compareCaseFile(DateTime.Parse("2024-12-01"),DateTime.Parse("2024-12-31"));
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -370,7 +402,37 @@ namespace wispro.sp.winClient
|
|
|
(string.IsNullOrEmpty(returnFile) ? 0 : 1) +
|
|
|
(string.IsNullOrEmpty(finalFile) ? 0 : 1);
|
|
|
|
|
|
- if (i > 1)
|
|
|
+ #region 将文件复制到保存文件夹中
|
|
|
+ string strSavePath = "d:\\CaseFiles";
|
|
|
+
|
|
|
+ string strCaseFilePath = Path.Combine(strSavePath, caseInfo.CaseNo);
|
|
|
+ if (!Directory.Exists(strCaseFilePath))
|
|
|
+ {
|
|
|
+ Directory.CreateDirectory(strCaseFilePath);
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(draftFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(draftFile);
|
|
|
+
|
|
|
+ File.Copy(draftFile, Path.Combine(strCaseFilePath, $"草稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(returnFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(returnFile);
|
|
|
+
|
|
|
+ File.Copy(returnFile, Path.Combine(strCaseFilePath, $"返稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(finalFile))
|
|
|
+ {
|
|
|
+ FileInfo file = new FileInfo(finalFile);
|
|
|
+
|
|
|
+ File.Copy(finalFile, Path.Combine(strCaseFilePath, $"定稿-{file.Name}"), true);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ if (i > 1)
|
|
|
{
|
|
|
CompareFiles(draftFile, returnFile, finalFile, caseInfo);
|
|
|
new APIService().SaveCompareResult(caseInfo);
|