diff --git a/MDM/Controllers/Process/ProcessOperationController.cs b/MDM/Controllers/Process/ProcessOperationController.cs
index 2630b74..22f2239 100644
--- a/MDM/Controllers/Process/ProcessOperationController.cs
+++ b/MDM/Controllers/Process/ProcessOperationController.cs
@@ -196,6 +196,9 @@ namespace MDM.Controllers.Process
return ToResponse(response);
}
+
+
+
//TODO 工艺参数数采删除
[HttpDelete("operation_delete_datacollection/{operation_datacollection_id}")]
public IActionResult OperationDeleteDatacollection(int operation_datacollection_id)
@@ -204,10 +207,50 @@ namespace MDM.Controllers.Process
return ToResponse(response);
}
+ ///
+ /// 查询物料防错规则字典
+ ///
+ ///
+ ///
+ [HttpGet("search_material_errorproof_dict")]
+ public IActionResult SearchMaterialErrorproofDict(string error_proof_rule_code)
+ {
+ var response = _ProcessOperationService.SearchMaterialErrorproofDict(error_proof_rule_code);
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 搜素物料档案信息
+ ///
+ /// 物料编码或者物料名称
+ ///
+ [HttpGet("search_material_info")]
+ public IActionResult SearchMaterialInfo(string material_info)
+ {
+ var response = _ProcessOperationService.SearchMaterialInfo(material_info);
+ return SUCCESS(response);
+ }
+
+
//TODO 新增物料信息
+ [HttpPost("operation_add_material_paramter")]
+ public IActionResult OperationAddMaterialParamter([FromBody] ProcessOperationFlowMaterialParamterDto parm)
+ {
+ var response = _ProcessOperationService.OperationAddMaterialParamter(parm);
+ return ToResponse(response);
+ }
+ //TODO 物料信息删除
+ [HttpDelete("operation_delete_material_paramter/{operation_material_paramter_id}")]
+ public IActionResult OperationDeleteMaterialParamter(int operation_material_paramter_id)
+ {
+ var response = _ProcessOperationService.OperationDeleteMaterialParamter(operation_material_paramter_id);
+ return ToResponse(response);
+ }
+
+
}
}
\ No newline at end of file
diff --git a/MDM/Models/Process/Dto/ProcessOperationCollectParameterDto.cs b/MDM/Models/Process/Dto/ProcessOperationCollectParameterDto.cs
index 9e85940..53b967e 100644
--- a/MDM/Models/Process/Dto/ProcessOperationCollectParameterDto.cs
+++ b/MDM/Models/Process/Dto/ProcessOperationCollectParameterDto.cs
@@ -96,13 +96,13 @@ namespace MDM.Model.Process.Dto
/// 是否为控制参数:1=是(如PID控制),0=否(仅采集)
///
- public string IsControlled { get; set; }
+ public int IsControlled { get; set; }
///
/// 是否为监控参数(是否采集/显示):1=是,0=否
///
- public string IsMonitored { get; set; }
+ public int IsMonitored { get; set; }
///
/// 控制类型(如PID、ON/OFF、手动设定等,可选)
@@ -119,7 +119,7 @@ namespace MDM.Model.Process.Dto
///
/// 是否必填/必采:1=是,0=否
///
- public string IsRequired { get; set; }
+ public int IsRequired { get; set; }
///
/// 参数排序(用于UI展示顺序)
diff --git a/MDM/Models/Process/ProcessOperationCollectParameter.cs b/MDM/Models/Process/ProcessOperationCollectParameter.cs
index bb91eec..fab3299 100644
--- a/MDM/Models/Process/ProcessOperationCollectParameter.cs
+++ b/MDM/Models/Process/ProcessOperationCollectParameter.cs
@@ -83,13 +83,13 @@ namespace MDM.Model.Process
/// 是否为控制参数:1=是(如PID控制),0=否(仅采集)
///
[SugarColumn(ColumnName = "is_controlled")]
- public string IsControlled { get; set; }
+ public int IsControlled { get; set; }
///
/// 是否为监控参数(是否采集/显示):1=是,0=否
///
[SugarColumn(ColumnName = "is_monitored")]
- public string IsMonitored { get; set; }
+ public int IsMonitored { get; set; }
///
/// 控制类型(如PID、ON/OFF、手动设定等,可选)
@@ -107,7 +107,7 @@ namespace MDM.Model.Process
/// 是否必填/必采:1=是,0=否
///
[SugarColumn(ColumnName = "is_required")]
- public string IsRequired { get; set; }
+ public int IsRequired { get; set; }
///
/// 参数排序(用于UI展示顺序)
diff --git a/MDM/Services/Process/IService/IProcessOperationService.cs b/MDM/Services/Process/IService/IProcessOperationService.cs
index 7c6cca5..6d0035e 100644
--- a/MDM/Services/Process/IService/IProcessOperationService.cs
+++ b/MDM/Services/Process/IService/IProcessOperationService.cs
@@ -2,6 +2,7 @@
using Aliyun.OSS;
using MDM.Model;
+using MDM.Model.Material;
using MDM.Model.Process;
using MDM.Model.Process.Dto;
using MDM.Models.Process;
@@ -42,5 +43,12 @@ namespace MDM.Services.IProcessService
List GetOperationFlowList(string routing_code, string operation_code);
int OperationAddDatacollection(ProcessOperationCollectParameterDto parm);
int OperationDeleteDatacollection(int operation_datacollection_id);
+ List SearchMaterialInfo(string material_info);
+ List SearchMaterialErrorproofDict(string error_proof_rule_code);
+ int OperationAddMaterialParamter(ProcessOperationFlowMaterialParamterDto parm);
+
+ int OperationDeleteMaterialParamter(int operation_material_paramter_id);
+
+
}
}
diff --git a/MDM/Services/Process/ProcessOperationService.cs b/MDM/Services/Process/ProcessOperationService.cs
index d3f8ef0..fed68ce 100644
--- a/MDM/Services/Process/ProcessOperationService.cs
+++ b/MDM/Services/Process/ProcessOperationService.cs
@@ -6,6 +6,7 @@ using Infrastructure.Attribute;
using Mapster;
using MDM.Controllers.Process;
using MDM.Model;
+using MDM.Model.Material;
using MDM.Model.Process;
using MDM.Model.Process.Dto;
using MDM.Models.Process;
@@ -253,5 +254,33 @@ namespace MDM.Services.Process
}
+
+ public List SearchMaterialInfo(string material_info)
+ {
+ return null;
+ }
+
+ public List SearchMaterialErrorproofDict(string error_proof_rule_code)
+ {
+
+ var response = Context.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(error_proof_rule_code), m => m.ErrorProofRuleCode.Contains(error_proof_rule_code))
+ .ToList();
+ return response;
+ }
+
+ public int OperationAddMaterialParamter(ProcessOperationFlowMaterialParamterDto parm)
+ {
+ var model = parm.Adapt();
+ model.CreatedTime = DateTime.Now;
+ var response = Context.Insertable(model).ExecuteCommand();
+ return response;
+ }
+ public int OperationDeleteMaterialParamter(int operation_material_paramter_id)
+ {
+ var response = Context.Deleteable(m => m.id == operation_material_paramter_id).ExecuteCommand();
+ return response;
+ }
+
}
}
\ No newline at end of file