MachineMaterialDetail.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Cksoft.Unity;
  2. using System;
  3. namespace DllEapEntity.OFILM
  4. {
  5. [Table("machinematerialdetail")]
  6. public class MachineMaterialDetail : BaseEntity
  7. {
  8. ////自动产生代码开始&&此行不能删除
  9. #region 自动产生代码
  10. public MachineMaterialDetail()
  11. {
  12. base.EntityStatusID = 1;
  13. }
  14. [ColDetail(10, "Id", 1, 1, 100, 1, "a.Id", "", 1, 1)]
  15. [Key]
  16. [Identity]
  17. public int Id { get; set; }
  18. [ColDetail(20, "MstId", 1, 1, 100, 1, "a.MstId", "", 1, 1)]
  19. public int MstId { get; set; }
  20. [ColDetail(30, "FDate", 1, 1, 100, 1, "a.FDate", "", 1, 1)]
  21. public DateTime FDate { get; set; }
  22. [ColDetail(40, "MacId", 1, 1, 100, 1, "a.MacId", "", 1, 1)]
  23. public int MacId { get; set; }
  24. [ColDetail(50, "Category", 1, 1, 100, 1, "a.Category", "", 1, 1)]
  25. public string Category { get; set; }
  26. [ColDetail(60, "Reject", 1, 1, 100, 1, "a.Reject", "", 1, 1)]
  27. public decimal? Reject { get; set; }
  28. [ColDetail(70, "Total", 1, 1, 100, 1, "a.Total", "", 1, 1)]
  29. public Int64 Total { get; set; }
  30. [ColDetail(80, "Stn1", 1, 1, 100, 1, "a.Stn1", "", 1, 1)]
  31. public Int64 Stn1 { get; set; }
  32. [ColDetail(90, "Stn2", 1, 1, 100, 1, "a.Stn2", "", 1, 1)]
  33. public Int64 Stn2 { get; set; }
  34. [ColDetail(100, "Stn3", 1, 1, 100, 1, "a.Stn3", "", 1, 1)]
  35. public Int64 Stn3 { get; set; }
  36. [ColDetail(110, "Stn4", 1, 1, 100, 1, "a.Stn4", "", 1, 1)]
  37. public Int64 Stn4 { get; set; }
  38. [ColDetail(120, "RecTime", 1, 1, 100, 1, "a.RecTime", "", 1, 1)]
  39. public DateTime RecTime { get; set; }
  40. [ColDetail(130, "ModTime", 1, 1, 100, 1, "a.ModTime", "", 1, 1)]
  41. public DateTime ModTime { get; set; }
  42. [ColDetail(140, "机台编号", 1, 0, 100, 1, "c.FCode", "", 1, 1)]
  43. public string MacCode { get; set; }
  44. [ColDetail(150, "Shift", 1, 1, 100, 1, "a.Shift", "", 1, 1)]
  45. public string Shift { get; set; }
  46. [ColDetail(170, "Recipe", 1, 1, 100, 1, "a.Recipe", "", 1, 1)]
  47. public string Recipe { get; set; }
  48. public override string GetSelectSql()
  49. {
  50. return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}");
  51. }
  52. public override string GetQueryColSql()
  53. {
  54. string sqlstr = "a.Id Id,a.MstId MstId,a.FDate FDate,a.MacId MacId,a.Category Category,a.Reject Reject,a.Total Total,a.Stn1 Stn1,a.Stn2 Stn2,a.Stn3 Stn3";
  55. sqlstr += ",a.Stn4 Stn4,a.RecTime RecTime,a.ModTime ModTime,c.FCode MacCode,a.Shift Shift,a.Recipe Recipe,0 EntityStatusID";
  56. return sqlstr;
  57. }
  58. public override string GetQueryTabSql()
  59. {
  60. string sqlstr = " machinematerialdetail a ";
  61. sqlstr += " left outer join machine c on a.macid =c.id";
  62. return sqlstr;
  63. }
  64. public override string GetQuerySortSql()
  65. {
  66. return "";
  67. }
  68. #endregion
  69. ////自动产生代码结束&&此行不能删除
  70. }
  71. }