根据产线编码获取工艺路线下拉列表

This commit is contained in:
quowingwang 2025-11-12 14:35:13 +08:00
parent ff4c3dad8d
commit 2aa35d3d91
3 changed files with 25 additions and 0 deletions

View File

@ -206,5 +206,17 @@ namespace RIZO.Admin.WebApi.Controllers.Mes.Process
var response = _ProcessInfoService.GetAllProcessInfo();
return SUCCESS(response);
}
/// <summary>
/// 根据产线编码获取工艺路线信息下拉列表
/// </summary>
/// <param name="parm"></param>
/// <returns></returns>
[HttpGet("GetProcessInfoByLineCode/{lineCode}")]
public IActionResult GetProcessInfoByLineCode([FromRoute] string lineCode)
{
var response = _ProcessInfoService.GetProcessInfoByLineCode(lineCode);
return SUCCESS(response);
}
}
}

View File

@ -26,5 +26,6 @@ namespace RIZO.Service.Mes.IMesService.Process
List<ProcessInfoPullDownDto> GetAllProcessInfo();
List<ProcessInfoPullDownDto> GetProcessInfoByLineCode(string lineCode);
}
}

View File

@ -294,5 +294,17 @@ namespace RIZO.Service.Mes.Process
}).ToList(); // 执行查询并转换为列表
return lineOptions;
}
public List<ProcessInfoPullDownDto> GetProcessInfoByLineCode(string lineCode)
{
var lineOptions = Queryable().Where(it =>it.LineCode == lineCode)
.OrderBy(it => it.ProcessCode)
.Select(it => new ProcessInfoPullDownDto
{
value = it.ProcessCode,
label = it.ProcessName
}).ToList(); // 执行查询并转换为列表
return lineOptions;
}
}
}