增加格式单的下载

usertest
jianghaiqing 4 months ago
parent 7450f27574
commit 09ea54206b

@ -258,7 +258,7 @@ namespace DS.WMS.Core.Op.Method
var fileAbsPath = string.Empty;
if (string.IsNullOrEmpty(basePath))
{
dirAbs = Path.Combine(_environment.WebRootPath, relativePath);
dirAbs = Path.Combine(_environment.WebRootPath ?? "", relativePath);
}
else
{

@ -617,6 +617,8 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await GetDraftCompareResult(msgModel);
Logger.Log(NLog.LogLevel.Info, "获取用户信息 userid={uid} userid={username} tendid={tid} OrgId={OrgId}", user.UserId,user.UserName,user.TenantId,user.OrgId);
var lastFileInfo = tenantDb.Queryable<OpFile>().Where(a => a.LinkId == bookingId &&
a.TypeCode.Equals(CONST_DRAFT_FILE_CODE))
.OrderByDescending(a => a.CreateTime).First();
@ -1094,7 +1096,20 @@ namespace DS.WMS.Core.TaskPlat.Method
// new ModifyServiceProjectStatusDetailDto { StatusCode = "XHZBDCHG" } }
//});
//Logger.Log(NLog.LogLevel.Info, "异步推送下货纸比对状态完成,结果={rlt}", JsonConvert.SerializeObject(saveStatusRlt));
var pushModel = new EmbedServiceProjectStatusDto
{
businessId = model.bookingId.ToString(),
SourceType = 1,
StatusCodes = new List<EmbedServiceProjectStatusDetailDto> {
new EmbedServiceProjectStatusDetailDto{
StatusCode = "XHZBDCHG"
}
}
};
var saveStatusRlt = await _djyServiceStatusService.SaveServiceStatus(pushModel);
Logger.Log(NLog.LogLevel.Info, "异步推送下货纸比对状态完成,结果={rlt}", JsonConvert.SerializeObject(saveStatusRlt));
}
}
#endregion

@ -1,7 +1,9 @@
using DS.Module.Core.Attributes;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.TaskPlat.Dtos;
using DS.WMS.Core.TaskPlat.Interface;
using DS.WMS.Core.TaskPlat.Method;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using ThirdParty.Json.LitJson;
@ -14,10 +16,12 @@ namespace DS.WMS.TaskApi.Controllers
public class TaskDraftCompareController : ApiController
{
private readonly ITaskDraftCompareService _taskDraftCompareService;
private readonly IOpFileService _opFileService;
public TaskDraftCompareController(ITaskDraftCompareService taskDraftCompareService)
public TaskDraftCompareController(ITaskDraftCompareService taskDraftCompareService, IOpFileService opFileService)
{
_taskDraftCompareService = taskDraftCompareService;
_opFileService = opFileService;
}
#region 执行邮件Draft比对
@ -41,7 +45,7 @@ namespace DS.WMS.TaskApi.Controllers
/// </summary>
/// <param name="bookingId">订舱主键</param>
/// <returns>返回回执</returns>
[HttpPost("GetDraftCompareResultInfo")]
[HttpGet("GetDraftCompareResultInfo")]
public async Task<TaskManageExcuteResultDto> GetDraftCompareResultInfo([FromQuery] long bookingId)
{
return await _taskDraftCompareService.GetDraftCompareResultInfo(bookingId);
@ -71,10 +75,23 @@ namespace DS.WMS.TaskApi.Controllers
/// <param name="model">请求详情</param>
/// <returns>返回回执</returns>
[HttpPost("SaveDraftCompareManual")]
public async Task SaveDraftCompareManual(TaskDraftCompareFeedBackDto model)
public async Task SaveDraftCompareManual([FromBody] TaskDraftCompareFeedBackDto model)
{
await _taskDraftCompareService.SaveDraftCompareManual(model);
}
#endregion
#region 根据文件ID下载附件
/// <summary>
/// 根据文件ID下载附件
/// </summary>
/// <param name="taskId">文件主键</param>
/// <returns>返回数据流</returns>
[HttpGet("DownloadFile")]
public async Task<IActionResult> DownloadFile([FromQuery] long Id)
{
return await _opFileService.DownloadFile(Id.ToString());
}
#endregion
}
}

Loading…
Cancel
Save