|
|
|
@ -22,6 +22,11 @@ using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using SixLabors.ImageSharp.Drawing;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using DS.WMS.Core.Flow.Dtos;
|
|
|
|
|
using DS.WMS.Core.Flow.Entity;
|
|
|
|
|
using DS.WMS.Core;
|
|
|
|
|
using MathNet.Numerics;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.MainApi.Controllers
|
|
|
|
|
{
|
|
|
|
@ -53,6 +58,50 @@ namespace DS.WMS.MainApi.Controllers
|
|
|
|
|
return _invokeService.ExportExcelByColumn(req);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//[HttpPost]
|
|
|
|
|
//[Route("CommonExcelExportAsync")]
|
|
|
|
|
//public async Task<IActionResult> CommonExcelExportAsync([FromBody] ExportExcelReq req)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// if (instance.CallbackURL.IsNullOrEmpty())
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
// //请求参数设置
|
|
|
|
|
// var callback = new FlowCallback
|
|
|
|
|
// {
|
|
|
|
|
// InstanceId = instance.Id,
|
|
|
|
|
// BusinessId = instance.BusinessId,
|
|
|
|
|
// BusinessType = instance.BusinessType,
|
|
|
|
|
// AuditType = instance.AuditType,
|
|
|
|
|
// FlowStatus = instance.FlowStatus,
|
|
|
|
|
// RejectReason = instance.Note
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
// if (api.DefaultHeaders.Contains("Authorization"))
|
|
|
|
|
// api.DefaultHeaders.Remove("Authorization");
|
|
|
|
|
|
|
|
|
|
// api.DefaultHeaders.Add("Authorization", "Bearer " + User.GetToken());
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// var result = await api.PostAsync<DataResult>(instance.CallbackURL, callback);
|
|
|
|
|
// if (result.Succeeded)
|
|
|
|
|
// {
|
|
|
|
|
// //更新回调执行标识
|
|
|
|
|
// await Db.Updateable<FlowInstance>().SetColumns(it => it.IsCallbackExecuted == true)
|
|
|
|
|
// .Where(it => it.Id == instance.Id).ExecuteCommandAsync();
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// await new ApplicationException($"访问回调URL:{instance.CallbackURL} 时返回了错误:" + result.Message).LogAsync(Db);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// catch (Exception ex)
|
|
|
|
|
// {
|
|
|
|
|
// await ex.LogAsync(Db);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据用户列导出Excel文件流
|
|
|
|
|
/// </summary>
|
|
|
|
|