From 9d15d18079f99199f84f4e12ad6b55e30738f1c3 Mon Sep 17 00:00:00 2001 From: "xueyu.liu" Date: Thu, 28 Apr 2022 18:42:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=AE=BE=E7=BD=AE=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=9F=BA=E7=A1=80=E6=98=BE=E7=A4=BA=E3=80=82=20?= =?UTF-8?q?=E8=BF=98=E6=9C=89=E9=9C=80=E8=A6=81=E4=BC=98=E5=8C=96=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Stone.Common.Dlls/Stone.Entity.dll | Bin 23040 -> 23040 bytes .../Stone.Entity/Entity_t_ErrTypeLevel.cs | 27 +++++ .../Stone.Entity/Stone.Entity.csproj | 1 + .../Stone.WinBiz/BasicData/F_ErrTypeLevel.cs | 93 ++++++++++++++++++ .../Stone.WinBiz/Stone.WinBiz.csproj | 1 + Stone.WinForm/Stone.WinForm/frmMain.cs | 10 ++ .../BasicData/frmErrTypeLevel.Designer.cs | 36 +++++++ .../BasicData/frmErrTypeLevel.cs | 26 +++++ .../Stone.WinModule/Standard/frmJISVDA.cs | 27 ++++- .../Stone.WinModule/Stone.WinModule.csproj | 6 ++ 10 files changed, 223 insertions(+), 4 deletions(-) create mode 100644 Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.cs create mode 100644 Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs create mode 100644 Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs create mode 100644 Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs diff --git a/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll b/Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll index 4bb8033d576a4f97e34c1ec5b39cc3532f34465a..8e06d41badc1da853614556ab4345971c64ca8a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z!UAny2U_LZVrM2};1#6;}iw!$5veM5RFMdLUI{3+a@wLCl> z`*Ec|2XEk1XrUNYtiKH`lyvH`|&Kc(1V;g zq#S*l#~#2beWW8P=ymp6BBn^&dfiPK6$GlA*70|A7A-Pe|)P z$t}JM0ll}RF@jfb=%uM5wx3EDhU!rjqx&~jJQUVHuDZ?N-&^0OqCY!%@sHk|xU1&o za~n=lq}tt|v1F$&d$4`OI%l+x{}TC1gkHga%|J_QZEM)Q?^K)_ShL{C!@KmRuZ!CH wPc?^AOnvuIHGW&?w3GW%;(Tr0_eZvpPVRWQKeFx15MNJz|JaU?sW0FEf4F2BhyVZp diff --git a/Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.cs b/Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.cs new file mode 100644 index 0000000..f233d32 --- /dev/null +++ b/Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.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_ErrTypeLevel : EntityBase + + { + public static string TableNameNew = "t_ErrTypeLevel"; + + public Entity_t_ErrTypeLevel() + { + base.TableName = TableNameNew; + base.Init(); + } + + public Entity_t_ErrTypeLevel(LocalDBService myDB) + { + base.db = myDB; + base.TableName = TableNameNew; + base.Init(); + } + } +} diff --git a/Stone.WinForm/Stone.Entity/Stone.Entity.csproj b/Stone.WinForm/Stone.Entity/Stone.Entity.csproj index 90124c5..8f1c03a 100644 --- a/Stone.WinForm/Stone.Entity/Stone.Entity.csproj +++ b/Stone.WinForm/Stone.Entity/Stone.Entity.csproj @@ -62,6 +62,7 @@ + diff --git a/Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs b/Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs new file mode 100644 index 0000000..d73fe89 --- /dev/null +++ b/Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs @@ -0,0 +1,93 @@ +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_ErrTypeLevel : F_Base + { + public F_ErrTypeLevel() + { + this.type = "PartOutQty"; + this.name = "基础资料_累计发货数量"; + this.entity = new Entity_t_ErrTypeLevel(); + //this.entityView = new Entity_v_Product(); + } + + public override void GetView(DataGridView dgv) + { + base.GetView(dgv); + + dgv.Columns["Code"].HeaderText = "类型编码"; + dgv.Columns["ErrTypeDesc"].HeaderText = "预警类型"; + dgv.Columns["ErrLevel"].HeaderText = "级别"; + dgv.Columns["ToPerson"].HeaderText = "邮件通知人"; + + } + + public override void Checking(DataRow drData, bool isNew) + { + //base.Checking(drData, isNew); + + + //if ((new F_CarModel()).GetData("Code='" + drData["CarModelCode"].ToString() + "'") == null) + // throw new Exception("车型代码 " + drData["CarModelCode"].ToString() + " 不存在!"); + + //if ((new F_Color()).GetData("Code='" + drData["ColorCode"].ToString() + "'") == null) + // throw new Exception("颜色代码 " + drData["ColorCode"].ToString() + " 不存在!"); + + + //if (MyStrings.GetLength(drData["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!"); + } + + + public override void InputData(DataSet dsData, LocalDBService db) + { + //Entity_t_Product t_Input = new Entity_t_Product(db); + //DataRow drInput = null; + + //foreach (DataRow drData in dsData.Tables[0].Rows) + //{ + + // drInput = t_Input.Table.NewRow(); + // drInput["Code"] = drData["存货代码"].ToString().Trim(); + // drInput["Name"] = drData["存货名称"].ToString().Trim(); + // drInput["CarModelCode"] = drData["车型代码"].ToString().Trim(); + // drInput["ColorCode"] = drData["颜色代码"].ToString().Trim(); + // drInput["Model"] = drData["规格型号"].ToString().Trim(); + // drInput["Deploy"] = drData["配置"].ToString().Trim(); + // drInput["BarCode"] = drData["条码号"].ToString(); + // drInput["PackNumer"] = drData["装箱数量"].ToString(); + // drInput["IsStandard"] = drData["是否STD件"].ToString(); + // drInput["State"] = drData["启用"].ToString(); + + // if (drInput["Code"].ToString().Trim() == "") + // throw new Exception("代码不能为空!"); + + + // if (t_Input.GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0) + // throw new Exception("代码 " + drInput["Code"].ToString() + " 已经存在!"); + + + // if ((new Entity_t_CarModel(db)).GetData("", "Code='" + drInput["CarModelCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0) + // throw new Exception("车型代码 " + drInput["CarModelCode"].ToString() + " 不存在!"); + + // if ((new Entity_t_Color(db)).GetData("", "Code='" + drInput["ColorCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0) + // throw new Exception("颜色代码 " + drInput["ColorCode"].ToString() + " 不存在!"); + + + // if (MyStrings.GetLength(drInput["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!"); + + // //Checking(drInput, true); + // t_Input.Add(drInput); + + //} + } + } +} diff --git a/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj b/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj index e38ea14..bda6f04 100644 --- a/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj +++ b/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj @@ -81,6 +81,7 @@ + diff --git a/Stone.WinForm/Stone.WinForm/frmMain.cs b/Stone.WinForm/Stone.WinForm/frmMain.cs index 2f2df49..f51a972 100644 --- a/Stone.WinForm/Stone.WinForm/frmMain.cs +++ b/Stone.WinForm/Stone.WinForm/frmMain.cs @@ -107,6 +107,16 @@ namespace Stone.WinForm ShowWindow(frm); } + + if (e.Node.Text == "预警设置") + { + Stone.WinModule.BasicData.frmErrTypeLevel frm = new Stone.WinModule.BasicData.frmErrTypeLevel(); + frm.m_Base = new WinBiz.BasicData.F_ErrTypeLevel(); + frm.init(); + + ShowWindow(frm); + } + #endregion #region 基础资料管理 diff --git a/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs b/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs new file mode 100644 index 0000000..0844f64 --- /dev/null +++ b/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs @@ -0,0 +1,36 @@ +namespace Stone.WinModule.BasicData +{ + partial class frmErrTypeLevel + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs b/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs new file mode 100644 index 0000000..346daf8 --- /dev/null +++ b/Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Stone.WinModule.BasicData +{ + public partial class frmErrTypeLevel : Stone.WinModule.BasicData.frmBaseMain + { + public frmErrTypeLevel() + { + InitializeComponent(); + } + + public override void Search(string code) + { + base.Search(code); + + strWhere += " or [Code] like '%" + code + "%'"; + + } + } +} diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs index 336768f..cc89fe7 100644 --- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs +++ b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs @@ -323,7 +323,10 @@ namespace Stone.WinModule.Standard string Date = MyDateTime.GetServerDateTime().ToString("yyyy-MM-dd"); string AsnNumbers = ""; - + List lsPartOutQty = new List(); + + var lstSql = new List(); + var strsql = ""; foreach (DataRow drData in dtData.Rows) { @@ -387,9 +390,14 @@ namespace Stone.WinModule.Standard drVDA["OrderNumber"] = drData["OrderNumber"].ToString(); drVDA["LocationCode"] = drData["LocationCode"].ToString(); drVDA["releaseId"] = drData["releaseId"].ToString(); + t_JIS_VDA.Add(drVDA); + //增加已发货数量 - + strsql = "Update t_PartOutQty" + + " set PartOutQty += " + decimal.Parse(drData["PackNumer"].ToString()) + "" + + " where Code = '" + drData["PartNumber"].ToString() + "'"; + db.Exec_NonQuery(strsql); PackageNos += drVDA["PackageNo"].ToString() + ","; } @@ -408,12 +416,17 @@ namespace Stone.WinModule.Standard drVDA["LocationCode"] = drData["LocationCode"].ToString(); drVDA["releaseId"] = drData["releaseId"].ToString(); t_JIS_VDA.Add(drVDA); - + + //增加已发货数量 + strsql = "Update t_PartOutQty" + + " set PartOutQty += " + Odd + "" + + " where Code = '" + drData["PartNumber"].ToString() + "'"; + db.Exec_NonQuery(strsql); PackageNos += drVDA["PackageNo"].ToString() + ","; } } - + //MyMessageBox.ShowInfoMessage($"ASN编号:{AsnNumber}\r\n装箱单号:{PackageNos} 生成完成!"); MyMessageBox.ShowInfoMessage($"装箱单号:{PackageNos} 生成完成!"); @@ -660,5 +673,11 @@ namespace Stone.WinModule.Standard // partOutQty.GetData()[] // partOutQty.Edit(part, qty); //} + + struct PartOutQty + { + string partcode; + int qty; + } } } diff --git a/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj b/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj index ad58418..0daf151 100644 --- a/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj +++ b/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj @@ -172,6 +172,12 @@ frmJISLimitsList.cs + + Form + + + frmErrTypeLevel.cs + Form