diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Consts/SpotInsRecordExecutionStatus.cs b/EquipMgr/Tnb.EquipMgr.Entities/Consts/SpotInsRecordExecutionStatus.cs
index f847477a..d774afae 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Consts/SpotInsRecordExecutionStatus.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Consts/SpotInsRecordExecutionStatus.cs
@@ -13,11 +13,11 @@ namespace Tnb.EquipMgr
///
/// 待复核
///
- public const string TOBECHECK = "1";
+ public const string TOBECHECK = "2";
///
/// 已完成
///
- public const string COMPLETED = "1";
+ public const string COMPLETED = "3";
}
}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/BaseMoldMaintainInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/BaseMoldMaintainInput.cs
new file mode 100644
index 00000000..e34be422
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/BaseMoldMaintainInput.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr.Entities.Dto
+{
+ public class BaseMoldMaintainInput
+ {
+ public string item_group_id { get; set; }
+ public List ids { get; set; }
+ }
+}
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/Dto/ProducttListOutput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MaterialListOutput.cs
similarity index 70%
rename from EquipMgr/Tnb.EquipMgr.Entities/Dto/ProducttListOutput.cs
rename to EquipMgr/Tnb.EquipMgr.Entities/Dto/MaterialListOutput.cs
index f4561ecb..bf1d1328 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/ProducttListOutput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MaterialListOutput.cs
@@ -7,15 +7,14 @@ using System.Threading.Tasks;
namespace Tnb.EquipMgr.Entities.Dto
{
///
- /// 产品列表输出类
+ /// 物料列表输出类
///
- public class ProductListOutput
+ public class MaterialListOutput
{
public string id { get; set; }
- public string product_code { get; set; }
- public string product_name { get; set; }
- public string product_standard { get; set; }
- public string product_group { get; set; }
+ public string code { get; set; }
+ public string name { get; set; }
+ public string material_group { get; set; }
public int real_cavity_qty { get; set; }
}
///
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldListOutput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldListOutput.cs
index d385c1bc..72a9bc91 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldListOutput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldListOutput.cs
@@ -8,7 +8,7 @@ namespace Tnb.EquipMgr.Entities.Dto
{
public class RelevanceMoldListOutput
{
-
+ public string mold_id { get; set; }
///
/// Desc:模具编号
/// Default:NULL::character varying
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainDelInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainDelInput.cs
new file mode 100644
index 00000000..4bedda98
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainDelInput.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr.Entities.Dto
+{
+ ///
+ /// 模具保养删除参数
+ ///
+ public class MoldMaintainDelInput : BaseMoldMaintainInput
+ {
+ ///
+ /// 删除的表名
+ ///
+ public string table_name { get; set; }
+ }
+}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainGroupItemRelationInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainGroupItemRelationInput.cs
index 98b11fef..0618d131 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainGroupItemRelationInput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainGroupItemRelationInput.cs
@@ -9,15 +9,7 @@ namespace Tnb.EquipMgr.Entities.Dto
///
/// 关联保养组与模具输入参数
///
- public class MoldMaintainGroupItemRelationInput
+ public class MoldMaintainGroupItemRelationInput :BaseMoldMaintainInput
{
- ///
- /// 项目组Id
- ///
- public string item_group_id { get; set; }
- ///
- /// 模具Id
- ///
- public string mold_id { get; set; }
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemInput.cs
index 75205ae8..8820e89a 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemInput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemInput.cs
@@ -9,16 +9,8 @@ namespace Tnb.EquipMgr.Entities.Dto
///
/// 模具保养项输入参数
///
- public class MoldMaintainGroupItemInput
+ public class MoldMaintainGroupItemInput : BaseMoldMaintainInput
{
- ///
- /// 项目组Id
- ///
- public string item_group_id { get; set; }
- ///
- /// 保养项Id
- ///
- public string item_id { get; set; }
-
+
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemListOutput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemListOutput.cs
index 93eefae1..c45b8ad4 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemListOutput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldMaintainItemListOutput.cs
@@ -11,6 +11,10 @@ namespace Tnb.EquipMgr.Entities.Dto
///
public class MoldMaintainItemListOutput
{
+ ///
+ /// 检查项Id
+ ///
+ public string item_id { get; set; }
///
/// 项目名称
///
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
index c64c5312..9c2ea796 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
@@ -9,15 +9,11 @@ namespace Tnb.EquipMgr.Entities.Dto
///
/// 模具规则定义,关键模具输入参数
///
- public class RelevanceMoldInput
+ public class RelevanceMoldInput : BaseMoldMaintainInput
{
///
/// 规则Id
///
public string? rule_id { get; set; }
- ///
- /// 模具Id
- ///
- public string? mold_id { get; set;}
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/SpotInsTemPublishInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/SpotInsTemPublishInput.cs
new file mode 100644
index 00000000..bc1bfaec
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/SpotInsTemPublishInput.cs
@@ -0,0 +1,9 @@
+namespace Tnb.EquipMgr.Entities.Dto
+{
+ public class SpotInsTemPublishInput
+ {
+ public string id { get; set; }
+
+ public string[] equipIds { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/ToolMoldInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/ToolMoldInput.cs
index 5b7ea819..64a6e2f7 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Dto/ToolMoldInput.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/ToolMoldInput.cs
@@ -10,9 +10,9 @@ namespace Tnb.EquipMgr.Entities.Dto
{
public string mold { get; set; }
public string[] equipid { get; set; }
- public string productid { get; set; }
+ public string materialid { get; set; }
public int real_cavity_qty { get; set; }
- public string[] productids { get; set; }
+ public string[] materialids { get; set; }
public string[] molds { get; set; }
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/BasMaterial.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/BasMaterial.cs
new file mode 100644
index 00000000..5e2a0e26
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/BasMaterial.cs
@@ -0,0 +1,352 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using SqlSugar;
+using Tnb.Common.Contracts;
+
+namespace Tnb.EquipMgr.Entities.Entity
+{
+ ///
+ ///物料信息
+ ///
+ [SugarTable("bas_material")]
+ public partial class BasMaterial : BaseEntity
+ {
+ public BasMaterial()
+ {
+
+
+ }
+ ///
+ /// Desc:是否包含入库数
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? is_contain_into_num { get; set; }
+
+ ///
+ /// Desc:批次管理
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? is_batch_enabled { get; set; }
+
+ ///
+ /// Desc:标签管理
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? is_label_enabled { get; set; }
+
+ ///
+ /// Desc:附件
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string attachment { get; set; }
+
+ ///
+ /// Desc:先进先出 0否 1是
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? first_in_out { get; set; }
+
+ ///
+ /// Desc:存储有效期(天)
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? storage_valid_day { get; set; }
+
+ ///
+ /// Desc:预警提前期(天)
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? early_warn_day { get; set; }
+
+ ///
+ /// Desc:安全库存
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? safe_stock { get; set; }
+
+ ///
+ /// Desc:发料仓库id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string send_warehouse_id { get; set; }
+
+ ///
+ /// Desc:入厂单位id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string into_factory_unit_id { get; set; }
+
+ ///
+ /// Desc:安全库存包含状态
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string safe_stock_stauts { get; set; }
+
+ ///
+ /// Desc:投料单位
+ /// Default:
+ /// Nullable:True
+ ///
+ public string material_in_unit_id { get; set; }
+
+ ///
+ /// Desc:产出单位
+ /// Default:
+ /// Nullable:True
+ ///
+ public string material_out_unit_id { get; set; }
+
+ ///
+ /// Desc:请料方式 1按计划排程请料 2自行管控
+ /// Default:
+ /// Nullable:True
+ ///
+ public string material_request_method { get; set; }
+
+ ///
+ /// Desc:物料代码
+ /// Default:
+ /// Nullable:False
+ ///
+ public string code { get; set; }
+
+ ///
+ /// Desc:物料名称
+ /// Default:
+ /// Nullable:False
+ ///
+ public string name { get; set; }
+
+ ///
+ /// Desc:物料分类ID
+ /// Default:
+ /// Nullable:False
+ ///
+ public string category_id { get; set; }
+
+ ///
+ /// Desc:单位ID
+ /// Default:
+ /// Nullable:False
+ ///
+ public string unit_id { get; set; }
+
+ ///
+ /// Desc:单价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? cost { get; set; }
+
+ ///
+ /// Desc:毛重
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? grossweight { get; set; }
+
+ ///
+ /// Desc:净重
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? netweight { get; set; }
+
+ ///
+ /// Desc:长
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? length { get; set; }
+
+ ///
+ /// Desc:宽
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? width { get; set; }
+
+ ///
+ /// Desc:高
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? high { get; set; }
+
+ ///
+ /// Desc:体积
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? volumn { get; set; }
+
+ ///
+ /// Desc:是否免检
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? isexemption { get; set; }
+
+ ///
+ /// Desc:安全库存
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? safeqty { get; set; }
+
+ ///
+ /// Desc:保质期
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? qualityperiod { get; set; }
+
+ ///
+ /// Desc:最小包装
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? minpacking { get; set; }
+
+ ///
+ /// Desc:先进先出间隔天数,批次间隔天数
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? fifo_interval_days { get; set; }
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? create_time { get; set; }
+
+ ///
+ /// Desc:修改时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? modify_time { get; set; }
+
+ ///
+ /// Desc:扩展字段
+ /// Default:
+ /// Nullable:True
+ ///
+ public string extras { get; set; }
+
+ ///
+ /// Desc:所属组织
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string org_id { get; set; }
+
+ ///
+ /// Desc:是否过期允许出库
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string expireout { get; set; }
+
+ ///
+ /// Desc:是否先进先出管控
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string fifo { get; set; }
+
+ ///
+ /// Desc:物料规格型号
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string material_standard { get; set; }
+
+ ///
+ /// Desc:海关编码
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string fhscode { get; set; }
+
+ ///
+ /// Desc:附属性
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string attribute { get; set; }
+
+ ///
+ /// Desc:管控类型: 批管控:Lot 单管控:KeyParts 非管控:NoControl
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string controltype { get; set; }
+
+ ///
+ /// Desc:备注
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string remark { get; set; }
+
+ ///
+ /// Desc:创建用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string create_id { get; set; }
+
+ ///
+ /// Desc:修改用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string modify_id { get; set; }
+
+ ///
+ /// Desc:状态
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string state { get; set; }
+
+ ///
+ /// Desc:物料属性
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string material_property { get; set; }
+
+ ///
+ /// Desc:标签
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string label { get; set; }
+
+ ///
+ /// Desc:描述
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string descrip { 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.Entities/Entity/ToolMoldMaintainRuleRelation.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainRuleRelation.cs
index f27e7d3a..d2818d09 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainRuleRelation.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainRuleRelation.cs
@@ -3,6 +3,7 @@ using System.Linq;
using System.Text;
using JNPF.Common.Security;
using SqlSugar;
+using Tnb.Common.Contracts;
namespace Tnb.EquipMgr.Entities
{
@@ -10,20 +11,8 @@ namespace Tnb.EquipMgr.Entities
///模具保养规则与模具关联
///
[SugarTable("tool_mold_maintain_rule_relation")]
- public partial class ToolMoldMaintainRuleRelation
+ public partial class ToolMoldMaintainRuleRelation:BaseEntity
{
- public ToolMoldMaintainRuleRelation(){
-
-
- }
- ///
- /// Desc:主键
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;} = SnowflakeIdHelper.NextId();
-
///
/// Desc:保养规则id
/// Default:
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsProduct.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsMaterial.cs
similarity index 75%
rename from EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsProduct.cs
rename to EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsMaterial.cs
index 0144e379..78bdc13d 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsProduct.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldsMaterial.cs
@@ -11,21 +11,15 @@ namespace Tnb.EquipMgr.Entities
///
///模具产品关联表
///
- [SugarTable("tool_molds_product")]
- public partial class ToolMoldsProduct
+ [SugarTable("tool_molds_material")]
+ public partial class ToolMoldsMaterial:BaseEntity
{
- public ToolMoldsProduct(){
+ public ToolMoldsMaterial(){
}
- ///
- /// Desc:编号
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;} = SnowflakeIdHelper.NextId();
+
///
/// Desc:模具编号
@@ -35,11 +29,11 @@ namespace Tnb.EquipMgr.Entities
public string mold_id {get;set;} = string.Empty;
///
- /// Desc:产品编号
+ /// Desc:物料编号
/// Default:
/// Nullable:False
///
- public string product_id {get;set;} = string.Empty;
+ public string material_id { get;set;} = string.Empty;
///
/// Desc:创建用户
@@ -77,11 +71,11 @@ namespace Tnb.EquipMgr.Entities
public int? real_cavity_qty {get;set;}
///
- /// Desc:产品同组标识
+ /// Desc:物料同组标识
/// Default:NULL::character varying
/// Nullable:True
///
- public string? product_group {get;set;}
+ public string? material_group { get;set;}
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Mapper/Mapper.cs b/EquipMgr/Tnb.EquipMgr.Entities/Mapper/Mapper.cs
index 47984fa8..3b575108 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Mapper/Mapper.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Mapper/Mapper.cs
@@ -8,6 +8,10 @@ namespace Tnb.EquipMgr.Entities.Mapper
{
public void Register(TypeAdapterConfig config)
{
+ config.ForType()
+ .Map(dest => dest.item_id, src => src.id);
+ config.ForType()
+ .Map(dest => dest.mold_id, src => src.id);
}
}
}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/IEqpSpotInsTemService.cs b/EquipMgr/Tnb.EquipMgr.Interfaces/IEqpSpotInsTemService.cs
new file mode 100644
index 00000000..12bdb6e4
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Interfaces/IEqpSpotInsTemService.cs
@@ -0,0 +1,12 @@
+using Tnb.EquipMgr.Entities.Dto;
+namespace Tnb.EquipMgr.Interfaces
+{
+ public interface IEqpSpotInsTemService
+ {
+ ///
+ /// 根据模板id发布到设备
+ ///
+ ///
+ public Task Publish(SpotInsTemPublishInput input);
+ }
+}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/IEquSpotInsRecordService.cs b/EquipMgr/Tnb.EquipMgr.Interfaces/IEquSpotInsRecordService.cs
new file mode 100644
index 00000000..887c7a87
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Interfaces/IEquSpotInsRecordService.cs
@@ -0,0 +1,14 @@
+using JNPF.Common.Dtos.VisualDev;
+
+namespace Tnb.EquipMgr.Interfaces
+{
+ public interface IEquSpotInsRecordService
+ {
+ ///
+ /// 执行点巡检
+ ///
+ ///
+ ///
+ public Task ExecuteSpotIns(string id,VisualDevModelDataUpInput input);
+ }
+}
\ No newline at end of file
diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldProductService.cs b/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaterialService.cs
similarity index 82%
rename from EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldProductService.cs
rename to EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaterialService.cs
index b7768fe7..be6af180 100644
--- a/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldProductService.cs
+++ b/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaterialService.cs
@@ -8,14 +8,14 @@ using Tnb.EquipMgr.Entities.Dto;
namespace Tnb.EquipMgr.Interfaces
{
- public interface IToolMoldProductService
+ public interface IToolMoldMaterialService
{
///
- /// 根据模具id获取设备集合
+ /// 根据模具id获取物料集合
///
///
///
- public Task> GetProductLists(ToolMoldInput ToolMoldInput);
+ public Task> GetMaterialLists(ToolMoldInput ToolMoldInput);
///
/// 增加模具产品绑定
///
@@ -37,14 +37,14 @@ namespace Tnb.EquipMgr.Interfaces
///
///
///
- public Task SaveProductGroup(ToolMoldInput ToolMoldInput);
+ public Task SaveMaterialGroup(ToolMoldInput ToolMoldInput);
///
/// 取消产品同组
///
///
///
///
- public Task CancelProductGroup(ToolMoldInput ToolMoldInput);
+ public Task CancelMaterialGroup(ToolMoldInput ToolMoldInput);
///
/// 根据产品id获取模具集合
@@ -59,6 +59,6 @@ namespace Tnb.EquipMgr.Interfaces
///
///
- public Task DetachProductData(ToolMoldInput ToolMoldInput);
+ public Task DetachMaterialData(ToolMoldInput ToolMoldInput);
}
}
diff --git a/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs b/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs
new file mode 100644
index 00000000..4b73b973
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr/BaseMoldMaintainService.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+using JNPF.Common.Enums;
+using JNPF.Common.Security;
+using JNPF.FriendlyException;
+using SqlSugar;
+using Tnb.Common.Contracts;
+using Tnb.EquipMgr.Entities.Dto;
+using Tnb.EquipMgr.Entities;
+using Tnb.EquipMgr.Utils;
+using Mapster;
+
+namespace Tnb.EquipMgr
+{
+ public class BaseMoldMaintainService
+ {
+ private readonly ISqlSugarClient _db;
+ public BaseMoldMaintainService(ISqlSugarClient db)
+ {
+ _db = db;
+ }
+ ///
+ /// 关联
+ ///
+ /// 输入参数类型
+ /// 目标数据库表类型
+ /// 输入参数
+ /// 主表属性名称
+ /// 次表属性名称
+ /// 删除条件
+ ///
+ ///
+ 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();
+ if (input == null) throw new ArgumentNullException(nameof(input));
+ var entities = new List();
+ if (input.ids?.Count > 0)
+ {
+ foreach (var id in input.ids)
+ {
+ var pk = id;
+ TDest entity = new();
+ entity.id = SnowflakeIdHelper.NextId();
+ if (!PropertySet.ValueFactories.TryGetValue(mColumnName, out Action