diff --git a/ProductionSystem_Model/DbModel/T_Product_Step.cs b/ProductionSystem_Model/DbModel/T_Product_Step.cs new file mode 100644 index 0000000..e61b301 --- /dev/null +++ b/ProductionSystem_Model/DbModel/T_Product_Step.cs @@ -0,0 +1,36 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProductionSystem_Model.DbModel +{ + /// + /// 产品步骤 + /// + public class T_Product_Step + { + [SugarColumn(ColumnName = "id", IsPrimaryKey = true)] + public int Id { get; set; } + + [SugarColumn(ColumnName = "step_name")] + public string StepName { get; set; } + + [SugarColumn(ColumnName = "equipment_name")] + public string EquipmentName { get; set; } + + [SugarColumn(ColumnName = "write_value")] + public string WriteValue { get; set; } + + [SugarColumn(ColumnName = "return_value")] + public string ReturnValue { get; set; } + + [SugarColumn(ColumnName = "createdtime")] + public DateTime CreateTime { get; set; } + + [SugarColumn(ColumnName = "product_type")] + public string ProductType { get; set; } + } +} diff --git a/ProductionSystem_Model/ProductionSystem_Model.csproj b/ProductionSystem_Model/ProductionSystem_Model.csproj index 5c229e5..8c8e4e8 100644 --- a/ProductionSystem_Model/ProductionSystem_Model.csproj +++ b/ProductionSystem_Model/ProductionSystem_Model.csproj @@ -113,6 +113,7 @@ + diff --git a/ProductionSystem_Service/ProductStepService.cs b/ProductionSystem_Service/ProductStepService.cs new file mode 100644 index 0000000..f3cc21f --- /dev/null +++ b/ProductionSystem_Service/ProductStepService.cs @@ -0,0 +1,30 @@ +using ProductionSystem_Log; +using ProductionSystem_Model.DbModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProductionSystem_Service +{ + public class ProductStepService : DbContext + { + /// + /// 新增产品步骤内容 + /// + /// + /// + public int AddProductStep(T_Product_Step t_Product_Step) + { + try + { + return db.Insertable(t_Product_Step).ExecuteCommand(); + }catch (Exception ex) + { + LogHelper.Error(ex, "执行ProductStepService下AddProductStep时异常"); + return -1; + } + } + } +} diff --git a/ProductionSystem_Service/ProductionSystem_Service.csproj b/ProductionSystem_Service/ProductionSystem_Service.csproj index 3ee7d6c..7aedf8c 100644 --- a/ProductionSystem_Service/ProductionSystem_Service.csproj +++ b/ProductionSystem_Service/ProductionSystem_Service.csproj @@ -111,6 +111,7 @@ +