Browse Source

1.累计发货数量 增加最后一次发货数量、最后发货时间、最后发货的ASN号

2.ASN上传时,影响累计发货数量
3.ASN撤销时,影响累计发货数量
4.号码预分配菜单 增加只查询未全部分配功能
5.生成Pre-DN时,校验原ASN上传时的校验项
6.ASN上传时,只校验是否有新LAB进来。即,校验发货数量和需求数量
7.LAB解析的预警邮件分人来发;
8.增加解析报错处理菜单 只能处理自己负责的错误信息;预警类型中增加对应的操作者
master
JinH 3 years ago
parent
commit
0b8495cbf5
  1. BIN
      Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll
  2. 27
      Stone.WinForm/Stone.Entity/Entity_t_ErrLog.cs
  3. 1
      Stone.WinForm/Stone.Entity/Stone.Entity.csproj
  4. 62
      Stone.WinForm/Stone.WinBiz/BasicData/F_ErrLog.cs
  5. 10
      Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs
  6. 10
      Stone.WinForm/Stone.WinBiz/BasicData/F_PartOutQty.cs
  7. 181
      Stone.WinForm/Stone.WinBiz/JISAdmin/F_EDI_JIS5000Sequence.cs
  8. 1
      Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
  9. 9
      Stone.WinForm/Stone.WinForm/frmMain.cs
  10. 81
      Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.Designer.cs
  11. 81
      Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.cs
  12. 180
      Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.resx
  13. 83
      Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevelDetail.Designer.cs
  14. 5
      Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevelDetail.cs
  15. 38
      Stone.WinForm/Stone.WinModule/BasicData/frmPartOutQtyDetail.Designer.cs
  16. 17
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.Designer.cs
  17. 40
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs
  18. 2
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx
  19. 86
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
  20. 9
      Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

BIN
Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll

Binary file not shown.

27
Stone.WinForm/Stone.Entity/Entity_t_ErrLog.cs

@ -0,0 +1,27 @@
using Gm_WMS.DataAccess.DataService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Stone.Entity
{
public class Entity_t_ErrLog : EntityBase
{
public static string TableNameNew = "t_Error_Log";
public Entity_t_ErrLog()
{
base.TableName = TableNameNew;
base.Init();
}
public Entity_t_ErrLog(LocalDBService myDB)
{
base.db = myDB;
base.TableName = TableNameNew;
base.Init();
}
}
}

1
Stone.WinForm/Stone.Entity/Stone.Entity.csproj

@ -62,6 +62,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="EntityBase.cs" /> <Compile Include="EntityBase.cs" />
<Compile Include="Entity_t_ErrLog.cs" />
<Compile Include="Entity_t_ErrTypeLevel.cs" /> <Compile Include="Entity_t_ErrTypeLevel.cs" />
<Compile Include="Entity_t_PartOutQty.cs" /> <Compile Include="Entity_t_PartOutQty.cs" />
<Compile Include="Entity_t_ShipingVerification.cs" /> <Compile Include="Entity_t_ShipingVerification.cs" />

62
Stone.WinForm/Stone.WinBiz/BasicData/F_ErrLog.cs

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Stone.Entity;
using Gm_WMS.DataAccess.DataService;
using Stone.Common;
namespace Stone.WinBiz.BasicData
{
public class F_ErrLog : F_Base
{
public F_ErrLog()
{
this.type = "ErrLog";
this.name = "系统设置_预警错误处理";
this.entity = new Entity_t_ErrLog();
}
public override void GetView(DataGridView dgv)
{
base.GetView(dgv);
dgv.Columns["ID"].HeaderText = "ID";
dgv.Columns["OperCode"].HeaderText = "操作者";
dgv.Columns["Msg"].HeaderText = "预警信息";
dgv.Columns["CreateTime"].HeaderText = "创建时间";
dgv.Columns["IsClose"].HeaderText = "是否处理";
}
public override void Checking(DataRow drData, bool isNew)
{
base.Checking(drData, isNew);
}
public override void InputData(DataSet dsData, LocalDBService db)
{
Entity_t_ErrLog t_Input = new Entity_t_ErrLog(db);
DataRow drInput = null;
foreach (DataRow drData in dsData.Tables[0].Rows)
{
drInput = t_Input.Table.NewRow();
drInput["ID"] = drData["ID"].ToString().Trim();
drInput["OperCode"] = drData["操作者"].ToString().Trim();
drInput["Msg"] = drData["预警信息"].ToString().Trim();
drInput["CreateTime"] = drData["创建时间"].ToString().Trim();
drInput["IsClose"] = drData["是否处理"].ToString().Trim();
if (drInput["OperCode"].ToString().Trim() == "")
throw new Exception("代码不能为空!");
t_Input.Add(drInput);
}
}
}
}

10
Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs

@ -27,7 +27,7 @@ namespace Stone.WinBiz.BasicData
dgv.Columns["ErrTypeDesc"].HeaderText = "预警类型"; dgv.Columns["ErrTypeDesc"].HeaderText = "预警类型";
dgv.Columns["ErrLevel"].HeaderText = "级别"; dgv.Columns["ErrLevel"].HeaderText = "级别";
dgv.Columns["ToPerson"].HeaderText = "邮件通知人"; dgv.Columns["ToPerson"].HeaderText = "邮件通知人";
dgv.Columns["OperCode"].HeaderText = "处理人";
} }
public override void Checking(DataRow drData, bool isNew) public override void Checking(DataRow drData, bool isNew)
@ -49,6 +49,7 @@ namespace Stone.WinBiz.BasicData
drInput["ErrTypeDesc"] = drData["类型描述"].ToString().Trim(); drInput["ErrTypeDesc"] = drData["类型描述"].ToString().Trim();
drInput["ErrLevel"] = drData["级别"].ToString().Trim(); drInput["ErrLevel"] = drData["级别"].ToString().Trim();
drInput["ToPerson"] = drData["邮件通知人"].ToString().Trim(); drInput["ToPerson"] = drData["邮件通知人"].ToString().Trim();
drInput["OperCode"] = drData["处理人"].ToString().Trim();
if (drInput["Code"].ToString().Trim() == "") if (drInput["Code"].ToString().Trim() == "")
throw new Exception("代码不能为空!"); throw new Exception("代码不能为空!");
@ -56,6 +57,13 @@ namespace Stone.WinBiz.BasicData
if (t_Input.GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0) if (t_Input.GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0)
throw new Exception("类型编码 " + drInput["Code"].ToString() + " 已经存在!"); throw new Exception("类型编码 " + drInput["Code"].ToString() + " 已经存在!");
var strsql = "";
strsql = "select count(1) from t_Sys_User where Name = '" + drInput["OperCode"].ToString() + "'";
var ds = db.Exec_DataSet(strsql);
if(ds.Tables[0].Rows.Count == 0)
throw new Exception("处理人 " + drInput["OperCode"].ToString() + " 不是有效的系统账号!");
t_Input.Add(drInput); t_Input.Add(drInput);
} }

