获取所有供应商

This commit is contained in:
qianhao.xu 2024-11-04 14:49:16 +08:00
parent 2e79761955
commit c223465ea0
3 changed files with 21 additions and 0 deletions

View File

@ -138,6 +138,16 @@ namespace DOAN.WebApi.Controllers.MES.quality.IPQC
return SUCCESS(response);
}
//TODO 获取所有供应商
[HttpGet("get_add_supplier")]
public IActionResult GetAddSupplier(string supplierCode)
{
var response = _QcDefectCollectionService.GetAllSuppliers(supplierCode);
return SUCCESS(response);
}

View File

@ -36,5 +36,8 @@ namespace DOAN.Service.MES.quality.IPQC.IService
List<BaseWorkRoute> GetAllLines();
List<BaseSupplier> GetAllSuppliers(string supplier_str);
}
}

View File

@ -198,5 +198,13 @@ namespace DOAN.Service.MES.quality.IPQC
return Context.Queryable<BaseWorkRoute>().Where(it => it.Status == 1).ToList();
}
public List<BaseSupplier> GetAllSuppliers(string supplier_str)
{
return Context.Queryable<BaseSupplier>()
.WhereIF(string.IsNullOrEmpty(supplier_str),it=>it.SupplierNo.Contains(supplier_str))
.Where(it=>it.Status == 1).ToList();
}
}
}