From ff4d6c2307a3be82be584882f8ee5a4a51d915b6 Mon Sep 17 00:00:00 2001 From: quowingwang Date: Sat, 10 Jan 2026 10:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8E=82=E5=92=8C=E8=BD=A6=E9=97=B4?= =?UTF-8?q?=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MDM/Controllers/Plant/PlantProductlinebodyController.cs | 8 ++++---- .../Plant/IService/IPlantProductlinebodyService.cs | 4 ++-- MDM/Services/Plant/PlantProductlinebodyService.cs | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/MDM/Controllers/Plant/PlantProductlinebodyController.cs b/MDM/Controllers/Plant/PlantProductlinebodyController.cs index 899309e..b8a82aa 100644 --- a/MDM/Controllers/Plant/PlantProductlinebodyController.cs +++ b/MDM/Controllers/Plant/PlantProductlinebodyController.cs @@ -119,9 +119,9 @@ namespace MDM.Controllers.Plant /// 工厂code /// [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); } diff --git a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs index 67644b1..5590e39 100644 --- a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs +++ b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs @@ -22,9 +22,9 @@ namespace MDM.Services.IPlantService List GetAllLine(); List GetWorkstationList(int id); - List GetFactorySite(string site_code); + List GetFactorySite(); - List GetWorkShop(string site_code, string workshop_code); + List GetWorkShop(string site_code); } } diff --git a/MDM/Services/Plant/PlantProductlinebodyService.cs b/MDM/Services/Plant/PlantProductlinebodyService.cs index 696c0de..a69e3de 100644 --- a/MDM/Services/Plant/PlantProductlinebodyService.cs +++ b/MDM/Services/Plant/PlantProductlinebodyService.cs @@ -106,17 +106,16 @@ namespace MDM.Services.Plant return Context.Queryable().Where(it => it.FkFactorySiteCode == productlinebody.FkFactorySiteCode && it.FkWorkshopCode == productlinebody.FkWorkshopCode && it.FkProductlinebody == productlinebody.LineCode).ToList(); } - public List GetFactorySite(string site_code) + public List GetFactorySite() { - return Context.Queryable().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList(); + return Context.Queryable().ToList(); } - public List GetWorkShop(string site_code, string workshop_code) + public List GetWorkShop(string site_code) { return Context.Queryable() .WhereIF(!string.IsNullOrEmpty(site_code), it => it.FkSiteCode.Contains(site_code)) - .WhereIF(!string.IsNullOrEmpty(workshop_code), it => it.WorkshopCode.Contains(workshop_code)) .ToList(); } }