12:29:48.183 | trace | yii\base\Application::bootstrap | Bootstrap with yii\log\Dispatcher |
12:29:48.183 | trace | yii\base\Module::getModule | Loading module: debug |
12:29:48.183 | trace | yii\base\Application::bootstrap | Bootstrap with yii\debug\Module::bootstrap() |
12:29:48.184 | trace | yii\redis\Connection::open | Opening redis DB connection: redis.server.local:6379, database=1 |
12:29:48.184 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: SELECT |
12:29:48.184 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.184 | trace | yii\base\Module::getModule | Loading module: gii |
12:29:48.184 | trace | yii\base\Application::bootstrap | Bootstrap with yii\gii\Module::bootstrap() |
12:29:48.184 | trace | yii\web\UrlManager::parseRequest | No matching URL rules. Using default URL parsing logic. |
12:29:48.184 | trace | yii\web\Application::handleRequest | Route requested: 'v2/pre-sales/list' |
12:29:48.184 | trace | yii\base\Module::getModule | Loading module: v2 |
12:29:48.185 | info | yii\web\Session::open | Session started |
12:29:48.185 | info | yii\db\Connection::open | Opening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta |
12:29:48.187 | info | yii\db\Command::query | SELECT * FROM "global"."vw_user_login" WHERE "access_token"='gIBfXHaGAAjf2tBIfgqsDfRNPly9E9om' |
12:29:48.190 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.190 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
12:29:48.190 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.191 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
12:29:48.191 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000 |
12:29:48.192 | trace | yii\base\Controller::runAction | Route to run: v2/pre-sales/list |
12:29:48.193 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.194 | trace | uranus\rbac\DbManager::checkAccessFromCache | Checking role: Admin |
12:29:48.194 | trace | yii\base\InlineAction::runWithParams | Running action: app\modules\v2\controllers\PreSalesController::actionList() |
12:29:48.194 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_cases" WHERE "id"='8693' |
12:29:48.194 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.194 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
12:29:48.195 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.195 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
12:29:48.195 | info | yii\db\Command::query | SELECT COUNT(*) FROM (SELECT
p.*,
p.end_at - p.start_at AS hours_spent
FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=8693 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC) "c" |
12:29:48.197 | info | yii\db\Command::query | SELECT
p.*,
p.end_at - p.start_at AS hours_spent
FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=8693 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC LIMIT 10 |
12:29:48.198 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=1301 |
12:29:48.199 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=5295 |
12:29:48.199 | info | yii\db\Command::query | SELECT "id", "case_status", "client_id", "project_id" FROM "a57be577deb434"."tbl_cases" WHERE "id"=8693 |
12:29:48.199 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=1301 |
12:29:48.200 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3895 |
12:29:48.200 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=1301 |
12:29:48.201 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=5295 |
12:29:48.201 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id"=5248 |
12:29:48.202 | info | yii\db\Command::query | SELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5248) |
12:29:48.202 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5248 |
12:29:48.203 | info | yii\db\Command::query | SELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5248) |
12:29:48.203 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=2 |
12:29:48.204 | info | yii\db\Command::query | SELECT id, id as key, geolocation[0] AS lng, geolocation[1] AS lat, address, updated_at as time FROM "a57be577deb434"."tbl_location" WHERE "id"=20036 |
12:29:48.204 | info | yii\db\Command::query | SELECT id, id as key, geolocation[0] AS lng, geolocation[1] AS lat, address, updated_at as time FROM "a57be577deb434"."tbl_location" WHERE "id"=20043 |
12:29:48.204 | info | yii\db\Command::query | SELECT *, "product_type_id" AS "key", "description" AS "value" FROM "a57be577deb434"."tbl_pre_sales_product_types" WHERE "pre_sales_id"=1889 |
12:29:48.205 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_contact_attend_pre_sales" WHERE "pre_sales_id"=1889 |
12:29:48.205 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=5969 |
12:29:48.206 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=4) AND ("object_id"=1889) |
12:29:48.208 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=28080 |
12:29:48.208 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=23) AND ("object_id"=1889) |
12:29:48.210 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=230 |
12:29:48.211 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=33 |
12:29:48.211 | info | yii\db\Command::query | SELECT "id", "id" AS "key", "title" AS "name" FROM "a57be577deb434"."tbl_service_type" WHERE "id"=2 |
12:29:48.212 | info | yii\db\Command::query | SELECT "object_id", count(*) as comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=4) AND ("object_id"=1889) GROUP BY "object_id" |
12:29:48.232 | info | yii\db\Command::query | SELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=4) AND (remind_user_id = 1000 AND is_read = false) AND ("object_id"=1889) GROUP BY "object_id" |
12:29:48.249 | info | yii\db\Command::query | SELECT "pre_sales_id", sum(amount) as count FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (1, 2, 3)) AND ("pre_sales_id"=1889) GROUP BY "pre_sales_id" |
12:29:48.251 | info | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_reimbursements" WHERE "pre_sales_id"=1889 |
12:29:48.252 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.253 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.254 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: GET |
12:29:48.254 | trace | yii\redis\Connection::executeCommand | Executing Redis Command: MGET |
12:29:48.254 | info | yii\db\Command::query | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 0, 266, 'v2/pre-sales/list', '{"access_token":"gIBfXHaGAAjf2tBIfgqsDfRNPly9E9om","device_type":"0","version_code":"266","id":"8693","page":"1","token":"e2dbe342d3b41efbee65a1898151e25f","posttime":"1757478588"}', '{"code":200,"data":{"list":[{"id":1889,"client_id":1301,"start_at":"2025-08-13 10:19:00","description":"\u7528\u6237\u73b0\u7f51\u5355\u51fa\u53e3\uff0c\u6682\u65f6\u7528\u4e0d\u5230\u8d1f\u8f7d\u5747\u8861\u8bbe\u5907\uff0c\u5df2\u4e0e\u7528\u6237\u8fdb\u884c\u6c9f\u901a\uff0c\u5bf9\u6bd4300M\u548c500M\u8bbe\u5907\u4f18\u52a3\u52bf\uff0c\u5df2\u544a\u77e5\u9500\u552e\u7528\u6237\u610f\u89c1","client_concerns":null,"pre_sales_assessment":"","engineer_id":5248,"created_by":5248,"created_at":"2025-08-13 10:19:43","updated_at":"2025-09-10 12:28:01","following_work_content":"","project_status":null,"end_at":"2025-08-13 16:08:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":8693,"service_id":230,"location_in_id":20036,"location_out_id":20043,"ticket_no":"PS250811003001","client_document_id":null,"client_document_file":null,"indistance":"75.085327787437","outdistance":"627.7259367971","hours_spent":"05:49:00","client":{"id":1301,"key":1301,"name":"\u591a\u7ef4\u8054\u5408\u96c6\u56e2\u80a1\u4efd\u6709\u9650\u516c\u53f8(\u591a\u7ef4\u7eff\u5efa\u79d1\u6280(\u5929\u6d25)\u6709\u9650\u516c\u53f8\u3001\u5317\u4eac\u591a\u7ef4\u827e\u65af\u7279\u56fd\u9645\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8)","logo":null,"sales_rep":5295,"salesRep":{"id":5295,"key":5295,"name":"\u9b4f\u6cfd\u6587"}},"case":{"id":8693,"case_status":5,"client_id":1301,"project_id":3895,"client":{"id":1301,"key":1301,"name":"\u591a\u7ef4\u8054\u5408\u96c6\u56e2\u80a1\u4efd\u6709\u9650\u516c\u53f8(\u591a\u7ef4\u7eff\u5efa\u79d1\u6280(\u5929\u6d25)\u6709\u9650\u516c\u53f8\u3001\u5317\u4eac\u591a\u7ef4\u827e\u65af\u7279\u56fd\u9645\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8)"},"project":{"id":3895,"key":3895,"name":"\u65b0\u5efa\u5bb9\u707e\u96c6\u7fa4"}},"salesRep":{"id":5295,"key":5295,"name":"\u9b4f\u6cfd\u6587"},"engineer":{"id":5248,"key":5248,"name":"\u6587\u4f73\u9f99","sex":"M","avatar":{"id":135,"user_id":5248,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b4458545-7f88-3479-97be-6f43b2b50454.png"}},"createdBy":{"id":5248,"key":5248,"name":"\u6587\u4f73\u9f99","sex":"M","department_id":2,"avatar":{"id":135,"user_id":5248,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b4458545-7f88-3479-97be-6f43b2b50454.png"},"department":{"id":2,"key":2,"name":"\u6280\u672f\u90e8"}},"location":null,"locationIn":{"id":20036,"key":20036,"lng":"116.292269","lat":"39.827021","address":"\u5317\u4eac\u5e02\u4e30\u53f0\u533a\u5185\u73af\u897f\u8def152\u53f7\u9760\u8fd1\u5317\u4eac\u4e30\u53f0\u603b\u90e8\u57fa\u573016\u533a","time":"2025-08-13 10:19:42"},"locationOut":{"id":20043,"key":20043,"lng":"116.297157","lat":"39.831203","address":"\u5317\u4eac\u5e02\u4e30\u53f0\u533a\u79d1\u6021\u8def1-60\u53f7\u9760\u8fd1\u79d1\u6021\u8def(\u5730\u94c1\u7ad9)","time":"2025-08-13 16:08:19"},"preSalesProductTypes":[],"attendedContacts":[{"id":5969,"key":5969,"name":"\u8c46\u6d77\u9e4f"}],"attachmentRelationships":[{"id":49460,"object_type":4,"object_id":1889,"attachment_id":28080,"attachment":{"id":28080,"key":28080,"name":"09f74ad2-959b-37a2-b3b9-30e05bca27ba","extension":"jpg","path":"\/v2\/attachment\/view\/gIBfXHaGAAjf2tBIfgqsDfRNPly9E9om\/09f74ad2-959b-37a2-b3b9-30e05bca27ba\/img_20250910_122753.jpg","orig_name":"img_20250910_122753.jpg"}}],"files":[],"service":{"id":230,"serial_no":"TOAST01","title":"\u54a8\u8be2\u670d\u52a1","brand_id":33,"type_id":2,"points":50,"points_off_time":50,"points_holiday":100,"description":"\u54a8\u8be2\u670d\u52a1","created_by":1001,"created_at":"2018-09-07 20:03:43","updated_at":"2022-01-04 14:34:32","is_delete":false,"sort":14,"brand":{"id":33,"key":33,"name":"Toast"},"type":{"id":2,"key":2,"name":"\u54a8\u8be2\u670d\u52a1"}},"clientDocument":null,"commentCount":{"object_id":1889,"comment":1},"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"5.82\u5c0f\u65f6","can_update":true,"can_delete":true,"can_complete":false,"can_create_reimbursement":false,"unread":0,"bgcolor":"#89c541","can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":1,"thispage":1,"pagesize":10},"can_create":false},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-09-10 12:29:48') RETURNING "id" |