1
This commit is contained in:
parent
4cdd7b06e3
commit
ba2e2dca05
@ -85,13 +85,13 @@ namespace DOAN.WebApi.Controllers.JobKanban
|
||||
|
||||
// 获取今日总任务数 ,剩余任务数
|
||||
[HttpGet("get_num_list")]
|
||||
public IActionResult GetKanbanNum(DateTime today, string LineCode)
|
||||
public IActionResult GetKanbanNum(DateTime today, string line_code, string group_code)
|
||||
{
|
||||
if (today == DateTime.MinValue || string.IsNullOrEmpty(LineCode))
|
||||
if (today == DateTime.MinValue || string.IsNullOrEmpty(line_code) || string.IsNullOrEmpty(group_code))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = workorderProgressService.GetKanbanNum(today, LineCode);
|
||||
var response = workorderProgressService.GetKanbanNum(today, line_code, group_code);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ namespace DOAN.Service.JobKanban.IService
|
||||
|
||||
ProWorkorderDto4 GetWorkOrderDetail(string workorder);
|
||||
|
||||
KanbanInfo GetKanbanNum(DateTime today, string LineCode);
|
||||
KanbanInfo GetKanbanNum(DateTime today, string line_code, string group_code);
|
||||
int StartWorkOrder(string workorder);
|
||||
int FinishWorkOrder(string workorder);
|
||||
ProWorkorder GetProductingWorkorder(string group_code, string line_code, DateTime handleDate);
|
||||
|
||||
@ -140,47 +140,49 @@ namespace DOAN.Service.JobKanban
|
||||
|
||||
}
|
||||
|
||||
public KanbanInfo GetKanbanNum(DateTime today, string LineCode)
|
||||
public KanbanInfo GetKanbanNum(DateTime today, string line_code, string group_code)
|
||||
{
|
||||
KanbanInfo kanbanInfo = new KanbanInfo();
|
||||
today = today.ToLocalTime().Date;
|
||||
kanbanInfo.TotalTaskNum = Context.Queryable<ProWorkorder>()
|
||||
.Where(it => it.WorkorderDate == today)
|
||||
.Where(it => it.LineCode == LineCode)
|
||||
.Where(it => it.LineCode == line_code)
|
||||
.Where(it => it.GroupCode == group_code)
|
||||
.Count();
|
||||
|
||||
kanbanInfo.RemainTasKNum = Context.Queryable<ProWorkorder>()
|
||||
.Where(it => it.WorkorderDate == today)
|
||||
.Where(it => it.LineCode == LineCode)
|
||||
.Where(it => it.LineCode == line_code)
|
||||
.Where(it => it.GroupCode == group_code)
|
||||
.Where(it => it.Status == 1 || it.Status == 2)
|
||||
.Count();
|
||||
|
||||
return kanbanInfo;
|
||||
}
|
||||
|
||||
public int StartWorkOrder(string workorder)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>().SetColumns(it => it.Status == 2)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
}
|
||||
public int StartWorkOrder(string workorder)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>().SetColumns(it => it.Status == 2)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
}
|
||||
|
||||
public int FinishWorkOrder(string workorder)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>().SetColumns(it => it.Status == 3)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
}
|
||||
public int FinishWorkOrder(string workorder)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>().SetColumns(it => it.Status == 3)
|
||||
.Where(it => it.Workorder == workorder).ExecuteCommand();
|
||||
}
|
||||
|
||||
public ProWorkorder GetProductingWorkorder(string group_code, string line_code, DateTime handleDate)
|
||||
{
|
||||
handleDate = handleDate.ToLocalTime().Date;
|
||||
public ProWorkorder GetProductingWorkorder(string group_code, string line_code, DateTime handleDate)
|
||||
{
|
||||
handleDate = handleDate.ToLocalTime().Date;
|
||||
|
||||
return Context.Queryable<ProWorkorder>().Where(it => it.GroupCode == group_code)
|
||||
.Where(it => it.LineCode == line_code)
|
||||
.Where(it => it.WorkorderDate == handleDate)
|
||||
.Where(it => it.Status == 2).First();
|
||||
return Context.Queryable<ProWorkorder>().Where(it => it.GroupCode == group_code)
|
||||
.Where(it => it.LineCode == line_code)
|
||||
.Where(it => it.WorkorderDate == handleDate)
|
||||
.Where(it => it.Status == 2).First();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user