| 10:04:21.203 | 2.8 ms | SELECT | SELECT COUNT(*) FROM (SELECT r.*,
min(
CASE WHEN 1 = r.verify_type THEN (
CASE WHEN rvr.status = 0 THEN 1
WHEN rsvr.status = 0 THEN 2
ELSE 4 END
) ELSE (
CASE WHEN rvr.status = 0 AND r.next_verify_user = 1001 THEN 1
WHEN rsvr.status = 0 AND r.next_stop_verify_user = 1001 THEN 2
ELSE 4 END
)
END) AS need_verify_sort
FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id WHERE (("r"."created_by"=1001) OR ("rvr"."user_id"=1001) OR ("r"."created_by" IN (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1025, 1026, 1027, 1028, 1029, 1030, 5015, 5016, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5037, 5043, 5044, 5045, 5047, 5048, 5049, 5050, 5062, 5063, 5064, 5065, 5066, 5069, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5078, 5079, 5080, 5081, 5082, 5083, 5085, 5086, 5087, 5088, 5089, 5093, 5094, 5095, 5096, 5101, 5102, 5104, 5105, 5123, 5124, 5125, 5126, 5128, 5135, 5203, 5208, 5209, 5229, 5230, 5247, 5248, 5249, 5250, 5252, 5258, 5259, 5293, 5294, 5295, 5296, 5297, 5298, 5299, 5300, 5301, 5302, 5303, 5304, 5305, 5309, 5311, 5329, 5332, 5333, 5351, 5356, 5357, 5358, 5359, 5360, 5364, 5388, 5393, 5404, 5409, 5411, 5412, 5413, 5419, 5420, 5440, 5445, 5446, 5448, 5449))) AND (("r"."status" != 0) OR (("r"."status"=0) AND ("r"."created_by"=1001))) AND ("r"."id" IN (SELECT "erp_purchase_inbound_id" FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id" IN (SELECT "erp_inventory_product_id" FROM "a57be577deb434"."tbl_erp_sales_outbound_spent_products" WHERE "erp_sales_outbound_id" IN (SELECT "id" FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "erp_sales_order_id"='1620')))) GROUP BY "r"."id" ORDER BY need_verify_sort asc, created_at DESC) "c" |
| 10:04:21.206 | 1.9 ms | SELECT | SELECT r.*,
min(
CASE WHEN 1 = r.verify_type THEN (
CASE WHEN rvr.status = 0 THEN 1
WHEN rsvr.status = 0 THEN 2
ELSE 4 END
) ELSE (
CASE WHEN rvr.status = 0 AND r.next_verify_user = 1001 THEN 1
WHEN rsvr.status = 0 AND r.next_stop_verify_user = 1001 THEN 2
ELSE 4 END
)
END) AS need_verify_sort
FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id WHERE (("r"."created_by"=1001) OR ("rvr"."user_id"=1001) OR ("r"."created_by" IN (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1025, 1026, 1027, 1028, 1029, 1030, 5015, 5016, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5037, 5043, 5044, 5045, 5047, 5048, 5049, 5050, 5062, 5063, 5064, 5065, 5066, 5069, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5078, 5079, 5080, 5081, 5082, 5083, 5085, 5086, 5087, 5088, 5089, 5093, 5094, 5095, 5096, 5101, 5102, 5104, 5105, 5123, 5124, 5125, 5126, 5128, 5135, 5203, 5208, 5209, 5229, 5230, 5247, 5248, 5249, 5250, 5252, 5258, 5259, 5293, 5294, 5295, 5296, 5297, 5298, 5299, 5300, 5301, 5302, 5303, 5304, 5305, 5309, 5311, 5329, 5332, 5333, 5351, 5356, 5357, 5358, 5359, 5360, 5364, 5388, 5393, 5404, 5409, 5411, 5412, 5413, 5419, 5420, 5440, 5445, 5446, 5448, 5449))) AND (("r"."status" != 0) OR (("r"."status"=0) AND ("r"."created_by"=1001))) AND ("r"."id" IN (SELECT "erp_purchase_inbound_id" FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id" IN (SELECT "erp_inventory_product_id" FROM "a57be577deb434"."tbl_erp_sales_outbound_spent_products" WHERE "erp_sales_outbound_id" IN (SELECT "id" FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "erp_sales_order_id"='1620')))) GROUP BY "r"."id" ORDER BY need_verify_sort asc, created_at DESC LIMIT 20 |
| 10:04:21.277 | 2.1 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/erp-purchase-inbound/of-erp-sales-order', '{"erp_sales_order_id":"1620","page":"1","web_access_token":"0ZGi0JftuKohgRfEvCcy0r4OKxU49PtY"}', '{"code":2000,"result":{"list":[{"id":91,"serial_no":"CGRKD-20251124-00001","from_date":"","wrote_date":"2025-11-24","handler":5064,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":2,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-24 13:44:39","stop_at":"","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"51","amount":"4044","cancel_number":"","cancel_amount":"","created_by":5064,"stop_description":"","is_used":true,"is_settle":false,"created_at":"2025-11-24 13:44:39","updated_at":"2025-11-24 13:44:39","print_times":"","need_verify_sort":4,"createdBy":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","department_id":10,"avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"handlerPerson":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","department_id":10,"avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"purchaseContract":{"id":4247,"key":4247,"name":"\u8ba1\u5212\u4ed8\u6b3e\u91d1\u989d\u6821\u9a8c"},"erpPurchaseInboundCarbonCopyRels":[],"erpPurchaseInboundVerifyRels":[],"lastErpPurchaseInboundVerifyRel":{},"haveErpPurchaseInboundVerifyRel":{},"selfErpPurchaseInboundVerifyRel":{},"erpPurchaseInboundStopVerifyRels":[],"lastErpPurchaseInboundStopVerifyRel":{},"haveErpPurchaseInboundStopVerifyRel":{},"selfErpPurchaseInboundStopVerifyRel":{},"attachmentRelationships":[],"files":[],"erpStore":{"id":1,"key":1,"name":"\u62d3\u5b9e\u4ed3\u5e93"},"erpPurchaseInboundProducts":[{"id":179,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":189,"erp_store_id":1,"product_id":2166,"description":"","number":"1","outbound":"0","inventory":"1","amount":"44","total_amount":"44.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"","sales_gift_outbound":"","erpStore":{"id":1,"key":1,"name":"\u62d3\u5b9e\u4ed3\u5e93"},"product":{"id":2166,"name":"Q28-100G-A5H","product_type":4,"product_component":43,"product_brand":150,"product_serie":716,"product_misc":"","product_qa":"","pn":"","description":"Q28 100G AOC 5M","created_by":1013,"created_at":"2025-11-11 15:22:56","updated_at":"2025-11-28 11:30:51","pinyin_shortcut":"Q28100GA5H","product_unit":6,"is_renew":false,"in_out_at":"2025-11-28 11:30:51.713981+08","productType":{"id":4,"key":4,"name":"\u7f51\u7edc\u8bbe\u5907 "},"productComponent":{"id":43,"key":43,"name":"\u7f51\u7edc\u8bbe\u5907\u914d\u4ef6"},"productBrand":{"id":150,"key":150,"name":"\u7eb3\u591a\u5fb7"},"productSerie":{"id":716,"key":716,"name":"\u7ebf\u7f06"},"productUnit":{"id":6,"key":6,"name":"\u6761"}},"erpPurchaseInboundProductSns":[],"erpPurchaseOrderProduct":{"id":189,"erp_purchase_order_id":2098,"erp_store_id":"","product_id":2166,"description":"","number":"1","into_inventory":"1","amount":"44","total_amount":"44","last_number":"1","last_amount":"44","last_total_amount":"44.00","un_into_inventory":1,"erpPurchaseInboundProducts":[{"id":179,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":189,"erp_store_id":1,"product_id":2166,"description":"","number":"1","outbound":"0","inventory":"1","amount":"44","total_amount":"44.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"","sales_gift_outbound":"","erpPurchaseInbound":{"id":91,"serial_no":"CGRKD-20251124-00001","from_date":"","wrote_date":"2025-11-24","handler":5064,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":2,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-24 13:44:39","stop_at":"","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"51","amount":"4044","cancel_number":"","cancel_amount":"","created_by":5064,"stop_description":"","is_used":true,"is_settle":false,"created_at":"2025-11-24 13:44:39","updated_at":"2025-11-24 13:44:39","print_times":""}},{"id":180,"erp_purchase_inbound_id":92,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":189,"erp_store_id":1,"product_id":2166,"description":"","number":"1","outbound":"0","inventory":"1","amount":"44","total_amount":"44.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"","sales_gift_outbound":"","erpPurchaseInbound":{"id":92,"serial_no":"CGRKD-20251125-00001","from_date":"","wrote_date":"2025-11-25","handler":1001,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":6,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-25 14:46:58","stop_at":"2025-11-25 14:47:11.556954+08","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"1","amount":"44","cancel_number":"","cancel_amount":"","created_by":1001,"stop_description":"\u6d4b\u8bd5\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6838\u4e2d","is_used":false,"is_settle":false,"created_at":"2025-11-25 14:45:05","updated_at":"2025-11-25 14:47:11","print_times":""}},{"id":181,"erp_purchase_inbound_id":93,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":189,"erp_store_id":1,"product_id":2166,"description":"","number":"1","outbound":"0","inventory":"1","amount":"44","total_amount":"44.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"","sales_gift_outbound":"","erpPurchaseInbound":{"id":93,"serial_no":"CGRKD-20251125-00002","from_date":"","wrote_date":"2025-11-25","handler":1001,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":6,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-25 14:49:52","stop_at":"2025-11-25 14:50:03.695364+08","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"1","amount":"44","cancel_number":"","cancel_amount":"","created_by":1001,"stop_description":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6838\u4e2d","is_used":false,"is_settle":false,"created_at":"2025-11-25 14:49:14","updated_at":"2025-11-25 14:50:45","print_times":""}},{"id":182,"erp_purchase_inbound_id":94,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":189,"erp_store_id":1,"product_id":2166,"description":"","number":"2","outbound":"0","inventory":"0","amount":"44","total_amount":"88.00","cancel_number":"2","cancel_amount":"44","cancel_total_amount":"88","lost_outbound":"","build_spent_outbound":"","sales_outbound":"","sales_gift_outbound":"","erpPurchaseInbound":{"id":94,"serial_no":"CGRKD-20251125-00003","from_date":"","wrote_date":"2025-11-25","handler":1001,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":2,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-25 14:52:15","stop_at":"","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"2","amount":"88","cancel_number":"","cancel_amount":"","created_by":1001,"stop_description":"","is_used":true,"is_settle":false,"created_at":"2025-11-25 14:51:55","updated_at":"2025-11-25 14:52:15","print_times":""}}],"un_inbound_amount":-44},"erpInventoryProduct":{"id":231,"product_id":2166,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_inbound_product_id":179,"erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-11-24","number":"1","outbound":"0","inventory":"1","amount":"44","total_amount":"44.00","actual_amount":"44","actual_total_amount":"44","is_build":false,"created_at":"2025-11-24 13:44:39","lost_outbound":"","erp_inventory_start_id":"","erp_inventory_start_product_id":"","erp_inventory_build_id":"","erp_inventory_build_product_id":"","build_spent_outbound":"","sales_outbound":"","erp_purchase_gift_id":"","erp_purchase_gift_product_id":"","sales_gift_outbound":""}},{"id":178,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":192,"erp_store_id":1,"product_id":1774,"description":"","number":"50","outbound":"0","inventory":"47","amount":"80","total_amount":"4000.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"3","sales_gift_outbound":"","erpStore":{"id":1,"key":1,"name":"\u62d3\u5b9e\u4ed3\u5e93"},"product":{"id":1774,"name":"\u901f\u77f3\u8ba1\u7b97\u4e91\u670d\u52a1-\u4f01\u4e1a\u7248","product_type":22,"product_component":205,"product_brand":219,"product_serie":1500,"product_misc":"","product_qa":"","pn":"","description":"\u901f\u77f3\u8ba1\u7b97\u4e91\u670d\u52a1-\u4f01\u4e1a\u7248\uff0cFastone Compute Cloud-Enterprise Edition (\u4ee5\u4e0b\u7b80\u79f0FCC-E)\u4e91\u670d\u52a1","created_by":1013,"created_at":"2024-09-02 15:13:25","updated_at":"2025-12-18 09:59:02","pinyin_shortcut":"ssjsyfwqyb","product_unit":2,"is_renew":false,"in_out_at":"2025-12-18 09:59:02.751465+08","productType":{"id":22,"key":22,"name":"\u670d\u52a1"},"productComponent":{"id":205,"key":205,"name":"\u5b89\u88c5\u670d\u52a1"},"productBrand":{"id":219,"key":219,"name":"\u901f\u77f3"},"productSerie":{"id":1500,"key":1500,"name":"\u901f\u77f3\u8ba1\u7b97\u4e91\u670d\u52a1-\u4f01\u4e1a\u7248"},"productUnit":{"id":2,"key":2,"name":"\u5957"}},"erpPurchaseInboundProductSns":[],"erpPurchaseOrderProduct":{"id":192,"erp_purchase_order_id":2098,"erp_store_id":"","product_id":1774,"description":"","number":"50","into_inventory":"50","amount":"80","total_amount":"4000.00","last_number":"50","last_amount":"80","last_total_amount":"4000.00","un_into_inventory":50,"erpPurchaseInboundProducts":[{"id":178,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_order_product_id":192,"erp_store_id":1,"product_id":1774,"description":"","number":"50","outbound":"0","inventory":"47","amount":"80","total_amount":"4000.00","cancel_number":"","cancel_amount":"","cancel_total_amount":"","lost_outbound":"","build_spent_outbound":"","sales_outbound":"3","sales_gift_outbound":"","erpPurchaseInbound":{"id":91,"serial_no":"CGRKD-20251124-00001","from_date":"","wrote_date":"2025-11-24","handler":5064,"erp_purchase_order_id":2098,"supplier_id":431,"purchase_contract_id":4247,"erp_store_id":1,"status":2,"abstract":"","description":"","verify_type":1,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-11-24 13:44:39","stop_at":"","cancel_at":"","refuse_description":"","is_resubmitted":false,"number":"51","amount":"4044","cancel_number":"","cancel_amount":"","created_by":5064,"stop_description":"","is_used":true,"is_settle":false,"created_at":"2025-11-24 13:44:39","updated_at":"2025-11-24 13:44:39","print_times":""}}],"un_inbound_amount":4000},"erpInventoryProduct":{"id":230,"product_id":1774,"erp_purchase_inbound_id":91,"erp_purchase_order_id":2098,"erp_purchase_inbound_product_id":178,"erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-11-24","number":"50","outbound":"3","inventory":"47","amount":"80","total_amount":"4000.00","actual_amount":"80","actual_total_amount":"3760","is_build":false,"created_at":"2025-11-24 13:44:39","lost_outbound":"","erp_inventory_start_id":"","erp_inventory_start_product_id":"","erp_inventory_build_id":"","erp_inventory_build_product_id":"","build_spent_outbound":"","sales_outbound":"3","erp_purchase_gift_id":"","erp_purchase_gift_product_id":"","sales_gift_outbound":""}}],"erpPurchaseInboundProjects":[{"id":96,"erp_purchase_inbound_id":91,"client_id":12,"project_id":4018,"client":{"id":12,"key":12,"name":"smc(\u4e2d\u56fd)\u6709\u9650\u516c\u53f8\/SMC(\u5317\u4eac)\u5236\u9020\u6709\u9650\u516c\u53f8"},"project":{"id":4018,"key":4018,"name":"POTJ25105352-\u56fa\u6001\u786c\u76d8-2025","project_status":3,"created_by":5300,"budget":"629","collected":"0","projectStatus":{"id":3,"key":3,"name":"\u5546\u673a\u6210\u4ea4","color":"#53cd02"},"createdBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1},"project_status_display":"\u5546\u673a\u6210\u4ea4"}}],"commentCount":{},"unreadComments":{},"unread":0,"can_update":false,"can_import_sn":false,"can_delete":false,"can_resubmit":false,"can_verify":false,"can_refuse":false,"can_stop":false,"can_create_erp_purchase_return":true,"can_stop_verify":false,"can_stop_refuse":false,"bgcolor":"#4B7902","status_display":"\u5df2\u901a\u8fc7","can_view_product":true,"erpPurchaseOrderProjects":[{"project":{"bgcolor":"#53cd02"}}]}],"can_create":true,"pagenation":{"totalcount":1,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"223.72.15.22","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko\/20100101 Firefox\/146.0"}', FALSE, '2025-12-18 10:04:21') RETURNING "id" |