Commit 3a7dd00c by 任天宇

升级格式

parent d5da2750
...@@ -96,6 +96,7 @@ namespace Jst.Report.Download ...@@ -96,6 +96,7 @@ 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.cbxRenameByDS = new System.Windows.Forms.CheckBox();
this.pnlLeft.SuspendLayout(); this.pnlLeft.SuspendLayout();
this.gbQuery.SuspendLayout(); this.gbQuery.SuspendLayout();
this.pnlCommands.SuspendLayout(); this.pnlCommands.SuspendLayout();
...@@ -555,6 +556,7 @@ namespace Jst.Report.Download ...@@ -555,6 +556,7 @@ namespace Jst.Report.Download
// //
// gbDownloadConfig // gbDownloadConfig
// //
this.gbDownloadConfig.Controls.Add(this.cbxRenameByDS);
this.gbDownloadConfig.Controls.Add(this.cbxPNandSN); this.gbDownloadConfig.Controls.Add(this.cbxPNandSN);
this.gbDownloadConfig.Controls.Add(this.cbxPgName); this.gbDownloadConfig.Controls.Add(this.cbxPgName);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByAjt); this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByAjt);
...@@ -570,7 +572,7 @@ namespace Jst.Report.Download ...@@ -570,7 +572,7 @@ namespace Jst.Report.Download
this.gbDownloadConfig.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.gbDownloadConfig.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbDownloadConfig.Location = new System.Drawing.Point(302, 0); this.gbDownloadConfig.Location = new System.Drawing.Point(302, 0);
this.gbDownloadConfig.Name = "gbDownloadConfig"; this.gbDownloadConfig.Name = "gbDownloadConfig";
this.gbDownloadConfig.Size = new System.Drawing.Size(942, 114); this.gbDownloadConfig.Size = new System.Drawing.Size(942, 121);
this.gbDownloadConfig.TabIndex = 8; this.gbDownloadConfig.TabIndex = 8;
this.gbDownloadConfig.TabStop = false; this.gbDownloadConfig.TabStop = false;
this.gbDownloadConfig.Text = "下载操作"; this.gbDownloadConfig.Text = "下载操作";
...@@ -578,7 +580,7 @@ namespace Jst.Report.Download ...@@ -578,7 +580,7 @@ namespace Jst.Report.Download
// cbxPNandSN // cbxPNandSN
// //
this.cbxPNandSN.AutoSize = true; this.cbxPNandSN.AutoSize = true;
this.cbxPNandSN.Location = new System.Drawing.Point(467, 30); this.cbxPNandSN.Location = new System.Drawing.Point(21, 90);
this.cbxPNandSN.Name = "cbxPNandSN"; this.cbxPNandSN.Name = "cbxPNandSN";
this.cbxPNandSN.Size = new System.Drawing.Size(188, 24); this.cbxPNandSN.Size = new System.Drawing.Size(188, 24);
this.cbxPNandSN.TabIndex = 14; this.cbxPNandSN.TabIndex = 14;
...@@ -588,7 +590,7 @@ namespace Jst.Report.Download ...@@ -588,7 +590,7 @@ namespace Jst.Report.Download
// cbxPgName // cbxPgName
// //
this.cbxPgName.AutoSize = true; this.cbxPgName.AutoSize = true;
this.cbxPgName.Location = new System.Drawing.Point(674, 29); this.cbxPgName.Location = new System.Drawing.Point(567, 61);
this.cbxPgName.Name = "cbxPgName"; this.cbxPgName.Name = "cbxPgName";
this.cbxPgName.Size = new System.Drawing.Size(138, 24); this.cbxPgName.Size = new System.Drawing.Size(138, 24);
this.cbxPgName.TabIndex = 13; this.cbxPgName.TabIndex = 13;
...@@ -598,7 +600,7 @@ namespace Jst.Report.Download ...@@ -598,7 +600,7 @@ namespace Jst.Report.Download
// cbxRenameFileByAjt // cbxRenameFileByAjt
// //
this.cbxRenameFileByAjt.AutoSize = true; this.cbxRenameFileByAjt.AutoSize = true;
this.cbxRenameFileByAjt.Location = new System.Drawing.Point(630, 72); this.cbxRenameFileByAjt.Location = new System.Drawing.Point(215, 90);
this.cbxRenameFileByAjt.Name = "cbxRenameFileByAjt"; this.cbxRenameFileByAjt.Name = "cbxRenameFileByAjt";
this.cbxRenameFileByAjt.Size = new System.Drawing.Size(128, 24); this.cbxRenameFileByAjt.Size = new System.Drawing.Size(128, 24);
this.cbxRenameFileByAjt.TabIndex = 12; this.cbxRenameFileByAjt.TabIndex = 12;
...@@ -608,17 +610,18 @@ namespace Jst.Report.Download ...@@ -608,17 +610,18 @@ namespace Jst.Report.Download
// cbxRenameFileByWph // cbxRenameFileByWph
// //
this.cbxRenameFileByWph.AutoSize = true; this.cbxRenameFileByWph.AutoSize = true;
this.cbxRenameFileByWph.Location = new System.Drawing.Point(487, 72); this.cbxRenameFileByWph.Location = new System.Drawing.Point(433, 61);
this.cbxRenameFileByWph.Name = "cbxRenameFileByWph"; this.cbxRenameFileByWph.Name = "cbxRenameFileByWph";
this.cbxRenameFileByWph.Size = new System.Drawing.Size(128, 24); this.cbxRenameFileByWph.Size = new System.Drawing.Size(128, 24);
this.cbxRenameFileByWph.TabIndex = 11; this.cbxRenameFileByWph.TabIndex = 11;
this.cbxRenameFileByWph.Text = "唯品会格式"; this.cbxRenameFileByWph.Text = "唯品会格式";
this.cbxRenameFileByWph.UseVisualStyleBackColor = true; this.cbxRenameFileByWph.UseVisualStyleBackColor = true;
this.cbxRenameFileByWph.CheckedChanged += new System.EventHandler(this.cbxRenameFileByWph_CheckedChanged);
// //
// cbxRenameFileByBatchNumber // cbxRenameFileByBatchNumber
// //
this.cbxRenameFileByBatchNumber.AutoSize = true; this.cbxRenameFileByBatchNumber.AutoSize = true;
this.cbxRenameFileByBatchNumber.Location = new System.Drawing.Point(326, 72); this.cbxRenameFileByBatchNumber.Location = new System.Drawing.Point(289, 61);
this.cbxRenameFileByBatchNumber.Name = "cbxRenameFileByBatchNumber"; this.cbxRenameFileByBatchNumber.Name = "cbxRenameFileByBatchNumber";
this.cbxRenameFileByBatchNumber.Size = new System.Drawing.Size(138, 24); this.cbxRenameFileByBatchNumber.Size = new System.Drawing.Size(138, 24);
this.cbxRenameFileByBatchNumber.TabIndex = 10; this.cbxRenameFileByBatchNumber.TabIndex = 10;
...@@ -628,7 +631,7 @@ namespace Jst.Report.Download ...@@ -628,7 +631,7 @@ namespace Jst.Report.Download
// cbxGroupByProductBrand // cbxGroupByProductBrand
// //
this.cbxGroupByProductBrand.AutoSize = true; this.cbxGroupByProductBrand.AutoSize = true;
this.cbxGroupByProductBrand.Location = new System.Drawing.Point(171, 72); this.cbxGroupByProductBrand.Location = new System.Drawing.Point(155, 61);
this.cbxGroupByProductBrand.Name = "cbxGroupByProductBrand"; this.cbxGroupByProductBrand.Name = "cbxGroupByProductBrand";
this.cbxGroupByProductBrand.Size = new System.Drawing.Size(128, 24); this.cbxGroupByProductBrand.Size = new System.Drawing.Size(128, 24);
this.cbxGroupByProductBrand.TabIndex = 9; this.cbxGroupByProductBrand.TabIndex = 9;
...@@ -638,7 +641,7 @@ namespace Jst.Report.Download ...@@ -638,7 +641,7 @@ namespace Jst.Report.Download
// cbxGroupByProductJudgement // cbxGroupByProductJudgement
// //
this.cbxGroupByProductJudgement.AutoSize = true; this.cbxGroupByProductJudgement.AutoSize = true;
this.cbxGroupByProductJudgement.Location = new System.Drawing.Point(21, 72); this.cbxGroupByProductJudgement.Location = new System.Drawing.Point(21, 61);
this.cbxGroupByProductJudgement.Name = "cbxGroupByProductJudgement"; this.cbxGroupByProductJudgement.Name = "cbxGroupByProductJudgement";
this.cbxGroupByProductJudgement.Size = new System.Drawing.Size(128, 24); this.cbxGroupByProductJudgement.Size = new System.Drawing.Size(128, 24);
this.cbxGroupByProductJudgement.TabIndex = 8; this.cbxGroupByProductJudgement.TabIndex = 8;
...@@ -652,7 +655,7 @@ namespace Jst.Report.Download ...@@ -652,7 +655,7 @@ namespace Jst.Report.Download
this.btnDownload.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnDownload.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDownload.Location = new System.Drawing.Point(842, 26); this.btnDownload.Location = new System.Drawing.Point(842, 26);
this.btnDownload.Name = "btnDownload"; this.btnDownload.Name = "btnDownload";
this.btnDownload.Size = new System.Drawing.Size(97, 85); this.btnDownload.Size = new System.Drawing.Size(97, 92);
this.btnDownload.TabIndex = 7; this.btnDownload.TabIndex = 7;
this.btnDownload.Text = "开始下载电子报告"; this.btnDownload.Text = "开始下载电子报告";
this.btnDownload.UseVisualStyleBackColor = true; this.btnDownload.UseVisualStyleBackColor = true;
...@@ -693,9 +696,9 @@ namespace Jst.Report.Download ...@@ -693,9 +696,9 @@ namespace Jst.Report.Download
this.panel1.Controls.Add(this.dgvReports); this.panel1.Controls.Add(this.dgvReports);
this.panel1.Controls.Add(this.lblMessage); this.panel1.Controls.Add(this.lblMessage);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(302, 114); this.panel1.Location = new System.Drawing.Point(302, 121);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(942, 531); this.panel1.Size = new System.Drawing.Size(942, 524);
this.panel1.TabIndex = 9; this.panel1.TabIndex = 9;
// //
// dgvReports // dgvReports
...@@ -720,7 +723,7 @@ namespace Jst.Report.Download ...@@ -720,7 +723,7 @@ namespace Jst.Report.Download
this.dgvReports.Name = "dgvReports"; this.dgvReports.Name = "dgvReports";
this.dgvReports.ReadOnly = true; this.dgvReports.ReadOnly = true;
this.dgvReports.RowTemplate.Height = 23; this.dgvReports.RowTemplate.Height = 23;
this.dgvReports.Size = new System.Drawing.Size(942, 489); this.dgvReports.Size = new System.Drawing.Size(942, 482);
this.dgvReports.TabIndex = 11; this.dgvReports.TabIndex = 11;
// //
// colReportId // colReportId
...@@ -799,12 +802,22 @@ namespace Jst.Report.Download ...@@ -799,12 +802,22 @@ namespace Jst.Report.Download
this.lblMessage.BackColor = System.Drawing.SystemColors.ActiveCaption; this.lblMessage.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.lblMessage.Dock = System.Windows.Forms.DockStyle.Bottom; this.lblMessage.Dock = System.Windows.Forms.DockStyle.Bottom;
this.lblMessage.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMessage.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMessage.Location = new System.Drawing.Point(0, 489); this.lblMessage.Location = new System.Drawing.Point(0, 482);
this.lblMessage.Name = "lblMessage"; this.lblMessage.Name = "lblMessage";
this.lblMessage.Size = new System.Drawing.Size(942, 42); this.lblMessage.Size = new System.Drawing.Size(942, 42);
this.lblMessage.TabIndex = 8; this.lblMessage.TabIndex = 8;
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// cbxRenameByDS
//
this.cbxRenameByDS.AutoSize = true;
this.cbxRenameByDS.Location = new System.Drawing.Point(349, 90);
this.cbxRenameByDS.Name = "cbxRenameByDS";
this.cbxRenameByDS.Size = new System.Drawing.Size(68, 24);
this.cbxRenameByDS.TabIndex = 15;
this.cbxRenameByDS.Text = "笛莎";
this.cbxRenameByDS.UseVisualStyleBackColor = true;
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -816,7 +829,7 @@ namespace Jst.Report.Download ...@@ -816,7 +829,7 @@ namespace Jst.Report.Download
this.Controls.Add(this.pnlLeft); this.Controls.Add(this.pnlLeft);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmMain"; this.Name = "FrmMain";
this.Text = "江苏纺检院电子报告下载客户端V2.03"; this.Text = "江苏纺检院电子报告下载客户端V2.04";
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
this.pnlLeft.ResumeLayout(false); this.pnlLeft.ResumeLayout(false);
this.gbQuery.ResumeLayout(false); this.gbQuery.ResumeLayout(false);
...@@ -900,6 +913,7 @@ namespace Jst.Report.Download ...@@ -900,6 +913,7 @@ namespace Jst.Report.Download
private System.Windows.Forms.Button btnLogin; private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.CheckBox cbxPgName; private System.Windows.Forms.CheckBox cbxPgName;
private System.Windows.Forms.CheckBox cbxPNandSN; private System.Windows.Forms.CheckBox cbxPNandSN;
private System.Windows.Forms.CheckBox cbxRenameByDS;
} }
} }
...@@ -38,6 +38,7 @@ namespace Jst.Report.Download ...@@ -38,6 +38,7 @@ namespace Jst.Report.Download
private bool _renameFileByProductName = false; private bool _renameFileByProductName = false;
private bool _renameFileByProductNameAndSN = false; private bool _renameFileByProductNameAndSN = false;
private bool _renameFileByDS = false;
private string _fileRootPath = string.Empty; private string _fileRootPath = string.Empty;
#endregion #endregion
...@@ -344,6 +345,7 @@ namespace Jst.Report.Download ...@@ -344,6 +345,7 @@ namespace Jst.Report.Download
_renameFileByAjt = cbxRenameFileByAjt.Checked; _renameFileByAjt = cbxRenameFileByAjt.Checked;
_renameFileByProductName = cbxPgName.Checked; _renameFileByProductName = cbxPgName.Checked;
_renameFileByProductNameAndSN = cbxPNandSN.Checked; _renameFileByProductNameAndSN = cbxPNandSN.Checked;
_renameFileByDS = cbxRenameByDS.Checked;
Thread thread = new Thread(download); Thread thread = new Thread(download);
thread.Start(); thread.Start();
} }
...@@ -417,6 +419,18 @@ namespace Jst.Report.Download ...@@ -417,6 +419,18 @@ namespace Jst.Report.Download
} }
text = $"{SamplingDate}+江苏纺检+{ProductBrand}+{ProductName}+{BatchNumber}+{ProductJudgement}.pdf"; text = $"{SamplingDate}+江苏纺检+{ProductBrand}+{ProductName}+{BatchNumber}+{ProductJudgement}.pdf";
} }
if (_renameFileByDS)
{
string BatchNumber = result.SampleBatchNumber.Trim();
string ProductBrand = result.SampleBrand.Trim();
string ProductName = result.SampleName.Trim();
string ProductJudgement = result.TestJudgement.Trim();
if (ProductJudgement.IsNullOrEmpty() || ProductJudgement == "/" || ProductJudgement == "\\")
{
ProductJudgement = "不判定";
}
text = $"+江苏纺检+{ProductName}+{BatchNumber}+{ProductJudgement}.pdf";
}
text = text.Replace("\\", "_").Replace("/", "_").Replace("*", "_"); text = text.Replace("\\", "_").Replace("/", "_").Replace("*", "_");
if (_groupByProductJudgement) if (_groupByProductJudgement)
{ {
...@@ -458,8 +472,12 @@ namespace Jst.Report.Download ...@@ -458,8 +472,12 @@ namespace Jst.Report.Download
btnDownload.Enabled = true; btnDownload.Enabled = true;
}); });
} }
#endregion #endregion
private void cbxRenameFileByWph_CheckedChanged(object sender, EventArgs e)
{
}
} }
} }
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2022.11140")] [assembly: AssemblyVersion("5.4.2023.07200")]
[assembly: AssemblyFileVersion("5.4.2022.11140")] [assembly: AssemblyFileVersion("5.4.2022.07200")]
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