10
Stone.WinForm/Stone.WinBiz/BasicData/F_PartOutQty.cs

@ -25,8 +25,9 @@ namespace Stone.WinBiz.BasicData
dgv.Columns["Code"].HeaderText = "存货代码"; dgv.Columns["Code"].HeaderText = "存货代码";
dgv.Columns["PartOutQty"].HeaderText = "累计发货数量"; dgv.Columns["PartOutQty"].HeaderText = "累计发货数量";
dgv.Columns["LastOutQty"].HeaderText = "最后发货数量";
dgv.Columns["LastOutTime"].HeaderText = "最后发货时间";
dgv.Columns["AsnNum"].HeaderText = "ASN号";
} }
public override void Checking(DataRow drData, bool isNew) public override void Checking(DataRow drData, bool isNew)
@ -54,8 +55,9 @@ namespace Stone.WinBiz.BasicData
drInput = t_Input.Table.NewRow(); drInput = t_Input.Table.NewRow();
drInput["Code"] = drData["存货代码"].ToString().Trim(); drInput["Code"] = drData["存货代码"].ToString().Trim();
drInput["PartOutQty"] = drData["累计发货数量"].ToString().Trim(); drInput["PartOutQty"] = drData["累计发货数量"].ToString().Trim();
drInput["LastOutQty"] = drData["最后发货数量"].ToString().Trim();
drInput["LastOutTime"] = drData["最后发货时间"].ToString().Trim();
drInput["AsnNum"] = drData["ASN号"].ToString().Trim();
if (drInput["Code"].ToString().Trim() == "") if (drInput["Code"].ToString().Trim() == "")
throw new Exception("存货代码不能为空!"); throw new Exception("存货代码不能为空!");

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

@ -147,6 +147,12 @@ namespace Stone.WinBiz.JISAdmin
var title = ""; var title = "";
title = "LAB解析异常:错误级别-" + errLvevl + "-" + errTypeDesc; title = "LAB解析异常:错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(file.Name + "解析失败", title, mailTo); F_Mail.Send(file.Name + "解析失败", title, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + file.Name +
"解析失败')";
db.Exec_NonQuery(strsql);
} }
// F_Mail.Send(file.Name + " 处理失败,原因为:" + ex.Message); // F_Mail.Send(file.Name + " 处理失败,原因为:" + ex.Message);
@ -240,8 +246,6 @@ namespace Stone.WinBiz.JISAdmin
//版本号在需求日期之后,目前是在需求日期处进行的数据插入 //版本号在需求日期之后,目前是在需求日期处进行的数据插入
var lstPartRelease = new List<PartRelease>(); var lstPartRelease = new List<PartRelease>();
var partRelese = new PartRelease(); var partRelese = new PartRelease();
//定义预警级别
var errType = 0;
foreach (var line_text in sp_text) foreach (var line_text in sp_text)
{ {
@ -283,6 +287,16 @@ namespace Stone.WinBiz.JISAdmin
} }
} }
var strPartMsg = ""; var strPartMsg = "";
//卸货点新增
var alertMsg1 = "";
//卸货点与代码不匹配
var alertMsg2 = "";
//卸货点失效
var alertMsg3 = "";
//零件新增
var alertMsg4 = "";
//零件失效
var alertMsg5 = "";
foreach (string line_text in sp_text) foreach (string line_text in sp_text)
{ {
@ -330,19 +344,13 @@ namespace Stone.WinBiz.JISAdmin
if (strState == "0" || string.IsNullOrEmpty(strState)) if (strState == "0" || string.IsNullOrEmpty(strState))
{ {
strPartMsg += "零件号 " + partNumber + " 已失效!" + Environment.NewLine; strPartMsg += "零件号 " + partNumber + " 已失效!" + Environment.NewLine;
if (errType == 0 || errType > 6) alertMsg5 += "零件号 " + partNumber + " 已失效!" + Environment.NewLine;
{
errType = 6;
}
} }
} }
else else
{ {
strPartMsg += "零件号 " + partNumber + " 未定义!" + Environment.NewLine; strPartMsg += "零件号 " + partNumber + " 未定义!" + Environment.NewLine;
if (errType == 0 || errType > 5) alertMsg4 += "零件号 " + partNumber + " 未定义!" + Environment.NewLine;
{
errType = 5;
}
} }
} }
@ -364,19 +372,13 @@ namespace Stone.WinBiz.JISAdmin
if (strState == "0" || string.IsNullOrEmpty(strState)) if (strState == "0" || string.IsNullOrEmpty(strState))
{ {
strPartMsg += "卸货点 " + location + " 已失效!" + Environment.NewLine; strPartMsg += "卸货点 " + location + " 已失效!" + Environment.NewLine;
if (errType == 0 || errType > 4) alertMsg3 += "卸货点 " + location + " 已失效!" + Environment.NewLine;
{
errType = 4;
}
} }
} }
else else
{ {
strPartMsg += "卸货点 " + location + " 未在系统中定义!" + Environment.NewLine; strPartMsg += "卸货点 " + location + " 未在系统中定义!" + Environment.NewLine;
if (errType == 0 || errType > 2) alertMsg1 += "卸货点 " + location + " 未在系统中定义!" + Environment.NewLine;
{
errType = 2;
}
} }
//校验卸货点、卸货点代码是否匹配 //校验卸货点、卸货点代码是否匹配
@ -389,10 +391,7 @@ namespace Stone.WinBiz.JISAdmin
if (dsLoc.Tables[0].Rows.Count == 0) if (dsLoc.Tables[0].Rows.Count == 0)
{ {
strPartMsg += "卸货点 " + location + " 对应的代码 " + LocationCode + " 未在系统中定义!" + Environment.NewLine; strPartMsg += "卸货点 " + location + " 对应的代码 " + LocationCode + " 未在系统中定义!" + Environment.NewLine;
if (errType == 0 || errType > 3) alertMsg2 += "卸货点 " + location + " 对应的代码 " + LocationCode + " 未在系统中定义!" + Environment.NewLine;
{
errType = 3;
}
} }
} }
@ -474,24 +473,130 @@ namespace Stone.WinBiz.JISAdmin
if (strPartMsg != "") if (strPartMsg != "")
{ {
strPartMsg = filename + " " + strPartMsg; var strsql = "";
var strErrTypeCode = errType.ToString("00"); var dsErrMail = new DataSet();
var strsql = "select top 1 * from t_ErrTypeLevel" + if (alertMsg1 != "")
" where Code = '" + strErrTypeCode + "'" + {
" order by id desc"; alertMsg1 = filename + " " + alertMsg1;
var dsErrMail = db.Exec_DataSet(strsql); strsql = "select top 1 * from t_ErrTypeLevel" +
if (dsErrMail.Tables[0].Rows.Count > 0) " where Code = '02'" +
" order by id desc";
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 = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(title, alertMsg1, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + alertMsg1 + "')";
db.Exec_NonQuery(strsql);
}
}
if (alertMsg2 != "")
{
alertMsg2 = filename + " " + alertMsg2;
strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '03'" +
" order by id desc";
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 = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(title, alertMsg2, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + alertMsg2 + "')";
db.Exec_NonQuery(strsql);
}
}
if (alertMsg3 != "")
{
alertMsg3 = filename + " " + alertMsg3;
strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '04'" +
" order by id desc";
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 = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(title, alertMsg3, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + alertMsg3 + "')";
db.Exec_NonQuery(strsql);
}
}
if (alertMsg4 != "")
{ {
//获取收件人 alertMsg4 = filename + " " + alertMsg4;
var mailTo = dsErrMail.Tables[0].Rows[0]["ToPerson"].ToString(); strsql = "select top 1 * from t_ErrTypeLevel" +
var errLvevl = dsErrMail.Tables[0].Rows[0]["ErrLevel"].ToString(); " where Code = '05'" +
var errTypeDesc = dsErrMail.Tables[0].Rows[0]["ErrTypeDesc"].ToString(); " order by id desc";
//设置邮件标题 dsErrMail = db.Exec_DataSet(strsql);
var title = ""; if (dsErrMail.Tables[0].Rows.Count > 0)
title = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc; {
F_Mail.Send(title, strPartMsg, mailTo); //获取收件人
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 = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(title, alertMsg4, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + alertMsg4 + "')";
db.Exec_NonQuery(strsql);
}
} }
if (alertMsg5 != "")
{
alertMsg5 = filename + " " + alertMsg5;
strsql = "select top 1 * from t_ErrTypeLevel" +
" where Code = '06'" +
" order by id desc";
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 = "LAB解析异常-错误级别-" + errLvevl + "-" + errTypeDesc;
F_Mail.Send(title, alertMsg5, mailTo);
//插入报警信息
var operCode = dsErrMail.Tables[0].Rows[0]["OperCode"].ToString();
strsql = "Insert into t_Error_Log(OperCode,Msg) values ('" + operCode + "','" + alertMsg5 + "')";
db.Exec_NonQuery(strsql);
}
}
strPartMsg = filename + " " + strPartMsg;
} }
Msg = strPartMsg; Msg = strPartMsg;
} }

