GetNextTypeAsync(BusinessTask current)
{
- var order = OpService.GetSeaExportInfo(current.BusinessId.ToString());
+ var order = await ActionService.GetBusinessDataAsync(current.BusinessId, current.BusinessType);
TaskFlowRuner flowRuner = new(TenantDb, ServiceProvider);
var result = await flowRuner.GetWorkFlowNextConfig(TaskBaseTypeEnum.WORK_FLOW_MAIN, new TaskFlowDataContext(
(TaskFlowDataNameConst.Business, order)
@@ -365,9 +367,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TaskStatus = TaskStatusEnum.Create,
RecvUsers = string.Join(',', info.Main.RecvUserInfoList.Select(x => x.RecvUserId)),
CreateBy = long.Parse(User.UserId),
- CreateTime = DateTime.Now
+ CreateTime = DateTime.Now,
+ NextType = request.NextType,
+ NextId = request.NextId
};
- task.NextType = await GetNextTypeAsync(task);
+ if (!task.NextType.HasValue)
+ task.NextType = await GetNextTypeAsync(task);
+
await TenantDb.Insertable(task).ExecuteCommandAsync();
//审核任务需创建工作流
@@ -506,7 +512,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
BusinessId = request.BusinessId,
BusinessType = request.BusinessType,
TaskTypeName = task.NextType.ToString(),
- RecvUserIdList = task.RecvUserIdArray
+ RecvUserIdList = task.RecvUserIdArray,
+ NextId = task.NextId
};
result = await CreateTaskAsync(req, false);
if (!result.Succeeded)
@@ -638,6 +645,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
Remark = remark
});
}
+
///
/// 获取指定类型的业务关联任务
///
diff --git a/ds-wms-service/DS.WMS.Core/Op/Templates/订舱委托.cshtml b/ds-wms-service/DS.WMS.Core/Op/Templates/订舱委托.cshtml
index c1150d90..5e812f43 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Templates/订舱委托.cshtml
+++ b/ds-wms-service/DS.WMS.Core/Op/Templates/订舱委托.cshtml
@@ -27,7 +27,7 @@
*** Auto Email, please reply to all (delete sender Admin)!If only reply to sender, we will not be able to find and deal with it! ***
-
+
Dear @Model.Contacts
diff --git a/ds-wms-service/DS.WMS.Core/ServiceBase.cs b/ds-wms-service/DS.WMS.Core/ServiceBase.cs
index b38af8ac..4bc4a734 100644
--- a/ds-wms-service/DS.WMS.Core/ServiceBase.cs
+++ b/ds-wms-service/DS.WMS.Core/ServiceBase.cs
@@ -1,4 +1,5 @@
using DS.Module.Core;
+using DS.Module.Core.Data;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Flow.Entity;