Browse Source

1.增加历史LAB查询菜单

2.增加服务器生成ASN功能
3.报文服务监控报文是否超时未生成
4.STD查询 起始日期默认值调整
master
hao.jin 3 years ago
parent
commit
8a5e28b600
  1. 25
      Stone.WinForm/Stone.DataService/Stone.DataService.Biz/Bill/F_STD_Check.cs
  2. 86
      Stone.WinForm/Stone.WinBiz/JISAdmin/F_EDI_JIS5000Sequence.cs
  3. 7
      Stone.WinForm/Stone.WinForm/frmMain.cs
  4. 282
      Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.Designer.cs
  5. 113
      Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.cs
  6. 120
      Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.resx
  7. 1
      Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_STD.cs
  8. 9
      Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

25
Stone.WinForm/Stone.DataService/Stone.DataService.Biz/Bill/F_STD_Check.cs

@ -22,6 +22,10 @@ namespace Stone.DataService.Biz.Bill
string BarCode = cmd.Pars[5]; string BarCode = cmd.Pars[5];
string PackageNo = PackageNo1.Substring(0, PackageNo1.Length - 3); string PackageNo = PackageNo1.Substring(0, PackageNo1.Length - 3);
string leftPackageNo2 = PackageNo2.Substring(0, PackageNo1.Length - 3);
string RightPackageNo1 = PackageNo1.Substring(PackageNo1.Length - 2);
string RightPackageNo2 = PackageNo2.Substring(PackageNo2.Length - 2);
LocalDBService db = null; LocalDBService db = null;
try try
@ -32,6 +36,27 @@ namespace Stone.DataService.Biz.Bill
Entity_t_JIS_VDA t_JIS_VDA = new Entity_t_JIS_VDA(db); Entity_t_JIS_VDA t_JIS_VDA = new Entity_t_JIS_VDA(db);
Entity_t_VerifyBill t_VerifyBill = new Entity_t_VerifyBill(db); Entity_t_VerifyBill t_VerifyBill = new Entity_t_VerifyBill(db);
if (PackageNo != leftPackageNo2)
{
throw new Exception($"装箱单号1 {PackageNo1} 和装箱单号2{PackageNo2} 不匹配!");
}
if (RightPackageNo1 == RightPackageNo2)
{
throw new Exception($"装箱单号1 {PackageNo} 和装箱单号2{leftPackageNo2} 的流水号重复!");
}
else
{
if (RightPackageNo1 != "01" && RightPackageNo1 != "02")
{
throw new Exception($"装箱单号1 {PackageNo1} 的流水号无效!");
}
if (RightPackageNo2 != "01" && RightPackageNo2 != "02")
{
throw new Exception($"装箱单号1 {PackageNo2} 的流水号无效!");
}
}
DataTable dtVDA = t_JIS_VDA.GetData($"[PackageNo]='{PackageNo}'").Tables[0]; DataTable dtVDA = t_JIS_VDA.GetData($"[PackageNo]='{PackageNo}'").Tables[0];
if (dtVDA.Rows.Count == 0) if (dtVDA.Rows.Count == 0)
throw new Exception($"装箱单号 {PackageNo} 在系统中不存在"); throw new Exception($"装箱单号 {PackageNo} 在系统中不存在");

86
Stone.WinForm/Stone.WinBiz/JISAdmin/F_EDI_JIS5000Sequence.cs

