增加人员岗位
This commit is contained in:
parent
b3de68ae80
commit
7c908f3d3d
@ -104,16 +104,19 @@ namespace DOAN.Service.Business
|
||||
/// </summary>
|
||||
/// <param name="group_schedule_id"></param>
|
||||
/// <returns></returns>
|
||||
public List<GroupPerson> SearchPerson_group_bind(string group_schedule_id)
|
||||
public List<GroupPersonDto> SearchPerson_group_bind(string group_schedule_id)
|
||||
{
|
||||
List<GroupPerson> peopleList = Context.Queryable<GroupRelPersonGroup>()
|
||||
var query = Context.Queryable<GroupRelPersonGroup>()
|
||||
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
||||
.Where((rel, p) => rel.FkGroupId == group_schedule_id)
|
||||
.Where((rel, p) => p.Status == 1)
|
||||
.Select((rel, p) => p)
|
||||
.ToList();
|
||||
.Select((rel, p) => p);
|
||||
|
||||
return peopleList;
|
||||
|
||||
return Context.Queryable(query)
|
||||
.LeftJoin<GroupPost>((q, p) => q.FkPost == p.Id)
|
||||
.Select((q, p) => new GroupPersonDto { PostName = p.PostName }, true)
|
||||
.ToList();
|
||||
|
||||
|
||||
}
|
||||
@ -124,26 +127,26 @@ namespace DOAN.Service.Business
|
||||
/// <param name="group_schedule_id"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <returns></returns>
|
||||
public List<GroupPerson> SearchPerson_group_bind_No(string group_schedule_id)
|
||||
public List<GroupPersonDto> SearchPerson_group_bind_No(string group_schedule_id)
|
||||
{
|
||||
// 查询日期内所有绑定人员
|
||||
|
||||
//查询指定日期排班
|
||||
|
||||
|
||||
|
||||
|
||||
//查询排班所有绑定的人员
|
||||
|
||||
|
||||
|
||||
// 查询排班内所有未绑定人员
|
||||
return Context.Queryable<GroupPerson>().Where(it => SqlFunc.Subqueryable<GroupRelPersonGroup>()
|
||||
var query= Context.Queryable<GroupPerson>().Where(it => SqlFunc.Subqueryable<GroupRelPersonGroup>()
|
||||
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
||||
.Where((rel, p) => p.Status == 1)
|
||||
.Where((rel, p) => SqlFunc.Subqueryable<GroupSchedule>().Where(it => it.ScheduleDate == SqlFunc.Subqueryable<GroupSchedule>()
|
||||
.Where(it => it.Id == group_schedule_id)
|
||||
.Select(it => it.ScheduleDate)).Where(it => it.Id == rel.FkGroupId).Any()).Where((rel, p) => p.Id == it.Id).NotAny()).ToList();
|
||||
.Where(it => it.Id == group_schedule_id)
|
||||
.Select(it => it.ScheduleDate)).Where(it => it.Id == rel.FkGroupId).Any()).Where((rel, p) => p.Id == it.Id).NotAny());
|
||||
return Context.Queryable(query)
|
||||
.LeftJoin<GroupPost>((q, p) => q.FkPost == p.Id)
|
||||
.Select((q, p) => new GroupPersonDto { PostName = p.PostName }, true)
|
||||
.ToList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -21,8 +21,8 @@ namespace DOAN.Service.group.IService
|
||||
|
||||
PagedInfo<GroupScheduleDto> ListGroupByDate(GroupScheduleQueryDto2 query);
|
||||
|
||||
List<GroupPerson> SearchPerson_group_bind(string group_schedule_id);
|
||||
List<GroupPerson> SearchPerson_group_bind_No(string group_schedule_id);
|
||||
List<GroupPersonDto> SearchPerson_group_bind(string group_schedule_id);
|
||||
List<GroupPersonDto> SearchPerson_group_bind_No(string group_schedule_id);
|
||||
int GroupAddPerson(string group_schedule_id, string person_id, string CreatedBy);
|
||||
int GroupRemovePerson(string group_schedule_id, string person_id);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user