From a19de4668bf1de677752b5b0ac3277f81d8b4d6e Mon Sep 17 00:00:00 2001 From: gcw_MV9p2JJN Date: Sun, 4 Jan 2026 18:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BA=A7=E7=BA=BF=E7=9A=84?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=B7=A5=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plant/PlantProductlinebodyController.cs | 8 ++++++ ...ssOperationWorkstationMappingController.cs | 26 +++++++++++++++++++ .../IService/IPlantProductlinebodyService.cs | 1 + .../Plant/PlantProductlinebodyService.cs | 7 +++++ ...ocessOperationWorkstationMappingService.cs | 1 + ...ocessOperationWorkstationMappingService.cs | 9 +++++++ 6 files changed, 52 insertions(+) diff --git a/MDM/Controllers/Plant/PlantProductlinebodyController.cs b/MDM/Controllers/Plant/PlantProductlinebodyController.cs index 9ecabbd..383d4c4 100644 --- a/MDM/Controllers/Plant/PlantProductlinebodyController.cs +++ b/MDM/Controllers/Plant/PlantProductlinebodyController.cs @@ -136,6 +136,14 @@ namespace MDM.Controllers.Plant return SUCCESS(response); } + //TODO 获取产线的所有工站 + [HttpGet("get_workstation_list")] + public IActionResult GetWorkstationList(int id) + { + var response = _PlantProductlinebodyService.GetWorkstationList(id); + + return SUCCESS(response); + } } diff --git a/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs b/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs index 144363b..0286a3d 100644 --- a/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs +++ b/MDM/Controllers/Process/ProcessOperationWorkstationMappingController.cs @@ -110,6 +110,32 @@ namespace MDM.Controllers.Process return ToResponse(response); } + + //TODO 下拉工艺路线 + [HttpGet("SelectRouting")] + public IActionResult SelectRouting(string routingcode) + { + var response = _ProcessOperationWorkstationMappingService.SelectRouting(routingcode); + + return SUCCESS(response); + } + + + //TODO 下拉工序 + + + + //TODO 下拉工厂 + + + //TODO 下拉产线 + + + //TODO 下拉工站 + + + + //TODO 分页查询配方参数 [HttpPost("operation_search_recipe")] public IActionResult QueryProcessOperationRecipe([FromBody] ProcessOperationQuery2Dto query) diff --git a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs index 647b937..11f3750 100644 --- a/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs +++ b/MDM/Services/Plant/IService/IPlantProductlinebodyService.cs @@ -19,6 +19,7 @@ namespace MDM.Services.IPlantService int UpdatePlantProductlinebody(PlantProductlinebody parm); + List GetWorkstationList(int id); List GetFactorySite(string site_code); List GetWorkShop(string site_code,string workshop_code); diff --git a/MDM/Services/Plant/PlantProductlinebodyService.cs b/MDM/Services/Plant/PlantProductlinebodyService.cs index 05af59f..3d10b80 100644 --- a/MDM/Services/Plant/PlantProductlinebodyService.cs +++ b/MDM/Services/Plant/PlantProductlinebodyService.cs @@ -87,6 +87,13 @@ namespace MDM.Services.Plant return Update(model, true); } + + public List GetWorkstationList(int id) + { + PlantProductlinebody productlinebody= Context.Queryable().Where(it => it.LineId == id).First(); + + return Context.Queryable().Where(it => it.FkFactorySiteCode == productlinebody.FkFactorySiteCode && it.FkWorkshopCode == productlinebody.FkWorkshopCode && it.FkProductlinebody == productlinebody.LineCode).ToList(); + } public List GetFactorySite(string site_code) { return Context.Queryable().WhereIF(!string.IsNullOrEmpty(site_code), it => it.SiteCode.Contains(site_code)).ToList(); diff --git a/MDM/Services/Process/IService/IProcessOperationWorkstationMappingService.cs b/MDM/Services/Process/IService/IProcessOperationWorkstationMappingService.cs index 92ab375..3304792 100644 --- a/MDM/Services/Process/IService/IProcessOperationWorkstationMappingService.cs +++ b/MDM/Services/Process/IService/IProcessOperationWorkstationMappingService.cs @@ -18,6 +18,7 @@ namespace MDM.Services.IProcessService ProcessOperationWorkstationMapping AddProcessOperationWorkstationMapping(ProcessOperationWorkstationMapping parm); + List SelectRouting(string routing); int UpdateProcessOperationWorkstationMapping(ProcessOperationWorkstationMapping parm); diff --git a/MDM/Services/Process/ProcessOperationWorkstationMappingService.cs b/MDM/Services/Process/ProcessOperationWorkstationMappingService.cs index 5f6d3fe..0aa14d9 100644 --- a/MDM/Services/Process/ProcessOperationWorkstationMappingService.cs +++ b/MDM/Services/Process/ProcessOperationWorkstationMappingService.cs @@ -115,6 +115,15 @@ namespace MDM.Services.Process return Context.Insertable(model).ExecuteReturnEntity(); } + + public List SelectRouting(string routing) + { + var response = Context.Queryable().WhereIF(!string.IsNullOrEmpty(routing), it => it.RoutingCode.Contains(routing)).ToList(); + return response; + + } + + /// /// 修改 ///