1
Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj

@ -80,6 +80,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BasicData\F_Base.cs" /> <Compile Include="BasicData\F_Base.cs" />
<Compile Include="BasicData\F_ErrLog.cs" />
<Compile Include="BasicData\F_JIS_Limits_List.cs" /> <Compile Include="BasicData\F_JIS_Limits_List.cs" />
<Compile Include="BasicData\F_ErrTypeLevel.cs" /> <Compile Include="BasicData\F_ErrTypeLevel.cs" />
<Compile Include="BasicData\F_PartOutQty.cs" /> <Compile Include="BasicData\F_PartOutQty.cs" />

9
Stone.WinForm/Stone.WinForm/frmMain.cs

@ -117,6 +117,15 @@ namespace Stone.WinForm
ShowWindow(frm); ShowWindow(frm);
} }
if (e.Node.Text == "预警错误处理")
{
Stone.WinModule.BasicData.frmErrLog frm = new Stone.WinModule.BasicData.frmErrLog();
frm.m_Base = new WinBiz.BasicData.F_ErrLog();
frm.init();
ShowWindow(frm);
}
#endregion #endregion
#region 基础资料管理 #region 基础资料管理

81
Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.Designer.cs

@ -0,0 +1,81 @@
namespace Stone.WinModule.BasicData
{
partial class frmErrLog
{
/// <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()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmErrLog));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.cbIsNeed = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "(10,09).png");
this.imageList1.Images.SetKeyName(1, "(09,36).png");
this.imageList1.Images.SetKeyName(2, "(12,27).png");
this.imageList1.Images.SetKeyName(3, "(25,41).png");
this.imageList1.Images.SetKeyName(4, "redo.png");
//
// cbIsNeed
//
this.cbIsNeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cbIsNeed.AutoSize = true;
this.cbIsNeed.Checked = true;
this.cbIsNeed.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbIsNeed.Location = new System.Drawing.Point(599, 12);
this.cbIsNeed.Name = "cbIsNeed";
this.cbIsNeed.Size = new System.Drawing.Size(60, 16);
this.cbIsNeed.TabIndex = 19;
this.cbIsNeed.Text = "待处理";
this.cbIsNeed.UseVisualStyleBackColor = true;
//
// frmErrLog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(881, 562);
this.Controls.Add(this.cbIsNeed);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "frmErrLog";
this.Load += new System.EventHandler(this.frmErrLog_Load);
this.Controls.SetChildIndex(this.txtCode, 0);
this.Controls.SetChildIndex(this.btnSerach, 0);
this.Controls.SetChildIndex(this.cbIsNeed, 0);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.CheckBox cbIsNeed;
}
}

81
Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.cs

