搜素物料档案信息
This commit is contained in:
parent
98bc995aea
commit
c1b88bb7f2
@ -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
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 搜素物料档案信息
|
||||
/// </summary>
|
||||
/// <param name="material_info">物料编码或者物料名称</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("search_material_info")]
|
||||
public IActionResult SearchMaterialInfo(string material_info)
|
||||
{
|
||||
var response = _ProcessRoutingService.SearchMaterialInfo(material_info);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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; }
|
||||
|
||||
@ -19,6 +19,12 @@ namespace MDM.Model.Process
|
||||
[SugarColumn(ColumnName = "fk_product_material_code")]
|
||||
public string FkProductMaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产成品name
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "product_name")]
|
||||
public string ProductMaterialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工艺路线code
|
||||
/// </summary>
|
||||
@ -31,6 +37,11 @@ namespace MDM.Model.Process
|
||||
[SugarColumn(ColumnName = "routing_name")]
|
||||
public string RoutingName { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
|
||||
@ -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<MaterialList> SearchMaterialInfo(string material_info);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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<MaterialList> SearchMaterialInfo(string material_info)
|
||||
{
|
||||
|
||||
var response = Context.Queryable<MaterialList>()
|
||||
.WhereIF(!string.IsNullOrEmpty(material_info), m => m.Name.Contains(material_info) || m.Code.Contains(material_info))
|
||||
.ToList();
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user