@ -156,6 +156,53 @@ namespace Stone.WinBiz.JISAdmin
} }
} }
try
{
#region 监控ASN报文是否成功生成
var db = new LocalDBService();
var strAsnUpLoadsql = "select top 1 * from t_ASN_UPLOAD where isCreate = 0 order by uid ";
var dsAsnUpLoad = db.Exec_DataSet(strAsnUpLoadsql);
if (dsAsnUpLoad.Tables[0].Rows.Count > 0)
{
//获取 ASN报文上传的时间
var alertTime = DateTime.Parse(dsAsnUpLoad.Tables[0].Rows[0]["AlertTime"].ToString());
var nowTime = DateTime.Now;
TimeSpan timeSpan = nowTime - alertTime;
var min = timeSpan.TotalMinutes;
//超出10分钟 报文未生成,则进行预警预警
if (min > 10)
{
var strErrTypeCode = "08";
var strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '" + strErrTypeCode + "'" +
" order by id desc";
var dsErrMail = db.Exec_DataSet(strsql);
if (dsErrMail.Tables[0].Rows.Count > 0)
{
//获取收件人
var mailTo = dsErrMail.Tables[0].Rows[0]["ToPerson"].ToString();
var errLvevl = dsErrMail.Tables[0].Rows[0]["ErrLevel"].ToString();
var errTypeDesc = dsErrMail.Tables[0].Rows[0]["ErrTypeDesc"].ToString();
//设置邮件标题
var title = "";
title = "服务器器ASN报文生成失败-错误级别-" + errLvevl + "-" + errTypeDesc;
var strDetails = "";
var asnNum = dsAsnUpLoad.Tables[0].Rows[0]["AsnNum"].ToString();
strDetails = "ASN【" + asnNum + "】已超出10分钟未生成报文!";
F_Mail.Send(title, strDetails, mailTo);
}
//更新报警时间
strsql = "Update t_ASN_UPLOAD set AlertTime = getdate() " +
" where isCreate = 0";
db.Exec_NonQuery(strsql);
}
}
#endregion
}
catch (Exception e)
{
F_Mail.Send("ASN报文生成监控异常", "监控ASN报文是否生成失败 " + e.ToString(), "JLi50@lear.com");
}
} }
@ -427,6 +474,7 @@ namespace Stone.WinBiz.JISAdmin
if (strPartMsg != "") if (strPartMsg != "")
{ {
strPartMsg = filename + " " + strPartMsg;
var strErrTypeCode = errType.ToString("00"); var strErrTypeCode = errType.ToString("00");
var strsql = "select top 1 * from t_ErrTypeLevel" + var strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '" + strErrTypeCode + "'" + " where Code = '" + strErrTypeCode + "'" +
@ -445,44 +493,6 @@ namespace Stone.WinBiz.JISAdmin
} }
} }
#region 监控ASN报文是否成功生成
var strAsnUpLoadsql = "select top 1 * from t_ASN_UPLOAD where isCreate = 0 order by uid ";
var dsAsnUpLoad = db.Exec_DataSet(strAsnUpLoadsql);
if (dsAsnUpLoad.Tables[0].Rows.Count > 0)
{
//获取 ASN报文上传的时间
var createTime = DateTime.Parse(dsAsnUpLoad.Tables[0].Rows[0]["CreateTime"].ToString());
var nowTime = DateTime.Now;
TimeSpan timeSpan = nowTime - createTime;
var min = timeSpan.TotalMinutes;
//超出10分钟 报文未生成,则进行预警预警
if (min > 10)
{
var strErrTypeCode = "08";
var strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '" + strErrTypeCode + "'" +
" order by id desc";
var dsErrMail = db.Exec_DataSet(strsql);
if (dsErrMail.Tables[0].Rows.Count > 0)
{
//获取收件人
var mailTo = dsErrMail.Tables[0].Rows[0]["ToPerson"].ToString();
var errLvevl = dsErrMail.Tables[0].Rows[0]["ErrLevel"].ToString();
var errTypeDesc = dsErrMail.Tables[0].Rows[0]["ErrTypeDesc"].ToString();
//设置邮件标题
var title = "";
title = "服务器器ASN报文生成失败-错误级别-" + errLvevl + "-" + errTypeDesc;
var strDetails = "";
var asnNum = dsAsnUpLoad.Tables[0].Rows[0]["AsnNum"].ToString();
strDetails = "ASN【" + asnNum + "】已超出10分钟未生成报文!";
F_Mail.Send(title, strDetails, mailTo);
}
}
}
#endregion
Msg = strPartMsg; Msg = strPartMsg;
} }

7
Stone.WinForm/Stone.WinForm/frmMain.cs

@ -204,9 +204,10 @@ namespace Stone.WinForm
if (e.Node.Text == "LAB历史版本") if (e.Node.Text == "LAB历史版本")
{ {
Stone.WinModule.JISData.frmJISLAB_All frm = new WinModule.JISData.frmJISLAB_All(); // Stone.WinModule.JISData.frmJISLAB_All frm = new WinModule.JISData.frmJISLAB_All();
frm.m_Base = new WinBiz.JISData.F_JIS_LAB_All(); // frm.m_Base = new WinBiz.JISData.F_JIS_LAB_All();
frm.init(); Stone.WinModule.JISData.frmJISLAB_All_new frm = new WinModule.JISData.frmJISLAB_All_new();
// frm.init();
ShowWindow(frm); ShowWindow(frm);
} }

