All Latest
6a424910cbc36: POST https://beta.jinchangxiao.com/vue/voucher-center/bill-list at 2026-06-29 06:29:36 pm by 221.216.117.25

Log Messages

总计43条数据
TimeLevelCategoryMessage
 
18:29:36.833traceyii\base\Application::bootstrapBootstrap with yii\log\Dispatcher
18:29:36.833traceyii\base\Module::getModuleLoading module: debug
18:29:36.834traceyii\base\Application::bootstrapBootstrap with yii\debug\Module::bootstrap()
18:29:36.834traceyii\redis\Connection::openOpening redis DB connection: redis.server.local:6379, database=1
18:29:36.835traceyii\redis\Connection::executeCommandExecuting Redis Command: SELECT
18:29:36.835traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.835infotime tracing start1782728976835834112
18:29:36.836traceyii\web\UrlManager::parseRequestNo matching URL rules. Using default URL parsing logic.
18:29:36.836traceyii\web\Application::handleRequestRoute requested: 'vue/voucher-center/bill-list'
18:29:36.836traceyii\base\Module::getModuleLoading module: vue
18:29:36.837infoyii\web\Session::openSession started
18:29:36.838infoyii\db\Command::querySELECT * FROM "global"."vw_user_login" WHERE "id"=1001
18:29:36.838infoyii\db\Connection::openOpening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta
18:29:36.840traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.840traceyii\redis\Connection::executeCommandExecuting Redis Command: MGET
18:29:36.841infoyii\db\Command::querySELECT * FROM "global"."vw_user_login" WHERE "id"=1001
18:29:36.842traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.842traceyii\redis\Connection::executeCommandExecuting Redis Command: MGET
18:29:36.843infoyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001
18:29:36.844infoyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_ledgers" WHERE "is_stop"=FALSE ORDER BY "id"
18:29:36.845traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.845traceyii\redis\Connection::executeCommandExecuting Redis Command: MGET
18:29:36.845traceyii\base\Controller::runActionRoute to run: vue/voucher-center/bill-list
18:29:36.846traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.848traceuranus\rbac\DbManager::checkAccessFromCacheChecking role: Admin
18:29:36.848traceyii\base\InlineAction::runWithParamsRunning action: app\modules\vue\controllers\VoucherCenterController::actionBillList()
18:29:36.848traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.849traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.856infoyii\db\Command::querySELECT COUNT(*) FROM ((SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30')) UNION ALL ( SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND ("i"."invoice_type"=-1) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND ("i"."invoice_type"=-1) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 7 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_project_product_rels" "p" ON p.project_id = c.from_project WHERE (COALESCE(c.including_tax, false) = false) AND (NOT ("c"."from_project" IS NULL)) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."client_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 13 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", NULL::integer AS "client_id", "c"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_purchase_contract_product_rels" "p" ON p.purchase_contract_id = c.id WHERE (COALESCE(c.including_tax, false) = false) AND (COALESCE(c.cost_type, 1) = 1) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_chargeback, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."supplier_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 20008 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", CASE WHEN COALESCE(e.amount, 0) > 0 THEN COALESCE(e.amount, 0) ELSE COALESCE(SUM(s.actual_total_amount), 0) END AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_outbounds" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_outbound_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20009 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_returns" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20003 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(NULLIF(SUM(p.total_amount), 0), e.amount, 0) AS "amount", NULL::integer AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_purchase_returns" "e" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_products" "p" ON p.erp_purchase_return_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."supplier_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20013 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_collect_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20012 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20019 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( (SELECT 20021 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_bank_outs" "e" ON e.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20021 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "p"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.bank_settle_at AS date) AS "bill_date", "t"."bank_settle_at" AS "completed_at", "p"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_payments" "p" ON p.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("t"."bank_settle_at" IS NULL)) AND ("p"."amount" > 0) AND ("t"."bank_settle_at" >= '2026-06-01') AND ("t"."bank_settle_at" <= '2026-06-30 23:59:59') ) ) UNION ALL ( (SELECT 20020 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_bank_ins" "e" ON e.erp_other_payment_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20020 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "s"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(p.bank_settle_at AS date) AS "bill_date", "p"."bank_settle_at" AS "completed_at", "s"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", CASE WHEN COUNT(DISTINCT bo.erp_bank_id) = 1 THEN MIN(bo.erp_bank_id) ELSE NULL END AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "s" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_tickets" "t" ON s.erp_other_payment_ticket_id = t.id INNER JOIN "a57be577deb434"."tbl_erp_payment_tickets" "p" ON s.erp_payment_ticket_id = p.id LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_bank_outs" "bo" ON bo.erp_payment_ticket_id = p.id WHERE ("p"."status" IN (2, 5)) AND ("p"."is_payment_settle"=TRUE) AND (NOT ("p"."bank_settle_at" IS NULL)) AND ("s"."amount" > 0) AND ("p"."bank_settle_at" >= '2026-06-01') AND ("p"."bank_settle_at" <= '2026-06-30 23:59:59') GROUP BY "s"."id", "s"."amount", "t"."id", "t"."serial_no", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."handler", "t"."created_by", "p"."bank_settle_at" ) ) UNION ALL ( SELECT 20015 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.verify_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT h.user_id) = 1 THEN MIN(h.user_id) ELSE NULL END AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_income_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_income_ticket_bank_ins" "e" ON e.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_handlers" "h" ON h.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = h.user_id WHERE ("t"."status"=2) AND (NOT ("t"."verify_at" IS NULL)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("t"."verify_at" >= '2026-06-01') AND ("t"."verify_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "t"."verify_at", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."created_by", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20014 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", "e"."contact_id" AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20018 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", "e"."have_invoice" AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20011 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(SUM(s.actual_total_amount), 0) AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_gifts" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_gift_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20004 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_losts" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20031 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_overflows" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20023 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_ticket_bank_outs" "e" ON e.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_amounts" "a" ON a.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20024 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_social_insurances" "t" INNER JOIN "a57be577deb434"."tbl_erp_social_insurance_bank_outs" "e" ON e.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_amounts" "a" ON a.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20026 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_personal_taxs" "t" INNER JOIN "a57be577deb434"."tbl_erp_personal_tax_bank_outs" "e" ON e.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_amounts" "a" ON a.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20027 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_prizes" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_prize_bank_outs" "e" ON e.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_amounts" "a" ON a.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20025 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_provident_funds" "t" INNER JOIN "a57be577deb434"."tbl_erp_provident_fund_bank_outs" "e" ON e.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_amounts" "a" ON a.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" )) "b" LEFT JOIN (SELECT "v"."object_type" AS "object_type", "v"."object_id" AS "object_id", COALESCE(v.event_type, 0) AS "event_type", COALESCE(v.event_id, 0) AS "event_id", COUNT(*) FILTER (WHERE v.status = 1) AS "success_count", COUNT(*) FILTER (WHERE v.status = 0) AS "fail_count", MAX(v.book_date) FILTER (WHERE v.status = 1) AS "last_book_date" FROM "a57be577deb434"."tbl_voucher_gen_items" "v" WHERE "v"."ledger_id"=1 GROUP BY "v"."object_type", "v"."object_id", COALESCE(v.event_type, 0), COALESCE(v.event_id, 0)) "g" ON g.object_type = b.object_type AND g.object_id = b.object_id AND g.event_type = b.event_type AND g.event_id = b.event_id
18:29:36.896infoyii\db\Command::querySELECT COALESCE(SUM(b.amount), 0) AS "total_amount" FROM ((SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30')) UNION ALL ( SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND ("i"."invoice_type"=-1) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND ("i"."invoice_type"=-1) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 7 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_project_product_rels" "p" ON p.project_id = c.from_project WHERE (COALESCE(c.including_tax, false) = false) AND (NOT ("c"."from_project" IS NULL)) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."client_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 13 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", NULL::integer AS "client_id", "c"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_purchase_contract_product_rels" "p" ON p.purchase_contract_id = c.id WHERE (COALESCE(c.including_tax, false) = false) AND (COALESCE(c.cost_type, 1) = 1) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_chargeback, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."supplier_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 20008 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", CASE WHEN COALESCE(e.amount, 0) > 0 THEN COALESCE(e.amount, 0) ELSE COALESCE(SUM(s.actual_total_amount), 0) END AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_outbounds" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_outbound_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20009 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_returns" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20003 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(NULLIF(SUM(p.total_amount), 0), e.amount, 0) AS "amount", NULL::integer AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_purchase_returns" "e" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_products" "p" ON p.erp_purchase_return_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."supplier_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20013 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_collect_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20012 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20019 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( (SELECT 20021 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_bank_outs" "e" ON e.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20021 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "p"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.bank_settle_at AS date) AS "bill_date", "t"."bank_settle_at" AS "completed_at", "p"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_payments" "p" ON p.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("t"."bank_settle_at" IS NULL)) AND ("p"."amount" > 0) AND ("t"."bank_settle_at" >= '2026-06-01') AND ("t"."bank_settle_at" <= '2026-06-30 23:59:59') ) ) UNION ALL ( (SELECT 20020 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_bank_ins" "e" ON e.erp_other_payment_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20020 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "s"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(p.bank_settle_at AS date) AS "bill_date", "p"."bank_settle_at" AS "completed_at", "s"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", CASE WHEN COUNT(DISTINCT bo.erp_bank_id) = 1 THEN MIN(bo.erp_bank_id) ELSE NULL END AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "s" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_tickets" "t" ON s.erp_other_payment_ticket_id = t.id INNER JOIN "a57be577deb434"."tbl_erp_payment_tickets" "p" ON s.erp_payment_ticket_id = p.id LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_bank_outs" "bo" ON bo.erp_payment_ticket_id = p.id WHERE ("p"."status" IN (2, 5)) AND ("p"."is_payment_settle"=TRUE) AND (NOT ("p"."bank_settle_at" IS NULL)) AND ("s"."amount" > 0) AND ("p"."bank_settle_at" >= '2026-06-01') AND ("p"."bank_settle_at" <= '2026-06-30 23:59:59') GROUP BY "s"."id", "s"."amount", "t"."id", "t"."serial_no", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."handler", "t"."created_by", "p"."bank_settle_at" ) ) UNION ALL ( SELECT 20015 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.verify_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT h.user_id) = 1 THEN MIN(h.user_id) ELSE NULL END AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_income_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_income_ticket_bank_ins" "e" ON e.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_handlers" "h" ON h.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = h.user_id WHERE ("t"."status"=2) AND (NOT ("t"."verify_at" IS NULL)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("t"."verify_at" >= '2026-06-01') AND ("t"."verify_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "t"."verify_at", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."created_by", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20014 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", "e"."contact_id" AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20018 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", "e"."have_invoice" AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20011 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(SUM(s.actual_total_amount), 0) AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_gifts" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_gift_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20004 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_losts" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20031 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_overflows" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20023 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_ticket_bank_outs" "e" ON e.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_amounts" "a" ON a.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20024 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_social_insurances" "t" INNER JOIN "a57be577deb434"."tbl_erp_social_insurance_bank_outs" "e" ON e.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_amounts" "a" ON a.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20026 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_personal_taxs" "t" INNER JOIN "a57be577deb434"."tbl_erp_personal_tax_bank_outs" "e" ON e.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_amounts" "a" ON a.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20027 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_prizes" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_prize_bank_outs" "e" ON e.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_amounts" "a" ON a.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20025 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_provident_funds" "t" INNER JOIN "a57be577deb434"."tbl_erp_provident_fund_bank_outs" "e" ON e.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_amounts" "a" ON a.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" )) "b" LEFT JOIN (SELECT "v"."object_type" AS "object_type", "v"."object_id" AS "object_id", COALESCE(v.event_type, 0) AS "event_type", COALESCE(v.event_id, 0) AS "event_id", COUNT(*) FILTER (WHERE v.status = 1) AS "success_count", COUNT(*) FILTER (WHERE v.status = 0) AS "fail_count", MAX(v.book_date) FILTER (WHERE v.status = 1) AS "last_book_date" FROM "a57be577deb434"."tbl_voucher_gen_items" "v" WHERE "v"."ledger_id"=1 GROUP BY "v"."object_type", "v"."object_id", COALESCE(v.event_type, 0), COALESCE(v.event_id, 0)) "g" ON g.object_type = b.object_type AND g.object_id = b.object_id AND g.event_type = b.event_type AND g.event_id = b.event_id
18:29:36.918infoyii\db\Command::querySELECT "b"."object_type" AS "object_type", "b"."object_id" AS "object_id", "b"."event_type" AS "event_type", "b"."event_id" AS "event_id", "b"."business_node" AS "business_node", "b"."bill_no" AS "bill_no", "b"."bill_date" AS "bill_date", "b"."completed_at" AS "completed_at", "b"."amount" AS "amount", "b"."client_id" AS "client_id", "b"."supplier_id" AS "supplier_id", "b"."contact_id" AS "contact_id", "b"."department_id" AS "department_id", "b"."handler_id" AS "handler_id", "b"."created_by" AS "created_by", "b"."erp_bank_id" AS "erp_bank_id", "b"."have_invoice" AS "have_invoice", "b"."is_verified" AS "is_verified", COALESCE(g.success_count, 0) AS "gen_success_count", COALESCE(g.fail_count, 0) AS "gen_fail_count", COALESCE(CAST(g.last_book_date AS text), '') AS "gen_book_date" FROM ((SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30')) UNION ALL ( SELECT 107 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", "i"."from_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contract_invoices" "i" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = i.contract_id WHERE (("i"."is_cancel"=FALSE) AND ("i"."is_draft"=FALSE)) AND ("i"."invoice_type"=-1) AND ("i"."from_date" >= '2026-06-01') AND ("i"."from_date" <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND (("i"."invoice_type" <> -1) OR ("i"."invoice_type" IS NULL)) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 109 AS "object_type", "i"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "i"."invoice_num" AS "bill_no", COALESCE(CAST(i.verify_at AS date), i.from_date) AS "bill_date", NULL::timestamp without time zone AS "completed_at", "i"."amount" AS "amount", NULL::integer AS "client_id", "i"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "i"."handler" AS "handler_id", "i"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", "i"."is_verify" AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contract_invoices" "i" WHERE ("i"."is_cancel"=FALSE) AND ("i"."invoice_type"=-1) AND (COALESCE(CAST(i.verify_at AS date), i.from_date) >= '2026-06-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-06-30') ) UNION ALL ( SELECT 7 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", "c"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_project_product_rels" "p" ON p.project_id = c.from_project WHERE (COALESCE(c.including_tax, false) = false) AND (NOT ("c"."from_project" IS NULL)) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."client_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 13 AS "object_type", "c"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "c"."serial_no" AS "bill_no", "c"."signed_at" AS "bill_date", NULL::timestamp without time zone AS "completed_at", ROUND((COALESCE(NULLIF(SUM(p.total_amount), 0), c.amount, 0) * 1.13)::numeric, 2) AS "amount", NULL::integer AS "client_id", "c"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "c"."handler" AS "handler_id", "c"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_purchase_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_purchase_contract_product_rels" "p" ON p.purchase_contract_id = c.id WHERE (COALESCE(c.including_tax, false) = false) AND (COALESCE(c.cost_type, 1) = 1) AND (COALESCE(c.is_draft, false) = false) AND (COALESCE(c.is_chargeback, false) = false) AND (COALESCE(c.is_verify, false) = false) AND (COALESCE(c.is_edit_verify, false) = false) AND (COALESCE(c.is_chargeback_verify, false) = false) AND ("c"."signed_at" >= '2026-06-01') AND ("c"."signed_at" <= '2026-06-30') GROUP BY "c"."id", "c"."serial_no", "c"."signed_at", "c"."amount", "c"."supplier_id", "c"."handler", "c"."created_by" ) UNION ALL ( SELECT 20008 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", CASE WHEN COALESCE(e.amount, 0) > 0 THEN COALESCE(e.amount, 0) ELSE COALESCE(SUM(s.actual_total_amount), 0) END AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_outbounds" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_outbound_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20009 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_returns" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20003 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(NULLIF(SUM(p.total_amount), 0), e.amount, 0) AS "amount", NULL::integer AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_purchase_returns" "e" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_products" "p" ON p.erp_purchase_return_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."amount", "e"."supplier_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20013 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_collect_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20012 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20019 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( (SELECT 20021 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_bank_outs" "e" ON e.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20021 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "p"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.bank_settle_at AS date) AS "bill_date", "t"."bank_settle_at" AS "completed_at", "p"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_payments" "p" ON p.erp_other_collect_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("t"."bank_settle_at" IS NULL)) AND ("p"."amount" > 0) AND ("t"."bank_settle_at" >= '2026-06-01') AND ("t"."bank_settle_at" <= '2026-06-30 23:59:59') ) ) UNION ALL ( (SELECT 20020 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_bank_ins" "e" ON e.erp_other_payment_ticket_id = t.id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59')) UNION ALL ( SELECT 20020 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "s"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(p.bank_settle_at AS date) AS "bill_date", "p"."bank_settle_at" AS "completed_at", "s"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", NULL::integer AS "department_id", "t"."handler" AS "handler_id", "t"."created_by" AS "created_by", CASE WHEN COUNT(DISTINCT bo.erp_bank_id) = 1 THEN MIN(bo.erp_bank_id) ELSE NULL END AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "s" INNER JOIN "a57be577deb434"."tbl_erp_other_payment_tickets" "t" ON s.erp_other_payment_ticket_id = t.id INNER JOIN "a57be577deb434"."tbl_erp_payment_tickets" "p" ON s.erp_payment_ticket_id = p.id LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_bank_outs" "bo" ON bo.erp_payment_ticket_id = p.id WHERE ("p"."status" IN (2, 5)) AND ("p"."is_payment_settle"=TRUE) AND (NOT ("p"."bank_settle_at" IS NULL)) AND ("s"."amount" > 0) AND ("p"."bank_settle_at" >= '2026-06-01') AND ("p"."bank_settle_at" <= '2026-06-30 23:59:59') GROUP BY "s"."id", "s"."amount", "t"."id", "t"."serial_no", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."handler", "t"."created_by", "p"."bank_settle_at" ) ) UNION ALL ( SELECT 20015 AS "object_type", "t"."id" AS "object_id", 2 AS "event_type", "e"."id" AS "event_id", '收款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(t.verify_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT h.user_id) = 1 THEN MIN(h.user_id) ELSE NULL END AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_other_income_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_other_income_ticket_bank_ins" "e" ON e.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_handlers" "h" ON h.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = h.user_id WHERE ("t"."status"=2) AND (NOT ("t"."verify_at" IS NULL)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("t"."verify_at" >= '2026-06-01') AND ("t"."verify_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "t"."verify_at", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."created_by", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20014 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", "e"."contact_id" AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20018 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", "e"."client_id" AS "client_id", "e"."supplier_id" AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", NULL::integer AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", "e"."have_invoice" AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20011 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", COALESCE(SUM(s.actual_total_amount), 0) AS "amount", "e"."client_id" AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_sales_gifts" "e" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_product_spents" "s" ON s.erp_sales_gift_id = e.id WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') GROUP BY "e"."id", "e"."serial_no", "e"."wrote_date", "e"."client_id", "e"."handler", "e"."created_by" ) UNION ALL ( SELECT 20004 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_losts" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20031 AS "object_type", "e"."id" AS "object_id", 0 AS "event_type", 0 AS "event_id", ''::text AS "business_node", "e"."serial_no" AS "bill_no", "e"."wrote_date" AS "bill_date", NULL::timestamp without time zone AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", NULL::integer AS "department_id", "e"."handler" AS "handler_id", "e"."created_by" AS "created_by", NULL::integer AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_inventory_overflows" "e" WHERE ("e"."status"=2) AND ("e"."wrote_date" >= '2026-06-01') AND ("e"."wrote_date" <= '2026-06-30') ) UNION ALL ( SELECT 20023 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_tickets" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_ticket_bank_outs" "e" ON e.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_amounts" "a" ON a.erp_wage_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20024 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_social_insurances" "t" INNER JOIN "a57be577deb434"."tbl_erp_social_insurance_bank_outs" "e" ON e.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_amounts" "a" ON a.erp_social_insurance_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20026 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_personal_taxs" "t" INNER JOIN "a57be577deb434"."tbl_erp_personal_tax_bank_outs" "e" ON e.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_amounts" "a" ON a.erp_personal_tax_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20027 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_wage_prizes" "t" INNER JOIN "a57be577deb434"."tbl_erp_wage_prize_bank_outs" "e" ON e.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_amounts" "a" ON a.erp_wage_prize_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" ) UNION ALL ( SELECT 20025 AS "object_type", "t"."id" AS "object_id", 1 AS "event_type", "e"."id" AS "event_id", '付款'::text AS "business_node", "t"."serial_no" AS "bill_no", CAST(e.settle_at AS date) AS "bill_date", "e"."settle_at" AS "completed_at", "e"."amount" AS "amount", NULL::integer AS "client_id", NULL::integer AS "supplier_id", NULL::integer AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT a.user_id) = 1 THEN MIN(a.user_id) ELSE NULL END AS "handler_id", NULL::integer AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", true AS "have_invoice", true AS "is_verified" FROM "a57be577deb434"."tbl_erp_provident_funds" "t" INNER JOIN "a57be577deb434"."tbl_erp_provident_fund_bank_outs" "e" ON e.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_amounts" "a" ON a.erp_provident_fund_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = a.user_id WHERE ("t"."status" IN (2, 5)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) AND ("e"."settle_at" >= '2026-06-01') AND ("e"."settle_at" <= '2026-06-30 23:59:59') GROUP BY "t"."id", "t"."serial_no", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id" )) "b" LEFT JOIN (SELECT "v"."object_type" AS "object_type", "v"."object_id" AS "object_id", COALESCE(v.event_type, 0) AS "event_type", COALESCE(v.event_id, 0) AS "event_id", COUNT(*) FILTER (WHERE v.status = 1) AS "success_count", COUNT(*) FILTER (WHERE v.status = 0) AS "fail_count", MAX(v.book_date) FILTER (WHERE v.status = 1) AS "last_book_date" FROM "a57be577deb434"."tbl_voucher_gen_items" "v" WHERE "v"."ledger_id"=1 GROUP BY "v"."object_type", "v"."object_id", COALESCE(v.event_type, 0), COALESCE(v.event_id, 0)) "g" ON g.object_type = b.object_type AND g.object_id = b.object_id AND g.event_type = b.event_type AND g.event_id = b.event_id ORDER BY "bill_date" DESC, "object_type", "object_id" DESC, "event_type", "event_id" DESC LIMIT 200
18:29:36.940infoyii\db\Command::querySELECT "id", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id" IN (3457, 3389, 2133, 3351, 1331)
18:29:36.941infoyii\db\Command::querySELECT "id", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id"=431
18:29:36.942infoyii\db\Command::querySELECT "id", "name", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1001, 1011)
18:29:36.942infoyii\db\Command::querySELECT "id", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id" IN (4, 3)
18:29:36.943infoyii\db\Command::querySELECT "id", "title", "serial_no" FROM "a57be577deb434"."tbl_erp_banks" WHERE "id"=1
18:29:36.944infoyii\db\Command::querySELECT "serial_no", "title" FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("ledger_id"=1) AND ("serial_no"='100201') AND ("is_delete"=FALSE)
18:29:36.945infoyii\db\Command::querySELECT "r"."object_id" AS "object_id" FROM "a57be577deb434"."tbl_term_taxonomy_relationships" "r" INNER JOIN "a57be577deb434"."tbl_term_taxonomies" "tt" ON r.taxonomy_id = tt.id WHERE ("r"."term_id"=18) AND ("r"."object_type"=11) AND ("r"."object_id"=8489) AND ("tt"."serial_no" IN (221106, 640301, 640302, 640303, 600704)) GROUP BY "r"."object_id"
18:29:36.947traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.948traceyii\redis\Connection::executeCommandExecuting Redis Command: MGET
18:29:36.948infoyii\db\Command::queryINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/voucher-center/bill-list', '{"page":"1","pageSize":"200","object_type":"0","generation_scope":"all","date_from":"2026-06-01","date_to":"2026-06-30","web_access_token":"G2-mdsiVx4ajd063Zd6C9RL7pLl9o1cd"}', '{"code":2000,"result":{"list":[{"id":"20009_7_0_0","object_type":20009,"object_type_name":"\u9500\u552e\u9000\u8d27\u5355","object_type_color":"","object_type_tip":"","object_id":7,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSTHD-20260626-00001","bill_date":"2026-06-26","completed_at":"","amount":33333,"partner_name":"\u65b0\u5bb6\u9500\u552e\u7ebf\u7d22\u6d4b\u8bd5-\u5206\u914d","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20003_6_0_0","object_type":20003,"object_type_name":"\u91c7\u8d2d\u9000\u8d27\u5355","object_type_color":"","object_type_tip":"","object_id":6,"event_type":0,"event_id":0,"business_node":"","bill_no":"CGTH-20260623-00001","bill_date":"2026-06-23","completed_at":"","amount":300,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u5546\u52a1\u90e8","handler_name":"\u97e9\u96c5\u82b3","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20009_6_0_0","object_type":20009,"object_type_name":"\u9500\u552e\u9000\u8d27\u5355","object_type_color":"","object_type_tip":"","object_id":6,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSTHD-20260623-00001","bill_date":"2026-06-23","completed_at":"","amount":18000,"partner_name":"\u4e2d\u56fd\u8bc1\u5238\u62a5\u6709\u9650\u8d23\u4efb\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20014_59_0_0","object_type":20014,"object_type_name":"\u8d39\u7528\u5355","object_type_color":"","object_type_tip":"","object_id":59,"event_type":0,"event_id":0,"business_node":"","bill_no":"FYD-20260622-00001","bill_date":"2026-06-22","completed_at":"","amount":100,"partner_name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_64_1_75","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":64,"event_type":1,"event_id":75,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260615-00001","bill_date":"2026-06-15","completed_at":"2026-06-15 10:30:25","amount":10,"partner_name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_61_1_74","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":61,"event_type":1,"event_id":74,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260611-00005","bill_date":"2026-06-15","completed_at":"2026-06-15 10:10:55","amount":0.01,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20013_2199_0_0","object_type":20013,"object_type_name":"\u6536\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2199,"event_type":0,"event_id":0,"business_node":"","bill_no":"SKD-20260611-00001","bill_date":"2026-06-11","completed_at":"","amount":1,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20019_3_0_0","object_type":20019,"object_type_name":"\u9884\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":3,"event_type":0,"event_id":0,"business_node":"","bill_no":"YFKD-20260611-00001","bill_date":"2026-06-11","completed_at":"","amount":1,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_63_2_1","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":63,"event_type":2,"event_id":1,"business_node":"\u6536\u6b3e","bill_no":"QTYSD-20260611-00007","bill_date":"2026-06-11","completed_at":"2026-06-11 17:44:12","amount":1,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_62_1_73","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":62,"event_type":1,"event_id":73,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260611-00006","bill_date":"2026-06-11","completed_at":"2026-06-11 17:44:48","amount":1,"partner_name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_60_1_69","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":60,"event_type":1,"event_id":69,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260611-00004","bill_date":"2026-06-11","completed_at":"2026-06-11 15:47:09","amount":200,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_58_1_70","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":58,"event_type":1,"event_id":70,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260611-00002","bill_date":"2026-06-11","completed_at":"2026-06-11 15:52:59","amount":8000,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20021_57_1_62","object_type":20021,"object_type_name":"\u5176\u4ed6\u5e94\u6536\u5355","object_type_color":"","object_type_tip":"","object_id":57,"event_type":1,"event_id":62,"business_node":"\u4ed8\u6b3e","bill_no":"QTYSD-20260611-00001","bill_date":"2026-06-11","completed_at":"2026-06-11 15:12:45","amount":100,"partner_name":"\u4e09\u76db\u667a\u6167\u6559\u80b2\u79d1\u6280\u80a1\u4efd\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u4e2d\u80b2\u8d1d\u62c9\u56fd\u9645\u6559\u80b2\u79d1\u6280\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u6c47\u51a0\u89e6\u6478\u6280\u672f\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20004_8_0_0","object_type":20004,"object_type_name":"\u62a5\u635f\u5355","object_type_color":"","object_type_tip":"","object_id":8,"event_type":0,"event_id":0,"business_node":"","bill_no":"BSD-20260604-00001","bill_date":"2026-06-04","completed_at":"","amount":232323,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20018_8489_0_0","object_type":20018,"object_type_name":"\u73b0\u91d1\u8d39\u7528\u5355","object_type_color":"","object_type_tip":"","object_id":8489,"event_type":0,"event_id":0,"business_node":"","bill_no":"XJFYD-20260604-00001","bill_date":"2026-06-04","completed_at":"","amount":1,"partner_name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u4e0d\u7b26\u5408\u751f\u6210\u6761\u4ef6","can_select":false,"have_invoice":false,"is_verified":true,"is_error":true,"error_code":"no_invoice","error_display":"\u8d39\u7528\u62a5\u9500\u672a\u4e0a\u4f20\u53d1\u7968","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"107_2327_0_0","object_type":107,"object_type_name":"\u9500\u552e\u53d1\u7968","object_type_color":"","object_type_tip":"","object_id":2327,"event_type":0,"event_id":0,"business_node":"","bill_no":"44","bill_date":"2026-06-02","completed_at":"","amount":88221,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"107_2326_0_0","object_type":107,"object_type_name":"\u9500\u552e\u53d1\u7968","object_type_color":"","object_type_tip":"","object_id":2326,"event_type":0,"event_id":0,"business_node":"","bill_no":"88221","bill_date":"2026-06-02","completed_at":"","amount":-88221,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20023_14_1_22","object_type":20023,"object_type_name":"\u5de5\u8d44\u5355","object_type_color":"","object_type_tip":"","object_id":14,"event_type":1,"event_id":22,"business_node":"\u4ed8\u6b3e","bill_no":"GZD-20260601-00001","bill_date":"2026-06-01","completed_at":"2026-06-01 09:23:52","amount":23023,"partner_name":"","department":"","handler_name":"","fund_account_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","fund_account_caption_name":"\u534e\u590f\u94f6\u884c\u5317\u4eac\u4e16\u7eaa\u57ce\u652f\u884c4065200001801900009530","gen_status":"\u672a\u751f\u6210\u51ed\u8bc1","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":0,"gen_fail_count":0,"book_date":""}],"pagenation":{"totalcount":18,"thispage":1,"pagesize":200},"total_amount":315394.01},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"221.216.117.25","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko\/20100101 Firefox\/152.0"}', FALSE, '2026-06-29 18:29:36', 112497920) RETURNING "id"
18:29:36.952traceyii\redis\Connection::executeCommandExecuting Redis Command: GET
18:29:36.952traceyii\redis\Connection::executeCommandExecuting Redis Command: SET