Database Queries

总计62条数据
TimeDurationTypeQuery
  
09:43:52.7043.9 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9'

09:43:52.7091.9 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

09:43:52.7131.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_clients" WHERE ("id"='1661') AND ("deleted"=FALSE)

09:43:52.7187.8 msSELECTSELECT COUNT(*) FROM (SELECT c.*, abs(c.expire_date - current_date) AS b_date, CASE WHEN c.expire_date IS NULL THEN 1 ELSE 2 END AS passed FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = c.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.id = c.from_project LEFT JOIN "a57be577deb434"."tbl_sales_group_relationships" "sgr" ON sgr.sales_id = client.sales_rep LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "cs" ON cs.object_id = c.id AND cs.object_type = 105 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "rs" ON rs.object_id = c.id AND rs.object_type = 106 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "vs" ON vs.object_id = c.id AND vs.object_type = 107 WHERE "client"."id"='1661' GROUP BY "c"."id" ORDER BY "c"."signed_at" DESC, "c"."created_at" DESC) "c"

09:43:52.7266.6 msSELECTSELECT c.*, abs(c.expire_date - current_date) AS b_date, CASE WHEN c.expire_date IS NULL THEN 1 ELSE 2 END AS passed FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = c.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.id = c.from_project LEFT JOIN "a57be577deb434"."tbl_sales_group_relationships" "sgr" ON sgr.sales_id = client.sales_rep LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "cs" ON cs.object_id = c.id AND cs.object_type = 105 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "rs" ON rs.object_id = c.id AND rs.object_type = 106 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "vs" ON vs.object_id = c.id AND vs.object_type = 107 WHERE "client"."id"='1661' GROUP BY "c"."id" ORDER BY "c"."signed_at" DESC, "c"."created_at" DESC LIMIT 10

09:43:52.7330.3 msSELECTSELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=1661

09:43:52.7330.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

09:43:52.7340.4 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1001)

09:43:52.7340.3 msSELECTSELECT "id", "id" AS "key", "name", "orig_name", "extension", "path" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=5271

09:43:52.7350.2 msSELECTSELECT "id", "id" AS "key", "name", "orig_name", "extension", "path" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=5320

09:43:52.7350.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1001, 5015)

09:43:52.7360.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (1001, 5015))

09:43:52.7360.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id" IN (4, 9)

09:43:52.73620.3 msSELECTSELECT "object_id", count(*) AS comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=7) AND ("object_id" IN (4140, 1558)) GROUP BY "object_id"

09:43:52.7570.4 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id" IN (3959, 1791)

09:43:52.7571.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_erp_sales_orders" WHERE ("status" IN (2, 5)) AND ("project_id" IN (1791, 3959))

09:43:52.7590.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_erp_sales_order_verify_rels" WHERE "erp_sales_order_id" IN (584, 1586) ORDER BY "id"

09:43:52.7590.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" WHERE "erp_sales_order_id" IN (584, 1586) ORDER BY "id"

09:43:52.7600.4 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name", "description", "total_contact_point", "paid_contact_point", "is_sales_order_ready", "project_product_version_id", "bargain_date", "collected", "profit_pct", "budget" FROM "a57be577deb434"."tbl_projects" WHERE "id" IN (3959, 1791)

09:43:52.7610.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_erp_sales_orders" WHERE ("status" IN (2, 5)) AND ("project_id" IN (1791, 3959))

09:43:52.7610.5 msSELECTSELECT "id", "product_type_id", "product_type_id" AS "key", "name", "budget", "pct", "project_id", "profit" FROM "a57be577deb434"."tbl_project_product_types" WHERE "project_id" IN (1791, 3959)

09:43:52.7620.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id" IN (1791, 3959)

09:43:52.7630.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_products" WHERE "id"=1040

09:43:52.7630.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_types" WHERE "id"=7

09:43:52.7640.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_components" WHERE "id"=32

09:43:52.7640.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=137

09:43:52.7650.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_series" WHERE "id"=633