282
Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.Designer.cs

@ -0,0 +1,282 @@
namespace Stone.WinModule.JISData
{
partial class frmJISLAB_All_new
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.lblState = new System.Windows.Forms.Label();
this.btnExport = new System.Windows.Forms.Button();
this.btnQuery = new System.Windows.Forms.Button();
this.txtReleaseDate2 = new System.Windows.Forms.DateTimePicker();
this.txtReleaseDate1 = new System.Windows.Forms.DateTimePicker();
this.label3 = new System.Windows.Forms.Label();
this.txtStartDate2 = new System.Windows.Forms.DateTimePicker();
this.txtStartDate1 = new System.Windows.Forms.DateTimePicker();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtPartNumber = new Stone.WinModule.MyControl.MySelectTextBox();
this.dgrdView = new System.Windows.Forms.DataGridView();
this.tbReleaseID1 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.tbReleaseID2 = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgrdView)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.tbReleaseID2);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tbReleaseID1);
this.panel1.Controls.Add(this.lblState);
this.panel1.Controls.Add(this.btnExport);
this.panel1.Controls.Add(this.btnQuery);
this.panel1.Controls.Add(this.txtReleaseDate2);
this.panel1.Controls.Add(this.txtReleaseDate1);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.txtStartDate2);
this.panel1.Controls.Add(this.txtStartDate1);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.txtPartNumber);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1494, 118);
this.panel1.TabIndex = 1;
//
// lblState
//
this.lblState.AutoSize = true;
this.lblState.Location = new System.Drawing.Point(1046, 79);
this.lblState.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblState.Name = "lblState";
this.lblState.Size = new System.Drawing.Size(71, 18);
this.lblState.TabIndex = 10;
this.lblState.Text = "记录:0";
//
// btnExport
//
this.btnExport.Location = new System.Drawing.Point(1186, 18);
this.btnExport.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(159, 34);
this.btnExport.TabIndex = 9;
this.btnExport.Text = "导出";
this.btnExport.UseVisualStyleBackColor = true;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// btnQuery
//
this.btnQuery.Location = new System.Drawing.Point(1018, 18);
this.btnQuery.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnQuery.Name = "btnQuery";
this.btnQuery.Size = new System.Drawing.Size(159, 34);
this.btnQuery.TabIndex = 8;
this.btnQuery.Text = "查询";
this.btnQuery.UseVisualStyleBackColor = true;
this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
//
// txtReleaseDate2
//
this.txtReleaseDate2.Location = new System.Drawing.Point(345, 69);
this.txtReleaseDate2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtReleaseDate2.Name = "txtReleaseDate2";
this.txtReleaseDate2.Size = new System.Drawing.Size(188, 28);
this.txtReleaseDate2.TabIndex = 7;
//
// txtReleaseDate1
//
this.txtReleaseDate1.Location = new System.Drawing.Point(146, 69);
this.txtReleaseDate1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtReleaseDate1.Name = "txtReleaseDate1";
this.txtReleaseDate1.Size = new System.Drawing.Size(188, 28);
this.txtReleaseDate1.TabIndex = 6;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(38, 75);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(98, 18);
this.label3.TabIndex = 5;
this.label3.Text = "发布日期:";
//
// txtStartDate2
//
this.txtStartDate2.Location = new System.Drawing.Point(345, 20);
this.txtStartDate2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtStartDate2.Name = "txtStartDate2";
this.txtStartDate2.Size = new System.Drawing.Size(188, 28);
this.txtStartDate2.TabIndex = 4;
//
// txtStartDate1
//
this.txtStartDate1.Location = new System.Drawing.Point(146, 20);
this.txtStartDate1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtStartDate1.Name = "txtStartDate1";
this.txtStartDate1.Size = new System.Drawing.Size(188, 28);
this.txtStartDate1.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(38, 26);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 18);
this.label2.TabIndex = 2;
this.label2.Text = "需求日期:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(584, 26);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 18);
this.label1.TabIndex = 1;
this.label1.Text = "零件号:";
//
// txtPartNumber
//
this.txtPartNumber.Location = new System.Drawing.Point(680, 20);
this.txtPartNumber.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.txtPartNumber.Name = "txtPartNumber";
this.txtPartNumber.ReadOnly = false;
this.txtPartNumber.Size = new System.Drawing.Size(189, 28);
this.txtPartNumber.TabIndex = 0;
this.txtPartNumber.OnSelectClick += new System.EventHandler(this.txtPartNumber_OnSelectClick);
//
// dgrdView
//
this.dgrdView.AllowUserToAddRows = false;
this.dgrdView.AllowUserToOrderColumns = true;
this.dgrdView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgrdView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgrdView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgrdView.DefaultCellStyle = dataGridViewCellStyle2;
this.dgrdView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgrdView.Location = new System.Drawing.Point(0, 118);
this.dgrdView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dgrdView.MultiSelect = false;
this.dgrdView.Name = "dgrdView";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgrdView.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dgrdView.RowTemplate.Height = 23;
this.dgrdView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgrdView.Size = new System.Drawing.Size(1494, 730);
this.dgrdView.TabIndex = 17;
//
// tbReleaseID1
//
this.tbReleaseID1.Location = new System.Drawing.Point(680, 72);
this.tbReleaseID1.Name = "tbReleaseID1";
this.tbReleaseID1.Size = new System.Drawing.Size(153, 28);
this.tbReleaseID1.TabIndex = 11;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(557, 76);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(107, 18);
this.label4.TabIndex = 12;
this.label4.Text = "ReleaseID:";
//
// tbReleaseID2
//
this.tbReleaseID2.Location = new System.Drawing.Point(855, 73);
this.tbReleaseID2.Name = "tbReleaseID2";
this.tbReleaseID2.Size = new System.Drawing.Size(153, 28);
this.tbReleaseID2.TabIndex = 13;
//
// frmJISLAB_All_new
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.ClientSize = new System.Drawing.Size(1494, 848);
this.Controls.Add(this.dgrdView);
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.Name = "frmJISLAB_All_new";
this.TabText = "LAB历史版本";
this.Text = "LAB历史版本";
this.Load += new System.EventHandler(this.frmJISLABCompare_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgrdView)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
public System.Windows.Forms.DataGridView dgrdView;
private System.Windows.Forms.Label lblState;
private System.Windows.Forms.Button btnExport;
private System.Windows.Forms.Button btnQuery;
private System.Windows.Forms.DateTimePicker txtReleaseDate2;
private System.Windows.Forms.DateTimePicker txtReleaseDate1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DateTimePicker txtStartDate2;
private System.Windows.Forms.DateTimePicker txtStartDate1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private MyControl.MySelectTextBox txtPartNumber;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tbReleaseID1;
private System.Windows.Forms.TextBox tbReleaseID2;
}
}

