Commit 39ea0664 by 任天宇

系统升级更新命名方式

parent 35f1994f
...@@ -94,6 +94,8 @@ namespace Jst.Report.Download ...@@ -94,6 +94,8 @@ namespace Jst.Report.Download
this.colDealDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colDealDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductJudgement = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colProductJudgement = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lblMessage = new System.Windows.Forms.Label(); this.lblMessage = new System.Windows.Forms.Label();
this.cbxPgName = new System.Windows.Forms.CheckBox();
this.cbxPNandSN = new System.Windows.Forms.CheckBox();
this.pnlLeft.SuspendLayout(); this.pnlLeft.SuspendLayout();
this.gbQuery.SuspendLayout(); this.gbQuery.SuspendLayout();
this.pnlCommands.SuspendLayout(); this.pnlCommands.SuspendLayout();
...@@ -553,6 +555,8 @@ namespace Jst.Report.Download ...@@ -553,6 +555,8 @@ namespace Jst.Report.Download
// //
// gbDownloadConfig // gbDownloadConfig
// //
this.gbDownloadConfig.Controls.Add(this.cbxPNandSN);
this.gbDownloadConfig.Controls.Add(this.cbxPgName);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByAjt); this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByAjt);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByWph); this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByWph);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByBatchNumber); this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByBatchNumber);
...@@ -781,6 +785,26 @@ namespace Jst.Report.Download ...@@ -781,6 +785,26 @@ namespace Jst.Report.Download
this.lblMessage.TabIndex = 8; this.lblMessage.TabIndex = 8;
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// cbxPgName
//
this.cbxPgName.AutoSize = true;
this.cbxPgName.Location = new System.Drawing.Point(674, 29);
this.cbxPgName.Name = "cbxPgName";
this.cbxPgName.Size = new System.Drawing.Size(138, 24);
this.cbxPgName.TabIndex = 13;
this.cbxPgName.Text = "文件名+品名";
this.cbxPgName.UseVisualStyleBackColor = true;
//
// cbxPNandSN
//
this.cbxPNandSN.AutoSize = true;
this.cbxPNandSN.Location = new System.Drawing.Point(467, 30);
this.cbxPNandSN.Name = "cbxPNandSN";
this.cbxPNandSN.Size = new System.Drawing.Size(188, 24);
this.cbxPNandSN.TabIndex = 14;
this.cbxPNandSN.Text = "文件名+品名+批号";
this.cbxPNandSN.UseVisualStyleBackColor = true;
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -874,6 +898,8 @@ namespace Jst.Report.Download ...@@ -874,6 +898,8 @@ namespace Jst.Report.Download
private System.Windows.Forms.TextBox tbxUserName; private System.Windows.Forms.TextBox tbxUserName;
private System.Windows.Forms.Button btnLogout; private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnLogin; private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.CheckBox cbxPgName;
private System.Windows.Forms.CheckBox cbxPNandSN;
} }
} }
...@@ -35,6 +35,10 @@ namespace Jst.Report.Download ...@@ -35,6 +35,10 @@ namespace Jst.Report.Download
private bool _renameFileByAjt = false; private bool _renameFileByAjt = false;
private bool _renameFileByProductName = false;
private bool _renameFileByProductNameAndSN = false;
private string _fileRootPath = string.Empty; private string _fileRootPath = string.Empty;
#endregion #endregion
...@@ -338,6 +342,8 @@ namespace Jst.Report.Download ...@@ -338,6 +342,8 @@ namespace Jst.Report.Download
_renameFileByBatchNumber = cbxRenameFileByBatchNumber.Checked; _renameFileByBatchNumber = cbxRenameFileByBatchNumber.Checked;
_renameFileByWph = cbxRenameFileByWph.Checked; _renameFileByWph = cbxRenameFileByWph.Checked;
_renameFileByAjt = cbxRenameFileByAjt.Checked; _renameFileByAjt = cbxRenameFileByAjt.Checked;
_renameFileByProductName = cbxPgName.Checked;
_renameFileByProductNameAndSN = cbxPNandSN.Checked;
Thread thread = new Thread(download); Thread thread = new Thread(download);
thread.Start(); thread.Start();
} }
...@@ -359,6 +365,17 @@ namespace Jst.Report.Download ...@@ -359,6 +365,17 @@ namespace Jst.Report.Download
lblMessage.Text = $"正在下载报告{result.ReportId},共{_results.Results.Count}条,正在处理第{index2}条...."; lblMessage.Text = $"正在下载报告{result.ReportId},共{_results.Results.Count}条,正在处理第{index2}条....";
}); });
string text = $"{result.ReportId}.pdf"; string text = $"{result.ReportId}.pdf";
if (_renameFileByProductNameAndSN)
{
string Text6 = result.SampleName.Trim();
string Text7 = result.SampleBatchNumber.Trim();
text = $"{result.ReportId} {Text6}{Text7}.pdf";
}
if (_renameFileByProductName)
{
string Text5 = result.SampleName.Trim();
text = $"{result.ReportId} {Text5}.pdf";
}
if (_renameFileByBatchNumber) if (_renameFileByBatchNumber)
{ {
string text2 = result.SampleBatchNumber.Trim(); string text2 = result.SampleBatchNumber.Trim();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment