diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MaintainRuleMoldListOutput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MaintainRuleMoldListOutput.cs
new file mode 100644
index 00000000..4c5669bd
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MaintainRuleMoldListOutput.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr.Entities.Dto
+{
+ ///
+ /// 保养规则关联模具列表输出参数
+ ///
+ public class MaintainRuleMoldListOutput
+ {
+ ///
+ /// 模具Id
+ ///
+ public string mold_id { get; set; }
+ ///
+ /// 模具编码
+ ///
+ public string mold_code { get; set; }
+ ///
+ /// 模具名称
+ ///
+ public string mold_name { get; set; }
+ }
+}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
index 187a4940..f34d8433 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
@@ -8,7 +8,7 @@ namespace Tnb.EquipMgr.Entities
///
///模具保养
///
- [SugarTable("tool_mold_maintenance")]
+ [SugarTable("tool_mold_maintain_item")]
public partial class MoldMaintenance
{
///
diff --git a/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs b/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs
index 8fc11254..4b73b973 100644
--- a/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs
+++ b/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs
@@ -12,6 +12,7 @@ using Tnb.Common.Contracts;
using Tnb.EquipMgr.Entities.Dto;
using Tnb.EquipMgr.Entities;
using Tnb.EquipMgr.Utils;
+using Mapster;
namespace Tnb.EquipMgr
{
@@ -22,13 +23,21 @@ namespace Tnb.EquipMgr
{
_db = db;
}
-
- protected async Task Relevance(TSrc input,string masterTableName, string name, Expression> deleleExp) where TDest : BaseEntity, new()
+ ///
+ /// 关联
+ ///
+ /// 输入参数类型
+ /// 目标数据库表类型
+ /// 输入参数
+ /// 主表属性名称
+ /// 次表属性名称
+ /// 删除条件
+ ///
+ ///
+ protected async Task Relevance(TSrc input, string mColumnName, string name, Expression> deleleExp) where TDest : BaseEntity, new()
where TSrc : BaseMoldMaintainInput
{
-
await _db.Deleteable().Where(deleleExp).ExecuteCommandAsync();
- //var itemGroupId = nameof(ToolMoldMaintainGroupRelation.item_group_id);
if (input == null) throw new ArgumentNullException(nameof(input));
var entities = new List();
if (input.ids?.Count > 0)
@@ -38,10 +47,10 @@ namespace Tnb.EquipMgr
var pk = id;
TDest entity = new();
entity.id = SnowflakeIdHelper.NextId();
- if (!PropertySet.ValueFactories.TryGetValue(masterTableName, out Action