113
Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.cs

@ -0,0 +1,113 @@
using Stone.Common;
using Stone.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Gm_WMS.DataAccess.DataService;
namespace Stone.WinModule.JISData
{
public partial class frmJISLAB_All_new : Stone.WinModule.frmBase
{
public frmJISLAB_All_new()
{
InitializeComponent();
this.txtStartDate1.Value = DateTime.Now;
this.txtStartDate2.Value = DateTime.Now.AddDays(10);
this.txtReleaseDate1.Value = DateTime.Now.AddDays(-7);
this.txtReleaseDate2.Value = DateTime.Now;
}
private void frmJISLABCompare_Load(object sender, EventArgs e)
{
}
private void txtPartNumber_OnSelectClick(object sender, EventArgs e)
{
try
{
Stone.WinModule.BasicData.frmProduct frm = new BasicData.frmProduct();
frm.m_Base = new WinBiz.BasicData.F_Product();
frm.init();
if (frm.ShowSelect("") == DialogResult.OK)
{
this.txtPartNumber.Text = frm.SelectValue;
}
frm.Dispose();
}
catch (Exception ex)
{
MyMessageBox.ShowErrorMessage(ex.Message);
}
}
private void btnQuery_Click(object sender, EventArgs e)
{
try
{
string PartNumber = this.txtPartNumber.Text.Trim();
string StartDate1 = this.txtStartDate1.Value.ToString("yyyy-MM-dd");
string StartDate2 = this.txtStartDate2.Value.ToString("yyyy-MM-dd");
string ReleaseDate1 = this.txtReleaseDate1.Value.ToString("yyyy-MM-dd 00:00:00");
string ReleaseDate2 = this.txtReleaseDate2.Value.ToString("yyyy-MM-dd 23:59:59");
string ReleaseID1 = this.tbReleaseID1.Text.Trim();
string ReleaseID2 = this.tbReleaseID2.Text.Trim();
var strsql = "";
var strWhere = "";
var strOrderBy = "";
strsql = "select fileType as '工厂',partNumber as '零件号',Description as '零件描述',Variant as '车型',StartDate as '需求日期起'," +
"EndDate as '需求日期止',quantity as '需求数量',quantity_print as '发货数量',quantity_diff as '发货差异',cumulativeQuantity as '累计收货数量'," +
"releaseId as '版本号',IsStandard as '是否STD件',PackNumer as '包装数量',location as '卸货点',time as '发布日期'," +
"locationCode as '卸货点代码',orderNumber as '采购订单号',addtime as '解析时间',filename as '文件名'" +
" from v_JIS_Lab_All where 1 =1 ";
strOrderBy = " order by [releaseId] asc, [StartDate] asc";
strWhere += " and StartDate >= '" + StartDate1 + "'";
strWhere += " and StartDate <= '" + StartDate2 + "'";
strWhere += " and Time >= '" + ReleaseDate1 + "'";
strWhere += " and Time <= '" + ReleaseDate2 + "'";
if (!string.IsNullOrEmpty(PartNumber))
{
strWhere += " and PartNumber = '" + PartNumber + "'";
}
if (!string.IsNullOrEmpty(ReleaseID1))
{
strWhere += " and releaseId >= '" + ReleaseID1 + "'";
}
if (!string.IsNullOrEmpty(ReleaseID1))
{
strWhere += " and releaseId <= '" + ReleaseID2 + "'";
}
strsql += strWhere;
strsql += strOrderBy;
DataTable dtShow = new DataTable();
var db = new LocalDBService();
dtShow = db.Exec_DataSet(strsql).Tables[0];
this.dgrdView.DataSource = dtShow;
this.lblState.Text = "记录:" + dtShow.Rows.Count;
}
catch (Exception ex)
{
MyMessageBox.ShowErrorMessage(ex.Message);
}
}
private void btnExport_Click(object sender, EventArgs e)
{
MyExport.ShowExport(this.dgrdView);
}
}
}

