Merge branch 'S01-轨迹中台' of http://192.168.80.50:3000/Dotnet/SJZY.Track.Api into S01-轨迹中台
This commit is contained in:
commit
91a99ad66e
@ -86,14 +86,13 @@ namespace SJZY.Track.Application.Services.TrackFlags
|
|||||||
private async Task<UnifyResultDto> AddAsync(EditTrackFlagInput input)
|
private async Task<UnifyResultDto> AddAsync(EditTrackFlagInput input)
|
||||||
{
|
{
|
||||||
#region 业务校验
|
#region 业务校验
|
||||||
|
var trackStatusEntitys = await _trackFlagRepository.GetListAsync(a =>
|
||||||
var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a =>
|
|
||||||
a.SubSystemId == input.SubSystemId && (a.Code == input.Code || a.Name == input.Flag));
|
a.SubSystemId == input.SubSystemId && (a.Code == input.Code || a.Name == input.Flag));
|
||||||
if (trackStatusEntity != null)
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
|
||||||
|
throw new BusinessException(message: "当前子系统下已存在轨迹标记代码");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var entity = ObjectMapper.Map<EditTrackFlagInput, TrackFlagEntity>(input);
|
var entity = ObjectMapper.Map<EditTrackFlagInput, TrackFlagEntity>(input);
|
||||||
@ -106,12 +105,13 @@ namespace SJZY.Track.Application.Services.TrackFlags
|
|||||||
{
|
{
|
||||||
#region 业务校验
|
#region 业务校验
|
||||||
|
|
||||||
var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a => a.Id != input.Id &&
|
var trackStatusEntitys = await _trackFlagRepository.GetListAsync(a => a.Id != input.Id &&
|
||||||
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
||||||
a.Name == input.Flag));
|
a.Name == input.Flag));
|
||||||
if (trackStatusEntity != null)
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
|
||||||
|
throw new BusinessException(message: "当前子系统下已存在轨迹标记代码");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -112,6 +112,7 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
|||||||
(a, b, c) => a.CreateTime >= input.CreateTimeStart)
|
(a, b, c) => a.CreateTime >= input.CreateTimeStart)
|
||||||
.WhereIF((!input.CreateTimeStart.HasValue) && input.CreateTimeEnd.HasValue,
|
.WhereIF((!input.CreateTimeStart.HasValue) && input.CreateTimeEnd.HasValue,
|
||||||
(a, b, c) => a.CreateTime <= input.CreateTimeEnd)
|
(a, b, c) => a.CreateTime <= input.CreateTimeEnd)
|
||||||
|
.OrderByDescending((a, b, c) => a.CreateTime)
|
||||||
.Select((a, b, c) => new TrackOrderVO
|
.Select((a, b, c) => new TrackOrderVO
|
||||||
{
|
{
|
||||||
Id = a.Id,
|
Id = a.Id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user