修改尼尔

This commit is contained in:
qianhao.xu 2024-07-23 16:30:15 +08:00
parent 53e0fe06da
commit 58b21eba1c
3 changed files with 55 additions and 4 deletions

View File

@ -72,6 +72,26 @@ namespace DOAN.Admin.WebApi.Controllers.JobKanban
var response = _LoginOrSetService.GetWorkOrderList(today, LineCode);
return SUCCESS(response);
}
/// <summary>
/// 工单list (已经完成的)
/// </summary>
/// <param name="today"></param>
/// <param name="LineCode"></param>
/// <returns></returns>
[HttpGet("get_workorder_finish")]
public IActionResult GetWorkOrderListFinish(DateTime today, string LineCode)
{
if (today == DateTime.MinValue || string.IsNullOrEmpty(LineCode))
{
return SUCCESS(null);
}
var response = _LoginOrSetService.GetWorkOrderListFinish(today, LineCode);
return SUCCESS(response);
}
// 获取工单详情
[HttpGet("get_workorder_detail")]
public IActionResult GetWorkOrderDetail(string workorder)

View File

@ -17,6 +17,9 @@ namespace DOAN.Service.JobKanban.IService
List<BaseGroup> GetGroupList();
List<BaseWorkRoute> GetRouteList();
List<ProWorkorderDto4> GetWorkOrderList(DateTime today, string LineCode);
List<ProWorkorderDto4> GetWorkOrderListFinish(DateTime today, string LineCode);
ProWorkorderDto4 GetWorkOrderDetail(string workorder);

View File

@ -54,12 +54,39 @@ namespace DOAN.Service.JobKanban
.MergeTable()
.OrderBy(it=>it.Workorder)
.ToList();
}
/// <summary>
/// 获取工单列表 完成
/// </summary>
/// <param name="today"></param>
/// <param name="LineCode"></param>
/// <returns></returns>
public List<ProWorkorderDto4> GetWorkOrderListFinish(DateTime today, string LineCode)
{
today = today.Date;
var query1 = Context.Queryable<ProWorkorder>()
.Where(it => it.WorkorderDate == today)
.Where(it => it.RouteId == LineCode)
.Where(it=>it.Status==1||it.Status==2)
;
return Context.Queryable(query1)
.LeftJoin<ProReportwork>((q, r) => q.Workorder == r.FkWorkorder)
.Select((q, r) => new ProWorkorderDto4()
{
FinishNum = r.FinishedNum
}, true)
.MergeTable()
.OrderBy(it => it.Workorder)
.ToList();
}
public ProWorkorderDto4 GetWorkOrderDetail(string workorder)
{
var query = Context.Queryable<ProWorkorder>()
@ -93,6 +120,7 @@ namespace DOAN.Service.JobKanban
.Where(it => it.Workorder == workorder)
.SetColumns(it => it.Status == 2)
.ExecuteCommand();
ProWorkorderStatus workorderStatus = new ProWorkorderStatus();
workorderStatus.Id = XueHua;
workorderStatus.Status = 1;
@ -164,7 +192,7 @@ namespace DOAN.Service.JobKanban
kanbanInfo.RemainTasKNum = Context.Queryable<ProWorkorder>()
.Where(it => it.WorkorderDate == today)
.Where(it => it.RouteId == LineCode)
.Where(it => it.Status == 1)
.Where(it => it.Status == 1||it.Status==2)
.Count();
return kanbanInfo;