1
0
Fork 0

add - 添加数据库实体类业务类新建四个库

nodyang
SoulStar 2 months ago
parent 56541ff30f
commit 916532af5a

@ -25,7 +25,7 @@ namespace HighWayIot.Repository.service
Repository<SysShiftTimeEntity> _repository => new Repository<SysShiftTimeEntity>("sqlserver"); Repository<SysShiftTimeEntity> _repository => new Repository<SysShiftTimeEntity>("sqlserver");
/// <summary> /// <summary>
/// 条件查询所有用户列表 用户名为模糊查询 /// 查询所有班次信息
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public List<SysShiftTimeEntity> GetShiftInfos() public List<SysShiftTimeEntity> GetShiftInfos()

@ -26,37 +26,65 @@ namespace HighWayIot.Repository.service
Repository<ZxMaterialEntity> _repository => new Repository<ZxMaterialEntity>("sqlserver"); Repository<ZxMaterialEntity> _repository => new Repository<ZxMaterialEntity>("sqlserver");
/// <summary> /// <summary>
/// 条件查询所有用户列表 用户名为模糊查询 /// 查询所有物料信息
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public List<ZxMaterialEntity> GetShiftInfos() public List<ZxMaterialEntity> GetMaterialInfos()
{ {
try try
{ {
List<ZxMaterialEntity> deviceInfo = _repository.GetList(); List<ZxMaterialEntity> deviceInfo = _repository.GetList(x => x.IsDeleted == false);
return deviceInfo; return deviceInfo;
} }
catch (Exception ex) catch (Exception ex)
{ {
log.Error("用户信息获取异常", ex); log.Error("物料信息获取异常", ex);
return null; return null;
} }
} }
/// <summary> /// <summary>
/// 修改班次信息 /// 修改物料信息
/// </summary> /// </summary>
/// <param name="sysUserEntity"></param> /// <param name="sysUserEntity"></param>
/// <returns></returns> /// <returns></returns>
public bool UpdateShiftInfo(ZxMaterialEntity sysUserEntity) public bool UpdateMaterialInfo(ZxMaterialEntity sysUserEntity)
{ {
try try
{ {
return _repository.Update(sysUserEntity); 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; return false;
} }
} }

@ -33,7 +33,7 @@ namespace HighWayIot.Repository.service
{ {
try try
{ {
List<ZxRecipeEntity> deviceInfo = _repository.GetList(); List<ZxRecipeEntity> deviceInfo = _repository.GetList(x => x.IsDeleted == false);
return deviceInfo; return deviceInfo;
} }
catch (Exception ex) catch (Exception ex)

@ -89,10 +89,10 @@
<Compile Include="UserControlPages\RecipeConfigPage.Designer.cs"> <Compile Include="UserControlPages\RecipeConfigPage.Designer.cs">
<DependentUpon>RecipeConfigPage.cs</DependentUpon> <DependentUpon>RecipeConfigPage.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UserControlPages\DailyReportPage.cs"> <Compile Include="UserControlPages\LogPages\DailyReportPage.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="UserControlPages\DailyReportPage.Designer.cs"> <Compile Include="UserControlPages\LogPages\DailyReportPage.Designer.cs">
<DependentUpon>DailyReportPage.cs</DependentUpon> <DependentUpon>DailyReportPage.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UserControlPages\EquipMaterialBindingPage.cs"> <Compile Include="UserControlPages\EquipMaterialBindingPage.cs">
@ -189,7 +189,7 @@
<EmbeddedResource Include="UserControlPages\RecipeConfigPage.resx"> <EmbeddedResource Include="UserControlPages\RecipeConfigPage.resx">
<DependentUpon>RecipeConfigPage.cs</DependentUpon> <DependentUpon>RecipeConfigPage.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UserControlPages\DailyReportPage.resx"> <EmbeddedResource Include="UserControlPages\LogPages\DailyReportPage.resx">
<DependentUpon>DailyReportPage.cs</DependentUpon> <DependentUpon>DailyReportPage.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UserControlPages\EquipMaterialBindingPage.resx"> <EmbeddedResource Include="UserControlPages\EquipMaterialBindingPage.resx">

@ -48,7 +48,7 @@ namespace HighWayIot.Winform.UserControlPages
this.RoleDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.RoleDataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.RoleDataGridView.Name = "RoleDataGridView"; this.RoleDataGridView.Name = "RoleDataGridView";
this.RoleDataGridView.RowTemplate.Height = 25; 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.TabIndex = 0;
this.RoleDataGridView.Tag = ""; this.RoleDataGridView.Tag = "";
// //
@ -70,10 +70,10 @@ namespace HighWayIot.Winform.UserControlPages
this.ButtonPanel.Location = new System.Drawing.Point(0, 0); this.ButtonPanel.Location = new System.Drawing.Point(0, 0);
this.ButtonPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.ButtonPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ButtonPanel.Name = "ButtonPanel"; 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; this.ButtonPanel.TabIndex = 4;
// //
// OperateConfigPage // MaterialConfigPage
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@ -81,8 +81,8 @@ namespace HighWayIot.Winform.UserControlPages
this.Controls.Add(this.ButtonPanel); this.Controls.Add(this.ButtonPanel);
this.Controls.Add(this.RoleDataGridView); this.Controls.Add(this.RoleDataGridView);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "OperateConfigPage"; this.Name = "MaterialConfigPage";
this.Size = new System.Drawing.Size(883, 562); this.Size = new System.Drawing.Size(1350, 963);
((System.ComponentModel.ISupportInitialize)(this.RoleDataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.RoleDataGridView)).EndInit();
this.ButtonPanel.ResumeLayout(false); this.ButtonPanel.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);

@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Rfid", "HighWayI
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.TouchSocket", "HighWayIot.TouchSocket\HighWayIot.TouchSocket.csproj", "{DD18A634-1F9C-409A-8C32-C3C81B1B55B5}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.TouchSocket", "HighWayIot.TouchSocket\HighWayIot.TouchSocket.csproj", "{DD18A634-1F9C-409A-8C32-C3C81B1B55B5}"
EndProject 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}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HighWayIot.Winform", "HighWayIot.Winform\HighWayIot.Winform.csproj", "{E36F832C-5F90-491C-B3B7-E94C734FD292}"
EndProject EndProject
Global Global
@ -55,10 +53,6 @@ Global
{DD18A634-1F9C-409A-8C32-C3C81B1B55B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {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.ActiveCfg = Release|Any CPU
{DD18A634-1F9C-409A-8C32-C3C81B1B55B5}.Release|Any CPU.Build.0 = 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.ActiveCfg = Debug|Any CPU
{E36F832C-5F90-491C-B3B7-E94C734FD292}.Debug|Any CPU.Build.0 = 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 {E36F832C-5F90-491C-B3B7-E94C734FD292}.Release|Any CPU.ActiveCfg = Release|Any CPU

Loading…
Cancel
Save