From 7b281164b2148f8d4b4761e41cc4c600ae20c102 Mon Sep 17 00:00:00 2001 From: OCEAN <1010331798@qq.com> Date: Sun, 18 May 2025 16:47:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E9=83=BD=E7=A7=BB=E5=88=B0=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=89=80=E6=9C=89=E8=BE=85=E5=8A=A9=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E9=83=BD=E6=94=BE=E5=9C=A8=E8=BE=85=E5=8A=A9=E7=B1=BB?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tcp_client/config.toml | 119 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/tcp_client/config.toml b/tcp_client/config.toml index bdf787f..4ee9cb1 100644 --- a/tcp_client/config.toml +++ b/tcp_client/config.toml @@ -20,3 +20,122 @@ user = "postgres" password = "Auseft@2025qwer" # 要同步的表配置 +[[tables]] +name = "comm_bch_batch" +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" +incremental = false +key_field = "UpdateTime" + + + +[[tables]] +name = "comm_bch_delivering_sampling" +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 " +incremental = false +key_field = "UpdateTime" + + +[[tables]] +name = "comm_sp_delivering_sampling" +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 " +incremental = false +key_field = "UpdateTime" + + + +[[tables]] +name = "hy_record" +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' " +incremental = false +key_field = "UpdateTime" + + +[[tables]] +name = "hy_itemdetail" +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') " +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_norm" +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')" +incremental = false +key_field = "UpdateTime" + + +[[tables]] +name = "hy_instrument" +query = "SELECT * FROM \"hy_instrument\"" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_information" +query = "SELECT * FROM \"hy_information\"" +incremental = false +key_field = "UpdateTime" + + + +[[tables]] +name = "hy_allot" +query = "SELECT * FROM \"hy_allot\"" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_cytask" +query = "SELECT * FROM \"hy_cytask\"" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_fullwatersample" +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" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_informationnorm" +query = "SELECT * FROM \"hy_informationnorm\"" +incremental = false +key_field = "UpdateTime" + + + + + + + +[[tables]] +name = "hy_laboratoryinstrument" +query = "SELECT * FROM \"hy_laboratoryinstrument\"" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_materialanalysis_type" +query = "SELECT * FROM \"hy_materialanalysis_type\"" +incremental = false +key_field = "UpdateTime" + +[[tables]] +name = "hy_materialdetail" +query = "SELECT * FROM \"hy_materialdetail\"" +incremental = false +key_field = "UpdateTime" + + + +[[tables]] +name = "hy_weight_input" +query = "SELECT * FROM \"hy_weight_input\"" +incremental = false +key_field = "UpdateTime" + + +[[tables]] +name = "hy_warmhumid" +query = "select id,laboratoryid,temperature::text as temperature,humidity::text humidity,begintime,endtime, username from hy_warmhumid" +incremental = false +key_field = "UpdateTime" \ No newline at end of file