1
This commit is contained in:
parent
da478116e3
commit
8b66959247
@ -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 某天
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@ -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());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user