ItemHttpPostDefaultList.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IMCS.DefaultList
  7. {
  8. public class ItemHttpPostDefaultList
  9. {
  10. public short MachineOperation
  11. {
  12. get
  13. {
  14. switch (MachineType)
  15. {
  16. case "取":
  17. return 1;
  18. case "移动":
  19. return 7; ;
  20. case "放":
  21. return 4; ;
  22. default:
  23. return 0; ;
  24. }
  25. }
  26. }
  27. public string MachineName { get; set; } = "柔性线";
  28. public string MachineType { get; set; } = "取";
  29. public short StartIndex { get; set; } = 0;
  30. public string Machine_Content { get; set; } = "";
  31. public int TaskId { get; set; } = 1;
  32. public string MachineAddress
  33. {
  34. get
  35. {
  36. switch (MachineType)
  37. {
  38. case "取":
  39. return "DB200.46";
  40. case "移动":
  41. return "DB200.48";
  42. case "放":
  43. return "DB200.48";
  44. default:
  45. return "DB200.46";
  46. }
  47. }
  48. }
  49. public bool JsonOK
  50. {
  51. get
  52. {
  53. if (MachineType.Equals("取") || MachineType.Equals("放") || MachineType.Equals("移动") || MachineType.Equals("查询") || MachineType.Equals("打标")
  54. || MachineType.Equals("机床4")
  55. || MachineType.Equals("清洗机")) { return true; }
  56. return false;
  57. }
  58. }
  59. }
  60. }