任务详情添加aishp名称

Insight
陈伟 2024-11-20 08:49:48 +08:00
parent 64833baecb
commit 4b45940efb
2 changed files with 9 additions and 1 deletions

View File

@ -80,14 +80,17 @@ public class PersonTaskApp : SqlSugarBaseApp<InsTask, SugarDbContext>
{ {
var result = await Repository.AsQueryable() var result = await Repository.AsQueryable()
.RightJoin<InsTaskgroup>((a, b) => a.Id == b.TaskId) .RightJoin<InsTaskgroup>((a, b) => a.Id == b.TaskId)
.InnerJoin<InsAishp>((a, b, c) => a.ShpId == c.Id)
.Where((a, b) => b.Id == taskGroupId) .Where((a, b) => b.Id == taskGroupId)
.Select((a, b) => new InsTaskExtend .Select((a, b,c) => new InsTaskExtend
{ {
TaskName = a.TaskName, // 任务名称 TaskName = a.TaskName, // 任务名称
GroupName = b.GroupName, // 任务分组包 GroupName = b.GroupName, // 任务分组包
Sort = b.Sort, // 序号 Sort = b.Sort, // 序号
BeginNum = b.BeginNum, BeginNum = b.BeginNum,
ShpName = c.ShpName,
EndNum = b.EndNum, EndNum = b.EndNum,
TubanNum = b.EndNum - b.BeginNum + 1,
TaskId = b.TaskId, TaskId = b.TaskId,
CreateTime = a.CreateTime, // 创建时间 CreateTime = a.CreateTime, // 创建时间
ReciveTime = b.ReciveTime, // 接收时间 ReciveTime = b.ReciveTime, // 接收时间

View File

@ -50,4 +50,9 @@ public class InsTaskExtend : InsTaskgroup
public int TubanNum { get; set; } public int TubanNum { get; set; }
public int RowNumber { get; set; } public int RowNumber { get; set; }
/// <summary>
/// aishp名称
/// </summary>
public string ShpName { get; set; }
} }