| 17:33:59.484 | trace | yii\base\Application::bootstrap | Bootstrap with yii\log\Dispatcher |
| 17:33:59.484 | trace | yii\base\Module::getModule | Loading module: debug |
| 17:33:59.485 | trace | yii\base\Application::bootstrap | Bootstrap with yii\debug\Module::bootstrap() |
| 17:33:59.485 | trace | yii\redis\Connection::open | Opening redis DB connection: redis.server.local:6379, database=1 |
| 17:33:59.485 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: SELECT |
| 17:33:59.485 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.486 | info | time tracing start | 1784194439486217984 |
| 17:33:59.486 | trace | yii\web\UrlManager::parseRequest | No matching URL rules. Using default URL parsing logic. |
| 17:33:59.486 | trace | yii\web\Application::handleRequest | Route requested: 'vue/voucher-center/bill-list' |
| 17:33:59.486 | trace | yii\base\Module::getModule | Loading module: vue |
| 17:33:59.487 | info | yii\web\Session::open | Session started |
| 17:33:59.488 | info | yii\db\Command::query | SELECT * FROM "global"."vw_user_login" WHERE "id"=1013 |
| 17:33:59.488 | info | yii\db\Connection::open | Opening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta |
| 17:33:59.489 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.490 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
| 17:33:59.490 | info | yii\db\Command::query | SELECT * FROM "global"."vw_user_login" WHERE "id"=1001 |
| 17:33:59.491 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.492 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
| 17:33:59.492 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:33:59.493 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_ledgers" WHERE "is_stop"=FALSE ORDER BY "id" |
| 17:33:59.493 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.493 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
| 17:33:59.493 | trace | yii\base\Controller::runAction | Route to run: vue/voucher-center/bill-list |
| 17:33:59.494 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.496 | trace | uranus\rbac\DbManager::checkAccessFromCache | Checking role: Admin |
| 17:33:59.496 | trace | yii\base\InlineAction::runWithParams | Running action: app\modules\vue\controllers\VoucherCenterController::actionBillList() |
| 17:33:59.496 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.497 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.503 | info | yii\db\Command::query | SELECT 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-07-01') AND ("i"."from_date" <= '2026-07-31')) 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-07-01') AND ("i"."from_date" <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("t"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("p"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("t"."verify_at" <= '2026-07-31 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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 |
| 17:33:59.523 | info | yii\db\Command::query | SELECT 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-07-01') AND ("i"."from_date" <= '2026-07-31')) 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-07-01') AND ("i"."from_date" <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("t"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("p"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("t"."verify_at" <= '2026-07-31 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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 |
| 17:33:59.542 | info | yii\db\Command::query | SELECT "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-07-01') AND ("i"."from_date" <= '2026-07-31')) 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-07-01') AND ("i"."from_date" <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND (COALESCE(CAST(i.verify_at AS date), i.from_date) <= '2026-07-31') ) 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("c"."signed_at" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("t"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("p"."bank_settle_at" <= '2026-07-31 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-07-01') AND ("t"."verify_at" <= '2026-07-31 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."wrote_date" <= '2026-07-31') ) 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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-07-01') AND ("e"."settle_at" <= '2026-07-31 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 |
| 17:33:59.561 | info | yii\db\Command::query | SELECT "id", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id" IN (982, 2125, 2128, 3351, 2133, 2766, 3462, 3303) |
| 17:33:59.562 | info | yii\db\Command::query | SELECT "id", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id" IN (431, 45) |
| 17:33:59.562 | info | yii\db\Command::query | SELECT "id", "name", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1011, 1001, 5087, 5300) |
| 17:33:59.563 | info | yii\db\Command::query | SELECT "id", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id" IN (1, 3, 4) |
| 17:33:59.563 | info | yii\db\Command::query | SELECT "id", "title", "serial_no" FROM "a57be577deb434"."tbl_erp_banks" WHERE "id"=1 |
| 17:33:59.564 | info | yii\db\Command::query | SELECT "serial_no", "title" FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("ledger_id"=1) AND ("serial_no"='100201') AND ("is_delete"=FALSE) |
| 17:33:59.565 | info | yii\db\Command::query | SELECT "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"=8490) AND ("tt"."serial_no" IN (221106, 640301, 640302, 640303, 600704)) GROUP BY "r"."object_id" |
| 17:33:59.566 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.567 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
| 17:33:59.567 | info | yii\db\Command::query | INSERT 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-07-01","date_to":"2026-07-31","web_access_token":"8xqSDHkpxFShwMjatgql1iJNjJHyfMBa"}', '{"code":2000,"result":{"list":[{"id":"20003_9_0_0","object_type":20003,"object_type_name":"\u91c7\u8d2d\u9000\u8d27\u5355","object_type_color":"","object_type_tip":"","object_id":9,"event_type":0,"event_id":0,"business_node":"","bill_no":"CGTH-20260715-00001","bill_date":"2026-07-15","completed_at":"","amount":2100,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20004_11_0_0","object_type":20004,"object_type_name":"\u62a5\u635f\u5355","object_type_color":"","object_type_tip":"","object_id":11,"event_type":0,"event_id":0,"business_node":"","bill_no":"BSD-20260715-00002","bill_date":"2026-07-15","completed_at":"","amount":500,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20004_10_0_0","object_type":20004,"object_type_name":"\u62a5\u635f\u5355","object_type_color":"","object_type_tip":"","object_id":10,"event_type":0,"event_id":0,"business_node":"","bill_no":"BSD-20260715-00001","bill_date":"2026-07-15","completed_at":"","amount":45,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20008_164_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":164,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260715-00003","bill_date":"2026-07-15","completed_at":"","amount":1776,"partner_name":"\u4e2d\u56fd\u4fe1\u606f\u5b89\u5168\u7814\u7a76\u6240","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20008_163_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":163,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260715-00002","bill_date":"2026-07-15","completed_at":"","amount":18000,"partner_name":"\u5317\u4eac\u673a\u5668\u5236\u9020\u6709\u9650\u516c\u53f8","department":"\u9500\u552e\u90e8","handler_name":"\u5218\u5fae","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20008_162_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":162,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260715-00001","bill_date":"2026-07-15","completed_at":"","amount":44433443,"partner_name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u9500\u552e\u90e8","handler_name":"\u5218\u5fae","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20011_133_0_0","object_type":20011,"object_type_name":"\u8d60\u9001\u5355","object_type_color":"","object_type_tip":"","object_id":133,"event_type":0,"event_id":0,"business_node":"","bill_no":"ZSD-20260715-00001","bill_date":"2026-07-15","completed_at":"","amount":500,"partner_name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09","department":"\u9500\u552e\u90e8","handler_name":"\u82cf\u6e05\u4e91","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20019_7_0_0","object_type":20019,"object_type_name":"\u9884\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":7,"event_type":0,"event_id":0,"business_node":"","bill_no":"YFKD-20260715-00003","bill_date":"2026-07-15","completed_at":"","amount":12345,"partner_name":"\u8054\u5f3a\u56fd\u9645\u8d38\u6613(\u4e2d\u56fd)\u6709\u9650\u516c\u53f8","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20019_5_0_0","object_type":20019,"object_type_name":"\u9884\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":5,"event_type":0,"event_id":0,"business_node":"","bill_no":"YFKD-20260715-00001","bill_date":"2026-07-15","completed_at":"","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":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20031_12_0_0","object_type":20031,"object_type_name":"\u62a5\u6ea2\u5355","object_type_color":"","object_type_tip":"","object_id":12,"event_type":0,"event_id":0,"business_node":"","bill_no":"BYD-20260715-00002","bill_date":"2026-07-15","completed_at":"","amount":222,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20031_11_0_0","object_type":20031,"object_type_name":"\u62a5\u6ea2\u5355","object_type_color":"","object_type_tip":"","object_id":11,"event_type":0,"event_id":0,"business_node":"","bill_no":"BYD-20260715-00001","bill_date":"2026-07-15","completed_at":"","amount":2323,"partner_name":"","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-15"},{"id":"20023_15_1_23","object_type":20023,"object_type_name":"\u5de5\u8d44\u5355","object_type_color":"","object_type_tip":"","object_id":15,"event_type":1,"event_id":23,"business_node":"\u4ed8\u6b3e","bill_no":"GZD-20260601-00002","bill_date":"2026-07-14","completed_at":"2026-07-14 17:14:59","amount":186022,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-14"},{"id":"20012_2368_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2368,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260713-00001","bill_date":"2026-07-13","completed_at":"","amount":8.8,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-13"},{"id":"20012_2367_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2367,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260710-00002","bill_date":"2026-07-10","completed_at":"","amount":2,"partner_name":"\u5409\u6797\u7701\u5a01\u58eb\u987f\u667a\u80fd\u79d1\u6280\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-10"},{"id":"20012_2366_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2366,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260710-00001","bill_date":"2026-07-10","completed_at":"","amount":2,"partner_name":"\u5409\u6797\u7701\u5a01\u58eb\u987f\u667a\u80fd\u79d1\u6280\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-10"},{"id":"20018_8490_0_0","object_type":20018,"object_type_name":"\u73b0\u91d1\u8d39\u7528\u5355","object_type_color":"","object_type_tip":"","object_id":8490,"event_type":0,"event_id":0,"business_node":"","bill_no":"XJFYD-20260708-00001","bill_date":"2026-07-08","completed_at":"","amount":1,"partner_name":"\u5927\u59d1\u8bf4\u7684\u98ce\u683c","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":"20012_2365_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2365,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260707-00004","bill_date":"2026-07-07","completed_at":"","amount":10,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-07"},{"id":"20012_2364_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2364,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260707-00003","bill_date":"2026-07-07","completed_at":"","amount":0,"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":true,"is_verified":true,"is_error":true,"error_code":"zero_amount","error_display":"\u5355\u636e\u91d1\u989d=0\uff0c\u65e0\u9700\u751f\u6210\u51ed\u8bc1","gen_success_count":0,"gen_fail_count":0,"book_date":""},{"id":"20012_2363_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2363,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260707-00002","bill_date":"2026-07-07","completed_at":"","amount":800,"partner_name":"\u5317\u4eac\u795e\u5dde\u90a6\u90a6\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8(\u8fc7\u5355)","department":"\u603b\u7ecf\u7406","handler_name":"\u5218\u4eba\u8bda","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-07"},{"id":"20012_2362_0_0","object_type":20012,"object_type_name":"\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":2362,"event_type":0,"event_id":0,"business_node":"","bill_no":"FKD-20260707-00001","bill_date":"2026-07-07","completed_at":"","amount":2,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-07"},{"id":"20019_4_0_0","object_type":20019,"object_type_name":"\u9884\u4ed8\u6b3e\u5355","object_type_color":"","object_type_tip":"","object_id":4,"event_type":0,"event_id":0,"business_node":"","bill_no":"YFKD-20260707-00001","bill_date":"2026-07-07","completed_at":"","amount":2,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-07"},{"id":"20020_46_1_2396","object_type":20020,"object_type_name":"\u5176\u4ed6\u5e94\u4ed8\u5355","object_type_color":"","object_type_tip":"","object_id":46,"event_type":1,"event_id":2396,"business_node":"\u4ed8\u6b3e","bill_no":"QTYFD-20260601-00001","bill_date":"2026-07-07","completed_at":"2026-07-07 17:09:08","amount":800,"partner_name":"\u5317\u4eac\u795e\u5dde\u90a6\u90a6\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8(\u8fc7\u5355)","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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-07"},{"id":"20008_161_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":161,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260705-00001","bill_date":"2026-07-05","completed_at":"","amount":44433443,"partner_name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u9500\u552e\u90e8","handler_name":"\u5218\u5fae","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-05"},{"id":"20003_8_0_0","object_type":20003,"object_type_name":"\u91c7\u8d2d\u9000\u8d27\u5355","object_type_color":"","object_type_tip":"","object_id":8,"event_type":0,"event_id":0,"business_node":"","bill_no":"CGTH-20260704-00001","bill_date":"2026-07-04","completed_at":"","amount":2100,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-04"},{"id":"20008_160_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":160,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260704-00002","bill_date":"2026-07-04","completed_at":"","amount":88920331,"partner_name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u9500\u552e\u90e8","handler_name":"\u5218\u5fae","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-04"},{"id":"20008_159_0_0","object_type":20008,"object_type_name":"\u9500\u552e\u51fa\u5e93\u5355","object_type_color":"","object_type_tip":"","object_id":159,"event_type":0,"event_id":0,"business_node":"","bill_no":"XSCKD-20260704-00001","bill_date":"2026-07-04","completed_at":"","amount":44433443,"partner_name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8","department":"\u9500\u552e\u90e8","handler_name":"\u5218\u5fae","fund_account_name":"","fund_account_caption_name":"","gen_status":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-04"},{"id":"20011_132_0_0","object_type":20011,"object_type_name":"\u8d60\u9001\u5355","object_type_color":"","object_type_tip":"","object_id":132,"event_type":0,"event_id":0,"business_node":"","bill_no":"ZSD-20260704-00001","bill_date":"2026-07-04","completed_at":"","amount":4826,"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":"\u5df2\u751f\u6210\u51ed\u8bc11\u6b21","can_select":true,"have_invoice":true,"is_verified":true,"is_error":false,"error_code":"","error_display":"","gen_success_count":1,"gen_fail_count":0,"book_date":"2026-07-04"}],"pagenation":{"totalcount":27,"thispage":1,"pagesize":200},"total_amount":222453047.8},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"114.244.130.25","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko\/20100101 Firefox\/152.0"}', FALSE, '2026-07-16 17:33:59', 81288192) RETURNING "id" |
| 17:33:59.570 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
| 17:33:59.570 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: SET |