From 916532af5a9521ebc3a35deb81be5cd606a6096c Mon Sep 17 00:00:00 2001 From: SoulStar Date: Thu, 28 Nov 2024 09:44:17 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=AE=9E=E4=BD=93=E7=B1=BB=E4=B8=9A=E5=8A=A1=E7=B1=BB?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=9B=9B=E4=B8=AA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/SysShiftTimeService.cs | 2 +- .../service/ZxMaterialService.cs | 44 +++++++++++++++---- .../service/ZxRecipeService.cs | 2 +- HighWayIot.Winform/HighWayIot.Winform.csproj | 6 +-- .../DailyReportPage.Designer.cs | 0 .../{ => LogPages}/DailyReportPage.cs | 0 .../{ => LogPages}/DailyReportPage.resx | 0 .../MaterialConfigPage.Designer.cs | 10 ++--- HighWayIot.sln | 6 --- 9 files changed, 46 insertions(+), 24 deletions(-) rename HighWayIot.Winform/UserControlPages/{ => LogPages}/DailyReportPage.Designer.cs (100%) rename HighWayIot.Winform/UserControlPages/{ => LogPages}/DailyReportPage.cs (100%) rename HighWayIot.Winform/UserControlPages/{ => LogPages}/DailyReportPage.resx (100%) diff --git a/HighWayIot.Repository/service/SysShiftTimeService.cs b/HighWayIot.Repository/service/SysShiftTimeService.cs index 7b838de..4c2a9b3 100644 --- a/HighWayIot.Repository/service/SysShiftTimeService.cs +++ b/HighWayIot.Repository/service/SysShiftTimeService.cs @@ -25,7 +25,7 @@ namespace HighWayIot.Repository.service Repository _repository => new Repository("sqlserver"); /// - /// 条件查询所有用户列表 用户名为模糊查询 + /// 查询所有班次信息 /// /// public List GetShiftInfos() diff --git a/HighWayIot.Repository/service/ZxMaterialService.cs b/HighWayIot.Repository/service/ZxMaterialService.cs index 8c88e9e..d2ff782 100644 --- a/HighWayIot.Repository/service/ZxMaterialService.cs +++ b/HighWayIot.Repository/service/ZxMaterialService.cs @@ -26,37 +26,65 @@ namespace HighWayIot.Repository.service Repository _repository => new Repository("sqlserver"); /// - /// 条件查询所有用户列表 用户名为模糊查询 + /// 查询所有物料信息 /// /// - public List GetShiftInfos() + public List GetMaterialInfos() { try { - List deviceInfo = _repository.GetList(); + List deviceInfo = _repository.GetList(x => x.IsDeleted == false); return deviceInfo; } catch (Exception ex) { - log.Error("用户信息获取异常", ex); + log.Error("物料信息获取异常", ex); return null; } } /// - /// 修改班次信息 + /// 修改物料信息 /// /// /// - public bool UpdateShiftInfo(ZxMaterialEntity sysUserEntity) + public bool UpdateMaterialInfo(ZxMaterialEntity sysUserEntity) { try { return _repository.Update(sysUserEntity); } - catch(Exception ex) + catch (Exception ex) + { + log.Error("物料信息修改异常", ex); + return false; + } + } + + public bool InsertMaterialInfo(ZxMaterialEntity sysUserEntity) + { + try + { + return _repository.Insert(sysUserEntity); + } + catch (Exception ex) + { + log.Error("物料信息添加异常", ex); + return false; + } + } + + public bool DeleteMaterialInfoByMaterialCode(string materialCode) + { + try + { + ZxMaterialEntity e = _repository.GetById(materialCode); + e.IsDeleted = true; + return _repository.Update(e); + } + catch (Exception ex) { - log.Error("用户信息修改异常", ex); + log.Error("物料信息删除异常", ex); return false; } } diff --git a/HighWayIot.Repository/service/ZxRecipeService.cs b/HighWayIot.Repository/service/ZxRecipeService.cs index 05f7ca5..bf04c4b 100644 --- a/HighWayIot.Repository/service/ZxRecipeService.cs +++ b/HighWayIot.Repository/service/ZxRecipeService.cs @@ -33,7 +33,7 @@ namespace HighWayIot.Repository.service { try { - List deviceInfo = _repository.GetList(); + List deviceInfo = _repository.GetList(x => x.IsDeleted == false); return deviceInfo; } catch (Exception ex) diff --git a/HighWayIot.Winform/HighWayIot.Winform.csproj b/HighWayIot.Winform/HighWayIot.Winform.csproj index 3964905..695eb85 100644 --- a/HighWayIot.Winform/HighWayIot.Winform.csproj +++ b/HighWayIot.Winform/HighWayIot.Winform.csproj @@ -89,10 +89,10 @@ RecipeConfigPage.cs - + UserControl - + DailyReportPage.cs @@ -189,7 +189,7 @@ RecipeConfigPage.cs - + DailyReportPage.cs diff --git a/HighWayIot.Winform/UserControlPages/DailyReportPage.Designer.cs b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs similarity index 100% rename from HighWayIot.Winform/UserControlPages/DailyReportPage.Designer.cs rename to HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.Designer.cs diff --git a/HighWayIot.Winform/UserControlPages/DailyReportPage.cs b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs similarity index 100% rename from HighWayIot.Winform/UserControlPages/DailyReportPage.cs rename to HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.cs diff --git a/HighWayIot.Winform/UserControlPages/DailyReportPage.resx b/HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx similarity index 100% rename from HighWayIot.Winform/UserControlPages/DailyReportPage.resx rename to HighWayIot.Winform/UserControlPages/LogPages/DailyReportPage.resx diff --git a/HighWayIot.Winform/UserControlPages/MaterialConfigPage.Designer.cs b/HighWayIot.Winform/UserControlPages/MaterialConfigPage.Designer.cs index d70f2dd..7e6d9e6 100644 --- a/HighWayIot.Winform/UserControlPages/MaterialConfigPage.Designer.cs +++ b/HighWayIot.Winform/UserControlPages/MaterialConfigPage.Designer.cs @@ -48,7 +48,7 @@ namespace HighWayIot.Winform.UserControlPages this.RoleDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.RoleDataGridView.Name = "RoleDataGridView"; this.RoleDataGridView.RowTemplate.Height = 25; - this.RoleDataGridView.Size = new System.Drawing.Size(883, 497); + this.RoleDataGridView.Size = new System.Drawing.Size(1350, 898); this.RoleDataGridView.TabIndex = 0; this.RoleDataGridView.Tag = ""; // @@ -70,10 +70,10 @@ namespace HighWayIot.Winform.UserControlPages this.ButtonPanel.Location = new System.Drawing.Point(0, 0); this.ButtonPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ButtonPanel.Name = "ButtonPanel"; - this.ButtonPanel.Size = new System.Drawing.Size(883, 61); + this.ButtonPanel.Size = new System.Drawing.Size(1350, 61); this.ButtonPanel.TabIndex = 4; // - // OperateConfigPage + // MaterialConfigPage // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -81,8 +81,8 @@ namespace HighWayIot.Winform.UserControlPages this.Controls.Add(this.ButtonPanel); this.Controls.Add(this.RoleDataGridView); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.Name = "OperateConfigPage"; - this.Size = new System.Drawing.Size(883, 562); + this.Name = "MaterialConfigPage"; + this.Size = new System.Drawing.Size(1350, 963); ((System.ComponentModel.ISupportInitialize)(this.RoleDataGridView)).EndInit(); this.ButtonPanel.ResumeLayout(false); this.ResumeLayout(false); diff --git a/HighWayIot.sln b/HighWayIot.sln index 7b33717..bfc33c2 100644 --- a/HighWayIot.sln +++ b/HighWayIot.sln @@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Rfid", "HighWayI EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.TouchSocket", "HighWayIot.TouchSocket\HighWayIot.TouchSocket.csproj", "{DD18A634-1F9C-409A-8C32-C3C81B1B55B5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Mqtt", "HighWayIot.Mqtt\HighWayIot.Mqtt.csproj", "{CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Winform", "HighWayIot.Winform\HighWayIot.Winform.csproj", "{E36F832C-5F90-491C-B3B7-E94C734FD292}" EndProject Global @@ -55,10 +53,6 @@ Global {DD18A634-1F9C-409A-8C32-C3C81B1B55B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {DD18A634-1F9C-409A-8C32-C3C81B1B55B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {DD18A634-1F9C-409A-8C32-C3C81B1B55B5}.Release|Any CPU.Build.0 = Release|Any CPU - {CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD9B8712-0E09-42D2-849B-B8EAB02C7AB8}.Release|Any CPU.Build.0 = Release|Any CPU {E36F832C-5F90-491C-B3B7-E94C734FD292}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E36F832C-5F90-491C-B3B7-E94C734FD292}.Debug|Any CPU.Build.0 = Debug|Any CPU {E36F832C-5F90-491C-B3B7-E94C734FD292}.Release|Any CPU.ActiveCfg = Release|Any CPU