09:43:52.7650.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_units" WHERE "id"=2

09:43:52.7650.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_erp_sales_order_products" WHERE "id"=1878

09:43:52.7660.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_contact_points" WHERE "project_id" IN (1791, 3959)

09:43:52.7661.9 msSELECTSELECT "id", "project_id" FROM "a57be577deb434"."tbl_sales_order_items" WHERE ("is_system"=TRUE) AND ("project_id" IN (1791, 3959))

09:43:52.7681.4 msSELECTSELECT "project_id", sum(amount) AS sum FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (2, 3)) AND ("project_id" IN (1791, 3959)) GROUP BY "project_id"

09:43:52.7700.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_sales_supplier_rels" WHERE "contract_id" IN (4140, 1558)

09:43:52.7700.4 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id" IN (365, 431)

09:43:52.7710.4 msSELECTSELECT "id", "id" AS "key", "serial_no" FROM "a57be577deb434"."tbl_purchase_contracts" WHERE "id" IN (1559, 4141)

09:43:52.7710.2 msSELECTSELECT "id", "id" AS "key", "type" AS "name" FROM "a57be577deb434"."tbl_contract_types" WHERE "id"=1

09:43:52.7720.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

09:43:52.7720.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1001)

09:43:52.7720.3 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE ("reminded"=FALSE) AND ("contract_id" IN (4140, 1558)) ORDER BY "remind_date"

09:43:52.7730.2 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" AS "name" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE "contract_id" IN (4140, 1558)

09:43:52.7730.4 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_remind_receivers" WHERE "contract_id" IN (4140, 1558)

09:43:52.7740.2 msSELECTSELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1011, 1001)

09:43:52.7740.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (1011, 1001))

09:43:52.7740.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_service_contract_remind_receivers" WHERE "contract_id" IN (4140, 1558)

09:43:52.7750.3 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" WHERE "contract_id" IN (4140, 1558)

09:43:52.7750.2 msSELECTSELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1001, 1011)

09:43:52.7750.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (1011, 1001))

09:43:52.7760.4 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" AS "name", "amount" AS "value", "overdue_days", "status" FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id" IN (4140, 1558) ORDER BY "remind_date"

09:43:52.7762.9 msSELECTSELECT "id", "id" AS "key", "contract_id", "amount" AS "value", "created_by", "created_at", "description", "collected_date", "amount" FROM (SELECT * FROM ((SELECT '1' || r.id::varchar as id, 1 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5, 1))) UNION ALL ( SELECT '2' || r.id::varchar as id, 2 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5, 1)) ) UNION ALL ( SELECT '3' || r.id::varchar as id, 3 as ticket_type, r.sales_contract_id as contract_id, 0 - r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5, 1)) )) "sub") "r" WHERE "contract_id" IN (4140, 1558) ORDER BY "id" DESC

09:43:52.7790.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

09:43:52.7800.5 msSELECTSELECT "id", "id" AS "key", "contract_id", "amount" AS "value", "attachment_id", "from_date", "description", "is_draft" FROM "a57be577deb434"."tbl_sales_contract_invoices" WHERE "contract_id" IN (4140, 1558) ORDER BY "id"

09:43:52.7800.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=5400

09:43:52.7811.8 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=20) AND ("object_id"=854)

09:43:52.7831.8 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=102) AND ("object_id"=854)

09:43:52.7850.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=5400

09:43:52.7852.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=105) AND ("object_id" IN (4140, 1558))

09:43:52.7870.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id" IN (5271, 28121)

09:43:52.7872.0 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=106) AND ("object_id" IN (4140, 1558))

09:43:52.7900.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=5320

09:43:52.7902.0 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=107) AND ("object_id" IN (4140, 1558))

09:43:52.79217.1 msSELECTSELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=7) AND (remind_user_id = 1000 AND is_read = false) AND ("object_id" IN (4140, 1558)) GROUP BY "object_id"

