diff --git a/MDM/Controllers/Process/ProcessRoutingController.cs b/MDM/Controllers/Process/ProcessRoutingController.cs
index e4833e2..3d2d0d1 100644
--- a/MDM/Controllers/Process/ProcessRoutingController.cs
+++ b/MDM/Controllers/Process/ProcessRoutingController.cs
@@ -1,17 +1,17 @@
-using Microsoft.AspNetCore.Mvc;
-
using DOAN.Admin.WebApi.Filters;
-using Infrastructure.Controllers;
+using DOAN.Common;
using DOAN.ServiceCore.Middleware;
-using Mapster;
-using Infrastructure.Enums;
using Infrastructure;
using Infrastructure.Attribute;
-using DOAN.Common;
+using Infrastructure.Controllers;
+using Infrastructure.Enums;
using Infrastructure.Model;
-using MDM.Services.IProcessService;
-using MDM.Model.Process.Dto;
+using Mapster;
using MDM.Model.Process;
+using MDM.Model.Process.Dto;
+using MDM.Services.IProcessService;
+using MDM.Services.Process;
+using Microsoft.AspNetCore.Mvc;
//创建时间:2025-11-15
namespace MDM.Controllers.Process
@@ -118,6 +118,17 @@ namespace MDM.Controllers.Process
}
+ ///
+ /// 搜素物料档案信息
+ ///
+ /// 物料编码或者物料名称
+ ///
+ [HttpGet("search_material_info")]
+ public IActionResult SearchMaterialInfo(string material_info)
+ {
+ var response = _ProcessRoutingService.SearchMaterialInfo(material_info);
+ return SUCCESS(response);
+ }
}
diff --git a/MDM/Models/Process/Dto/ProcessRoutingDto.cs b/MDM/Models/Process/Dto/ProcessRoutingDto.cs
index 71286c5..912de13 100644
--- a/MDM/Models/Process/Dto/ProcessRoutingDto.cs
+++ b/MDM/Models/Process/Dto/ProcessRoutingDto.cs
@@ -26,6 +26,7 @@ namespace MDM.Model.Process.Dto
public int RoutingId { get; set; }
public string FkProductMaterialCode { get; set; }
+ public string ProductMaterialCode { get; set; }
[Required(ErrorMessage = "工艺路线code不能为空")]
public string RoutingCode { get; set; }
diff --git a/MDM/Models/Process/ProcessRouting.cs b/MDM/Models/Process/ProcessRouting.cs
index bcf25b2..b540e22 100644
--- a/MDM/Models/Process/ProcessRouting.cs
+++ b/MDM/Models/Process/ProcessRouting.cs
@@ -19,6 +19,12 @@ namespace MDM.Model.Process
[SugarColumn(ColumnName = "fk_product_material_code")]
public string FkProductMaterialCode { get; set; }
+ ///
+ /// 产成品name
+ ///
+ [SugarColumn(ColumnName = "product_name")]
+ public string ProductMaterialName { get; set; }
+
///
/// 工艺路线code
///
@@ -31,6 +37,11 @@ namespace MDM.Model.Process
[SugarColumn(ColumnName = "routing_name")]
public string RoutingName { get; set; }
+
+
+
+
+
///
/// 版本号
///
diff --git a/MDM/Services/Process/IService/IProcessRoutingService.cs b/MDM/Services/Process/IService/IProcessRoutingService.cs
index 8130d5e..05dbea2 100644
--- a/MDM/Services/Process/IService/IProcessRoutingService.cs
+++ b/MDM/Services/Process/IService/IProcessRoutingService.cs
@@ -1,6 +1,7 @@
using MDM.Model;
+using MDM.Model.Material;
using MDM.Model.Process;
using MDM.Model.Process.Dto;
using MDM.Service;
@@ -22,5 +23,7 @@ namespace MDM.Services.IProcessService
int UpdateProcessRouting(ProcessRouting parm);
+ List SearchMaterialInfo(string material_info);
+
}
}
diff --git a/MDM/Services/Process/ProcessOperationService.cs b/MDM/Services/Process/ProcessOperationService.cs
index 56d81df..047a789 100644
--- a/MDM/Services/Process/ProcessOperationService.cs
+++ b/MDM/Services/Process/ProcessOperationService.cs
@@ -36,7 +36,6 @@ namespace MDM.Services.Process
.AndIF(!string.IsNullOrEmpty(parm.OperationCode), m => m.OperationCode.Contains(parm.OperationCode))
.AndIF(!string.IsNullOrEmpty(parm.OperationName), m => m.OperationName.Contains(parm.OperationName))
.AndIF(!string.IsNullOrEmpty(parm.ParallelGroupCode), m => m.ParallelGroupCode.Contains(parm.ParallelGroupCode))
-
;
var response = Queryable()
diff --git a/MDM/Services/Process/ProcessRoutingService.cs b/MDM/Services/Process/ProcessRoutingService.cs
index bf339b1..2429245 100644
--- a/MDM/Services/Process/ProcessRoutingService.cs
+++ b/MDM/Services/Process/ProcessRoutingService.cs
@@ -1,6 +1,7 @@
using Infrastructure.Attribute;
using MDM.Model;
+using MDM.Model.Material;
using MDM.Model.Process;
using MDM.Model.Process.Dto;
using MDM.Repository;
@@ -87,6 +88,13 @@ namespace MDM.Services.Process
//return response;
return Update(model, true);
}
+ public List SearchMaterialInfo(string material_info)
+ {
+ var response = Context.Queryable()
+ .WhereIF(!string.IsNullOrEmpty(material_info), m => m.Name.Contains(material_info) || m.Code.Contains(material_info))
+ .ToList();
+ return response;
+ }
}
}
\ No newline at end of file