From fef6863e8d71e4bec1540ec2bc76bf7b7b1642d1 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Tue, 3 Dec 2024 19:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B7=A5=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobile/ReportFlowController.cs | 31 +++++++++++++++++++ .../Mobile/IService/IReportFlowService.cs | 10 ++++++ DOAN.Service/Mobile/ReportFlowService.cs | 22 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 DOAN.Admin.WebApi/Controllers/Mobile/ReportFlowController.cs create mode 100644 DOAN.Service/Mobile/IService/IReportFlowService.cs create mode 100644 DOAN.Service/Mobile/ReportFlowService.cs diff --git a/DOAN.Admin.WebApi/Controllers/Mobile/ReportFlowController.cs b/DOAN.Admin.WebApi/Controllers/Mobile/ReportFlowController.cs new file mode 100644 index 0000000..a5be093 --- /dev/null +++ b/DOAN.Admin.WebApi/Controllers/Mobile/ReportFlowController.cs @@ -0,0 +1,31 @@ +using DOAN.Service.Mobile.IService; +using Microsoft.AspNetCore.Mvc; + +namespace DOAN.Admin.WebApi.Controllers.Mobile; + +/// +/// 工序流转卡 +/// +[AllowAnonymous] +[Route("modile/reportflow")] +public class ReportFlowController : BaseController +{ + //IReportFlowService + private readonly IReportFlowService _reportFlowService; + + public ReportFlowController(IReportFlowService reportFlowService) + { + _reportFlowService = reportFlowService; + } + + //TODO 查询工单详情 + [HttpGet("get_workorder_detail")] + public IActionResult GetWorkOrderDetail(string workOrder) + { + if (string.IsNullOrEmpty(workOrder)) + throw new CustomException("workOrderId 是空"); + return SUCCESS(_reportFlowService.GetWorkOrderDetail(workOrder)); + } + + +} \ No newline at end of file diff --git a/DOAN.Service/Mobile/IService/IReportFlowService.cs b/DOAN.Service/Mobile/IService/IReportFlowService.cs new file mode 100644 index 0000000..a05b31c --- /dev/null +++ b/DOAN.Service/Mobile/IService/IReportFlowService.cs @@ -0,0 +1,10 @@ +using DOAN.Model.MES.product; + +namespace DOAN.Service.Mobile.IService; + +public interface IReportFlowService: IBaseService +{ + + ProWorkorder GetWorkOrderDetail(string workorder); + +} \ No newline at end of file diff --git a/DOAN.Service/Mobile/ReportFlowService.cs b/DOAN.Service/Mobile/ReportFlowService.cs new file mode 100644 index 0000000..3e2e888 --- /dev/null +++ b/DOAN.Service/Mobile/ReportFlowService.cs @@ -0,0 +1,22 @@ +using DOAN.Model.MES.product; +using DOAN.Model.Public; +using DOAN.Service.Mobile.IService; +using DOAN.Service.Public.IPublicService; +using Infrastructure.Attribute; +using Microsoft.AspNetCore.Mvc; + +namespace DOAN.Service.Mobile; + +/// +/// 广告管理Service业务层处理 +/// +[AppService(ServiceType = typeof(IReportFlowService), ServiceLifetime = LifeTime.Transient)] +public class ReportFlowService : BaseService, IReportFlowService +{ + public ProWorkorder GetWorkOrderDetail(string workorder) + { + return Context.Queryable().Where(x => x.Workorder == workorder).Single(); + } + +} +