120
Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_All_new.resx

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

1
Stone.WinForm/Stone.WinModule/JISData/frmJISLAB_STD.cs

@ -31,6 +31,7 @@ namespace Stone.WinModule.JISData
this.txtPackageGroupName.ValueMember = "Str"; this.txtPackageGroupName.ValueMember = "Str";
this.dateTimePicker2.Value = DateTime.Now.AddYears(2); this.dateTimePicker2.Value = DateTime.Now.AddYears(2);
this.dateTimePicker1.Value = DateTime.Now.AddDays(-13);
} }

9
Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

@ -275,6 +275,12 @@
<Compile Include="JISData\frmJISASA_Input_Info.Designer.cs"> <Compile Include="JISData\frmJISASA_Input_Info.Designer.cs">
<DependentUpon>frmJISASA_Input_Info.cs</DependentUpon> <DependentUpon>frmJISASA_Input_Info.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="JISData\frmJISLAB_All_new.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="JISData\frmJISLAB_All_new.Designer.cs">
<DependentUpon>frmJISLAB_All_new.cs</DependentUpon>
</Compile>
<Compile Include="JISData\frmJISLABCompare.cs"> <Compile Include="JISData\frmJISLABCompare.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -713,6 +719,9 @@
<EmbeddedResource Include="JISData\frmJISASA_Input_Info.resx"> <EmbeddedResource Include="JISData\frmJISASA_Input_Info.resx">
<DependentUpon>frmJISASA_Input_Info.cs</DependentUpon> <DependentUpon>frmJISASA_Input_Info.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="JISData\frmJISLAB_All_new.resx">
<DependentUpon>frmJISLAB_All_new.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="JISData\frmJISLABCompare.resx"> <EmbeddedResource Include="JISData\frmJISLABCompare.resx">
<DependentUpon>frmJISLABCompare.cs</DependentUpon> <DependentUpon>frmJISLABCompare.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

Loading…
Cancel
Save