diff --git a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
index 08e8406c..e9300b88 100644
--- a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
+++ b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
@@ -46,4 +46,15 @@ public class TrackPullService : ApplicationService, ITransientDependency
{
return await _trackPullConfigRepository.GetContentPageAsync(input);
}
+
+ ///
+ /// 轨迹拉取配置详情
+ ///
+ ///
+ ///
+ [HttpGet("GetDetail")]
+ public async Task GetDetailAsync(int id)
+ {
+ return await _trackPullConfigRepository.GetDetailAsync(id);
+ }
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs b/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
index 4716c2ba..422aafde 100644
--- a/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
+++ b/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
@@ -164,7 +164,7 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
x.TrackTemplateId == input.TrackTemplateId && x.TrackContentId == input.TrackContentId;
if (input.Options == OptionTypeNoNull.修改) isAnyExp.And(x => x.Id != input.Id);
- if (await _trackTemplateRepository.IsAnyAsync(isAnyExp))
+ if (await _trackTemplateRepository.IsContentAnyAsync(isAnyExp))
throw new BusinessException(message: _stringLocalizer["IsTrackTemplateContentAny"]);
}
@@ -174,18 +174,18 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
var entity = ObjectMapper.Map(input);
- await _trackTemplateRepository.InsertAsync(entity);
+ await _trackTemplateRepository.InsertContentAsync(entity);
break;
case OptionTypeNoNull.修改:
- var oldEntity = await _trackTemplateRepository.GetByIdAsync(input.Id!.Value) ??
+ var oldEntity = await _trackTemplateRepository.GetContentByIdAsync(input.Id!.Value) ??
throw new BusinessException(message: _stringLocalizer["NotFindData"]);
ObjectMapper.Map(input, oldEntity);
- await _trackTemplateRepository.UpdateAsync(oldEntity);
+ await _trackTemplateRepository.UpdateContentAsync(oldEntity);
break;
diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPullAggregate/ITrackPullConfigRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackPullAggregate/ITrackPullConfigRepository.cs
index 8229f27c..98bb4822 100644
--- a/src/SJZY.Track.Domain/Aggregates/TrackPullAggregate/ITrackPullConfigRepository.cs
+++ b/src/SJZY.Track.Domain/Aggregates/TrackPullAggregate/ITrackPullConfigRepository.cs
@@ -18,4 +18,11 @@ public interface ITrackPullConfigRepository : IBasicRepository
///
Task> GetContentPageAsync(GetTrackPullContentPageInputVO input);
+
+ ///
+ /// 轨迹拉取配置详情
+ ///
+ ///
+ ///
+ Task GetDetailAsync(int id);
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Aggregates/TrackTemplateAggregate/ITrackTemplateRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackTemplateAggregate/ITrackTemplateRepository.cs
index a20f2ced..ac26857b 100644
--- a/src/SJZY.Track.Domain/Aggregates/TrackTemplateAggregate/ITrackTemplateRepository.cs
+++ b/src/SJZY.Track.Domain/Aggregates/TrackTemplateAggregate/ITrackTemplateRepository.cs
@@ -25,13 +25,13 @@ public interface ITrackTemplateRepository : IBasicRepository
Task GetContentDetailAsync(int id);
- Task IsAnyAsync(Expression> whereExpression);
+ Task IsContentAnyAsync(Expression> whereExpression);
- Task InsertAsync(TrackTemplateContentEntity insertObj);
+ Task InsertContentAsync(TrackTemplateContentEntity insertObj);
- Task GetByIdAsync(int id);
+ Task GetContentByIdAsync(int id);
- Task UpdateAsync(TrackTemplateContentEntity updateObj);
+ Task UpdateContentAsync(TrackTemplateContentEntity updateObj);
Task SoftDeleteContentAsync(int id);
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackPull/GetTrackPullConfigDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPull/GetTrackPullConfigDetailOutputVO.cs
new file mode 100644
index 00000000..76fbdaf4
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackPull/GetTrackPullConfigDetailOutputVO.cs
@@ -0,0 +1,82 @@
+namespace SJZY.Track.Domain.Dtos.TrackPull
+{
+ public class GetTrackPullConfigDetailOutputVO
+ {
+ public int Id { get; set; }
+
+ ///
+ /// 拉取轨迹订单号
+ ///
+ public string OrderNoName { get; set; }
+
+ ///
+ /// 返参解析对象
+ ///
+ public int ParseMethod { get; set; }
+
+ ///
+ /// 定时任务(分钟)
+ ///
+ public int PullInterval { get; set; }
+
+ ///
+ /// 服务商
+ ///
+ public string ServiceProvider { get; set; }
+
+ ///
+ /// 服务商id
+ ///
+ public int ServiceProviderId { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 拉取轨迹时区
+ ///
+ public string TackTimeZoneName { get; set; }
+
+ ///
+ /// 拉取轨迹内容代码
+ ///
+ public string TrackContentCodeName { get; set; }
+
+ ///
+ /// 拉取轨迹内容
+ ///
+ public string TrackContentName { get; set; }
+
+ ///
+ /// 拉取轨迹发生地
+ ///
+ public string TrackPlaceName { get; set; }
+
+ ///
+ /// 拉取轨迹状态
+ ///
+ public string TrackStatusName { get; set; }
+
+ ///
+ /// 轨迹模板
+ ///
+ public string TrackTemplate { get; set; }
+
+ ///
+ /// 轨迹模板id
+ ///
+ public int TrackTemplateId { get; set; }
+
+ ///
+ /// 拉取轨迹发生时间
+ ///
+ public string TrackTimeName { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/TrackPullConfigRepository.cs b/src/SJZY.Track.Repository/TrackPullConfigRepository.cs
index 43b0d367..289552b0 100644
--- a/src/SJZY.Track.Repository/TrackPullConfigRepository.cs
+++ b/src/SJZY.Track.Repository/TrackPullConfigRepository.cs
@@ -51,4 +51,23 @@ public class TrackPullConfigRepository : BasicRepository,
})
.ToPagedListAsync(input.PageIndex, input.PageSize);
}
+
+ public async Task GetDetailAsync(int id)
+ {
+ return await AsQueryable()
+ .LeftJoin((trackPull, system) => trackPull.SubSystemId == system.Id && !system.IsDeleted)
+ .LeftJoin((trackPull, system, service) => trackPull.ServiceProviderId == service.Id && !service.IsDeleted)
+ .LeftJoin((trackPull, system, service, template) => trackPull.TrackTemplateId == template.Id && !template.IsDeleted)
+ .InnerJoin((trackPull, system, service, template, paramsConfig) => trackPull.Id == paramsConfig.PullOrPushConfigId && !paramsConfig.IsPush && !paramsConfig.IsDeleted)
+ .Filter(null, true)
+ .Where(trackPull => trackPull.Id == id && !trackPull.IsDeleted)
+ .Select((trackPull, system, service, template, paramsConfig) => new GetTrackPullConfigDetailOutputVO
+ {
+ Id = trackPull.Id,
+ SubSystem = system.CnName,
+ ServiceProvider = service.Name,
+ TrackTemplate = template.Name
+ }, true)
+ .SingleAsync();
+ }
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/TrackTemplateRepository.cs b/src/SJZY.Track.Repository/TrackTemplateRepository.cs
index f26d606c..ee2ee76f 100644
--- a/src/SJZY.Track.Repository/TrackTemplateRepository.cs
+++ b/src/SJZY.Track.Repository/TrackTemplateRepository.cs
@@ -126,25 +126,25 @@ public class TrackTemplateRepository : BasicRepository, ITr
}
///
- public async Task IsAnyAsync(Expression> whereExpression)
+ public async Task IsContentAnyAsync(Expression> whereExpression)
{
return await Context.Queryable().Where(whereExpression).AnyAsync();
}
///
- public async Task InsertAsync(TrackTemplateContentEntity insertObj)
+ public async Task InsertContentAsync(TrackTemplateContentEntity insertObj)
{
return await Context.Insertable(insertObj).ExecuteCommandAsync() > 0;
}
///
- public async Task GetByIdAsync(int id)
+ public async Task GetContentByIdAsync(int id)
{
return await Context.Queryable().InSingleAsync(id);
}
///
- public async Task UpdateAsync(TrackTemplateContentEntity updateObj)
+ public async Task UpdateContentAsync(TrackTemplateContentEntity updateObj)
{
return await Context.Updateable(updateObj).ExecuteCommandHasChangeAsync();
}