实时产出增加小组查询
This commit is contained in:
parent
cba0d7d86e
commit
2b2c84e8a8
@ -59,13 +59,13 @@ namespace DOAN.WebApi.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 日生产完成率
|
||||
/// 实时产出
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("productionCompletionRate")]
|
||||
public IActionResult ProductionCompletionRate()
|
||||
public IActionResult ProductionCompletionRate(string groupName)
|
||||
{
|
||||
var response = _ReportService.ProductionCompletionRate(DateTime.Today);
|
||||
var response = _ReportService.ProductionCompletionRate(groupName, DateTime.Today);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ namespace DOAN.Service.MES.report.IService
|
||||
List<DevicePoweronRateModel> DevicePoweronRate(DeviceReportDto param);
|
||||
List<DeviceDowntimeRateModel> DeviceDowntimeRate(DeviceReportDto param);
|
||||
|
||||
List<ProductionCompletionRate> ProductionCompletionRate(DateTime dateTime);
|
||||
List<ProductionCompletionRate> ProductionCompletionRate(string groupName, DateTime dateTime);
|
||||
|
||||
List<ProductionCompletionRate> MonthlyProductionCompletionRate(DateTime dateTime);
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ namespace DOAN.Service.MES.report
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<ProductionCompletionRate> ProductionCompletionRate(DateTime dateTime)
|
||||
public List<ProductionCompletionRate> ProductionCompletionRate(string groupName, DateTime dateTime)
|
||||
{
|
||||
List<ProductionCompletionRate> list = new List<ProductionCompletionRate>();
|
||||
|
||||
@ -156,7 +156,9 @@ namespace DOAN.Service.MES.report
|
||||
.LeftJoin<GroupSchedule>((a, b) => a.GroupCode == b.GroupCode)
|
||||
.LeftJoin<GroupShift>((a, b, c) => b.FkShift == c.Id)
|
||||
.LeftJoin<BaseGroup>((a, b, c, d) => a.GroupCode == d.GroupCode)
|
||||
.Where((a, b, c, d) => a.WorkorderDate.Value.ToString("yyyy-MM-dd") == dt && b.ScheduleDate.Value.ToString("yyyy-MM-dd") == dt)
|
||||
.Where((a, b, c, d) => a.WorkorderDate.Value.ToString("yyyy-MM-dd") == dt
|
||||
&& b.ScheduleDate.Value.ToString("yyyy-MM-dd") == dt
|
||||
&& (string.IsNullOrEmpty(groupName) || d.GroupName.Contains(groupName)))
|
||||
.Select((a, b, c, d) =>
|
||||
new
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user