1
This commit is contained in:
parent
a0ec3319b2
commit
203babdf07
@ -160,16 +160,16 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// //TODO 查询班组绑定的人员
|
/// //TODO 查询班组绑定的人员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="group_schedule_id">班组id</param>
|
/// <param name="group_code">班组id</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("list_person_bind")]
|
[HttpGet("list_person_bind")]
|
||||||
public IActionResult SearchPerson_group_bind(string group_schedule_id)
|
public IActionResult SearchPerson_group_bind(string group_code)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(group_schedule_id))
|
if (string.IsNullOrEmpty(group_code))
|
||||||
{
|
{
|
||||||
return SUCCESS(null);
|
return SUCCESS(null);
|
||||||
}
|
}
|
||||||
var response = _GroupScheduleService.SearchPerson_group_bind(group_schedule_id);
|
var response = _GroupScheduleService.SearchPerson_group_bind(group_code);
|
||||||
|
|
||||||
return SUCCESS(response);
|
return SUCCESS(response);
|
||||||
}
|
}
|
||||||
@ -178,12 +178,12 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// TODO 查询排班未绑定的人员
|
/// TODO 查询排班未绑定的人员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="group_schedule_id">班id</param>
|
/// <param name="group_code">班id</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("list_person_bind_no")]
|
[HttpPost("list_person_bind_no")]
|
||||||
public IActionResult SearchPerson_group_bind_No([FromBody] GroupScheduleQueryDto3 parm)
|
public IActionResult SearchPerson_group_bind_No([FromBody] GroupScheduleQueryDto3 parm)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(parm.group_schedule_id))
|
if (string.IsNullOrEmpty(parm.group_code))
|
||||||
{
|
{
|
||||||
return SUCCESS(null);
|
return SUCCESS(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace DOAN.Model.MES.group.Dto
|
|||||||
}
|
}
|
||||||
public class GroupScheduleQueryDto3 : PagerInfo
|
public class GroupScheduleQueryDto3 : PagerInfo
|
||||||
{
|
{
|
||||||
public string group_schedule_id { get; set; }
|
public string group_code { get; set; }
|
||||||
public string WorkNum { get; set; }
|
public string WorkNum { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@ -107,13 +107,13 @@ namespace DOAN.Service.Business
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询班组绑定的人员
|
/// 查询班组绑定的人员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="group_schedule_id"></param>
|
/// <param name="group_code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<GroupPersonDto> SearchPerson_group_bind(string group_schedule_id)
|
public List<GroupPersonDto> SearchPerson_group_bind(string group_code)
|
||||||
{
|
{
|
||||||
var query = Context.Queryable<GroupRelPersonGroup>()
|
var query = Context.Queryable<GroupRelPersonGroup>()
|
||||||
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
||||||
.Where((rel, p) => rel.FkGroupId == group_schedule_id)
|
.Where((rel, p) => rel.GroupCode == group_code)
|
||||||
.Where((rel, p) => p.Status == 1)
|
.Where((rel, p) => p.Status == 1)
|
||||||
.Select((rel, p) => p);
|
.Select((rel, p) => p);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ namespace DOAN.Service.Business
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询班组未绑定的人员
|
/// 查询班组未绑定的人员
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="group_schedule_id"></param>
|
/// <param name="group_code"></param>
|
||||||
/// <param name="date"></param>
|
/// <param name="date"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public PagedInfo<GroupPersonDto> SearchPerson_group_bind_No(GroupScheduleQueryDto3 parm)
|
public PagedInfo<GroupPersonDto> SearchPerson_group_bind_No(GroupScheduleQueryDto3 parm)
|
||||||
@ -145,7 +145,7 @@ namespace DOAN.Service.Business
|
|||||||
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
.LeftJoin<GroupPerson>((rel, p) => rel.FkPersonId == p.Id)
|
||||||
.Where((rel, p) => p.Status == 1)
|
.Where((rel, p) => p.Status == 1)
|
||||||
.Where((rel, p) => SqlFunc.Subqueryable<GroupSchedule>().Where(it => it.ScheduleDate == SqlFunc.Subqueryable<GroupSchedule>()
|
.Where((rel, p) => SqlFunc.Subqueryable<GroupSchedule>().Where(it => it.ScheduleDate == SqlFunc.Subqueryable<GroupSchedule>()
|
||||||
.Where(it => it.Id == parm.group_schedule_id)
|
.Where(it => it.Id == parm.group_code)
|
||||||
.Select(it => it.ScheduleDate)).Where(it => it.Id == rel.GroupCode).Any()).Where((rel, p) => p.Id == it.Id).NotAny());
|
.Select(it => it.ScheduleDate)).Where(it => it.Id == rel.GroupCode).Any()).Where((rel, p) => p.Id == it.Id).NotAny());
|
||||||
|
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ namespace DOAN.Service.Business
|
|||||||
|
|
||||||
//TODO copy 班组人员
|
//TODO copy 班组人员
|
||||||
string[] collects = date_schedules.Select(it => it.Id).ToArray();
|
string[] collects = date_schedules.Select(it => it.Id).ToArray();
|
||||||
List<GroupRelPersonGroup> Copy_groups = Context.Queryable<GroupRelPersonGroup>().Where(it => collects.Contains(it.FkGroupId)).ToList();
|
List<GroupRelPersonGroup> Copy_groups = Context.Queryable<GroupRelPersonGroup>().Where(it => collects.Contains(it.GroupCode)).ToList();
|
||||||
|
|
||||||
List<GroupRelPersonGroup> inserts_GroupRelPersonGroup = new List<GroupRelPersonGroup>();
|
List<GroupRelPersonGroup> inserts_GroupRelPersonGroup = new List<GroupRelPersonGroup>();
|
||||||
|
|
||||||
@ -257,13 +257,13 @@ namespace DOAN.Service.Business
|
|||||||
group.UpdatedBy = CreatedBy;
|
group.UpdatedBy = CreatedBy;
|
||||||
group.UpdatedTime = DateTime.Now;
|
group.UpdatedTime = DateTime.Now;
|
||||||
//组绑定 的人员
|
//组绑定 的人员
|
||||||
List<GroupRelPersonGroup> Copy_group_presons = Copy_groups.Where(it => it.FkGroupId == group.Id).ToList();
|
List<GroupRelPersonGroup> Copy_group_presons = Copy_groups.Where(it => it.GroupCode == group.Id).ToList();
|
||||||
if (Copy_group_presons.Count > 0)
|
if (Copy_group_presons.Count > 0)
|
||||||
{
|
{
|
||||||
group.Id = XueHua;
|
group.Id = XueHua;
|
||||||
foreach (var person in Copy_group_presons)
|
foreach (var person in Copy_group_presons)
|
||||||
{
|
{
|
||||||
person.FkGroupId = group.Id;
|
person.GroupCode = group.Id;
|
||||||
person.CreatedBy = group.CreatedBy;
|
person.CreatedBy = group.CreatedBy;
|
||||||
person.CreatedTime = group.CreatedTime;
|
person.CreatedTime = group.CreatedTime;
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ namespace DOAN.Service.Business
|
|||||||
{
|
{
|
||||||
// 删除原有数据
|
// 删除原有数据
|
||||||
// Context.Deleteable(date_schedules).ExecuteCommand();
|
// Context.Deleteable(date_schedules).ExecuteCommand();
|
||||||
// Context.Deleteable<GroupRelPersonGroup>().Where(it => collects.Contains(it.FkGroupId)).ExecuteCommand();
|
// Context.Deleteable<GroupRelPersonGroup>().Where(it => collects.Contains(it.GroupCode)).ExecuteCommand();
|
||||||
result = Context.Insertable(date_schedules).ExecuteCommand();
|
result = Context.Insertable(date_schedules).ExecuteCommand();
|
||||||
Context.Insertable(inserts_GroupRelPersonGroup).ExecuteCommand();
|
Context.Insertable(inserts_GroupRelPersonGroup).ExecuteCommand();
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ namespace DOAN.Service.group.IService
|
|||||||
|
|
||||||
PagedInfo<GroupScheduleDto> ListGroupByDate(GroupScheduleQueryDto2 query);
|
PagedInfo<GroupScheduleDto> ListGroupByDate(GroupScheduleQueryDto2 query);
|
||||||
|
|
||||||
List<GroupPersonDto> SearchPerson_group_bind(string group_schedule_id);
|
List<GroupPersonDto> SearchPerson_group_bind(string group_code);
|
||||||
PagedInfo<GroupPersonDto> SearchPerson_group_bind_No(GroupScheduleQueryDto3 parm);
|
PagedInfo<GroupPersonDto> SearchPerson_group_bind_No(GroupScheduleQueryDto3 parm);
|
||||||
|
|
||||||
List<BaseGroup> GetALLGroup(string group_code,string group_name);
|
List<BaseGroup> GetALLGroup(string group_code,string group_name);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user