工厂和车间下拉
This commit is contained in:
parent
00108081e7
commit
ff4d6c2307
@ -119,9 +119,9 @@ namespace MDM.Controllers.Plant
|
||||
/// <param name="site_code">工厂code</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("get_factory_site")]
|
||||
public IActionResult GetFactorySite(string site_code)
|
||||
public IActionResult GetFactorySite()
|
||||
{
|
||||
var response = _PlantProductlinebodyService.GetFactorySite(site_code);
|
||||
var response = _PlantProductlinebodyService.GetFactorySite();
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
@ -129,9 +129,9 @@ namespace MDM.Controllers.Plant
|
||||
//获取车间
|
||||
|
||||
[HttpGet("get_workshop")]
|
||||
public IActionResult GetWorkShop(string site_code, string workshop_code)
|
||||
public IActionResult GetWorkShop(string site_code)
|
||||
{
|
||||
var response = _PlantProductlinebodyService.GetWorkShop(site_code, workshop_code);
|
||||
var response = _PlantProductlinebodyService.GetWorkShop(site_code);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@ -22,9 +22,9 @@ namespace MDM.Services.IPlantService
|
||||
List<LinePullDownDto> GetAllLine();
|
||||
|
||||
List<PlantWorkstation> GetWorkstationList(int id);
|
||||
List<PlantFactorySite> GetFactorySite(string site_code);
|
||||
List<PlantFactorySite> GetFactorySite();
|
||||
|
||||
List<PlantWorkshop> GetWorkShop(string site_code, string workshop_code);
|
||||
List<PlantWorkshop> GetWorkShop(string site_code);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,17 +106,16 @@ namespace MDM.Services.Plant
|
||||
|
||||
return Context.Queryable<PlantWorkstation>().Where(it => it.FkFactorySiteCode == productlinebody.FkFactorySiteCode && it.FkWorkshopCode == productlinebody.FkWorkshopCode && it.FkProductlinebody == productlinebody.LineCode).ToList();
|
||||
}
|
||||
public List<PlantFactorySite> GetFactorySite(string site_code)
|
||||
public List<PlantFactorySite> GetFactorySite()
|
||||
{
|
||||
return Context.Queryable<PlantFactorySite>().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
|
||||
return Context.Queryable<PlantFactorySite>().ToList();
|
||||
}
|
||||
|
||||
|
||||
public List<PlantWorkshop> GetWorkShop(string site_code, string workshop_code)
|
||||
public List<PlantWorkshop> GetWorkShop(string site_code)
|
||||
{
|
||||
return Context.Queryable<PlantWorkshop>()
|
||||
.WhereIF(!string.IsNullOrEmpty(site_code), it => it.FkSiteCode.Contains(site_code))
|
||||
.WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user