班组绑人
This commit is contained in:
@@ -194,12 +194,12 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
|
||||
//TODO 班组添加人员
|
||||
[HttpGet("add_person")]
|
||||
public IActionResult GroupAddPerson(string group_code, string person_id)
|
||||
public IActionResult GroupAddPerson(string group_code, string person_id,DateTime schedule_date)
|
||||
{
|
||||
if (string.IsNullOrEmpty(group_code)) { return SUCCESS(null); }
|
||||
if (string.IsNullOrEmpty(person_id)) { return SUCCESS(null); }
|
||||
var response = _GroupScheduleService
|
||||
.GroupAddPerson(group_code, person_id, HttpContext.GetName());
|
||||
.GroupAddPerson(group_code, person_id, schedule_date, HttpContext.GetName());
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace DOAN.Model.MES.group.Dto
|
||||
/// </summary>
|
||||
public class GroupRelPersonGroupDto
|
||||
{
|
||||
|
||||
public DateTime ScheduleDate { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "组别id不能为空")]
|
||||
public string GroupCode { get; set; }
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@ namespace DOAN.Model.MES.group
|
||||
[SugarTable("group_rel_person_group")]
|
||||
public class GroupRelPersonGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// 排班日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "schedule_date")]
|
||||
public DateTime ScheduleDate { get; set; }
|
||||
/// <summary>
|
||||
/// 组别id
|
||||
/// </summary>
|
||||
|
||||
@@ -170,13 +170,14 @@ namespace DOAN.Service.Business
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public int GroupAddPerson(string group_code, string person_id, string CreatedBy)
|
||||
public int GroupAddPerson(string group_code, string person_id,DateTime schedule_date, string CreatedBy)
|
||||
{
|
||||
GroupRelPersonGroup relPersonGroup = new GroupRelPersonGroup();
|
||||
relPersonGroup.GroupCode = group_code;
|
||||
relPersonGroup.FkPersonId = person_id;
|
||||
relPersonGroup.CreatedTime = DateTime.Now;
|
||||
relPersonGroup.CreatedBy = CreatedBy;
|
||||
relPersonGroup.ScheduleDate = schedule_date.Date;
|
||||
return Context.Insertable(relPersonGroup).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace DOAN.Service.group.IService
|
||||
PagedInfo<GroupPersonDto> SearchPerson_group_bind_No(GroupScheduleQueryDto3 parm);
|
||||
|
||||
List<BaseGroup> GetALLGroup(string group_code,string group_name);
|
||||
int GroupAddPerson(string group_code, string person_id, string CreatedBy);
|
||||
int GroupAddPerson(string group_code, string person_id,DateTime schedule_date, string CreatedBy);
|
||||
int GroupRemovePerson(string group_code, string person_id);
|
||||
|
||||
List<SchedulingSituation> GetMonthScheduleResult(int year,int HandleMonth);
|
||||
|
||||
Reference in New Issue
Block a user