@ -0,0 +1,81 @@
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;
using Stone.Common;
namespace Stone.WinModule.BasicData
{
public partial class frmErrLog : Stone.WinModule.BasicData.frmBaseMain
{
public frmErrLog()
{
InitializeComponent();
this.tlbAdd.Visible = false;
this.tlbAddCopy.Visible = false;
this.tlbEdit.Visible = false;
this.tlbDelete.Visible = false;
this.tlbInput.Visible = false;
}
public override void Search(string code)
{
if (code == "")
{
strWhere = "1=1";
}
else
{
strWhere = "(OperCode like '%" + code + "%'";
strWhere += " or [Msg] like '%" + code + "%')";
}
if (cbIsNeed.Checked)
{
strWhere += " and IsClose = 0";
}
}
private void frmErrLog_Load(object sender, EventArgs e)
{
ToolStripButton btnHandle = new ToolStripButton("处理");
btnHandle.Image = this.imageList1.Images[3];
btnHandle.TextImageRelation = TextImageRelation.ImageAboveText;
btnHandle.Click += btnHandle_Click;
this.toolStrip1.Items.Insert(4, btnHandle);
}
private void btnHandle_Click(object sender, EventArgs e)
{
string LogID = "0";
try
{
if (this.dgrdView.SelectedRows.Count == 0)
throw new Exception("请选择一行记录");
string OperCode = this.dgrdView.SelectedRows[0].Cells["OperCode"].Value.ToString();
//校验当前人员是否运行操作该记录
if(OperCode != User.UserInfo.UserName)
{
throw new Exception($"只能处理自己权限下的错误提示!");
}
var strID = this.dgrdView.SelectedRows[0].Cells["ID"].Value.ToString();
var strsql = "Update t_Error_Log set IsClose = 1 where ID = " + strID;
var db = new LocalDBService();
db.Exec_NonQuery(strsql);
MyMessageBox.ShowInfoMessage($"处理成功");
this.tlbRefresh.PerformClick();
}
catch (Exception ex)
{
MyMessageBox.ShowErrorMessage(ex.Message);
}
}
}
}

180
Stone.WinForm/Stone.WinModule/BasicData/frmErrLog.resx

@ -0,0 +1,180 @@
<?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>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>227, 17</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
CwAAAk1TRnQBSQFMAgEBBQEAAWgBAAFoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8ADAAB9ATyAf8xAAH/
AfQB/wYAAbsB3AO6Af8xAAG7AbQB8wL/AwAC/wO0AboB/zEAAbwB2wG0AbUB8wP0AfMDtAG6AbsB/zEA
Af8BswG6ArQGswG6AbMBuwH/MgAB/wG0AboBtAWzAbsBtAH/AbsB/zMAAf8BuwG0BLsBtAHy/wCFAAH3
CWYnAAH0A64BbQRsA2YBvAIAAfcIwwFmJgAB8wGSAfAK9wFmAf8BAAH3BcMB9wlmCAAB8wHdAf8VAAHw
AfcB9AH/AvQBGQIJAy0BbAFmAfcBAAH3BcMB9wjDAWYIAAH0AdUBzwHzFAAB9wHxBf8B8wEZAfoBOwEt
Aa4BbAFmAQABtQXDAfcIwwFmCAAB/wHyAdUBtAkAAbQBiwOGBgABtQHzBv8B8wL6AS0BrgFtAWYBAAG1
BcMB9wjDAWYKAAG0AdUB8QgAA7QBrQGGBgABtQIHAe8B9wG1Ae0B7AOuAeoB7AGuAWwBAAHvBcMBtQjD
AWYGAAH/AwAB9AGtAdUIAAG0AdYBtAHPAYYGAAG1Cf8B9AHzAe0CrgEAAbsFwwG1CMMBZgIABa0BiwIA
Af8BrQHVAfIHAAG0AQkB1QG0AYsGAAHzAe8BuwG1AbsCtQGRAq4BbQHrAfcBkQGuAQABuwXDAbUIwwFm
AgABtAGtAtUBtAH0AwABrQG0AQkFAAG0Aq0B3ALVAa0BiwGGBQAB8gHvAbwE/wH0AfMBtQGuAe0B7wGu
AQABuwXDAe8IwwFmAgABtAPVAbUB9AMAAa0BtAEJBQAB8wG0AQkB3ALVAa0BiwH0BgAB9AHvAf8B8wK8
AgcB8AKuAvcBAAEHA8MBWAGgAXkBoAFYBsMBZgIAAbQD1QKtAfABAAH/AYsBtAEJBgAB8wHVAQkB3AG0
AYsB9AgAAfAB8wX/ARkBBwGuAfACAAEHA8MBoAFYARoBWAGgBsMBZgEAAf8B1gEJARkB3AG0Aq0BtQG0
AYsB1QEJBwAB8wHVAQkBiwH0CQAB/wEHAf8B9AK8AgcB8QHrAa4CAAEJA8MBeQEaAfYBGgF5A8MB9wNm
AgAB1gH/AQAB3QHcAdUDrQG0AgkIAAHzAbQB9AsAAfMB8AX/AfMBBwGuAf8BAAQJAaABWAEaAVgBoAPD
AbUBvAFmAfEGAAEJAdwFCQH/FwAB8wgHBgABWAGgAXkBoAFYA8MBtQFmAfEIAAHzAgkB3QHzAf8pAAUJ
AQcBuwHxIgABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEBFgAD/wEAAv8GAAL/BgAC/wYA
Av8GAAH/AcAGAAGPAcAGAAGDAYAGAAGABwABgAcAAcAHAAHgAQ8GAAL/BgAC/wYAAv8GAAL/BgAC/wYA
Av8BAAE/BP8BgAEDAQABPwT/AQABAQIAAf8BHwL/AQABAQIAAf8BDwL/AQABAQIAAf8BDwH4AT8BAAEB
AgAB/wHHAfgBPwEAAQECAAH9AccB+AE/AQABAQIAAcABwwH4AT8BAAEBAgABwAHjAeABDwGAAQECAAHA
AeMB4AEPAcABAQIAAcABQwHwAR8B4AEDAgABgAEDAfgBPwHgAQMCAAHIAQMB/AF/AfABAQIAAfwBAwL/
AfgBAwHwAQEB/gEHBP8B/AEDBP8L
</value>
</data>
</root>

83
Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevelDetail.Designer.cs

