终端一体化运控平台
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.
 
 
 

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