工厂下拉

This commit is contained in:
quowingwang 2026-01-10 10:05:56 +08:00
parent d0c8cb5a0d
commit 7c0ff2ed00
3 changed files with 9 additions and 5 deletions

View File

@ -116,9 +116,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 = _PlantWorkshopService.GetFactorySite(site_code);
var response = _PlantWorkshopService.GetFactorySite();
return SUCCESS(response);
}

View File

@ -19,6 +19,6 @@ namespace MDM.Services.IPlantService
int UpdatePlantWorkshop(PlantWorkshop parm);
List<PlantFactorySite> GetFactorySite(string site_code);
List<PlantFactorySite> GetFactorySite();
}
}

View File

@ -87,9 +87,13 @@ namespace MDM.Services.Plant
return Update(model, true);
}
public List<PlantFactorySite> GetFactorySite(string site_code)
//public List<PlantFactorySite> GetFactorySite(string site_code)
//{
// return Context.Queryable<PlantFactorySite>().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList();
//}
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();
}
}
}