【 2. 轨迹状态页面:新增编辑弹窗,列表增加是否完结的字段,非必填】
https://www.tapd.cn/60863849/prong/tasks/view/1160863849001027890
This commit is contained in:
parent
1f8a0d2f93
commit
85b05dfa5d
@ -35,5 +35,10 @@ public class EditTrackStatusInput
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹状态英文
|
/// 轨迹状态英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? EntrackStatus { get; set; }
|
public string? EnTrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否完结
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCompleted { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,10 +35,15 @@ public class GetTrackStatusDetailDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容英文
|
/// 轨迹内容英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string EntrackStatus { get; set; }
|
public string EnTrackStatus { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 节点名称
|
/// 节点名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? NodeName { get; set; }
|
public string? NodeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否完结
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCompleted { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,12 @@ public class GetTrackStatusListDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容英文
|
/// 轨迹内容英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string EntrackStatus { get; set; }
|
public string EnTrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否完结
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCompleted { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
|
|||||||
@ -12,7 +12,7 @@ public class TrackStatusAutoMapperProfile : Profile
|
|||||||
CreateMap<EditTrackStatusInput, TrackStatusEntity>(MemberList.None)
|
CreateMap<EditTrackStatusInput, TrackStatusEntity>(MemberList.None)
|
||||||
//层级不一致的场景
|
//层级不一致的场景
|
||||||
.ForMember(dest => dest.Status, opt => opt.MapFrom(source => source.TrackStatus))
|
.ForMember(dest => dest.Status, opt => opt.MapFrom(source => source.TrackStatus))
|
||||||
.ForMember(dest => dest.EnStatus, opt => opt.MapFrom(source => source.EntrackStatus))
|
.ForMember(dest => dest.EnStatus, opt => opt.MapFrom(source => source.EnTrackStatus))
|
||||||
.ForMember(dest => dest.Node, opt => opt.MapFrom(source => source.NodeId));
|
.ForMember(dest => dest.Node, opt => opt.MapFrom(source => source.NodeId));
|
||||||
CreateMap<GetTrackStatusDetailVO, GetTrackStatusDetailDto>(MemberList.None);
|
CreateMap<GetTrackStatusDetailVO, GetTrackStatusDetailDto>(MemberList.None);
|
||||||
CreateMap<GetPageTrackStatusInput, GetPageTrackStatusVO>(MemberList.None);
|
CreateMap<GetPageTrackStatusInput, GetPageTrackStatusVO>(MemberList.None);
|
||||||
|
|||||||
@ -89,7 +89,7 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
|
|
||||||
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.SubSystemId == input.SubSystemId &&
|
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.SubSystemId == input.SubSystemId &&
|
||||||
(a.Code == input.Code ||
|
(a.Code == input.Code ||
|
||||||
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
a.Status == input.TrackStatus || a.EnStatus == input.EnTrackStatus));
|
||||||
if (trackStatusEntitys.Any())
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
||||||
@ -106,7 +106,7 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
throw new BusinessException(message: "该子系统下轨迹状态已存在");
|
throw new BusinessException(message: "该子系统下轨迹状态已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
var trackStatusEnName = trackStatusEntitys.FirstOrDefault(t => t.EnStatus == input.EntrackStatus);
|
var trackStatusEnName = trackStatusEntitys.FirstOrDefault(t => t.EnStatus == input.EnTrackStatus);
|
||||||
if (trackStatusEnName != null)
|
if (trackStatusEnName != null)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹状态英文已存在");
|
throw new BusinessException(message: "该子系统下轨迹状态英文已存在");
|
||||||
@ -127,7 +127,7 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
|
|
||||||
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.Id != input.Id &&
|
var trackStatusEntitys = await _trackStatusRepository.GetListAsync(a => a.Id != input.Id &&
|
||||||
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
||||||
a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
|
a.Status == input.TrackStatus || a.EnStatus == input.EnTrackStatus));
|
||||||
if (trackStatusEntitys.Any())
|
if (trackStatusEntitys.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
//throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
|
||||||
@ -144,7 +144,7 @@ public class TrackStatusService : ApplicationService, ITransientDependency
|
|||||||
throw new BusinessException(message: "该子系统下轨迹状态已存在");
|
throw new BusinessException(message: "该子系统下轨迹状态已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
var trackStatusEnName = trackStatusEntitys.FirstOrDefault(t => t.EnStatus == input.EntrackStatus);
|
var trackStatusEnName = trackStatusEntitys.FirstOrDefault(t => t.EnStatus == input.EnTrackStatus);
|
||||||
if (trackStatusEnName != null)
|
if (trackStatusEnName != null)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹状态英文已存在");
|
throw new BusinessException(message: "该子系统下轨迹状态英文已存在");
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public class EditTrackStatusInputValidation : AbstractValidator<EditTrackStatusI
|
|||||||
RuleFor(x => x.NodeId).GreaterThan(0).WithMessage("所属节点的id必须大于0!");
|
RuleFor(x => x.NodeId).GreaterThan(0).WithMessage("所属节点的id必须大于0!");
|
||||||
RuleFor(x => x.Code).NotNull().WithMessage("轨迹状态代码必填!").NotEmpty().WithMessage("轨迹状态代码不能为空!");
|
RuleFor(x => x.Code).NotNull().WithMessage("轨迹状态代码必填!").NotEmpty().WithMessage("轨迹状态代码不能为空!");
|
||||||
RuleFor(x => x.TrackStatus).NotNull().WithMessage("轨迹状态必填!").NotEmpty().WithMessage("轨迹状态不能为空!");
|
RuleFor(x => x.TrackStatus).NotNull().WithMessage("轨迹状态必填!").NotEmpty().WithMessage("轨迹状态不能为空!");
|
||||||
RuleFor(x => x.EntrackStatus).NotNull().WithMessage("轨迹状态英文必填!").NotEmpty().WithMessage("轨迹状态英文不能为空!");
|
RuleFor(x => x.EnTrackStatus).NotNull().WithMessage("轨迹状态英文必填!").NotEmpty().WithMessage("轨迹状态英文不能为空!");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,6 @@ public class TrackStatusEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
[SugarColumn(ColumnName = "EnStatus")]
|
[SugarColumn(ColumnName = "EnStatus")]
|
||||||
public string EnStatus { get; set; } = null!;
|
public string EnStatus { get; set; } = null!;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否完结
|
/// 是否完结
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -35,10 +35,15 @@ public class GetTrackStatusDetailVO
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容英文
|
/// 轨迹内容英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string EntrackStatus { get; set; }
|
public string EnTrackStatus { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 节点名称
|
/// 节点名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? NodeName { get; set; }
|
public string? NodeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否完结
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCompleted { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,12 @@ public class GetTrackStatusListVO
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容英文
|
/// 轨迹内容英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string EntrackStatus { get; set; }
|
public string EnTrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否完结
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCompleted { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
|
|||||||
@ -24,10 +24,11 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
|
|||||||
SubSystemId = a.SubSystemId,
|
SubSystemId = a.SubSystemId,
|
||||||
SubSystem = b.CnName,
|
SubSystem = b.CnName,
|
||||||
Code = a.Code,
|
Code = a.Code,
|
||||||
EntrackStatus = a.EnStatus,
|
EnTrackStatus = a.EnStatus,
|
||||||
NodeId = a.Node,
|
NodeId = a.Node,
|
||||||
TrackStatus = a.Status,
|
TrackStatus = a.Status,
|
||||||
NodeName = t.NodeName
|
NodeName = t.NodeName,
|
||||||
|
IsCompleted = a.IsCompleted
|
||||||
})
|
})
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
return detail;
|
return detail;
|
||||||
@ -40,7 +41,7 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<UnifyPageResultDto<GetTrackStatusListVO>> GetPageTrackStatus(GetPageTrackStatusVO input)
|
public async Task<UnifyPageResultDto<GetTrackStatusListVO>> GetPageTrackStatus(GetPageTrackStatusVO input)
|
||||||
{
|
{
|
||||||
UnifyPageResultDto<GetTrackStatusListVO> pagedList = await Context.Queryable<TrackStatusEntity>()
|
var pagedList = await Context.Queryable<TrackStatusEntity>()
|
||||||
.LeftJoin<VSystemEntity>((a, b) => a.SubSystemId == b.Id && b.IsDeleted == false)
|
.LeftJoin<VSystemEntity>((a, b) => a.SubSystemId == b.Id && b.IsDeleted == false)
|
||||||
.LeftJoin<VUserEntity>((a, b, c) => a.CreateUserId == c.Id && c.IsDeleted == false)
|
.LeftJoin<VUserEntity>((a, b, c) => a.CreateUserId == c.Id && c.IsDeleted == false)
|
||||||
.LeftJoin<VUserEntity>((a, b, c, d) => a.UpdateUserId == d.Id && d.IsDeleted == false)
|
.LeftJoin<VUserEntity>((a, b, c, d) => a.UpdateUserId == d.Id && d.IsDeleted == false)
|
||||||
@ -57,7 +58,7 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
|
|||||||
{
|
{
|
||||||
Id = a.Id,
|
Id = a.Id,
|
||||||
Code = a.Code,
|
Code = a.Code,
|
||||||
EntrackStatus = a.EnStatus,
|
EnTrackStatus = a.EnStatus,
|
||||||
TrackStatus = a.Status,
|
TrackStatus = a.Status,
|
||||||
NodeId = a.Node,
|
NodeId = a.Node,
|
||||||
Node = e.NodeName!,
|
Node = e.NodeName!,
|
||||||
@ -65,7 +66,8 @@ public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackS
|
|||||||
CreateUser = c.Name,
|
CreateUser = c.Name,
|
||||||
UpdateTime = a.UpdateTime,
|
UpdateTime = a.UpdateTime,
|
||||||
UpdateUser = d.Name,
|
UpdateUser = d.Name,
|
||||||
SubSystem = b.CnName
|
SubSystem = b.CnName,
|
||||||
|
IsCompleted = a.IsCompleted
|
||||||
})
|
})
|
||||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user