diff --git a/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs b/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs
index 88c86b1..17f8f93 100644
--- a/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs
+++ b/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs
@@ -9,6 +9,8 @@ using DOAN.Admin.WebApi.Filters;
using Org.BouncyCastle.Crypto;
using DOAN.Model.System;
using MiniExcelLibs;
+using DOAN.Model.System.Dto;
+using DOAN.Model;
//创建时间:2024-07-16
namespace DOAN.Admin.WebApi.Controllers
@@ -195,5 +197,22 @@ namespace DOAN.Admin.WebApi.Controllers
}
+
+ ///
+ /// 工单导出
+ ///
+ ///
+ ///
+ [HttpGet("export")]
+ [Log(Title = "工单导出", BusinessType = BusinessType.EXPORT)]
+
+ public IActionResult WorkOrderExport([FromQuery] DateTime extportDate)
+ {
+ var list = _ProWorkorderService.WorkOrderExport(extportDate, new PagerInfo(1, 10000));
+
+ var result = ExportExcelMini(list.Result, "workorder", $"工单列表{extportDate}");
+ return ExportExcel(result.Item2, result.Item1);
+ }
+
}
}
\ No newline at end of file
diff --git a/DOAN.Service/MES/product/IService/IProWorkorderService.cs b/DOAN.Service/MES/product/IService/IProWorkorderService.cs
index de56b8d..6f8f0ba 100644
--- a/DOAN.Service/MES/product/IService/IProWorkorderService.cs
+++ b/DOAN.Service/MES/product/IService/IProWorkorderService.cs
@@ -3,6 +3,8 @@ using DOAN.Model;
using DOAN.Model.MES.product;
using DOAN.Model.MES.product.Dto;
+using DOAN.Model.System.Dto;
+using DOAN.Model.System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -30,5 +32,7 @@ namespace DOAN.Service.MES.product.IService
int ImportData(IFormFile formFile,string username);
+ public PagedInfo WorkOrderExport(DateTime exportTime, PagerInfo pager);
+
}
}
diff --git a/DOAN.Service/MES/product/ProWorkorderService.cs b/DOAN.Service/MES/product/ProWorkorderService.cs
index 04ed738..2cb178f 100644
--- a/DOAN.Service/MES/product/ProWorkorderService.cs
+++ b/DOAN.Service/MES/product/ProWorkorderService.cs
@@ -494,8 +494,16 @@ namespace DOAN.Service.MES.product
});
return result;
}
-
-
+ ///
+ /// 工单导出
+ ///
+ ///
+ ///
+ ///
+ public PagedInfo WorkOrderExport(DateTime exportTime, PagerInfo pager)
+ {
+ return Context.Queryable().Where(it => it.WorkorderDate == exportTime).ToPage(pager);
+ }
}