获取车型,获取零件号

This commit is contained in:
qianhao.xu 2024-08-27 09:46:52 +08:00
parent 94eca8aba6
commit d1daa77620
3 changed files with 41 additions and 7 deletions

View File

@ -103,11 +103,12 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
// TODO 根据配方id 获取上下限列表
[HttpGet("get_recipe/{Id}")]
public IActionResult GetRecipebyLimit(int Id)
public IActionResult GetRecipebyLimit(int Id)
{
if (Id <= 0) {
if (Id <= 0)
{
throw new Exception("参数异常,请检查常数");
}
var response = _RecipeService.GetRecipebyLimit(Id);
return SUCCESS(response);
@ -116,7 +117,7 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
//TODO 获取公司
[HttpGet("get_company")]
public IActionResult GetAllCompany()
public IActionResult GetAllCompany()
{
var response = _RecipeService.GetAllCompany();
return SUCCESS(response);
@ -124,7 +125,7 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
//TODO 获取车间
[HttpGet("get_workshop")]
public IActionResult GetWorkShopByCompany(int company_id)
public IActionResult GetWorkShopByCompany(int company_id)
{
if (company_id <= 0)
{
@ -138,7 +139,7 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
//TODO 获取产线和设备 children
[HttpGet("get_line_childen_device")]
public IActionResult GetLineChildenDevice(int workshop_id)
public IActionResult GetLineChildenDevice(int workshop_id)
{
if (workshop_id <= 0)
{
@ -151,7 +152,7 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
//TODO 选中配方
[HttpGet("selected")]
public IActionResult SelectedRecipe(int recipe_id)
public IActionResult SelectedRecipe(int recipe_id)
{
if (recipe_id <= 0)
{
@ -163,6 +164,22 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
}
//TODO 获取车型
[HttpGet("get_vehicelmodel")]
public IActionResult GetVehicelModel(string partString)
{
var response = _RecipeService.GetVehicelModel(partString);
return SUCCESS(response);
}
//TODO 获取零件号
[HttpGet("get_partnumber")]
public IActionResult GetPartNumber(string partString)
{
var response = _RecipeService.GetPartNumber(partString);
return SUCCESS(response);
}
}
}

View File

@ -1,4 +1,5 @@
using DOAN.Model.Factory_Model;
using DOAN.Model.huate_group.MasterDataManagement;
using DOAN.Model.huate_group.recipe;
using DOAN.Model.huate_group.recipe.Dto;
@ -27,5 +28,9 @@ namespace DOAN.Service.huate_group.Recipe.IService
List<ProductLineChildrenDevice> GetLineChildenDevice(int workshop_id);
int SelectedRecipe(int recipe_id);
List<BaseVehiclemodel> GetVehicelModel(string partString);
List<BasePartnumber> GetPartNumber(string partString);
}
}

View File

@ -7,6 +7,8 @@ using DOAN.Repository;
using Aliyun.OSS;
using DOAN.Model.Factory_Model;
using DOAN.Model.Factory_Model.Dto;
using DOAN.Model.huate_group.MasterDataManagement;
using Microsoft.AspNetCore.Http;
namespace DOAN.Service.huate_group.Recipe
@ -212,5 +214,15 @@ namespace DOAN.Service.huate_group.Recipe
return result;
}
public List<BaseVehiclemodel> GetVehicelModel(string partString)
{
return Context.Queryable<BaseVehiclemodel>().WhereIF(!string.IsNullOrEmpty(partString), it => it.VehicelModelName.Contains(partString)).ToList();
}
public List<BasePartnumber> GetPartNumber(string partString)
{
return Context.Queryable<BasePartnumber>().WhereIF(!string.IsNullOrEmpty(partString), it => it.PartnumberName.Contains(partString)).ToList();
}
}
}