@ -37,103 +37,116 @@
this.colorDialog1 = new System.Windows.Forms.ColorDialog(); this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.txtemail = new System.Windows.Forms.TextBox(); this.txtemail = new System.Windows.Forms.TextBox();
this.tbHandler = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnAddNewLine // btnAddNewLine
// //
this.btnAddNewLine.Location = new System.Drawing.Point(62, 286); this.btnAddNewLine.Location = new System.Drawing.Point(41, 191);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(6); this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// btnClose // btnClose
// //
this.btnClose.Location = new System.Drawing.Point(381, 286); this.btnClose.Location = new System.Drawing.Point(254, 191);
this.btnClose.Margin = new System.Windows.Forms.Padding(6); this.btnClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// btnOK // btnOK
// //
this.btnOK.Location = new System.Drawing.Point(250, 286); this.btnOK.Location = new System.Drawing.Point(167, 191);
this.btnOK.Margin = new System.Windows.Forms.Padding(6); this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// txtLevel // txtLevel
// //
this.txtLevel.Location = new System.Drawing.Point(170, 150); this.txtLevel.Location = new System.Drawing.Point(113, 100);
this.txtLevel.Margin = new System.Windows.Forms.Padding(4);
this.txtLevel.MaxLength = 200; this.txtLevel.MaxLength = 200;
this.txtLevel.Name = "txtLevel"; this.txtLevel.Name = "txtLevel";
this.txtLevel.Size = new System.Drawing.Size(331, 28); this.txtLevel.Size = new System.Drawing.Size(222, 21);
this.txtLevel.TabIndex = 2; this.txtLevel.TabIndex = 2;
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(34, 154); this.label3.Location = new System.Drawing.Point(47, 103);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(62, 18); this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 111; this.label3.TabIndex = 111;
this.label3.Text = "级别:"; this.label3.Text = "级别:";
// //
// txtName // txtName
// //
this.txtName.Location = new System.Drawing.Point(170, 106); this.txtName.Location = new System.Drawing.Point(113, 71);
this.txtName.Margin = new System.Windows.Forms.Padding(4);
this.txtName.MaxLength = 100; this.txtName.MaxLength = 100;
this.txtName.Name = "txtName"; this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(331, 28); this.txtName.Size = new System.Drawing.Size(222, 21);
this.txtName.TabIndex = 1; this.txtName.TabIndex = 1;
// //
// txtCode // txtCode
// //
this.txtCode.Location = new System.Drawing.Point(170, 60); this.txtCode.Location = new System.Drawing.Point(113, 40);
this.txtCode.Margin = new System.Windows.Forms.Padding(4);
this.txtCode.MaxLength = 10; this.txtCode.MaxLength = 10;
this.txtCode.Name = "txtCode"; this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(331, 28); this.txtCode.Size = new System.Drawing.Size(222, 21);
this.txtCode.TabIndex = 0; this.txtCode.TabIndex = 0;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(34, 111); this.label2.Location = new System.Drawing.Point(23, 74);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 18); this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 109; this.label2.TabIndex = 109;
this.label2.Text = "预警类型:"; this.label2.Text = "预警类型:";
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(34, 66); this.label1.Location = new System.Drawing.Point(23, 44);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(98, 18); this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 108; this.label1.TabIndex = 108;
this.label1.Text = "类型编码:"; this.label1.Text = "类型编码:";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(34, 201); this.label4.Location = new System.Drawing.Point(12, 134);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(116, 18); this.label4.Size = new System.Drawing.Size(77, 12);
this.label4.TabIndex = 111; this.label4.TabIndex = 111;
this.label4.Text = "邮件通知人:"; this.label4.Text = "邮件通知人:";
// //
// txtemail // txtemail
// //
this.txtemail.Location = new System.Drawing.Point(170, 197); this.txtemail.Location = new System.Drawing.Point(113, 131);
this.txtemail.Margin = new System.Windows.Forms.Padding(4);
this.txtemail.MaxLength = 200; this.txtemail.MaxLength = 200;
this.txtemail.Name = "txtemail"; this.txtemail.Name = "txtemail";
this.txtemail.Size = new System.Drawing.Size(331, 28); this.txtemail.Size = new System.Drawing.Size(222, 21);
this.txtemail.TabIndex = 2; this.txtemail.TabIndex = 2;
// //
// tbHandler
//
this.tbHandler.Location = new System.Drawing.Point(113, 160);
this.tbHandler.MaxLength = 200;
this.tbHandler.Name = "tbHandler";
this.tbHandler.Size = new System.Drawing.Size(222, 21);
this.tbHandler.TabIndex = 112;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(35, 163);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 113;
this.label5.Text = "处理人:";
//
// frmErrTypeLevelDetail // frmErrTypeLevelDetail
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(572, 416); this.ClientSize = new System.Drawing.Size(381, 277);
this.Controls.Add(this.tbHandler);
this.Controls.Add(this.label5);
this.Controls.Add(this.txtemail); this.Controls.Add(this.txtemail);
this.Controls.Add(this.txtLevel); this.Controls.Add(this.txtLevel);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
@ -142,7 +155,7 @@
this.Controls.Add(this.txtCode); this.Controls.Add(this.txtCode);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(6); this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmErrTypeLevelDetail"; this.Name = "frmErrTypeLevelDetail";
this.Load += new System.EventHandler(this.frmColorDetail_Load); this.Load += new System.EventHandler(this.frmColorDetail_Load);
this.Controls.SetChildIndex(this.btnOK, 0); this.Controls.SetChildIndex(this.btnOK, 0);
@ -156,6 +169,8 @@
this.Controls.SetChildIndex(this.label4, 0); this.Controls.SetChildIndex(this.label4, 0);
this.Controls.SetChildIndex(this.txtLevel, 0); this.Controls.SetChildIndex(this.txtLevel, 0);
this.Controls.SetChildIndex(this.txtemail, 0); this.Controls.SetChildIndex(this.txtemail, 0);
this.Controls.SetChildIndex(this.label5, 0);
this.Controls.SetChildIndex(this.tbHandler, 0);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -172,5 +187,7 @@
private System.Windows.Forms.ColorDialog colorDialog1; private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtemail; private System.Windows.Forms.TextBox txtemail;
private System.Windows.Forms.TextBox tbHandler;
private System.Windows.Forms.Label label5;
} }
} }

5
Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevelDetail.cs

