MFCVerificationDataRecorder.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using Aitex.Core.RT.DBCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MECF.Framework.Common.DBCore
  8. {
  9. public class MFCVerificationDataRecorder
  10. {
  11. public static void Add(MFCVerificationData data)
  12. {
  13. string sql = string.Format(
  14. "INSERT INTO \"mfc_verification_data\"(\"module\" , \"name\" ,\"operate_time\", \"percent10_setpoint\" , \"percent10_calculate\", \"percent20_setpoint\", \"percent20_calculate\", " +
  15. "\"percent30_setpoint\" , \"percent30_calculate\", \"percent40_setpoint\", \"percent40_calculate\", " +
  16. "\"percent50_setpoint\" , \"percent50_calculate\", \"percent60_setpoint\", \"percent60_calculate\", " +
  17. "\"percent70_setpoint\" , \"percent70_calculate\", \"percent80_setpoint\", \"percent80_calculate\", " +
  18. "\"percent90_setpoint\" , \"percent90_calculate\", \"percent100_setpoint\", \"percent100_calculate\", \"setpoint\", \"calculate\"" +
  19. ")VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}' " +
  20. ", '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}'" +
  21. ", '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}');",
  22. data.Module,
  23. data.Name,
  24. DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss.fff"),
  25. data.Percent10Setpoint,
  26. data.Percent10Calculate,
  27. data.Percent20Setpoint,
  28. data.Percent20Calculate,
  29. data.Percent30Setpoint,
  30. data.Percent30Calculate,
  31. data.Percent40Setpoint,
  32. data.Percent40Calculate,
  33. data.Percent50Setpoint,
  34. data.Percent50Calculate,
  35. data.Percent60Setpoint,
  36. data.Percent60Calculate,
  37. data.Percent70Setpoint,
  38. data.Percent70Calculate,
  39. data.Percent80Setpoint,
  40. data.Percent80Calculate,
  41. data.Percent90Setpoint,
  42. data.Percent90Calculate,
  43. data.Percent100Setpoint,
  44. data.Percent100Calculate,
  45. data.Setpoint,
  46. data.Calculate);
  47. DB.Insert(sql);
  48. }
  49. }
  50. public class MFCVerificationData
  51. {
  52. public string Module { get; set; }
  53. public string Name { get; set; }
  54. public float Percent10Setpoint { get; set; }
  55. public float Percent10Calculate { get; set; }
  56. public float Percent20Setpoint { get; set; }
  57. public float Percent20Calculate { get; set; }
  58. public float Percent30Setpoint { get; set; }
  59. public float Percent30Calculate { get; set; }
  60. public float Percent40Setpoint { get; set; }
  61. public float Percent40Calculate { get; set; }
  62. public float Percent50Setpoint { get; set; }
  63. public float Percent50Calculate { get; set; }
  64. public float Percent60Setpoint { get; set; }
  65. public float Percent60Calculate { get; set; }
  66. public float Percent70Setpoint { get; set; }
  67. public float Percent70Calculate { get; set; }
  68. public float Percent80Setpoint { get; set; }
  69. public float Percent80Calculate { get; set; }
  70. public float Percent90Setpoint { get; set; }
  71. public float Percent90Calculate { get; set; }
  72. public float Percent100Setpoint { get; set; }
  73. public float Percent100Calculate { get; set; }
  74. public float Setpoint { get; set; }
  75. public float Calculate { get; set; }
  76. }
  77. }