This commit is contained in:
gcw_MV9p2JJN 2025-10-23 18:42:23 +08:00
parent da478116e3
commit 8b66959247
3 changed files with 30 additions and 3 deletions

View File

@ -60,7 +60,7 @@ namespace DOAN.Admin.WebApi.Controllers
public IActionResult GetProPlanAchievementrate(int Id)
{
var response = _ProPlanAchievementrateService.GetInfo(Id);
var info = response.Adapt<ProPlanAchievementrate>();
return SUCCESS(info);
}
@ -123,10 +123,33 @@ namespace DOAN.Admin.WebApi.Controllers
}
//TODO 导出模板
[HttpGet("importTemplate")]
[Log(Title = "生产工单导入模板", BusinessType = BusinessType.EXPORT, IsSaveRequestData = true, IsSaveResponseData = false)]
[AllowAnonymous]
public IActionResult ImportTemplateExcel()
{
(string, string) result = DownloadImportTemplate("PlanAchievementRate");
return ExportExcel(result.Item2, result.Item1);
}
//TODO 导入excel
//TODO 导入excel 某天
[HttpPost("importData")]
[Log(Title = "计划达成率导入", BusinessType = BusinessType.IMPORT, IsSaveRequestData = false, IsSaveResponseData = true)]
[AllowAnonymous]
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile)
{
//TODO 导出excel
if (formFile == null)
{
return SUCCESS(null);
}
int response = _ProPlanAchievementrateService.ImportData(formFile, HttpContext.GetName());
return SUCCESS(response);
}
//TODO 导出excel 某天

View File

@ -5,6 +5,7 @@ using DOAN.Model.MES.product;
using DOAN.Model.MES.product.Dto;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
namespace DOAN.Service.MES.product.IService
{
@ -35,5 +36,8 @@ namespace DOAN.Service.MES.product.IService
List<ProPlanAchievementrateDto> GetListByMonth();
ImportData(formFile, HttpContext.GetName());
}
}