@ -27,12 +27,13 @@ namespace Stone.WinModule.BasicData
if (!MyValidator.IsEmpty(this.txtName, "")) return false; if (!MyValidator.IsEmpty(this.txtName, "")) return false;
if (!MyValidator.IsEmpty(this.txtLevel, "")) return false; if (!MyValidator.IsEmpty(this.txtLevel, "")) return false;
if (!MyValidator.IsEmpty(this.txtemail, "")) return false; if (!MyValidator.IsEmpty(this.txtemail, "")) return false;
if (!MyValidator.IsEmpty(this.tbHandler, "")) return false;
base.GetData(); base.GetData();
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim()); drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim());
drData["ErrTypeDesc"] = MyStrings.GetString(this.txtName.Text.Trim()); drData["ErrTypeDesc"] = MyStrings.GetString(this.txtName.Text.Trim());
drData["Errlevel"] = MyStrings.GetString(this.txtLevel.Text.Trim()); drData["Errlevel"] = MyStrings.GetString(this.txtLevel.Text.Trim());
drData["ToPerson"] = MyStrings.GetString(this.txtemail.Text.Trim()); drData["ToPerson"] = MyStrings.GetString(this.txtemail.Text.Trim());
drData["OperCode"] = MyStrings.GetString(this.tbHandler.Text.Trim());
return true; return true;
} }
@ -49,6 +50,7 @@ namespace Stone.WinModule.BasicData
this.txtName.Text = drData["ErrTypeDesc"].ToString(); this.txtName.Text = drData["ErrTypeDesc"].ToString();
this.txtLevel.Text = drData["ErrLevel"].ToString(); this.txtLevel.Text = drData["ErrLevel"].ToString();
this.txtemail.Text = drData["ToPerson"].ToString(); this.txtemail.Text = drData["ToPerson"].ToString();
this.tbHandler.Text = drData["OperCode"].ToString();
} }
return false; return false;
@ -61,6 +63,7 @@ namespace Stone.WinModule.BasicData
this.txtName.Text = ""; this.txtName.Text = "";
this.txtLevel.Text = ""; this.txtLevel.Text = "";
this.txtemail.Text = ""; this.txtemail.Text = "";
this.tbHandler.Text = "";
this.txtCode.Focus(); this.txtCode.Focus();
} }

38
Stone.WinForm/Stone.WinModule/BasicData/frmPartOutQtyDetail.Designer.cs

@ -37,66 +37,62 @@
// //
// btnAddNewLine // btnAddNewLine
// //
this.btnAddNewLine.Location = new System.Drawing.Point(60, 190); this.btnAddNewLine.Location = new System.Drawing.Point(41, 116);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(6); this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// btnClose // btnClose
// //
this.btnClose.Location = new System.Drawing.Point(379, 190); this.btnClose.Location = new System.Drawing.Point(254, 116);
this.btnClose.Margin = new System.Windows.Forms.Padding(6); this.btnClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// btnOK // btnOK
// //
this.btnOK.Location = new System.Drawing.Point(248, 190); this.btnOK.Location = new System.Drawing.Point(166, 116);
this.btnOK.Margin = new System.Windows.Forms.Padding(6); this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
// //
// txtOutQty // txtOutQty
// //
this.txtOutQty.Location = new System.Drawing.Point(170, 106); this.txtOutQty.Location = new System.Drawing.Point(113, 71);
this.txtOutQty.Margin = new System.Windows.Forms.Padding(4);
this.txtOutQty.MaxLength = 100; this.txtOutQty.MaxLength = 100;
this.txtOutQty.Name = "txtOutQty"; this.txtOutQty.Name = "txtOutQty";
this.txtOutQty.Size = new System.Drawing.Size(331, 28); this.txtOutQty.Size = new System.Drawing.Size(222, 21);
this.txtOutQty.TabIndex = 1; this.txtOutQty.TabIndex = 1;
// //
// txtCode // txtCode
// //
this.txtCode.Location = new System.Drawing.Point(170, 60); this.txtCode.Location = new System.Drawing.Point(113, 40);
this.txtCode.Margin = new System.Windows.Forms.Padding(4);
this.txtCode.MaxLength = 10; this.txtCode.MaxLength = 10;
this.txtCode.Name = "txtCode"; this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(331, 28); this.txtCode.Size = new System.Drawing.Size(222, 21);
this.txtCode.TabIndex = 0; this.txtCode.TabIndex = 0;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(34, 111); this.label2.Location = new System.Drawing.Point(23, 74);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(134, 18); this.label2.Size = new System.Drawing.Size(89, 12);
this.label2.TabIndex = 109; this.label2.TabIndex = 109;
this.label2.Text = "累计发货数量:"; this.label2.Text = "累计发货数量:";
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(34, 66); this.label1.Location = new System.Drawing.Point(23, 44);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 18); this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 108; this.label1.TabIndex = 108;
this.label1.Text = "物料号:"; this.label1.Text = "物料号:";
// //
// frmPartOutQtyDetail // frmPartOutQtyDetail
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(572, 288); this.ClientSize = new System.Drawing.Size(381, 170);
this.Controls.Add(this.txtOutQty); this.Controls.Add(this.txtOutQty);
this.Controls.Add(this.txtCode); this.Controls.Add(this.txtCode);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(6); this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmPartOutQtyDetail"; this.Name = "frmPartOutQtyDetail";
this.Load += new System.EventHandler(this.frmColorDetail_Load); this.Load += new System.EventHandler(this.frmColorDetail_Load);
this.Controls.SetChildIndex(this.btnOK, 0); this.Controls.SetChildIndex(this.btnOK, 0);

17
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.Designer.cs

