BuildingView.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace YLShipBuildLandMap.Entity.ViewModel.Build
  5. {
  6. public class BuildingView : BdBuilding
  7. {
  8. public string FloorList { get; set; }
  9. }
  10. public class BuildingXyAxisView : BdBuildingXyAxis
  11. {
  12. public string BuildingName { get; set; }
  13. }
  14. public class BuildingXyAxisGroupView
  15. {
  16. public Guid? BuildingId { get; set; }
  17. public string BuildingName { get; set; }
  18. public decimal? MinXAxis { get; set; }
  19. public decimal? MaxXAxis { get; set; }
  20. public decimal? MinYAxis { get; set; }
  21. public decimal? MaxYAxis { get; set; }
  22. public decimal? XCenter
  23. {
  24. get
  25. {
  26. if (MinXAxis.HasValue && MaxXAxis.HasValue)
  27. {
  28. return (MinXAxis.Value + MaxXAxis.Value) / 2;
  29. }
  30. else
  31. {
  32. return 0;
  33. }
  34. }
  35. }
  36. public decimal? YCenter
  37. {
  38. get
  39. {
  40. if (MinYAxis.HasValue && MaxYAxis.HasValue)
  41. {
  42. return (MinYAxis.Value + MaxYAxis.Value) / 2;
  43. }
  44. else
  45. {
  46. return 0;
  47. }
  48. }
  49. }
  50. }
  51. }