终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

137 regels
4.4 KiB

  1. using BPA.Helper;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Drawing;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace BPASmartClient.Model
  9. {
  10. /// <summary>
  11. /// 原料模块
  12. /// </summary>
  13. public class RawMaterialModel : NotifyBase
  14. {
  15. /// <summary>
  16. /// 配方料仓下料总量
  17. /// </summary>
  18. public float TotalWeight { get { return _totalWeight; } set { _totalWeight = value; OnPropertyChanged(); } }
  19. private float _totalWeight;
  20. /// <summary>
  21. /// 原料名称
  22. /// </summary>
  23. public string RawMaterialName { get { return _mRawMaterialName; } set { _mRawMaterialName = value; OnPropertyChanged(); } }
  24. private string _mRawMaterialName;
  25. /// <summary>
  26. /// 原料设备IP
  27. /// </summary>
  28. public string DeviceIp { get; set; }
  29. /// <summary>
  30. /// 桶号
  31. /// </summary>
  32. public int Loc { get { return _mLoc; } set { _mLoc = value; OnPropertyChanged(); } }
  33. private int _mLoc;
  34. /// <summary>
  35. /// 原料重量设置
  36. /// </summary>
  37. public uint RawMaterialWeight { get { return _mRawMaterialWeight; } set { _mRawMaterialWeight = value; OnPropertyChanged(); } }
  38. private uint _mRawMaterialWeight;
  39. /// <summary>
  40. /// 原料来源
  41. /// 0:本地
  42. /// 1:设备
  43. /// </summary>
  44. public ushort RawMaterialSource { get { return _mRawMaterialSource; } set { _mRawMaterialSource = value; OnPropertyChanged(); } }
  45. private ushort _mRawMaterialSource = 1;
  46. /// <summary>
  47. /// 原料ID
  48. /// </summary>
  49. public string RawMaterialId { get { return _mRawMaterialId; } set { _mRawMaterialId = value; OnPropertyChanged(); } }
  50. private string _mRawMaterialId;
  51. /// <summary>
  52. /// 选中索引
  53. /// </summary>
  54. [Newtonsoft.Json.JsonIgnore]
  55. public int SelectIndex { get { return _mSelectIndex; } set { _mSelectIndex = value; OnPropertyChanged(); } }
  56. private int _mSelectIndex;
  57. /// <summary>
  58. /// 原料类型 MW18
  59. /// 1:液体
  60. /// 2:膏体
  61. /// 3:粉体
  62. /// </summary>
  63. [Newtonsoft.Json.JsonIgnore]
  64. public ushort RawMaterialType { get { return _mRawMaterialType; } set { _mRawMaterialType = value; OnPropertyChanged(); } }
  65. private ushort _mRawMaterialType;
  66. /// <summary>
  67. /// 料仓重量反馈 MD40
  68. /// </summary>
  69. [Newtonsoft.Json.JsonIgnore]
  70. public float WeightFeedback { get { return _mWeightFeedback; } set { _mWeightFeedback = value; OnPropertyChanged(); } }
  71. private float _mWeightFeedback;
  72. /// <summary>
  73. /// 上限反馈
  74. /// </summary>
  75. [Newtonsoft.Json.JsonIgnore]
  76. public bool UpLimtFeedback { get { return _mUpLimtFeedback; } set { _mUpLimtFeedback = value; OnPropertyChanged(); } }
  77. private bool _mUpLimtFeedback;
  78. /// <summary>
  79. /// 下限反馈
  80. /// </summary>
  81. [Newtonsoft.Json.JsonIgnore]
  82. public bool DownLimtFeedback { get { return _mDownLimtFeedback; } set { _mDownLimtFeedback = value; OnPropertyChanged(); } }
  83. private bool _mDownLimtFeedback;
  84. /// <summary>
  85. /// 下料重量反馈 MD52
  86. /// </summary>
  87. [Newtonsoft.Json.JsonIgnore]
  88. public float UpLimtWeightFeedback { get { return _mUpLimtWeightFeedback; } set { _mUpLimtWeightFeedback = value; OnPropertyChanged(); } }
  89. private float _mUpLimtWeightFeedback;
  90. /// <summary>
  91. /// 原料设备执行状态
  92. /// 1:等待配料
  93. /// 2:下料中
  94. /// 3:下料完成
  95. /// </summary>
  96. public ushort RecipeStatus
  97. {
  98. get { return _mRecipeStatus; }
  99. set
  100. {
  101. _mRecipeStatus = value;
  102. //if (value == 1 && Status != Status.配料完成) Status = Status.等待配料;
  103. //else if (value == 2) Status = Status.正在配料;
  104. //else if (value == 3) Status = Status.配料完成;
  105. OnPropertyChanged();
  106. }
  107. }
  108. private ushort _mRecipeStatus = 1;
  109. /// <summary>
  110. /// 配料状态名称
  111. /// </summary>
  112. public Status Status { get { return _mStatus; } set { _mStatus = value; OnPropertyChanged(); } }
  113. private Status _mStatus;
  114. }
  115. }