生产工单
This commit is contained in:
@@ -54,21 +54,21 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// <param name="path">完整文件路径</param>
|
/// <param name="path">完整文件路径</param>
|
||||||
/// <param name="fileName">带扩展文件名</param>
|
/// <param name="fileName">带扩展文件名</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//protected IActionResult ExportExcel(string path, string fileName)
|
|
||||||
//{
|
|
||||||
// //var webHostEnvironment = App.WebHostEnvironment;
|
|
||||||
// if (!Path.Exists(path))
|
|
||||||
// {
|
|
||||||
// throw new CustomException(fileName + "文件不存在");
|
|
||||||
// }
|
|
||||||
// var stream = Io.File.OpenRead(path); //创建文件流
|
|
||||||
|
|
||||||
// Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition");
|
|
||||||
// return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName));
|
|
||||||
// // return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName);
|
|
||||||
//}
|
|
||||||
|
|
||||||
protected IActionResult ExportExcel(string path, string fileName)
|
protected IActionResult ExportExcel(string path, string fileName)
|
||||||
|
{
|
||||||
|
//var webHostEnvironment = App.WebHostEnvironment;
|
||||||
|
if (!Path.Exists(path))
|
||||||
|
{
|
||||||
|
throw new CustomException(fileName + "文件不存在");
|
||||||
|
}
|
||||||
|
var stream = Io.File.OpenRead(path); //创建文件流
|
||||||
|
|
||||||
|
Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition");
|
||||||
|
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", HttpUtility.UrlEncode(fileName));
|
||||||
|
// return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IActionResult ExportExcel2(string path, string fileName)
|
||||||
{
|
{
|
||||||
if (!Path.Exists(path))
|
if (!Path.Exists(path))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
|||||||
public IActionResult ImportTemplateExcel()
|
public IActionResult ImportTemplateExcel()
|
||||||
{
|
{
|
||||||
(string, string) result = DownloadImportTemplate("日生产计划模板");//返回文件名和路径
|
(string, string) result = DownloadImportTemplate("日生产计划模板");//返回文件名和路径
|
||||||
return ExportExcel(result.Item2, result.Item1);
|
return ExportExcel2(result.Item2, result.Item1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
|||||||
if (item.PreviousNumber != null && item.PreviousNumber > 0 && item.PQualifiedNum != null && item.PQualifiedNum > 0)
|
if (item.PreviousNumber != null && item.PreviousNumber > 0 && item.PQualifiedNum != null && item.PQualifiedNum > 0)
|
||||||
{
|
{
|
||||||
decimal rate = (decimal)item.PQualifiedNum / (decimal)item.PreviousNumber;
|
decimal rate = (decimal)item.PQualifiedNum / (decimal)item.PreviousNumber;
|
||||||
item.PQualifiedRate = Math.Round(rate, 2);
|
item.PQualifiedRate = Math.Round(rate, 4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104344.xlsx
Normal file
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104344.xlsx
Normal file
Binary file not shown.
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104356.xlsx
Normal file
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104356.xlsx
Normal file
Binary file not shown.
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104917.xlsx
Normal file
BIN
ZR.Admin.WebApi/wwwroot/export/2025年51周1日计划-12-20-104917.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user