diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentOutput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentOutput.cs
index 69e77773..f1c9300c 100644
--- a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentOutput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentOutput.cs
@@ -26,4 +26,19 @@ public class GetAvailableContentOutput
/// 是否对外
///
public bool IsExternal { get; set; }
+
+ ///
+ /// 轨迹来源
+ ///
+ public int? Source { get; set; }
+
+ ///
+ /// 轨迹发生时间
+ ///
+ public DateTime? TrackTime { get; set; }
+
+ ///
+ /// 轨迹发生时区
+ ///
+ public float? TrackTimeZone { get; set; }
}
diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
index 8cb91e48..4aa023da 100644
--- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
+++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
@@ -266,7 +266,7 @@ public class TrackContentService : ApplicationService
if (!item.IsAllowManuallyCreate && input.TrackOptionType == TrackOptionType.创建) //跳过不允许手动创建的轨迹内容
continue;
- if (!item.IsAllowManuallyUpdate && input.TrackOptionType == TrackOptionType.修改) //跳过不允许手动创建的轨迹内容
+ if (!item.IsAllowManuallyUpdate && input.TrackOptionType == TrackOptionType.修改) //跳过不允许手动修改的轨迹内容
continue;
res.Data.Add(new GetAvailableContentOutput()
@@ -279,6 +279,42 @@ public class TrackContentService : ApplicationService
});
}
+ if (input.TrackOptionType == TrackOptionType.创建
+ || trackDetails == null
+ || trackDetails.Count == 0)
+ {
+ return res;
+ }
+
+
+ //修改操作,查轨迹内容列表反映明细表数据,重新构造响应数据
+ var matchContent = new List();
+ var contents = res.Data.Select(x => new
+ {
+ x.Id,
+ x.IsExternal,
+ x.Code
+ });
+
+ foreach (var content in contents)
+ {
+ var match = trackDetails
+ .Where(x => x.TrackCode == content.Code)
+ .Select(matchItem => new GetAvailableContentOutput
+ {
+ IsExternal = content.IsExternal,
+ Id = content.Id,
+ EnContent = matchItem.TrackEnContent,
+ Content = matchItem.TrackContent,
+ Code = matchItem.TrackCode,
+ TrackTime = matchItem.TrackTime,
+ TrackTimeZone = matchItem.TrackTimeZone,
+ Source = matchItem.Source
+ });
+ matchContent.AddRange(match);
+ }
+
+ res.Data = matchContent;
return res;
}