|
|
@ -5,6 +5,7 @@ using DS.Module.Core.Helpers;
|
|
|
|
using DS.Module.DjyServiceStatus;
|
|
|
|
using DS.Module.DjyServiceStatus;
|
|
|
|
using DS.Module.SqlSugar;
|
|
|
|
using DS.Module.SqlSugar;
|
|
|
|
using DS.Module.UserModule;
|
|
|
|
using DS.Module.UserModule;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Code.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;
|
|
|
|
using DS.WMS.Core.TaskPlat.Interface;
|
|
|
|
using DS.WMS.Core.TaskPlat.Interface;
|
|
|
@ -20,12 +21,17 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class TaskManageService : TaskManageBaseService<TaskManageService>, ITaskManageService
|
|
|
|
public class TaskManageService : TaskManageBaseService<TaskManageService>, ITaskManageService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private readonly ICodeCtnService codeCtnService;
|
|
|
|
public TaskManageService(IUser user,
|
|
|
|
public TaskManageService(IUser user,
|
|
|
|
ILogger<TaskManageService> logger,
|
|
|
|
ILogger<TaskManageService> logger,
|
|
|
|
ISaasDbService saasDbService,
|
|
|
|
ISaasDbService saasDbService,
|
|
|
|
IServiceProvider serviceProvider,
|
|
|
|
IServiceProvider serviceProvider,
|
|
|
|
IWebHostEnvironment environment) : base(user, logger, saasDbService, serviceProvider, environment)
|
|
|
|
IWebHostEnvironment environment,
|
|
|
|
{ }
|
|
|
|
ICodeCtnService codeCtnService) : base(user, logger, saasDbService, serviceProvider, environment)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.codeCtnService = codeCtnService;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 对工作流提供的接口
|
|
|
|
#region 对工作流提供的接口
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -736,12 +742,21 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
await tenantDb.Insertable(bcInfo).ExecuteCommandAsync();
|
|
|
|
await tenantDb.Insertable(bcInfo).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
//异步写入集装箱
|
|
|
|
//异步写入集装箱
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ctnCodeList = (await codeCtnService.GetAllList()).Data ?? new List<Code.Dtos.CodeCtnRes>();
|
|
|
|
var ctnList = info.Main.BCInfo.CtnList.Select(ctn =>
|
|
|
|
var ctnList = info.Main.BCInfo.CtnList.Select(ctn =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var bcCtnInfo = ctn.Adapt<TaskBCCTNInfo>();
|
|
|
|
var bcCtnInfo = ctn.Adapt<TaskBCCTNInfo>();
|
|
|
|
bcCtnInfo.Id = SnowFlakeSingle.Instance.NextId();
|
|
|
|
bcCtnInfo.Id = SnowFlakeSingle.Instance.NextId();
|
|
|
|
bcCtnInfo.P_ID = bcInfo.Id;
|
|
|
|
bcCtnInfo.P_ID = bcInfo.Id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(bcCtnInfo.CTNCODE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var ctnCode = ctnCodeList.FirstOrDefault(a => !string.IsNullOrWhiteSpace(a.CtnName) && a.CtnName.Equals(bcCtnInfo.CTNALL, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bcCtnInfo.CTNCODE = ctnCode != null ? ctnCode.EdiCode : "(箱型未收录)";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bcInfo.CreateBy = taskInfo.CreateBy;
|
|
|
|
bcInfo.CreateBy = taskInfo.CreateBy;
|
|
|
|
bcInfo.CreateTime = taskInfo.CreateTime;
|
|
|
|
bcInfo.CreateTime = taskInfo.CreateTime;
|
|
|
|
return bcCtnInfo;
|
|
|
|
return bcCtnInfo;
|
|
|
@ -762,6 +777,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
// 执行自动化操作
|
|
|
|
// 执行自动化操作
|
|
|
|
TaskFlowDataContext dataContext = new(
|
|
|
|
TaskFlowDataContext dataContext = new(
|
|
|
|
(TaskFlowDataNameConst.TaskManageOrderMessageInfo, info),
|
|
|
|
(TaskFlowDataNameConst.TaskManageOrderMessageInfo, info),
|
|
|
|
|
|
|
|
(TaskFlowDataNameConst.TaskBCId, bcInfo.Id),
|
|
|
|
(TaskFlowDataNameConst.BCFile, file),
|
|
|
|
(TaskFlowDataNameConst.BCFile, file),
|
|
|
|
(TaskFlowDataNameConst.AmendmentFile, modifyFile)
|
|
|
|
(TaskFlowDataNameConst.AmendmentFile, modifyFile)
|
|
|
|
);
|
|
|
|
);
|
|
|
|