From f3712b58e758706684ccf5ce6c33a66ed215532c Mon Sep 17 00:00:00 2001 From: "xiaowei.song" Date: Wed, 15 Nov 2023 14:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/pro/ProWorkplanController.cs | 13 ++++++++++++ .../mes/pro/IService/IProWorkorderService.cs | 15 ++++++++++++++ .../mes/pro/IService/IProWorkplanService.cs | 2 ++ ZR.Service/mes/pro/ProWorkorderService.cs | 20 +++++++++++++++++++ ZR.Service/mes/pro/ProWorkplanService.cs | 5 +++++ 5 files changed, 55 insertions(+) create mode 100644 ZR.Service/mes/pro/IService/IProWorkorderService.cs create mode 100644 ZR.Service/mes/pro/ProWorkorderService.cs diff --git a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs index 3a83e6a3..4c3778a7 100644 --- a/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/pro/ProWorkplanController.cs @@ -67,5 +67,18 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro return ToResponse(new ApiResult(200, "success", data)); } + + [HttpGet("getworkorderList/{id}")] + public IActionResult GetWorkorderList(string id) + { + List lst = new List(); + + if (!string.IsNullOrEmpty(id)) + { + lst = proWorkplanService.GetWorkorderList(id); + } + + return ToResponse(new ApiResult(200, "success", lst)); + } } } diff --git a/ZR.Service/mes/pro/IService/IProWorkorderService.cs b/ZR.Service/mes/pro/IService/IProWorkorderService.cs new file mode 100644 index 00000000..90830ca4 --- /dev/null +++ b/ZR.Service/mes/pro/IService/IProWorkorderService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.mes.pro; +using ZR.Model.MES.op.DTO; + +namespace ZR.Service.mes.pro.IService +{ + public interface IProWorkorderService + { + } +} diff --git a/ZR.Service/mes/pro/IService/IProWorkplanService.cs b/ZR.Service/mes/pro/IService/IProWorkplanService.cs index e356b66d..f02daa0d 100644 --- a/ZR.Service/mes/pro/IService/IProWorkplanService.cs +++ b/ZR.Service/mes/pro/IService/IProWorkplanService.cs @@ -19,5 +19,7 @@ namespace ZR.Service.mes.pro.IService public int UpdateWorkPlan(ProWorkplan proWorkplan); public int DeleteWorkPlan(string id); + + public List GetWorkorderList(string id); } } diff --git a/ZR.Service/mes/pro/ProWorkorderService.cs b/ZR.Service/mes/pro/ProWorkorderService.cs new file mode 100644 index 00000000..0d7e2e84 --- /dev/null +++ b/ZR.Service/mes/pro/ProWorkorderService.cs @@ -0,0 +1,20 @@ +using Infrastructure.Attribute; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZR.Model.mes.md; +using ZR.Model.mes.pro; +using ZR.Service.mes.pro.IService; +using ZR.Service.MES.md.IService; + +namespace ZR.Service.mes.pro +{ + [AppService(ServiceType = typeof(IProWorkorderService), ServiceLifetime = LifeTime.Transient)] + public class ProWorkorderService : BaseService, IProWorkorderService + { + } +} diff --git a/ZR.Service/mes/pro/ProWorkplanService.cs b/ZR.Service/mes/pro/ProWorkplanService.cs index 348a783e..2ecbea53 100644 --- a/ZR.Service/mes/pro/ProWorkplanService.cs +++ b/ZR.Service/mes/pro/ProWorkplanService.cs @@ -49,5 +49,10 @@ namespace ZR.Service.mes.pro { return Context.Deleteable().In(id).ExecuteCommand(); } + + public List GetWorkorderList(string id) + { + return Context.Queryable().Where(it => it.FkProPlanId == id).ToList(); + } } }