导出功能
This commit is contained in:
parent
2e927ea999
commit
6ec528f281
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工单导出
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
[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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -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<ProWorkorder> WorkOrderExport(DateTime exportTime, PagerInfo pager);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,8 +494,16 @@ namespace DOAN.Service.MES.product
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工单导出
|
||||
/// </summary>
|
||||
/// <param name="exportTime"></param>
|
||||
/// <param name="pager"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<ProWorkorder> WorkOrderExport(DateTime exportTime, PagerInfo pager)
|
||||
{
|
||||
return Context.Queryable<ProWorkorder>().Where(it => it.WorkorderDate == exportTime).ToPage(pager);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user