数据同步
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

145 行
5.5KB

  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. port = 5432
  15. name = "Auseft_RL_Web"
  16. user = "postgres"
  17. password = "Auseft@2025qwer"
  18. # 要同步的表配置
  19. [[tables]]
  20. name = "comm_bch_batch"
  21. query = "SELECT id, tenant_id, supply_id, material_id, batch_record_id, sample_type, related_code, batching_start_time, batching_end_time, batching_start_ticket, batching_end_ticket, batching_quantity, batching_weight::text, batching_code, batching_code_creator, batching_code_creation_time, preparation_code, preparation_code_creator, preparation_code_creation_time, assay_code, assay_code_creator, assay_code_creation_time, creator_id, creation_time, last_modifier_id, last_modification_reason, last_modification_time, deleted, deleter_id, deletion_reason, deletion_time, source_type FROM comm_bch_batch"
  22. incremental = false
  23. key_field = "UpdateTime"
  24. [[tables]]
  25. name = "comm_bch_delivering_sampling"
  26. query = "SELECT id, tenant_id, supply_id, material_id, sample_type, operation_type, business_type, delivering_type, delivering_code, delivering_quantity, delivering_unit, delivering_weight::text as delivering_weight, delivering_weights, delivering_remark, deliverer, delivery_time, sampling, sampling_type, sampling_code, sampling_quantity, sampling_unit, sampling_weight::text as sampling_weight, sampling_weights, sampling_remark, sampler, sample_time, creator_id, creation_time, last_modifier_id, last_modification_reason, last_modification_time, deleted, deleter_id, deletion_reason, deletion_time FROM comm_bch_delivering_sampling "
  27. incremental = false
  28. key_field = "UpdateTime"
  29. [[tables]]
  30. name = "comm_sp_delivering_sampling"
  31. query = "SELECT id, tenant_id, supply_id, material_id, sample_type, bch_ds_id, operation_type, business_type, delivering_type, delivering_code, delivering_quantity, delivering_unit, delivering_weight::text as delivering_weight, delivering_weights, delivering_remark, deliverer, delivery_time, sampling, sampling_type, sampling_code, sampling_quantity, sampling_unit, sampling_weight::text as sampling_weight, sampling_weights, sampling_remark, sampler, sample_time, creator_id, creation_time, last_modifier_id, last_modification_reason, last_modification_time, deleted, deleter_id, deletion_reason, deletion_time FROM comm_sp_delivering_sampling "
  32. incremental = false
  33. key_field = "UpdateTime"
  34. [[tables]]
  35. name = "hy_record"
  36. 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' "
  37. incremental = false
  38. key_field = "UpdateTime"
  39. [[tables]]
  40. name = "hy_itemdetail"
  41. 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') "
  42. incremental = false
  43. key_field = "UpdateTime"
  44. [[tables]]
  45. name = "hy_norm"
  46. 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')"
  47. incremental = false
  48. key_field = "UpdateTime"
  49. [[tables]]
  50. name = "hy_instrument"
  51. query = "SELECT * FROM \"hy_instrument\""
  52. incremental = false
  53. key_field = "UpdateTime"
  54. [[tables]]
  55. name = "hy_information"
  56. query = "SELECT * FROM \"hy_information\""
  57. incremental = false
  58. key_field = "UpdateTime"
  59. [[tables]]
  60. name = "hy_allot"
  61. query = "SELECT * FROM \"hy_allot\""
  62. incremental = false
  63. key_field = "UpdateTime"
  64. [[tables]]
  65. name = "hy_cytask"
  66. query = "SELECT * FROM \"hy_cytask\""
  67. incremental = false
  68. key_field = "UpdateTime"
  69. [[tables]]
  70. name = "hy_fullwatersample"
  71. 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"
  72. incremental = false
  73. key_field = "UpdateTime"
  74. [[tables]]
  75. name = "hy_informationnorm"
  76. query = "SELECT * FROM \"hy_informationnorm\""
  77. incremental = false
  78. key_field = "UpdateTime"
  79. [[tables]]
  80. name = "hy_laboratoryinstrument"
  81. query = "SELECT * FROM \"hy_laboratoryinstrument\""
  82. incremental = false
  83. key_field = "UpdateTime"
  84. [[tables]]
  85. name = "hy_materialanalysis_type"
  86. query = "SELECT * FROM \"hy_materialanalysis_type\""
  87. incremental = false
  88. key_field = "UpdateTime"
  89. [[tables]]
  90. name = "hy_materialdetail"
  91. query = "SELECT * FROM \"hy_materialdetail\""
  92. incremental = false
  93. key_field = "UpdateTime"
  94. [[tables]]
  95. name = "hy_weight_input"
  96. query = "SELECT * FROM \"hy_weight_input\""
  97. incremental = false
  98. key_field = "UpdateTime"
  99. [[tables]]
  100. name = "hy_warmhumid"
  101. query = "select id,laboratoryid,temperature::text as temperature,humidity::text humidity,begintime,endtime, username from hy_warmhumid"
  102. incremental = false
  103. key_field = "UpdateTime"