09:43:52.8101.9 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 2, 1149, 'v2/sales-contract/of-client', '{"access_token":"jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9","device_type":"2","id":"1661","page":"1","posttime":"1758159872","token":"df6b9cad8db7a7e7836e5e44292b28f4","version_code":"1149"}', '{"code":200,"data":{"list":[{"id":4140,"client_id":1661,"signed_at":"2025-09-11","amount":"2366664","handler":1001,"description":"","created_by":1001,"created_at":"2025-09-11 15:03:37","updated_at":"2025-09-16 17:03:02","contract_scan":null,"receipt_scan":null,"contract_type":1,"project_id":3959,"valid_date":null,"expire_date":null,"sla":"","remind_ahead":"","expire_remind_ahead":"","expire_reminded":false,"serial_no":"2025-09-11-001","payment_collection_remind_ahead":"","from_project":3959,"receipt_date":null,"verify_date":null,"including_tax":true,"build_by_project":true,"need_analysis":true,"is_settle":false,"is_deliver":false,"is_outbound":false,"is_save_collection":true,"save_collection_at":"2025-09-12 17:01:06","is_verify":false,"is_draft":true,"erp_settle_amount":"88","erp_un_settle_amount":"2366576","erp_payment_ticket_is_verify":false,"erp_collect_ticket_is_verify":false,"erp_cash_cost_ticket_is_verify":false,"b_date":null,"passed":1,"client":{"id":1661,"key":1661,"name":"\u5317\u4eac\u7f51\u4fe1\u5143\u79d1\u6280\u6709\u9650\u516c\u53f8","logo":null,"sales_rep":1001,"salesRep":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}},"contractScan":null,"receiptScan":null,"createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"commentCount":{"object_id":4140,"comment":2},"project":{"id":3959,"key":3959,"name":"\u5409\u5fb7\u79d1\u5a03","erpSalesOrder":{"id":1586,"serial_no":"XSDD-20250911-00001","from_date":null,"wrote_date":"2025-09-11","handler":1001,"client_id":1661,"purchase_contract_id":null,"project_id":3959,"sales_contract_id":4140,"erp_store_id":null,"status":2,"erp_send_type_id":null,"abstract":null,"description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"next_cancel_verify_user":null,"verify_at":"2025-09-11 15:03:36","stop_at":null,"cancel_at":null,"refuse_description":null,"is_resubmitted":false,"is_done":false,"number":"3","amount":"2366664","created_by":1001,"stop_description":null,"extra":"{\"payment_collection_remind_ahead\":null,\"salesContractPaymentCollectionRemindReceivers\":null,\"salesContractPaymentCollectionRemindDates\":null}","outbound_status":false,"is_used":true,"is_cancel":false,"is_settle":false,"is_old":false,"created_at":"2025-09-11 10:49:29","updated_at":"2025-09-16 17:03:12","erpSalesOrderVerifyRels":[{"id":24,"erp_sales_order_id":1586,"user_id":1001,"status":1,"description":"","verify_at":"2025-09-11 15:03:36"}],"erpSalesOrderStopVerifyRels":[{"id":17,"erp_sales_order_id":1586,"user_id":1001,"status":2,"description":"","verify_at":"2025-09-16 17:03:12"}]}},"fromProject":{"id":3959,"key":3959,"name":"\u5409\u5fb7\u79d1\u5a03","description":"","total_contact_point":null,"paid_contact_point":null,"is_sales_order_ready":false,"project_product_version_id":1016,"bargain_date":"2025-09-11","collected":"88","profit_pct":"99.98","budget":"2366664","erpSalesOrder":{"id":1586,"serial_no":"XSDD-20250911-00001","from_date":null,"wrote_date":"2025-09-11","handler":1001,"client_id":1661,"purchase_contract_id":null,"project_id":3959,"sales_contract_id":4140,"erp_store_id":null,"status":2,"erp_send_type_id":null,"abstract":null,"description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"next_cancel_verify_user":null,"verify_at":"2025-09-11 15:03:36","stop_at":null,"cancel_at":null,"refuse_description":null,"is_resubmitted":false,"is_done":false,"number":"3","amount":"2366664","created_by":1001,"stop_description":null,"extra":"{\"payment_collection_remind_ahead\":null,\"salesContractPaymentCollectionRemindReceivers\":null,\"salesContractPaymentCollectionRemindDates\":null}","outbound_status":false,"is_used":true,"is_cancel":false,"is_settle":false,"is_old":false,"created_at":"2025-09-11 10:49:29","updated_at":"2025-09-16 17:03:12"},"projectProductTypes":[{"id":7037,"product_type_id":7,"key":7,"name":"\u8f6f\u4ef6","budget":"2366664","pct":"99.98","project_id":3959,"profit":"2366397"}],"projectProductRels":[{"id":10738,"project_id":3959,"product_id":1040,"amount":"788888.00","number":2,"cost":"89","description":"","supplier_id":null,"hardware_from":null,"software_from":null,"maintenance_from":null,"hardware_to":null,"software_to":null,"maintenance_to":null,"total_amount":"1577776","total_cost":"178","erp_sales_order_product_id":1878,"supplier":null,"product":{"id":1040,"name":"\u5b81\u76fe\u4ee4\u724c\u8f6f\u4ef6V1.0","product_type":7,"product_component":32,"product_brand":137,"product_serie":633,"product_misc":null,"product_qa":null,"pn":"","description":"","created_by":1013,"created_at":"2023-09-25 16:31:25","updated_at":"2025-09-15 16:19:45","pinyin_shortcut":"ndlprjV10","product_unit":2,"is_renew":false,"productType":{"id":7,"key":7,"name":"\u8f6f\u4ef6"},"productComponent":{"id":32,"key":32,"name":"\u9632\u75c5\u6bd2\u8f6f\u4ef6"},"productBrand":{"id":137,"key":137,"name":"\u5b81\u76fe"},"productSerie":{"id":633,"key":633,"name":"\u4ee4\u724c"},"productUnit":{"id":2,"key":2,"name":"\u5957"}},"erpSalesOrderProduct":{"id":1878,"erp_sales_order_id":1586,"erp_store_id":null,"product_id":1040,"description":"","number":"2","outbound":"1","amount":"788888.00","total_amount":"1577776","last_number":"2","last_amount":"788888.00","last_total_amount":"1577776","cost":"89","total_cost":"178","supplier_id":null,"hardware_from":null,"software_from":null,"maintenance_from":null,"hardware_to":null,"software_to":null,"maintenance_to":null}}],"projectContactPoints":[],"buildSalesOrderItems":[],"reimbursementAmountSum":null,"profit":2366190.6672,"contact_points_status_display":"\u672a\u8bbe\u7f6e"},"salesSupplierRels":[],"contractType":{"id":1,"key":1,"name":"\u4ea7\u54c1\u9500\u552e"},"handleBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}},"remindDate":null,"serviceContractRemindDates":[],"salesContractRemindReceivers":[{"id":10856,"user_id":1001,"key":1001,"contract_id":4140,"user":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}}],"serviceContractRemindReceivers":[],"salesContractPaymentCollectionRemindReceivers":[],"salesContractPaymentCollectionRemindDates":[],"salesContractPayments":[{"id":"12036","key":"12036","contract_id":4140,"value":"88","created_by":1001,"created_at":"2025-09-15 15:50:37","description":"\u5bf9\u65b9\u7684\u8eab\u4efd","collected_date":"2025-09-15 15:50:37","amount":"88","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4},"pct":0}],"salesContractInvoices":[],"contractScans":[{"id":49564,"object_type":105,"object_id":4140,"attachment_id":28121,"attachment":{"id":28121,"key":28121,"name":"491d3f89-894f-3cf5-abf2-361d6f604b0e","extension":"png","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/491d3f89-894f-3cf5-abf2-361d6f604b0e\/\u56fe\u7247.png","orig_name":"\u56fe\u7247.png"}}],"receiptScans":[],"verifyScans":[],"unreadComments":null,"collected_plan":0,"projectProductTotalAmount":1577776,"projectProductAllAmount":true,"projectProductTotalCost":178,"projectProductAllCost":true,"projectProductTotalCount":2,"invoiced":0,"un_invoiced":2366664,"collected":"88","un_collected":2366576,"is_collected":false,"handlerPerson":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}},"remind_date":"","remind_ahead_display":"\u65e0","expire_remind_ahead_display":"\u65e0","payment_collection_remind_ahead_display":"\u65e0","can_update":true,"can_delete":false,"unread":0,"bgcolor":"#89c541","can_view_product":true,"can_progress":true,"is_chargeback":false,"is_done":false},{"id":1558,"client_id":1661,"signed_at":"2020-06-03","amount":"514761.00","handler":1001,"description":"1\u53f05500VX-HW\u8bbe\u5907","created_by":5015,"created_at":"2020-06-23 16:32:19","updated_at":"2020-07-15 11:37:55","contract_scan":5271,"receipt_scan":5320,"contract_type":1,"project_id":1791,"valid_date":null,"expire_date":"2021-06-02","sla":"","remind_ahead":"","expire_remind_ahead":"30 days","expire_reminded":true,"serial_no":"TSKJ20200602-HYF-004","payment_collection_remind_ahead":"1 day","from_project":1791,"receipt_date":null,"verify_date":null,"including_tax":true,"build_by_project":true,"need_analysis":true,"is_settle":false,"is_deliver":false,"is_outbound":false,"is_save_collection":true,"save_collection_at":"","is_verify":false,"is_draft":false,"erp_settle_amount":"514761","erp_un_settle_amount":"0","erp_payment_ticket_is_verify":false,"erp_collect_ticket_is_verify":false,"erp_cash_cost_ticket_is_verify":false,"b_date":1569,"passed":2,"client":{"id":1661,"key":1661,"name":"\u5317\u4eac\u7f51\u4fe1\u5143\u79d1\u6280\u6709\u9650\u516c\u53f8","logo":null,"sales_rep":1001,"salesRep":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}},"contractScan":{"id":5271,"key":5271,"name":"1727e634-855f-3aa3-86ce-f19c5df0e9dd","orig_name":"2020_06_29_09_03_56.pdf","extension":"pdf","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/1727e634-855f-3aa3-86ce-f19c5df0e9dd\/2020_06_29_09_03_56.pdf","download":"\/vue\/attachment\/download?name=1727e634-855f-3aa3-86ce-f19c5df0e9dd"},"receiptScan":{"id":5320,"key":5320,"name":"b0db54c2-4b7d-3b26-b333-1bcd84fc2666","orig_name":"\u626b\u63cf\u5168\u80fd\u738b 2020-07-08 14.11.10.pdf","extension":"pdf","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/b0db54c2-4b7d-3b26-b333-1bcd84fc2666\/\u626b\u63cf\u5168\u80fd\u738b 2020-07-08 14.11.10.pdf","download":"\/vue\/attachment\/download?name=b0db54c2-4b7d-3b26-b333-1bcd84fc2666"},"createdBy":{"id":5015,"key":5015,"name":"\u5f20\u96ea\u677e","sex":"F","department_id":9,"avatar":{"id":5,"user_id":5015,"name":"\/files\/cdn\/a57be577deb434\/avatar\/7a105eb6-13c4-3990-9428-b163f97fe449.png"},"department":{"id":9,"key":9,"name":"\u9879\u76ee\u90e8"}},"commentCount":null,"project":{"id":1791,"key":1791,"name":"\u706b\u773c5500VX\u91c7\u8d2d\u9879\u76ee","erpSalesOrder":{"id":584,"serial_no":"XSDD-20210419-00001","from_date":null,"wrote_date":"2020-06-03","handler":5015,"client_id":1661,"purchase_contract_id":null,"project_id":1791,"sales_contract_id":1558,"erp_store_id":null,"status":2,"erp_send_type_id":null,"abstract":null,"description":"\u5b89\u5168 ","verify_type":1,"next_verify_user":null,"next_stop_verify_user":null,"next_cancel_verify_user":null,"verify_at":"2021-04-19 22:25:38","stop_at":null,"cancel_at":null,"refuse_description":null,"is_resubmitted":false,"is_done":false,"number":"0","amount":"514761","created_by":5015,"stop_description":null,"extra":null,"outbound_status":false,"is_used":false,"is_cancel":false,"is_settle":false,"is_old":true,"created_at":"2020-06-23 16:32:19","updated_at":"2021-04-19 22:25:38","erpSalesOrderVerifyRels":[],"erpSalesOrderStopVerifyRels":[]}},"fromProject":{"id":1791,"key":1791,"name":"\u706b\u773c5500VX\u91c7\u8d2d\u9879\u76ee","description":"1\u53f05500VX-HW\u8bbe\u5907","total_contact_point":null,"paid_contact_point":null,"is_sales_order_ready":false,"project_product_version_id":null,"bargain_date":"2020-06-03","collected":"514761","profit_pct":"0.56","budget":"514761.00","erpSalesOrder":{"id":584,"serial_no":"XSDD-20210419-00001","from_date":null,"wrote_date":"2020-06-03","handler":5015,"client_id":1661,"purchase_contract_id":null,"project_id":1791,"sales_contract_id":1558,"erp_store_id":null,"status":2,"erp_send_type_id":null,"abstract":null,"description":"\u5b89\u5168 ","verify_type":1,"next_verify_user":null,"next_stop_verify_user":null,"next_cancel_verify_user":null,"verify_at":"2021-04-19 22:25:38","stop_at":null,"cancel_at":null,"refuse_description":null,"is_resubmitted":false,"is_done":false,"number":"0","amount":"514761","created_by":5015,"stop_description":null,"extra":null,"outbound_status":false,"is_used":false,"is_cancel":false,"is_settle":false,"is_old":true,"created_at":"2020-06-23 16:32:19","updated_at":"2021-04-19 22:25:38"},"projectProductTypes":[{"id":4722,"product_type_id":87,"key":87,"name":"\u5b89\u5168","budget":"514761.00","pct":"0.56","project_id":1791,"profit":"2882.6616"}],"projectProductRels":[],"projectContactPoints":[],"buildSalesOrderItems":[],"reimbursementAmountSum":{"project_id":1791,"sum":"289.76"},"profit":2882.6616,"contact_points_status_display":"\u672a\u8bbe\u7f6e"},"salesSupplierRels":[{"id":635,"contract_id":1558,"supplier_id":365,"purchase_id":1559,"supplier":{"id":365,"key":365,"name":"\u5317\u4eac\u767e\u8fbe\u4fe1\u901a\u79d1\u6280\u6709\u9650\u516c\u53f8"},"purchase":{"id":1559,"key":1559,"serial_no":"TSKJ20200603-HYF-002"}},{"id":3217,"contract_id":1558,"supplier_id":431,"purchase_id":4141,"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"purchase":{"id":4141,"key":4141,"serial_no":"\u800c\u7279\u70ed\u821e"}}],"contractType":{"id":1,"key":1,"name":"\u4ea7\u54c1\u9500\u552e"},"handleBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}},"remindDate":null,"serviceContractRemindDates":[],"salesContractRemindReceivers":[{"id":3670,"user_id":1011,"key":1011,"contract_id":1558,"user":{"id":1011,"key":1011,"name":"\u97e9\u96c5\u82b3","sex":"F","avatar":{"id":17,"user_id":1011,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b54747f4-248d-380e-93bc-0f62f769e70d.png"}}},{"id":10593,"user_id":1001,"key":1001,"contract_id":1558,"user":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}}],"serviceContractRemindReceivers":[],"salesContractPaymentCollectionRemindReceivers":[{"id":1252,"user_id":1001,"key":1001,"contract_id":1558,"user":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}},{"id":1253,"user_id":1011,"key":1011,"contract_id":1558,"user":{"id":1011,"key":1011,"name":"\u97e9\u96c5\u82b3","sex":"F","avatar":{"id":17,"user_id":1011,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b54747f4-248d-380e-93bc-0f62f769e70d.png"}}}],"salesContractPaymentCollectionRemindDates":[{"id":550,"key":550,"contract_id":1558,"name":"2020-08-11","value":"514761.00","overdue_days":null,"status":1,"pct":100,"collect_status":"\u5df2\u5b8c\u6210"}],"salesContractPayments":[{"id":"1423","key":"1423","contract_id":1558,"value":"514761.00","created_by":null,"created_at":"2020-06-23 16:32:19","description":null,"collected_date":"2020-06-23 16:32:19","amount":"514761.00","createdBy":null,"pct":100}],"salesContractInvoices":[{"id":854,"key":854,"contract_id":1558,"value":"514761.00","attachment_id":5400,"from_date":"2020-07-15","description":null,"is_draft":true,"attachment":{"id":5400,"key":5400,"name":"b0be27a4-0269-36ec-99ed-ef2ca596d429","extension":"pdf","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/b0be27a4-0269-36ec-99ed-ef2ca596d429\/2020_07_15_11_35_57.pdf","orig_name":"2020_07_15_11_35_57.pdf"},"attachmentRelationships":[],"files":[{"id":6460,"object_type":102,"object_id":854,"attachment_id":5400,"attachment":{"id":5400,"key":5400,"name":"b0be27a4-0269-36ec-99ed-ef2ca596d429","extension":"pdf","path":"\/v2\/attachment\/view\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/b0be27a4-0269-36ec-99ed-ef2ca596d429\/2020_07_15_11_35_57.pdf","orig_name":"2020_07_15_11_35_57.pdf"}}]}],"contractScans":[{"id":12313,"object_type":105,"object_id":1558,"attachment_id":5271,"attachment":{"id":5271,"key":5271,"name":"1727e634-855f-3aa3-86ce-f19c5df0e9dd","extension":"pdf","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/1727e634-855f-3aa3-86ce-f19c5df0e9dd\/2020_06_29_09_03_56.pdf","orig_name":"2020_06_29_09_03_56.pdf"}}],"receiptScans":[{"id":13085,"object_type":106,"object_id":1558,"attachment_id":5320,"attachment":{"id":5320,"key":5320,"name":"b0db54c2-4b7d-3b26-b333-1bcd84fc2666","extension":"pdf","path":"\/v2\/attachment\/preview\/jHlpO8y0vHBbQ6l37r2-YY8AcmS4s8X9\/b0db54c2-4b7d-3b26-b333-1bcd84fc2666\/\u626b\u63cf\u5168\u80fd\u738b 2020-07-08 14.11.10.pdf","orig_name":"\u626b\u63cf\u5168\u80fd\u738b 2020-07-08 14.11.10.pdf"}}],"verifyScans":[],"unreadComments":null,"collected_plan":514761,"projectProductTotalAmount":0,"projectProductAllAmount":true,"projectProductTotalCost":0,"projectProductAllCost":true,"projectProductTotalCount":0,"invoiced":514761,"un_invoiced":0,"collected":"514761","un_collected":0,"is_collected":true,"handlerPerson":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}},"remind_date":"","remind_ahead_display":"\u65e0","expire_remind_ahead_display":"\u63d0\u524d30\u5929","payment_collection_remind_ahead_display":"\u63d0\u524d1\u5929","can_update":true,"can_delete":false,"unread":0,"bgcolor":"#89c541","can_view_product":true,"can_progress":true,"is_chargeback":false,"is_done":true}],"pagenation":{"totalcount":2,"thispage":1,"pagesize":10}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-09-18 09:43:52') RETURNING "id"