|
|
@ -14,7 +14,6 @@ using DS.WMS.Core.Map.Dtos;
|
|
|
|
using DS.WMS.Core.Map.Interface;
|
|
|
|
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.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;
|
|
|
@ -25,6 +24,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using SqlSugar;
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
namespace DS.WMS.Core.TaskPlat.Method
|
|
|
@ -188,6 +188,42 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
throw;
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 工作流设置任务对象属性
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
public async Task<DataResult> SetTaskBaseInfoPropertyWithBsno(long bsno, TaskBaseTypeEnum taskBaseTypeEnum, params Expression<Func<TaskBaseInfo, bool>>[] columns)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SqlSugarScopeProvider tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long? taskInfoId = await tenantDb.Queryable<TaskBaseInfo>().ClearFilter(typeof(IOrgId))
|
|
|
|
|
|
|
|
.OrderByDescending(a => a.Id)
|
|
|
|
|
|
|
|
.Where(t => t.OUT_BS_NO == bsno && t.TASK_TYPE == taskBaseTypeEnum.ToString())
|
|
|
|
|
|
|
|
.Select(t => t.Id)
|
|
|
|
|
|
|
|
.FirstAsync();
|
|
|
|
|
|
|
|
if (taskInfoId == null || taskInfoId == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
logger.LogInformation($"根据bsno:【{bsno}】,TaskBaseTypeEnum:【{taskBaseTypeEnum}】未查询到任务");
|
|
|
|
|
|
|
|
return DataResult.Failed(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.DataQueryNoData)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
logger.LogInformation($"根据bsno:【{bsno}】,查询出taskInfoId=【{taskInfoId}】");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var updateable = tenantDb.Updateable<TaskBaseInfo>();
|
|
|
|
|
|
|
|
foreach (var item in columns)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
updateable.SetColumns(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
updateable.SetColumns(x => x.UpdateBy == long.Parse(user.UserId))
|
|
|
|
|
|
|
|
.SetColumns(x => x.UpdateTime == DateTime.Now)
|
|
|
|
|
|
|
|
.SetColumns(x => x.UpdateUserName == user.UserName);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await updateable.Where(x => taskInfoId == x.Id)
|
|
|
|
|
|
|
|
.ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("操作成功");
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|