MachineShort.cs 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using Cksoft.Unity;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace DllEapEntity.RA
  5. {
  6. [Table("machine")]
  7. public class MachineShort:BaseEntity
  8. {
  9. ////自动产生代码开始&&此行不能删除
  10. #region 自动产生代码
  11. public MachineShort()
  12. {
  13. base.EntityStatusID = 1;
  14. }
  15. [ColDetail(10,"园区",1,1,100,1,"a.Factory","",1,1)]
  16. public string Factory { get; set; }
  17. [ColDetail(20,"设备ID",1,1,100,1,"a.FCode","",1,1)]
  18. public string FCode { get; set; }
  19. [ColDetail(30,"湿度实际值",1,1,100,1,"b.HumidPV","",1,1)]
  20. public string HumidPV { get; set; }
  21. [ColDetail(40,"温度实际值",1,1,100,1,"b.TemperaturePV","",1,1)]
  22. public string TemperaturePV { get; set; }
  23. [ColDetail(50,"状态持续时间(小时)",1,1,100,1,"c.Duration","",1,1)]
  24. public string Duration { get; set; }
  25. [ColDetail(60,"状态 0=停机,1=运转,2=预约",1,1,100,1,"c.Status","",1,1)]
  26. public string Status { get; set; }
  27. [ColDetail(70,"湿度标准值",1,1,100,1,"b.HumidSv","",1,1)]
  28. public string HumidSv { get; set; }
  29. [ColDetail(80,"温度标准值",1,1,100,1,"b.TemperatureSV","",1,1)]
  30. public string TemperatureSV { get; set; }
  31. [ColDetail(90,"当前执行的段数",1,1,100,1,"b.Step","",1,1)]
  32. public string Step { get; set; }
  33. [ColDetail(100,"当前程序名",1,1,100,1,"b.ProgramName","",1,1)]
  34. public string ProgramName { get; set; }
  35. [ColDetail(110,"当段剩余分钟",1,1,100,1,"b.Minutes","",1,1)]
  36. public string Minutes { get; set; }
  37. [ColDetail(120,"当段剩余小时",1,1,100,1,"b.Hour","",1,1)]
  38. public string Hour { get; set; }
  39. [ColDetail(130,"目前执行的循环数",1,1,100,1,"b.Cycle","",1,1)]
  40. public string Cycle { get; set; }
  41. [ColDetail(140,"机型",1,1,100,1,"d.Model","",1,1)]
  42. public string Model { get; set; }
  43. [ColDetail(150,"机台名称",1,1,100,1,"d.FName","",1,1)]
  44. public string FName { get; set; }
  45. [ColDetail(160,"厂商",1,1,100,1,"d.SName","",1,1)]
  46. public string SName { get; set; }
  47. [ColDetail(170,"机台编号",1,1,100,1,"a.MacNum","",1,1)]
  48. public string MacNum { get; set; }
  49. [ColDetail(180,"修改时间",1,1,100,1,"b.ModeTime","",1,1)]
  50. public DateTime ModeTime { get; set; }
  51. [ColDetail(190,"开始时间",1,1,100,1,"c.StartTime","",1,1)]
  52. public DateTime StartTime { get; set; }
  53. [ColDetail(200,"IP地址",1,1,100,1,"a.IPAdress","",1,1)]
  54. public string IPAdress { get; set; }
  55. public override string GetSelectSql()
  56. {
  57. return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}");
  58. }
  59. public override string GetQueryColSql()
  60. {
  61. string sqlstr = "a.Factory Factory,a.FCode FCode,b.HumidPV HumidPV,b.TemperaturePV TemperaturePV,c.Duration Duration,c.Status Status,b.HumidSv HumidSv";
  62. sqlstr += ",b.TemperatureSV TemperatureSV,b.Step Step,b.ProgramName ProgramName,b.Minutes Minutes,b.Hour Hour,b.Cycle Cycle,d.Model Model,d.FName FName";
  63. sqlstr += ",d.SName SName,a.MacNum MacNum,b.ModeTime ModeTime,c.StartTime StartTime,a.IPAdress IPAdress,0 EntityStatusID";
  64. return sqlstr;
  65. }
  66. public override string GetQueryTabSql()
  67. {
  68. string sqlstr=" machine a ";
  69. sqlstr+=" left outer join baseinfo b on a.id =b.macid";
  70. sqlstr+=" left outer join statusinfo c on a.id =c.macid";
  71. sqlstr+=" left outer join supplier d on a.SupplierID =d.id";
  72. return sqlstr;
  73. }
  74. public override string GetQuerySortSql()
  75. {
  76. return "";
  77. }
  78. #endregion
  79. ////自动产生代码结束&&此行不能删除
  80. }
  81. }