dev
嵇文龙 1 month ago
parent c942cf0817
commit 3cd2aaafe0

@ -1516,6 +1516,8 @@ public static class MultiLanguageConst
#endregion
#region 关联任务
[Description("传入的业务信息无效,请确保业务状态正确或未被删除")]
public const string Biz_Not_Valid = "Biz_Not_Valid";
[Description("此任务已存在,请勿重复提交")]
public const string TaskExists = "Task_Exists";
[Description("未能找到任务")]

@ -185,6 +185,21 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns>
public async Task<DataResult> CreateTaskAsync(TaskCreationRequest request, bool useTransaction = true)
{
//if (request.BusinessType.HasValue)
//{
// bool isBizValid = false;
// switch (request.BusinessType.Value)
// {
// case BusinessType.OceanShippingExport:
// isBizValid = await TenantDb.Queryable<SeaExport>().AnyAsync(x => x.Id == request.BusinessId);
// break;
// }
// if (!isBizValid)
// return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Biz_Not_Valid));
//}
if (!await HasAuthorizedAsync())
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ModuleUnauthorized));

Loading…
Cancel
Save