@ -36,6 +36,7 @@
this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.chkAuto = new System.Windows.Forms.CheckBox(); this.chkAuto = new System.Windows.Forms.CheckBox();
this.timer2 = new System.Windows.Forms.Timer(this.components); this.timer2 = new System.Windows.Forms.Timer(this.components);
this.cbIsDiff = new System.Windows.Forms.CheckBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnSerach // btnSerach
@ -92,10 +93,24 @@
// //
this.timer2.Tick += new System.EventHandler(this.timer2_Tick); this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
// //
// cbIsDiff
//
this.cbIsDiff.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cbIsDiff.AutoSize = true;
this.cbIsDiff.Checked = true;
this.cbIsDiff.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbIsDiff.Location = new System.Drawing.Point(569, 10);
this.cbIsDiff.Name = "cbIsDiff";
this.cbIsDiff.Size = new System.Drawing.Size(84, 16);
this.cbIsDiff.TabIndex = 22;
this.cbIsDiff.Text = "未完全分配";
this.cbIsDiff.UseVisualStyleBackColor = true;
//
// frmJISVDA // frmJISVDA
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(1156, 562); this.ClientSize = new System.Drawing.Size(1156, 562);
this.Controls.Add(this.cbIsDiff);
this.Controls.Add(this.chkAuto); this.Controls.Add(this.chkAuto);
this.Controls.Add(this.dateTimePicker2); this.Controls.Add(this.dateTimePicker2);
this.Controls.Add(this.dateTimePicker1); this.Controls.Add(this.dateTimePicker1);
@ -107,6 +122,7 @@
this.Controls.SetChildIndex(this.dateTimePicker1, 0); this.Controls.SetChildIndex(this.dateTimePicker1, 0);
this.Controls.SetChildIndex(this.dateTimePicker2, 0); this.Controls.SetChildIndex(this.dateTimePicker2, 0);
this.Controls.SetChildIndex(this.chkAuto, 0); this.Controls.SetChildIndex(this.chkAuto, 0);
this.Controls.SetChildIndex(this.cbIsDiff, 0);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -120,5 +136,6 @@
private System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.CheckBox chkAuto; private System.Windows.Forms.CheckBox chkAuto;
private System.Windows.Forms.Timer timer2; private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.CheckBox cbIsDiff;
} }
} }

40
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs

@ -56,6 +56,10 @@ namespace Stone.WinModule.Standard
strWhere += " [filename] like '%" + code + "%' "; strWhere += " [filename] like '%" + code + "%' ";
} }
if (cbIsDiff.Checked)
{
strWhere += " and quantity > quantity_print ";
}
strWhere = "[IsStandard]=1 and [startDate]>='" + d1 + "' and [startDate]<='" + d2 + "' and (" + strWhere + ")"; strWhere = "[IsStandard]=1 and [startDate]>='" + d1 + "' and [startDate]<='" + d2 + "' and (" + strWhere + ")";
} }
@ -323,10 +327,10 @@ namespace Stone.WinModule.Standard
string Date = MyDateTime.GetServerDateTime().ToString("yyyy-MM-dd"); string Date = MyDateTime.GetServerDateTime().ToString("yyyy-MM-dd");
string AsnNumbers = ""; string AsnNumbers = "";
var strsql = ""; // var strsql = "";
var dtPartOutQty = new DataTable(); // var dtPartOutQty = new DataTable();
strsql = "select * from t_PartOutQty"; // strsql = "select * from t_PartOutQty";
dtPartOutQty = db.Exec_DataSet(strsql).Tables[0]; // dtPartOutQty = db.Exec_DataSet(strsql).Tables[0];
foreach (DataRow drData in dtData.Rows) foreach (DataRow drData in dtData.Rows)
{ {
@ -393,13 +397,13 @@ namespace Stone.WinModule.Standard
t_JIS_VDA.Add(drVDA); t_JIS_VDA.Add(drVDA);
//增加已发货数量 //增加已发货数量
var code = drData["PartNumber"].ToString(); // var code = drData["PartNumber"].ToString();
var outQty = decimal.Parse(drData["PackNumer"].ToString()); // var outQty = decimal.Parse(drData["PackNumer"].ToString());
strsql = CreatePartOutSql(code, outQty, dtPartOutQty,out dtPartOutQty); // strsql = CreatePartOutSql(code, outQty, dtPartOutQty,out dtPartOutQty);
if (!string.IsNullOrEmpty(strsql)) // if (!string.IsNullOrEmpty(strsql))
{ // {
db.Exec_NonQuery(strsql); // db.Exec_NonQuery(strsql);
} // }
PackageNos += drVDA["PackageNo"].ToString() + ","; PackageNos += drVDA["PackageNo"].ToString() + ",";
} }
@ -421,13 +425,13 @@ namespace Stone.WinModule.Standard
t_JIS_VDA.Add(drVDA); t_JIS_VDA.Add(drVDA);
//增加已发货数量 //增加已发货数量
var code = drData["PartNumber"].ToString(); // var code = drData["PartNumber"].ToString();
var outQty = Odd; // var outQty = Odd;
strsql = CreatePartOutSql(code, outQty, dtPartOutQty, out dtPartOutQty); // strsql = CreatePartOutSql(code, outQty, dtPartOutQty, out dtPartOutQty);
if (!string.IsNullOrEmpty(strsql)) // if (!string.IsNullOrEmpty(strsql))
{ // {
db.Exec_NonQuery(strsql); // db.Exec_NonQuery(strsql);
} // }
PackageNos += drVDA["PackageNo"].ToString() + ","; PackageNos += drVDA["PackageNo"].ToString() + ",";
} }

2
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.resx

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
CQAAAk1TRnQBSQFMAgEBAgEAASABAAEgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CQAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

86
Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs

