LineOverviewDto.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using ProductionLineMonitor.Web.Services.LineService;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace ProductionLineMonitor.Application.Services.LineService.Dtos
  6. {
  7. public class OverviewProductionPlanDto : ProductionPlan
  8. {
  9. public OverviewProductionPlanDto()
  10. {
  11. }
  12. /// <summary>
  13. /// 产能
  14. /// </summary>
  15. public int Capacity { get; set; }
  16. public double AchievementRate
  17. {
  18. get
  19. {
  20. if (PlanCapacity == 0)
  21. {
  22. return 0;
  23. }
  24. return Math.Round((float)Capacity / PlanCapacity * 100, 0);
  25. }
  26. }
  27. }
  28. public class LineOverviewDto
  29. {
  30. public string Id { get; set; } = string.Empty;
  31. public int Floor { get; set; }
  32. public int Line { get; set; }
  33. public string LineName { get; set; } = string.Empty;
  34. public string Name { get; set; } = string.Empty;
  35. public IList<OverviewProductionPlanDto> OverviewProductionPlans { get; set; }
  36. = new List<OverviewProductionPlanDto>();
  37. }
  38. }