feat: 添加工单管理服务及相关测试
refactor: 重构工单服务接口和实现 test: 添加工单服务的单元测试和集成测试
This commit is contained in:
28
DOAN.Service/MES/Product/ProWorkorderExportService.cs
Normal file
28
DOAN.Service/MES/Product/ProWorkorderExportService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using DOAN.Model.MES.product;
|
||||
using DOAN.Service.MES.product.IService;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
|
||||
namespace DOAN.Service.MES.product
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单导出服务
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IProWorkorderExportService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class ProWorkorderExportService : BaseService<ProWorkorder>, IProWorkorderExportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单导出
|
||||
/// </summary>
|
||||
/// <param name="exportTime"></param>
|
||||
/// <returns></returns>
|
||||
public List<ProWorkorder> WorkOrderExport(DateTime exportTime)
|
||||
{
|
||||
exportTime = exportTime.Date;
|
||||
return Context
|
||||
.Queryable<ProWorkorder>()
|
||||
.Where(it => it.WorkorderDate == exportTime)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user