优化字段为空时的处理
parent
fa7bf2ec66
commit
68b6cc9b91
|
|
@ -332,20 +332,14 @@ public class ConfigSubscribe : IJob
|
||||||
var y = response.Content.ReadAsByteArrayAsync().Result;
|
var y = response.Content.ReadAsByteArrayAsync().Result;
|
||||||
var ms = new MemoryStream(y);
|
var ms = new MemoryStream(y);
|
||||||
var directories = ImageMetadataReader.ReadMetadata(ms);
|
var directories = ImageMetadataReader.ReadMetadata(ms);
|
||||||
// 获取 XMP 目录(包含 XMP 原始 XML 数据)
|
|
||||||
var xmpDirectory = directories.OfType<XmpDirectory>().FirstOrDefault();
|
var xmpDirectory = directories.OfType<XmpDirectory>().FirstOrDefault();
|
||||||
if (xmpDirectory != null)
|
if (xmpDirectory != null)
|
||||||
{
|
{
|
||||||
// 获取 XMP 的 XML 字符串(原始数据)
|
|
||||||
var xmpXml = xmpDirectory.GetXmpProperties();
|
var xmpXml = xmpDirectory.GetXmpProperties();
|
||||||
foreach (var keyValuePair in xmpXml)
|
foreach (var keyValuePair in xmpXml)
|
||||||
{
|
{
|
||||||
switch (keyValuePair.Key)
|
switch (keyValuePair.Key)
|
||||||
{
|
{
|
||||||
// // drone-dji:GimbalPitchDegree: -90.00
|
|
||||||
//drone-dji:GimbalReverse: 0
|
|
||||||
//drone-dji:GimbalRollDegree: +180.00
|
|
||||||
//drone-dji:GimbalYawDegree: -96.40
|
|
||||||
case "drone-dji:GimbalPitchDegree":
|
case "drone-dji:GimbalPitchDegree":
|
||||||
gimbalPitch = float.Parse(keyValuePair.Value);
|
gimbalPitch = float.Parse(keyValuePair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
@ -490,8 +484,16 @@ public class ConfigSubscribe : IJob
|
||||||
};
|
};
|
||||||
if (executeTask != null)
|
if (executeTask != null)
|
||||||
{
|
{
|
||||||
fileUpload.CreateUserName = executeTask.CreateUserName;
|
_logger.LogDebug($"任务信息:{JsonConvert.SerializeObject(executeTask)}");
|
||||||
fileUpload.CreateUserId = executeTask.CreateId;
|
if (!string.IsNullOrEmpty(executeTask.CreateUserName))
|
||||||
|
{
|
||||||
|
fileUpload.CreateUserName = executeTask.CreateUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (executeTask.CreateId != null)
|
||||||
|
{
|
||||||
|
fileUpload.CreateUserId = executeTask.CreateId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加事务
|
// 添加事务
|
||||||
|
|
@ -665,8 +667,7 @@ public class ConfigSubscribe : IJob
|
||||||
if (!string.IsNullOrEmpty(task.AIInspection) && task.AIInspection.Equals(true) &&
|
if (!string.IsNullOrEmpty(task.AIInspection) && task.AIInspection.Equals(true) &&
|
||||||
!string.IsNullOrEmpty(task.PushUrl))
|
!string.IsNullOrEmpty(task.PushUrl))
|
||||||
{
|
{
|
||||||
// 停止直播
|
// todo video_id 需要根据不同设备改变
|
||||||
// 停止 aimodel 运行
|
|
||||||
var para = @$"{{
|
var para = @$"{{
|
||||||
""bid"": {Guid.NewGuid().ToString()},
|
""bid"": {Guid.NewGuid().ToString()},
|
||||||
""data"": {{
|
""data"": {{
|
||||||
|
|
|
||||||
|
|
@ -146,5 +146,5 @@ public class LasaMediaFile
|
||||||
public string CreateUserName { get; set; }
|
public string CreateUserName { get; set; }
|
||||||
[SugarColumn(IsIgnore = true)] public string TaskName { get; set; }
|
[SugarColumn(IsIgnore = true)] public string TaskName { get; set; }
|
||||||
[SugarColumn(IsIgnore = true)] public string AirLineName { get; set; }
|
[SugarColumn(IsIgnore = true)] public string AirLineName { get; set; }
|
||||||
public long CreateUserId { get; set; }
|
public long? CreateUserId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ namespace OpenAuth.Repository.Domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AirLineId { get; set; }
|
public string AirLineId { get; set; }
|
||||||
|
|
||||||
public long CreateId { get; set; }
|
public long? CreateId { get; set; }
|
||||||
public DateTime? CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue