fix:修复针对于使用EsId修改轨迹的验证,使其正常运行工作
This commit is contained in:
parent
922bd08a11
commit
dc257cf49b
@ -288,6 +288,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
// 轨迹内容上的约束检查
|
// 轨迹内容上的约束检查
|
||||||
// 更新轨迹时是否可以匹配到轨迹的检查
|
// 更新轨迹时是否可以匹配到轨迹的检查
|
||||||
await TrackUpsertValidation(input.IsAdd,
|
await TrackUpsertValidation(input.IsAdd,
|
||||||
|
input.EsId,
|
||||||
input.SubSystemId,
|
input.SubSystemId,
|
||||||
order.Id,
|
order.Id,
|
||||||
order.OrderNo,
|
order.OrderNo,
|
||||||
@ -370,6 +371,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
// 轨迹内容上的约束检查
|
// 轨迹内容上的约束检查
|
||||||
// 更新轨迹时是否可以匹配到轨迹的检查
|
// 更新轨迹时是否可以匹配到轨迹的检查
|
||||||
await TrackUpsertValidation(input.IsAdd,
|
await TrackUpsertValidation(input.IsAdd,
|
||||||
|
null,
|
||||||
input.SubSystemId,
|
input.SubSystemId,
|
||||||
order.Id,
|
order.Id,
|
||||||
order.OrderNo,
|
order.OrderNo,
|
||||||
@ -443,6 +445,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
//在轨迹更新主流程之前的前置检查
|
//在轨迹更新主流程之前的前置检查
|
||||||
private async Task TrackUpsertValidation(
|
private async Task TrackUpsertValidation(
|
||||||
bool isAdd,
|
bool isAdd,
|
||||||
|
string? esId,
|
||||||
int subSystemId,
|
int subSystemId,
|
||||||
int orderId,
|
int orderId,
|
||||||
string orderNo,
|
string orderNo,
|
||||||
@ -517,6 +520,21 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 针对于esId快速路径修改轨迹的检查
|
||||||
|
|
||||||
|
if (isAdd == false && !string.IsNullOrWhiteSpace(esId))
|
||||||
|
{
|
||||||
|
var tracks = await _trackDetailsEsRepository.GetDataByIds(new[] { esId });
|
||||||
|
if (tracks.Count == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessException(message: $"轨迹esId:[{esId}]不存在,无法修改轨迹");
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
//轨迹新增,不允许重复的轨迹提前拦截
|
//轨迹新增,不允许重复的轨迹提前拦截
|
||||||
if (isAdd)
|
if (isAdd)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user