修改比对结果

usertest
jianghaiqing 4 months ago
parent c694f2d161
commit 8558134775

@ -1,5 +1,6 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.DjyServiceStatus; using DS.Module.DjyServiceStatus;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.TaskPlat.Dtos; using DS.WMS.Core.TaskPlat.Dtos;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
@ -19,5 +20,12 @@ namespace DS.WMS.Core.TaskPlat.Interface
/// </summary> /// </summary>
/// <param name="taskId">BC任务主键</param> /// <param name="taskId">BC任务主键</param>
Task<DataResult<TaskManageOrderResultDto>> GetInfoByTaskId(long taskId); Task<DataResult<TaskManageOrderResultDto>> GetInfoByTaskId(long taskId);
/// <summary>
/// 获取当前比对结果
/// </summary>
/// <param name="taskId">BC任务主键</param>
/// <returns>返回回执</returns>
Task<DataResult<List<CompareResultDetailInfo>>> GetCompareResult(long taskId);
} }
} }

@ -11,6 +11,7 @@ using DS.WMS.Core.Map.Interface;
using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface; using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Op.Method;
using DS.WMS.Core.Sys.Interface; using DS.WMS.Core.Sys.Interface;
using DS.WMS.Core.TaskPlat.Dtos; using DS.WMS.Core.TaskPlat.Dtos;
using DS.WMS.Core.TaskPlat.Entity; using DS.WMS.Core.TaskPlat.Entity;
@ -20,6 +21,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.XWPF.UserModel;
using SqlSugar; using SqlSugar;
namespace DS.WMS.Core.TaskPlat.Method namespace DS.WMS.Core.TaskPlat.Method
@ -1169,5 +1171,37 @@ namespace DS.WMS.Core.TaskPlat.Method
} }
#endregion #endregion
#region 获取当前比对结果
/// <summary>
/// 获取当前比对结果
/// </summary>
/// <param name="taskId">BC任务主键</param>
/// <returns>返回回执</returns>
public async Task<DataResult<List<CompareResultDetailInfo>>> GetCompareResult(long taskId)
{
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
var queryList = await tenantDb.Queryable<TaskBaseInfo>()
.InnerJoin<TaskBCInfo>((a, b) => a.Id == b.TASK_ID)
.Where((a, b) => a.Id == taskId)
.Select((a, b) => new { Base = a, BC = b })
.ToListAsync();
//任务主键{taskPkId}无法获取业务信息
if (queryList.Count == 0)
throw new Exception(string.Format(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.TaskBaseInfoFromTaskIdNull)), taskId));
var taskBCInfo = queryList.FirstOrDefault().BC;
if (taskBCInfo.BOOKING_SLOT_ID.HasValue)
{
return await bookingSlotService.Value.GetSlotCompareResult(taskBCInfo.BOOKING_SLOT_ID.Value, taskBCInfo.BATCH_NO);
}
else
{
return DataResult<List<CompareResultDetailInfo>>.FailedData(new List<CompareResultDetailInfo>());
}
}
#endregion
} }
} }

@ -1,9 +1,11 @@
using DS.Module.Core; using DS.Module.Core;
using DS.Module.DjyServiceStatus; using DS.Module.DjyServiceStatus;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.TaskPlat.Dtos; using DS.WMS.Core.TaskPlat.Dtos;
using DS.WMS.Core.TaskPlat.Interface; using DS.WMS.Core.TaskPlat.Interface;
using DS.WMS.Core.TaskPlat.Method; using DS.WMS.Core.TaskPlat.Method;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Owin.Security.Provider;
namespace DS.WMS.TaskApi.Controllers namespace DS.WMS.TaskApi.Controllers
{ {
@ -39,5 +41,18 @@ namespace DS.WMS.TaskApi.Controllers
var result = await _taskManageBCService.CreateBookingAndSlot(model); var result = await _taskManageBCService.CreateBookingAndSlot(model);
return result; return result;
} }
#region 获取当前比对结果
/// <summary>
/// 获取当前比对结果
/// </summary>
/// <param name="taskId">BC任务主键</param>
/// <returns>返回回执</returns>
[HttpGet("GetCompareResult")]
public async Task<DataResult<List<CompareResultDetailInfo>>> GetCompareResult(long taskId)
{
return await _taskManageBCService.GetCompareResult(taskId);
}
#endregion
} }
} }

Loading…
Cancel
Save