数据同步
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.

119 lines
3.4KB

  1. [server]
  2. #host = "10.180.4.88"
  3. host = "127.0.0.1"
  4. port = 9090
  5. [client]
  6. # 定时任务配置
  7. interval_seconds = 3600 # 每隔多少秒执行一次
  8. max_retries = 3
  9. read_timeout_secs = 10
  10. write_timeout_secs = 10
  11. retry_delay_secs = 2
  12. [database]
  13. host = "10.180.4.100"
  14. #host = "192.168.0.100"
  15. port = 5432
  16. name = "Auseft_RL_Web"
  17. user = "postgres"
  18. password = "Auseft@2025qwer"
  19. # 要同步的表配置
  20. [[tables]]
  21. name = "hy_record"
  22. query = "SELECT id, hy_code, type, hy_check, hy_approve, check_time, approve_time, approve_user, check_user, hy_time, hy_values, accept_time, accept_user, mt::text as mt, mad::text as mad, aad::text as aad, ad::text as ad, vad::text as vad, vd::text as vd, var::text as var, vdaf::text as vdaf, fcad::text as fcad, st_ar::text as st_ar, st_ad::text as st_ad, st_d::text as st_d, had::text as had, hd::text as hd, qb_ad::text as qb_ad, qgr_ad::text as qgr_ad, qgr_d::text as qgr_d, qnet_ar_mj_kg::text as qnet_ar_mj_kg, qnet_ar_j_cal::text as qnet_ar_j_cal, v::text as v, aar::text as aar, qnet_ar::text as qnet_ar, qnet_ar1::text as qnet_ar1, crc::text as crc, st_daf::text as st_daf, cad ::text as cad, cd::text as cd, isauto, hy_type, isnormal FROM hy_record where hy_approve=0 and accept_time >= NOW() - INTERVAL '10 days' "
  23. incremental = false
  24. key_field = "UpdateTime"
  25. [[tables]]
  26. name = "hy_itemdetail"
  27. query = "SELECT * FROM hy_itemdetail where record_id in (select id from hy_record where hy_approve=0 and accept_time >= NOW() - INTERVAL '10 days') "
  28. incremental = false
  29. key_field = "UpdateTime"
  30. [[tables]]
  31. name = "hy_norm"
  32. query = " select id,norm_id,zbvalues::text as zbvalues,itemdetail_id,hy_user,checktime,\"explain\" from hy_norm where itemdetail_id in (SELECT t1.id FROM hy_itemdetail t1 inner join hy_record t2 on t1.record_id=t2.id where t2.hy_approve=0 and t2.accept_time >= NOW() - INTERVAL '10 days')"
  33. incremental = false
  34. key_field = "UpdateTime"
  35. [[tables]]
  36. name = "hy_instrument"
  37. query = "SELECT * FROM \"hy_instrument\""
  38. incremental = false
  39. key_field = "UpdateTime"
  40. [[tables]]
  41. name = "hy_information"
  42. query = "SELECT * FROM \"hy_information\""
  43. incremental = false
  44. key_field = "UpdateTime"
  45. [[tables]]
  46. name = "hy_allot"
  47. query = "SELECT * FROM \"hy_allot\""
  48. incremental = false
  49. key_field = "UpdateTime"
  50. [[tables]]
  51. name = "hy_cytask"
  52. query = "SELECT * FROM \"hy_cytask\""
  53. incremental = false
  54. key_field = "UpdateTime"
  55. [[tables]]
  56. name = "hy_fullwatersample"
  57. query = "select id,qs_code,qs_tonnage::text as qs_tonnage,mt::text as mt,remark,onecode,towcode,fx_code,fx_onecode,fx_twocode from hy_fullwatersample"
  58. incremental = false
  59. key_field = "UpdateTime"
  60. [[tables]]
  61. name = "hy_informationnorm"
  62. query = "SELECT * FROM \"hy_informationnorm\""
  63. incremental = false
  64. key_field = "UpdateTime"
  65. [[tables]]
  66. name = "hy_laboratoryinstrument"
  67. query = "SELECT * FROM \"hy_laboratoryinstrument\""
  68. incremental = false
  69. key_field = "UpdateTime"
  70. [[tables]]
  71. name = "hy_materialanalysis_type"
  72. query = "SELECT * FROM \"hy_materialanalysis_type\""
  73. incremental = false
  74. key_field = "UpdateTime"
  75. [[tables]]
  76. name = "hy_materialdetail"
  77. query = "SELECT * FROM \"hy_materialdetail\""
  78. incremental = false
  79. key_field = "UpdateTime"
  80. [[tables]]
  81. name = "hy_weight_input"
  82. query = "SELECT * FROM \"hy_weight_input\""
  83. incremental = false
  84. key_field = "UpdateTime"
  85. [[tables]]
  86. name = "hy_warmhumid"
  87. query = "select id,laboratoryid,temperature::text as temperature,humidity::text humidity,begintime,endtime, username from hy_warmhumid"
  88. incremental = false
  89. key_field = "UpdateTime"