Performance Profiling

Total processing time: 62 ms; Peak memory: 4.060 MB. Show Profiling Timeline

总计15条数据
TimeDurationCategoryInfo
  
14:10:05.26326.1 msyii\db\Command::querySELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC LIMIT 20
14:10:05.2944.0 msyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_visit_module_histories" WHERE ("user_id"=5250) AND ("object_type"=23) AND ("visit_date"='2025-07-05')
14:10:05.2513.3 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC) "c"
14:10:05.2452.3 msyii\db\Command::querySELECT * FROM "global"."vw_user_login" WHERE "id"=5250
14:10:05.3002.0 msyii\db\Command::queryINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 5250, 5, 'vue/analysis/project-list', '{"dataUserId":"1001,1004,1005,1013,5087,5295,5300,5311,5329,5332,5420","page":"1","status":"status1","web_access_token":"lF6lDSiCl5CRIFfE8shlx2wSeme229Hs"}', '{"code":2000,"result":{"list":[{"service_time":"0.02","service_count":1,"pscount":1,"ircount":0,"pstime":"0.0166666666666667","irtime":"0","points":0,"work_time":0.03,"work_count":1,"reimbursement_amount":"0","id":3815,"client_id":3337,"project_status":1,"project_progress":5,"budget":"0","profit_pct":"0","bargain_date":"2025-12-04","description":null,"created_by":5332,"created_at":"2025-07-04 11:01:46","updated_at":"2025-07-04 14:37:30","engineer_id":null,"project_title":"\u4ed8\u6b3e\u53d1\u8d27","collected":"0","status_updated_at":"2025-07-04 11:01:46.580051+08","success_rate":null,"comment":"\u5c06\u9519\u5c31\u9519\u5bb6","contract_type":1,"progress_updated_at":"2025-07-04 11:01:46.580051+08","forecast_updated_at":"2025-07-04 11:01:46.580051+08","end_at":"","pinyin_shortcut":"fkfh","creator":1000,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":3337,"key":3337,"name":"\u6d77\u57fa\u4f1a\u57fa\u91d1\u4f1a","logo":null,"client_type":1,"client_class":80,"client_industry":1},"createdBy":{"id":5332,"key":5332,"name":"\u970d\u536b\u8d85","sex":"M","department_id":1,"avatar":{"id":148,"user_id":5332,"name":"\/files\/cdn\/a57be577deb434\/avatar\/3a3eda91-ddc9-3633-8071-70a4c3d7180c.png"}}},{"service_time":"0.12","service_count":3,"pscount":1,"ircount":2,"pstime":"0.1","irtime":"0.0166666666666667","points":"400","work_time":0.02,"work_count":2,"reimbursement_amount":"432","id":3805,"client_id":2815,"project_status":1,"project_progress":2,"budget":"9988","profit_pct":"4","bargain_date":"2025-10-02","description":"","created_by":1004,"created_at":"2025-05-12 10:20:17","updated_at":"2025-07-04 14:18:10","engineer_id":null,"project_title":"\u54c8\u597d\u54c8\u7535\u8bdd","collected":"0","status_updated_at":"2025-06-24 22:18:16.559198+08","success_rate":null,"comment":"","contract_type":2,"progress_updated_at":"2025-06-24 22:18:16.559198+08","forecast_updated_at":"2025-06-24 22:16:38.743424+08","end_at":"","pinyin_shortcut":"hhhdh","creator":1004,"used_client":3335,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"399.5200000000000000","un_collected":"9988","client":{"id":2815,"key":2815,"name":"\u4e2d\u56fd\u9ec4\u91d1","logo":null,"client_type":6,"client_class":47,"client_industry":10},"createdBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1,"avatar":{"id":10,"user_id":1004,"name":"\/files\/cdn\/a57be577deb434\/avatar\/fc8d836d-8085-35fc-8a48-54a276f664a6.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"123","id":3814,"client_id":2815,"project_status":1,"project_progress":9,"budget":"0","profit_pct":"0","bargain_date":"2025-09-30","description":null,"created_by":1004,"created_at":"2025-06-30 16:54:56","updated_at":"2025-07-03 14:16:47","engineer_id":null,"project_title":"\u51e0\u8282\u8bfe","collected":"0","status_updated_at":"2025-06-30 16:54:56.582576+08","success_rate":null,"comment":"\u4f60\u90fd\u4e0d\u5403\u5427","contract_type":1,"progress_updated_at":"2025-06-30 16:54:56.582576+08","forecast_updated_at":"2025-06-30 16:54:56.582576+08","end_at":"","pinyin_shortcut":"jjk","creator":1001,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":2815,"key":2815,"name":"\u4e2d\u56fd\u9ec4\u91d1","logo":null,"client_type":6,"client_class":47,"client_industry":10},"createdBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1,"avatar":{"id":10,"user_id":1004,"name":"\/files\/cdn\/a57be577deb434\/avatar\/fc8d836d-8085-35fc-8a48-54a276f664a6.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3813,"client_id":2330,"project_status":1,"project_progress":5,"budget":"0","profit_pct":"0","bargain_date":"2025-06-28","description":null,"created_by":5332,"created_at":"2025-06-28 17:39:44","updated_at":"2025-06-28 17:39:44","engineer_id":null,"project_title":"\u63a5\u7535\u8bdd\u7684\u5427","collected":"0","status_updated_at":"2025-06-28 17:39:44.094478+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2025-06-28 17:39:44.094478+08","forecast_updated_at":"2025-06-28 17:39:44.094478+08","end_at":"","pinyin_shortcut":"jdhdb","creator":1000,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":2330,"key":2330,"name":"\u8fbd\u5b81\u5e86\u9633\u7279\u79cd\u5316\u5de5\u6709\u9650\u516c\u53f8","logo":null,"client_type":6,"client_class":null,"client_industry":5},"createdBy":{"id":5332,"key":5332,"name":"\u970d\u536b\u8d85","sex":"M","department_id":1,"avatar":{"id":148,"user_id":5332,"name":"\/files\/cdn\/a57be577deb434\/avatar\/3a3eda91-ddc9-3633-8071-70a4c3d7180c.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3812,"client_id":1121,"project_status":1,"project_progress":5,"budget":"0","profit_pct":"0","bargain_date":"2025-06-27","description":"","created_by":5295,"created_at":"2025-06-27 12:22:33","updated_at":"2025-06-27 12:39:43","engineer_id":null,"project_title":"\u6d4b\u8bd5","collected":"0","status_updated_at":"2025-06-27 12:22:33.234169+08","success_rate":null,"comment":"\u6d4b\u8bd5\u6d4b\u8bd5\u6d4b\u8bd5","contract_type":1,"progress_updated_at":"2025-06-27 12:22:33.234169+08","forecast_updated_at":"2025-06-27 12:22:33.234169+08","end_at":"","pinyin_shortcut":"cs","creator":1000,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":1121,"key":1121,"name":"\u5317\u4eac\u4e1c\u65b9\u8ba1\u91cf\u6d4b\u8bd5\u7814\u7a76\u6240","logo":null,"client_type":1,"client_class":80,"client_industry":1},"createdBy":{"id":5295,"key":5295,"name":"\u9b4f\u6cfd\u6587","sex":"F","department_id":1,"avatar":{"id":137,"user_id":5295,"name":"\/files\/cdn\/a57be577deb434\/avatar\/85c67d90-6989-3d4e-bbf8-31d69b6e8ffe.jpg"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3803,"client_id":3323,"project_status":1,"project_progress":9,"budget":"0","profit_pct":"0","bargain_date":"2025-05-07","description":null,"created_by":5420,"created_at":"2025-05-07 15:06:42","updated_at":"2025-06-27 15:58:27","engineer_id":null,"project_title":"\u5495\u549a\u5495\u549a","collected":"0","status_updated_at":"2025-05-07 15:06:42.207336+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2025-05-07 15:06:42.207336+08","forecast_updated_at":"2025-05-07 15:06:42.207336+08","end_at":"","pinyin_shortcut":"gdgd","creator":1001,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":3323,"key":3323,"name":"\u5317\u4eac\u6c7d\u8f66\u7814\u7a76\u603b\u9662\u6709\u9650\u516c\u53f8","logo":null,"client_type":6,"client_class":80,"client_industry":5},"createdBy":{"id":5420,"key":5420,"name":"\u674e\u6ea6","sex":"M","department_id":1,"avatar":{"id":161,"user_id":5420,"name":"\/files\/cdn\/a57be577deb434\/avatar\/030adffb-15cf-3504-a6fe-49ad56425387.png"}}},{"service_time":"1.06","service_count":1,"pscount":0,"ircount":1,"pstime":"0","irtime":"1.06444444444444","points":"31","work_time":0,"work_count":0,"reimbursement_amount":"157.24","id":3287,"client_id":149,"project_status":1,"project_progress":2,"budget":"3000000","profit_pct":"10","bargain_date":"2024-12-31","description":null,"created_by":1005,"created_at":"2023-08-13 16:30:53","updated_at":"2024-11-11 13:52:18","engineer_id":null,"project_title":"\u6cd5\u8bc1\u65b0\u5de5\u5382","collected":"0","status_updated_at":"2023-08-13 16:30:53.331424+08","success_rate":null,"comment":"","contract_type":2,"progress_updated_at":"2023-08-13 16:30:53.331424+08","forecast_updated_at":"2023-08-13 16:30:53.331424+08","end_at":"","pinyin_shortcut":"fzxgc","creator":1005,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"300000.000000000000","un_collected":"3000000","client":{"id":149,"key":149,"name":"\u516c\u5b89\u90e8\u7b2c\u4e00\u7814\u7a76\u6240(\u6cd5\u8bc1\u90e8)\uff08\u71d5\u4eac\uff09","logo":null,"client_type":1,"client_class":80,"client_industry":1},"createdBy":{"id":1005,"key":1005,"name":"\u8d75\u6657\u7131","sex":"F","department_id":1,"avatar":{"id":16,"user_id":1005,"name":"\/files\/cdn\/a57be577deb434\/avatar\/56876dde-37eb-39fc-853a-47eaef6510e5.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3471,"client_id":129,"project_status":1,"project_progress":2,"budget":"100000","profit_pct":"10","bargain_date":"2024-10-31","description":null,"created_by":5329,"created_at":"2024-03-11 09:26:53","updated_at":"2024-07-08 15:12:17","engineer_id":null,"project_title":"\u6570\u636e\u5e93\u6269\u5c55\u5b58\u50a8","collected":"0","status_updated_at":"2024-03-11 09:26:53.468566+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2024-03-11 09:26:53.468566+08","forecast_updated_at":"2024-03-11 09:26:53.468566+08","end_at":"","pinyin_shortcut":"sjkkzcc","creator":5359,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"10000.0000000000000000","un_collected":"100000","client":{"id":129,"key":129,"name":"\u56fd\u91d1\u57fa\u91d1\u7ba1\u7406\u6709\u9650\u516c\u53f8(S)","logo":null,"client_type":6,"client_class":47,"client_industry":10},"createdBy":{"id":5329,"key":5329,"name":"\u9ad8\u5ce5","sex":"M","department_id":1,"avatar":{"id":147,"user_id":5329,"name":"\/files\/cdn\/a57be577deb434\/avatar\/0d79e7ec-ac2a-3ab6-8cf3-b8c7ee1d0b71.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":1.53,"work_count":2,"reimbursement_amount":"110.00","id":3420,"client_id":579,"project_status":1,"project_progress":3,"budget":"500000","profit_pct":"10","bargain_date":"2024-08-31","description":null,"created_by":5329,"created_at":"2024-01-08 18:19:42","updated_at":"2024-07-26 12:06:15","engineer_id":null,"project_title":"\u7b49\u4fdd\u5b89\u5168\u5efa\u8bbe-K","collected":"0","status_updated_at":"2024-05-13 10:34:32.217807+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2024-03-25 10:10:35.633748+08","forecast_updated_at":"2024-05-13 10:34:32.217807+08","end_at":"","pinyin_shortcut":"dbaqjsK","creator":5329,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":true,"collected_plan":null,"profits":"50000.000000000000","un_collected":"500000","client":{"id":579,"key":579,"name":"\u90ae\u653f\u79d1\u5b66\u7814\u7a76\u89c4\u5212\u9662","logo":null,"client_type":6,"client_class":43,"client_industry":20},"createdBy":{"id":5329,"key":5329,"name":"\u9ad8\u5ce5","sex":"M","department_id":1,"avatar":{"id":147,"user_id":5329,"name":"\/files\/cdn\/a57be577deb434\/avatar\/0d79e7ec-ac2a-3ab6-8cf3-b8c7ee1d0b71.png"}}},{"service_time":"2.28","service_count":1,"pscount":0,"ircount":1,"pstime":"0","irtime":"2.28333333333333","points":"31","work_time":1.6,"work_count":1,"reimbursement_amount":"130","id":3463,"client_id":2202,"project_status":1,"project_progress":5,"budget":"100000","profit_pct":"10","bargain_date":"2024-07-31","description":null,"created_by":5300,"created_at":"2024-03-05 14:13:06","updated_at":"2024-04-29 09:53:05","engineer_id":null,"project_title":"\u52d2\u7d22\u75c5\u6bd2\u9632\u62a4\u65b9\u6848-\u9752\u85e4npatch+\u4e07\u76f8\uff08\u6d4b\u8bd5\uff09","collected":"0","status_updated_at":"2024-03-05 14:13:06.178873+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2024-03-05 14:13:06.178873+08","forecast_updated_at":"2024-03-05 14:13:06.178873+08","end_at":"","pinyin_shortcut":"lsbdfhfaqtnpatchwxcs","creator":5300,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"10000.0000000000000000","un_collected":"100000","client":{"id":2202,"key":2202,"name":"\u5317\u4eac\u5e02\u671d\u9633\u533a\u4e50\u6210\u5b66\u6821\uff08\u5317\u4eac\u5e02\u671d\u9633\u533a\u4e50\u6210\u5e7c\u513f\u56ed\uff09","logo":null,"client_type":5,"client_class":43,"client_industry":24},"createdBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1,"avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3480,"client_id":248,"project_status":1,"project_progress":2,"budget":"400000","profit_pct":"10","bargain_date":"2024-07-31","description":null,"created_by":5329,"created_at":"2024-03-24 16:00:12","updated_at":"2024-07-01 14:31:14","engineer_id":null,"project_title":"\u9632\u52d2\u7d22\u5b89\u5168\u5efa\u8bbe-k","collected":"0","status_updated_at":"2024-03-24 16:01:13.182892+08","success_rate":null,"comment":"\u4ee5\u3001\u670d\u52a1\u65b9\u5f0f\u91c7\u8d2d","contract_type":1,"progress_updated_at":"2024-03-24 16:01:13.182892+08","forecast_updated_at":"2024-03-24 16:00:12.438155+08","end_at":"","pinyin_shortcut":"flsaqjsk","creator":5329,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":true,"collected_plan":null,"profits":"40000.000000000000","un_collected":"400000","client":{"id":248,"key":248,"name":"\u4e2d\u56fd\u90ae\u653f\u4f9b\u5e94\u94fe","logo":null,"client_type":6,"client_class":43,"client_industry":1},"createdBy":{"id":5329,"key":5329,"name":"\u9ad8\u5ce5","sex":"M","department_id":1,"avatar":{"id":147,"user_id":5329,"name":"\/files\/cdn\/a57be577deb434\/avatar\/0d79e7ec-ac2a-3ab6-8cf3-b8c7ee1d0b71.png"}}},{"service_time":"6.52","service_count":3,"pscount":3,"ircount":0,"pstime":"6.51666666666667","irtime":"0","points":"200","work_time":0,"work_count":0,"reimbursement_amount":"2323.00","id":3329,"client_id":2492,"project_status":1,"project_progress":2,"budget":"600000","profit_pct":"30","bargain_date":"2024-05-31","description":null,"created_by":5087,"created_at":"2023-10-15 19:57:32","updated_at":"2024-04-02 17:48:30","engineer_id":null,"project_title":"\u9662\u5185\u865a\u62df\u5316\u5efa\u8bbe-K","collected":"0","status_updated_at":"2023-12-03 21:46:59.123311+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2023-10-15 19:57:32.636686+08","forecast_updated_at":"2023-12-03 21:46:59.123311+08","end_at":"","pinyin_shortcut":"ynxnhjsK","creator":5087,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"180000.000000000000","un_collected":"600000","client":{"id":2492,"key":2492,"name":"\u822a\u5929\u79d1\u5de5\u96c6\u56e2\u667a\u80fd\u79d1\u6280\u7814\u7a76\u9662\u6709\u9650\u516c\u53f8","logo":null,"client_type":6,"client_class":47,"client_industry":5},"createdBy":{"id":5087,"key":5087,"name":"\u5218\u5fae","sex":"F","department_id":1,"avatar":{"id":62,"user_id":5087,"name":"\/files\/cdn\/a57be577deb434\/avatar\/06f75b3a-7b6c-37a8-81c0-b2934104daa7.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":14.03,"work_count":11,"reimbursement_amount":"890.5","id":3203,"client_id":520,"project_status":1,"project_progress":3,"budget":"200000","profit_pct":"10","bargain_date":"2024-03-31","description":"SDP+\u5b89\u5168\u5de5\u4f5c\u7a7a\u95f4\n\u529e\u516c\u7ec8\u7aef\u6570\u91cf130-150","created_by":5300,"created_at":"2023-05-19 15:59:41","updated_at":"2024-09-06 20:38:59","engineer_id":null,"project_title":"\u5b89\u5168\u5de5\u4f5c\u7a7a\u95f4-2023-K","collected":"0","status_updated_at":"2024-03-18 10:50:02.128522+08","success_rate":null,"comment":"SDP+\u5b89\u5168\u5de5\u4f5c\u7a7a\u95f4\n\u529e\u516c\u7ec8\u7aef\u6570\u91cf130-150\r\n","contract_type":1,"progress_updated_at":"2023-05-19 15:59:41.173448+08","forecast_updated_at":"2024-03-18 10:50:02.128522+08","end_at":"","pinyin_shortcut":"aqgzkj2023K","creator":5300,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"20000.000000000000","un_collected":"200000","client":{"id":520,"key":520,"name":"\u5317\u4eac\u4f18\u80fd\u535a\u534e\u6295\u8d44\u7ba1\u7406\u6709\u9650\u516c\u53f8","logo":null,"client_type":5,"client_class":43,"client_industry":10},"createdBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1,"avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3136,"client_id":2130,"project_status":1,"project_progress":5,"budget":"150000","profit_pct":"50","bargain_date":"2023-12-31","description":"31 NAS \u5b58\u50a8\u7eed\u4fdd 8\u4e07 \/SAN\u5b58\u50a8\u7eed\u4fdd 7\u4e07","created_by":5087,"created_at":"2023-03-06 14:33:33","updated_at":"2023-09-18 16:36:05","engineer_id":null,"project_title":"2023\u5e74\u5b58\u50a8\u7eed\u4fdd-K","collected":"0","status_updated_at":"2023-05-08 20:36:07.746351+08","success_rate":null,"comment":"31 NAS \u5b58\u50a8\u7eed\u4fdd 8\u4e07 \/SAN\u5b58\u50a8\u7eed\u4fdd 7\u4e07\r\n","contract_type":1,"progress_updated_at":"2023-03-06 14:38:12.823874+08","forecast_updated_at":"2023-05-08 20:36:07.746351+08","end_at":"","pinyin_shortcut":"2023nccxbK","creator":5087,"used_client":85,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"75000.000000000000","un_collected":"150000","client":{"id":2130,"key":2130,"name":"\u5317\u4eac\u4eac\u822a\u8ba1\u7b97\u901a\u8baf\u7814\u7a76\u6240304","logo":null,"client_type":6,"client_class":47,"client_industry":5},"createdBy":{"id":5087,"key":5087,"name":"\u5218\u5fae","sex":"F","department_id":1,"avatar":{"id":62,"user_id":5087,"name":"\/files\/cdn\/a57be577deb434\/avatar\/06f75b3a-7b6c-37a8-81c0-b2934104daa7.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3126,"client_id":2130,"project_status":1,"project_progress":3,"budget":"0","profit_pct":"0","bargain_date":"2023-12-31","description":"304\u6240\u5e2e\u9662\u91cc\u8c03\u7814\u8fd0\u7ef4\u7cfb\u7edf\uff0c\u76ee\u7684\u662f\u89e3\u51b3\u9662\u91cc\u8fd0\u7ef4\u7cfb\u7edf\u4e0d\u80fd\u7edf\u7ba1\u56fd\u4ea7\u81ea\u4e3b\u53ef\u63a7\u8bbe\u5907\uff0c\u4e1c\u897f\u8d8a\u6765\u8d8a\u591a\u4e0d\u65b9\u4fbf\uff0c\u540c\u65f6\u9662\u91cc\u4e5f\u6709\u96c6\u4e2d\u7ba1\u63a7\u7684\u60f3\u6cd5\uff0c\u5728\u8c03\u7814\u3002","created_by":5087,"created_at":"2023-02-27 02:46:33","updated_at":"2023-10-23 00:35:47","engineer_id":null,"project_title":"\u8fd0\u7ef4\u7ba1\u7406\u7cfb\u7edf","collected":"0","status_updated_at":"2023-02-27 02:46:33.832345+08","success_rate":null,"comment":"304\u6240\u5e2e\u9662\u91cc\u8c03\u7814\u8fd0\u7ef4\u7cfb\u7edf\uff0c\u76ee\u7684\u662f\u89e3\u51b3\u9662\u91cc\u8fd0\u7ef4\u7cfb\u7edf\u4e0d\u80fd\u7edf\u7ba1\u56fd\u4ea7\u81ea\u4e3b\u53ef\u63a7\u8bbe\u5907\uff0c\u4e1c\u897f\u8d8a\u6765\u8d8a\u591a\u4e0d\u65b9\u4fbf\uff0c\u540c\u65f6\u9662\u91cc\u4e5f\u6709\u96c6\u4e2d\u7ba1\u63a7\u7684\u60f3\u6cd5\uff0c\u5728\u8c03\u7814\u3002\r\n","contract_type":1,"progress_updated_at":"2023-02-27 02:46:33.832345+08","forecast_updated_at":"2023-05-15 11:40:41.852321+08","end_at":"","pinyin_shortcut":"ywglxt","creator":5087,"used_client":2130,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":2130,"key":2130,"name":"\u5317\u4eac\u4eac\u822a\u8ba1\u7b97\u901a\u8baf\u7814\u7a76\u6240304","logo":null,"client_type":6,"client_class":47,"client_industry":5},"createdBy":{"id":5087,"key":5087,"name":"\u5218\u5fae","sex":"F","department_id":1,"avatar":{"id":62,"user_id":5087,"name":"\/files\/cdn\/a57be577deb434\/avatar\/06f75b3a-7b6c-37a8-81c0-b2934104daa7.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3137,"client_id":2130,"project_status":1,"project_progress":3,"budget":"2000000","profit_pct":"15","bargain_date":"2023-12-31","description":"33\u6240\u60ef\u6027\u516c\u53f8\uff0c\u4e0e\u9662\u7f51\u8fde\u63a5\uff0c\u8d2d\u4e70\u52a0\u5bc6\u673a\u548c\u9632\u706b\u5899\u7b49\u7f51\u7edc\u8bbe\u5907\u3002","created_by":5087,"created_at":"2023-03-06 16:32:45","updated_at":"2023-09-18 16:36:05","engineer_id":null,"project_title":"\u60ef\u6027\u516c\u53f8\u8054\u7f51\u8bbe\u5907","collected":"0","status_updated_at":"2023-03-27 20:49:05.468689+08","success_rate":null,"comment":"33\u6240\u60ef\u6027\u516c\u53f8\uff0c\u4e0e\u9662\u7f51\u8fde\u63a5\uff0c\u8d2d\u4e70\u52a0\u5bc6\u673a\u548c\u9632\u706b\u5899\u7b49\u7f51\u7edc\u8bbe\u5907\u3002\r\n","contract_type":1,"progress_updated_at":"2023-03-12 21:57:55.785099+08","forecast_updated_at":"2023-05-15 11:40:18.906738+08","end_at":"","pinyin_shortcut":"gxgslwsb","creator":5087,"used_client":2128,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"300000.000000000000","un_collected":"2000000","client":{"id":2130,"key":2130,"name":"\u5317\u4eac\u4eac\u822a\u8ba1\u7b97\u901a\u8baf\u7814\u7a76\u6240304","logo":null,"client_type":6,"client_class":47,"client_industry":5},"createdBy":{"id":5087,"key":5087,"name":"\u5218\u5fae","sex":"F","department_id":1,"avatar":{"id":62,"user_id":5087,"name":"\/files\/cdn\/a57be577deb434\/avatar\/06f75b3a-7b6c-37a8-81c0-b2934104daa7.png"}}},{"service_time":"2.43","service_count":2,"pscount":0,"ircount":2,"pstime":"0","irtime":"2.43333333333333","points":"94","work_time":0,"work_count":0,"reimbursement_amount":"70.22","id":3289,"client_id":1276,"project_status":1,"project_progress":2,"budget":"220000","profit_pct":"20","bargain_date":"2023-12-31","description":null,"created_by":1005,"created_at":"2023-08-13 16:35:43","updated_at":"2024-02-07 12:08:00","engineer_id":null,"project_title":"DLP\u6570\u636e\u52a0\u5bc6","collected":"0","status_updated_at":"2023-08-13 16:35:43.780966+08","success_rate":null,"comment":"","contract_type":2,"progress_updated_at":"2023-08-13 16:35:43.780966+08","forecast_updated_at":"2023-08-13 16:35:43.780966+08","end_at":"","pinyin_shortcut":"DLPsjjm","creator":1005,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"44000.000000000000","un_collected":"220000","client":{"id":1276,"key":1276,"name":"\u5317\u4eac\u777f\u82af\u9ad8\u901a\u91cf\u79d1\u6280\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u4e2d\u79d1\u777f\u82af\u667a\u80fd\u8ba1\u7b97\u4ea7\u4e1a\u7814\u7a76\u9662\u6709\u9650\u516c\u53f8\/\u4e2d\u56fd\u79d1\u5b66\u9662\u8ba1\u7b97\u6280\u672f\u7814\u7a76\u6240)\/\u76d0\u57ce\u4e2d\u79d1\u9ad8\u901a\u91cf\u8ba1\u7b97\u7814\u7a76\u9662\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u777f\u82af\u4f17\u6838\u79d1\u6280\u6709\u9650\u516c\u53f8","logo":null,"client_type":5,"client_class":43,"client_industry":1},"createdBy":{"id":1005,"key":1005,"name":"\u8d75\u6657\u7131","sex":"F","department_id":1,"avatar":{"id":16,"user_id":1005,"name":"\/files\/cdn\/a57be577deb434\/avatar\/56876dde-37eb-39fc-853a-47eaef6510e5.png"}}},{"service_time":"1.25","service_count":1,"pscount":0,"ircount":1,"pstime":"0","irtime":"1.25","points":"31","work_time":0,"work_count":0,"reimbursement_amount":"0","id":3288,"client_id":89,"project_status":1,"project_progress":2,"budget":"300000","profit_pct":"10","bargain_date":"2023-10-31","description":null,"created_by":1005,"created_at":"2023-08-13 16:32:52","updated_at":"2023-12-06 14:49:25","engineer_id":null,"project_title":"\u670d\u52a1\u5668\u65b0\u8d2d","collected":"0","status_updated_at":"2023-08-13 16:32:52.158458+08","success_rate":null,"comment":"","contract_type":2,"progress_updated_at":"2023-08-13 16:32:52.158458+08","forecast_updated_at":"2023-08-13 16:32:52.158458+08","end_at":"","pinyin_shortcut":"fwqxg","creator":1005,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"30000.000000000000","un_collected":"300000","client":{"id":89,"key":89,"name":"\u5c71\u4e1c\u91d1\u8f6f\u79d1\u6280\u80a1\u4efd\u6709\u9650\u516c\u53f8(\u62db\u91d1\u77ff\u4e1a\u80a1\u4efd\u6709\u9650\u516c\u53f8)","logo":null,"client_type":6,"client_class":47,"client_industry":16},"createdBy":{"id":1005,"key":1005,"name":"\u8d75\u6657\u7131","sex":"F","department_id":1,"avatar":{"id":16,"user_id":1005,"name":"\/files\/cdn\/a57be577deb434\/avatar\/56876dde-37eb-39fc-853a-47eaef6510e5.png"}}},{"service_time":"4","service_count":1,"pscount":0,"ircount":1,"pstime":"0","irtime":"3.99888888888889","points":"31","work_time":0,"work_count":0,"reimbursement_amount":"36.47","id":3343,"client_id":1276,"project_status":1,"project_progress":7,"budget":"0","profit_pct":"0","bargain_date":"2023-10-23","description":null,"created_by":1005,"created_at":"2023-10-23 17:07:04","updated_at":"2025-02-11 13:51:58","engineer_id":null,"project_title":"\u601d\u79d1\u914d\u4ef6","collected":"0","status_updated_at":"2023-10-23 17:07:04.761436+08","success_rate":null,"comment":"","contract_type":1,"progress_updated_at":"2023-10-23 17:07:04.761436+08","forecast_updated_at":"2023-10-23 17:07:04.761436+08","end_at":"","pinyin_shortcut":"skpj","creator":1005,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":true,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":1276,"key":1276,"name":"\u5317\u4eac\u777f\u82af\u9ad8\u901a\u91cf\u79d1\u6280\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u4e2d\u79d1\u777f\u82af\u667a\u80fd\u8ba1\u7b97\u4ea7\u4e1a\u7814\u7a76\u9662\u6709\u9650\u516c\u53f8\/\u4e2d\u56fd\u79d1\u5b66\u9662\u8ba1\u7b97\u6280\u672f\u7814\u7a76\u6240)\/\u76d0\u57ce\u4e2d\u79d1\u9ad8\u901a\u91cf\u8ba1\u7b97\u7814\u7a76\u9662\u6709\u9650\u516c\u53f8\/\u5317\u4eac\u777f\u82af\u4f17\u6838\u79d1\u6280\u6709\u9650\u516c\u53f8","logo":null,"client_type":5,"client_class":43,"client_industry":1},"createdBy":{"id":1005,"key":1005,"name":"\u8d75\u6657\u7131","sex":"F","department_id":1,"avatar":{"id":16,"user_id":1005,"name":"\/files\/cdn\/a57be577deb434\/avatar\/56876dde-37eb-39fc-853a-47eaef6510e5.png"}}},{"service_time":"0","service_count":0,"pscount":0,"ircount":0,"pstime":"0","irtime":"0","points":0,"work_time":0,"work_count":0,"reimbursement_amount":"0","id":3095,"client_id":89,"project_status":1,"project_progress":2,"budget":"0","profit_pct":"0","bargain_date":"2023-08-31","description":"XDR\uff0c\u96f6\u4fe1\u4efb","created_by":1005,"created_at":"2023-01-31 11:09:42","updated_at":"2023-08-16 10:58:47","engineer_id":null,"project_title":"\u5b89\u5168\u52a0\u56fa-\u96f6\u4fe1\u4efb-G","collected":"0","status_updated_at":"2023-05-15 18:14:28.225227+08","success_rate":null,"comment":"XDR\uff0c\u96f6\u4fe1\u4efb\r\n\u5ba2\u6237\u8d2d\u4e70\u4e86\u9489\u9489\u672c\u5730\u5316\uff0c\u8bf4\u662f\u5e26\u8fd9\u4e2a\u529f\u80fd\u3002\u770b\u770b\u5b89\u88c5\u5b8c\u662f\u5426\u80fd\u8fbe\u5230\u8981\u6c42\uff0c\u5982\u679c\u8fbe\u4e0d\u5230\uff0c\u8fd8\u8981\u5355\u72ec\u4e70\u3002","contract_type":2,"progress_updated_at":"2023-05-15 18:14:28.225227+08","forecast_updated_at":"2023-05-15 18:14:28.225227+08","end_at":"","pinyin_shortcut":"aqjglxrG","creator":1005,"used_client":null,"from_contact":null,"total_contact_point":null,"paid_contact_point":null,"project_product_version_id":null,"is_sales_order_ready":false,"collected_plan":null,"profits":"0.00000000000000000000","un_collected":"0","client":{"id":89,"key":89,"name":"\u5c71\u4e1c\u91d1\u8f6f\u79d1\u6280\u80a1\u4efd\u6709\u9650\u516c\u53f8(\u62db\u91d1\u77ff\u4e1a\u80a1\u4efd\u6709\u9650\u516c\u53f8)","logo":null,"client_type":6,"client_class":47,"client_industry":16},"createdBy":{"id":1005,"key":1005,"name":"\u8d75\u6657\u7131","sex":"F","department_id":1,"avatar":{"id":16,"user_id":1005,"name":"\/files\/cdn\/a57be577deb434\/avatar\/56876dde-37eb-39fc-853a-47eaef6510e5.png"}}}],"count":24,"sumBudget":"8577488","sumProfit":1263774.52,"sumCollect":"0","pagenation":{"totalcount":24,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0}', FALSE, '2025-07-05 14:10:05') RETURNING "id"
14:10:05.2551.8 msyii\db\Command::querySELECT SUM(budget) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC) "c"
14:10:05.2431.8 msyii\db\Connection::openOpening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta
14:10:05.2571.7 msyii\db\Command::querySELECT SUM(budget / 100 * profit_pct) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC) "c"
14:10:05.2591.7 msyii\db\Command::querySELECT SUM(collected) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC) "c"
14:10:05.2621.6 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE ("p"."created_by" IN ('1001', '1004', '1005', '1013', '5087', '5295', '5300', '5311', '5329', '5332', '5420')) AND ("p"."project_status"='1')) "final" ORDER BY "bargain_date" DESC) "c"
14:10:05.2481.2 msyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250
14:10:05.2980.9 msyii\db\Command::executeUPDATE "a57be577deb434"."tbl_visit_module_histories" SET "num"=215, "last_visit_at"='now()' WHERE "id"=49799
14:10:05.2900.7 msyii\db\Command::querySELECT "id", "id" AS "key", "name", "logo", "client_type", "client_class", "client_industry" FROM "a57be577deb434"."tbl_clients" WHERE "id" IN (3337, 2815, 2330, 1121, 3323, 149, 129, 579, 2202, 248, 2492, 520, 2130, 1276, 89)
14:10:05.2910.7 msyii\db\Command::querySELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (5420, 5332, 5295, 5329, 1005, 5087, 1004, 5300))
14:10:05.2910.3 msyii\db\Command::querySELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (5332, 1004, 5295, 5420, 1005, 5329, 5300, 5087)