@ -209,6 +209,12 @@ namespace Stone.WinModule.Standard
if (dsData.Tables[0].Select("[IsPrintASN]=False").Length > 0) if (dsData.Tables[0].Select("[IsPrintASN]=False").Length > 0)
throw new Exception(AsnNumber + " 未打印"); throw new Exception(AsnNumber + " 未打印");
if (dsData.Tables[0].Select("[IsPackingVerification]=False").Length > 0)
throw new Exception(AsnNumber + " 未完成装箱校验");
if (dsData.Tables[0].Select("[IsShipingVerification]=False").Length > 0)
throw new Exception(AsnNumber + " 未完成装车校验");
DateTime UploadTime = t_JIS_VDA.GetDateTime(); DateTime UploadTime = t_JIS_VDA.GetDateTime();
for (int i = 0; i < dsData.Tables[0].Rows.Count; i++) for (int i = 0; i < dsData.Tables[0].Rows.Count; i++)
@ -223,6 +229,25 @@ namespace Stone.WinModule.Standard
string filename = F_JIS5000_Print.WriteASN_VDA(db, dsData, AsnNumber); string filename = F_JIS5000_Print.WriteASN_VDA(db, dsData, AsnNumber);
#region 计算累计发货数量
var strsql = "";
var dtPartOutQty = new DataTable();
strsql = "select * from t_PartOutQty";
dtPartOutQty = db.Exec_DataSet(strsql).Tables[0];
foreach (DataRow drData in dsData.Tables[0].Rows)
{
var code = drData["PartNumber"].ToString();
var outQty = decimal.Parse(drData["Qty"].ToString());
var asnNum = drData["AsnNumber"].ToString();
strsql = CreatePartOutSql(code, outQty, dtPartOutQty, asnNum,out dtPartOutQty);
if (!string.IsNullOrEmpty(strsql))
{
db.Exec_NonQuery(strsql);
}
}
#endregion
db.Commit(); db.Commit();
try try
{ {
@ -277,7 +302,7 @@ namespace Stone.WinModule.Standard
} }
else if (Convert.ToInt32(dtLab.Rows[0]["quantity"]) != Qty) else if (Convert.ToInt32(dtLab.Rows[0]["quantity"]) != Qty)
{ {
msg += $"{PartNumber} {Date} 发货数量 {dtLab.Rows[0]["quantity"]} 和LAB需求数量 {Qty} 不一样\r\n"; msg += $"{PartNumber} {Date} 发货数量 {Qty} 和LAB需求数量 {dtLab.Rows[0]["quantity"]} 不一样\r\n";
} }
} }
@ -362,6 +387,16 @@ namespace Stone.WinModule.Standard
CancelASN(AsnNumber); CancelASN(AsnNumber);
//计算累计发货数量
var strSql = "UPDATE t_PartOutQty " +
" set PartOutQty -= LastOutQty," +
" LastOutQty = 0," +
" LastOutTime = null," +
" AsnNum = ''" +
" where AsnNum = '" + AsnNumber + "'";
var db = new LocalDBService();
db.Exec_NonQuery(strSql);
F_JIS_Log.WriteLogsEnd(LogID, true, ""); F_JIS_Log.WriteLogsEnd(LogID, true, "");
MyMessageBox.ShowInfoMessage($"{AsnNumber} 撤销成功"); MyMessageBox.ShowInfoMessage($"{AsnNumber} 撤销成功");
@ -414,6 +449,8 @@ namespace Stone.WinModule.Standard
string AsnNumber = this.dgrdView.SelectedRows[0].Cells["AsnNumber"].Value.ToString(); string AsnNumber = this.dgrdView.SelectedRows[0].Cells["AsnNumber"].Value.ToString();
if (!CheckASN(AsnNumber)) return;
Entity_v_JIS_VDA v_JIS_VDA = new Entity_v_JIS_VDA(); Entity_v_JIS_VDA v_JIS_VDA = new Entity_v_JIS_VDA();
DataTable dtData = v_JIS_VDA.GetData("", $"[AsnNumber]='{AsnNumber}'", "[PackageNo] asc").Tables[0]; DataTable dtData = v_JIS_VDA.GetData("", $"[AsnNumber]='{AsnNumber}'", "[PackageNo] asc").Tables[0];
if (dtData.Rows.Count == 0) throw new Exception("打印的数据不存在"); if (dtData.Rows.Count == 0) throw new Exception("打印的数据不存在");
@ -751,5 +788,52 @@ namespace Stone.WinModule.Standard
this.dateTimePicker2.Enabled = true; this.dateTimePicker2.Enabled = true;
} }
} }
private static string CreatePartOutSql(string PartCode, decimal outQty, DataTable dt, string asnNum,out DataTable dtPartOutQty)
{
dtPartOutQty = dt;
string strsql = "";
if (dtPartOutQty.Select(" Code = '" + PartCode + "'").Length > 0)
{
//继续校验该ASN是否维护累计发货数量信息
if (dtPartOutQty.Select(" AsnNum = '" + asnNum + "'").Length > 0)
{
strsql = "Update t_PartOutQty" +
" set PartOutQty += " + outQty + "," +
" LastOutQty += " + outQty +
" where Code = '" + PartCode + "'" +
" and AsnNum = '" + asnNum + "'";
}
else
{
strsql = "Update t_PartOutQty" +
" set PartOutQty += " + outQty + "," +
" LastOutQty = " + outQty + "," +
" LastOutTime = getdate()," +
" AsnNum = '" + asnNum + "'" +
" where Code = '" + PartCode + "'";
var db = new LocalDBService();
db.Exec_NonQuery(strsql);
//DT重新赋值
strsql = "select * from t_PartOutQty";
dtPartOutQty = db.Exec_DataSet(strsql).Tables[0];
strsql = "";
}
}
else
{
//该零件未维护累计发货数量信息
strsql = "Insert into t_PartOutQty(Code,PartOutQty,LastOutQty,LastOutTime,AsnNum) values ('" + PartCode + "'," + outQty + "," + outQty + ",getdate(),'"+ asnNum + "')";
var db = new LocalDBService();
db.Exec_NonQuery(strsql);
//DT重新赋值
strsql = "select * from t_PartOutQty";
dtPartOutQty = db.Exec_DataSet(strsql).Tables[0];
strsql = "";
}
return strsql;
}
} }
} }

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

@ -154,6 +154,12 @@
<Compile Include="BasicData\frmCallOff.Designer.cs"> <Compile Include="BasicData\frmCallOff.Designer.cs">
<DependentUpon>frmCallOff.cs</DependentUpon> <DependentUpon>frmCallOff.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BasicData\frmErrLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BasicData\frmErrLog.Designer.cs">
<DependentUpon>frmErrLog.cs</DependentUpon>
</Compile>
<Compile Include="BasicData\frmPartOutQtyDetail.cs"> <Compile Include="BasicData\frmPartOutQtyDetail.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -664,6 +670,9 @@
<EmbeddedResource Include="BasicData\frmColor.resx"> <EmbeddedResource Include="BasicData\frmColor.resx">
<DependentUpon>frmColor.cs</DependentUpon> <DependentUpon>frmColor.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="BasicData\frmErrLog.resx">
<DependentUpon>frmErrLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BasicData\frmPartOutQtyDetail.resx"> <EmbeddedResource Include="BasicData\frmPartOutQtyDetail.resx">
<DependentUpon>frmPartOutQtyDetail.cs</DependentUpon> <DependentUpon>frmPartOutQtyDetail.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

Loading…
Cancel
Save