Merge branch 'S07' into test
# Conflicts: # src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
This commit is contained in:
commit
63e0b4c848
@ -5,7 +5,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<Version>7.0.17</Version>
|
||||
<Version>7.0.19</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@ -288,6 +288,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
// 轨迹内容上的约束检查
|
||||
// 更新轨迹时是否可以匹配到轨迹的检查
|
||||
await TrackUpsertValidation(input.IsAdd,
|
||||
input.EsId,
|
||||
input.SubSystemId,
|
||||
order.Id,
|
||||
order.OrderNo,
|
||||
@ -370,6 +371,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
// 轨迹内容上的约束检查
|
||||
// 更新轨迹时是否可以匹配到轨迹的检查
|
||||
await TrackUpsertValidation(input.IsAdd,
|
||||
null,
|
||||
input.SubSystemId,
|
||||
order.Id,
|
||||
order.OrderNo,
|
||||
@ -443,6 +445,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
//在轨迹更新主流程之前的前置检查
|
||||
private async Task TrackUpsertValidation(
|
||||
bool isAdd,
|
||||
string? esId,
|
||||
int subSystemId,
|
||||
int orderId,
|
||||
string orderNo,
|
||||
@ -517,6 +520,21 @@ public partial class TrackService : ApplicationService, ITrackService
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user