14:46:11.658 | info | yii\db\Command::query | 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_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rvr.erp_inventory_lost_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))) GROUP BY "r"."id" ORDER BY need_verify_sort asc, created_at DESC) "c" |
14:46:11.660 | info | yii\db\Command::query | 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_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rvr.erp_inventory_lost_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))) GROUP BY "r"."id" ORDER BY need_verify_sort asc, created_at DESC LIMIT 20 |
14:46:11.724 | info | yii\db\Command::query | 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-inventory-lost/list', '{"Filter":{"name":"default","sort":"DESC"},"ErpInventoryLostSearch":{"wrote_date_period":"","created_at_period":"","status":"","erp_store_id":"","handler":"","created_by":"","number_range_to":"","number_range_from":"","amount_range_to":"","amount_range_from":""},"page":"1","web_access_token":"S7OJrULURAq348jTGnVvRiAMpe10N7Zn"}', '{"code":2000,"result":{"list":[{"id":2,"serial_no":"BSD-20250813-00001","from_date":"","wrote_date":"2025-08-13","handler":1013,"supplier_id":"","erp_store_id":1,"status":2,"abstract":"\u5bf9\u8d26\u62a5\u635f","description":"","verify_type":2,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-08-13 17:04:44","stop_at":"","refuse_description":"","is_resubmitted":false,"number":"33","amount":"632.9","created_by":1013,"stop_description":"","is_settle":false,"created_at":"2025-08-13 17:03:00","updated_at":"2025-08-13 17:04:44","need_verify_sort":4,"createdBy":{"id":1013,"key":1013,"name":"\u7fc1\u5bb6\u6210","sex":"M","department_id":7,"avatar":{"id":34,"user_id":1013,"name":"\/files\/cdn\/a57be577deb434\/avatar\/25ef1fe7-8dda-3daa-b8ea-9fabd0a47439.png"},"department":{"id":7,"key":7,"name":"\u5e93\u623f\u90e8"}},"handlerPerson":{"id":1013,"key":1013,"name":"\u7fc1\u5bb6\u6210","sex":"M","department_id":7,"avatar":{"id":34,"user_id":1013,"name":"\/files\/cdn\/a57be577deb434\/avatar\/25ef1fe7-8dda-3daa-b8ea-9fabd0a47439.png"},"department":{"id":7,"key":7,"name":"\u5e93\u623f\u90e8"}},"supplier":{},"erpInventoryLostCarbonCopyRels":[],"erpInventoryLostVerifyRels":[{"id":3,"erp_inventory_lost_id":2,"user_id":1011,"status":1,"description":"","verify_at":"2025-08-13 17:03:32","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":4,"erp_inventory_lost_id":2,"user_id":1001,"status":1,"description":"","verify_at":"2025-08-13 17:04:44","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"}}}],"lastErpInventoryLostVerifyRel":{},"haveErpInventoryLostVerifyRel":{"id":3,"erp_inventory_lost_id":2,"user_id":1011,"status":1,"description":"","verify_at":"2025-08-13 17:03:32"},"selfErpInventoryLostVerifyRel":{},"erpInventoryLostStopVerifyRels":[],"lastErpInventoryLostStopVerifyRel":{},"haveErpInventoryLostStopVerifyRel":{},"selfErpInventoryLostStopVerifyRel":{},"attachmentRelationships":[],"files":[],"erpStore":{"id":1,"key":1,"name":"\u62d3\u5b9e\u4ed3\u5e93"},"erpInventoryLostProducts":[{"id":4,"erp_inventory_lost_id":2,"erp_inventory_product_id":42,"product_id":2087,"description":"","number":"2","amount":"70","total_amount":"140","product":{"id":2087,"name":"\u4e1d\u7ef8\u9f20\u6807\u57ab","product_type":11,"product_component":179,"product_brand":134,"product_serie":1687,"product_misc":"","product_qa":"","pn":"","description":"","created_by":1001,"created_at":"2025-08-08 18:02:20","updated_at":"2025-08-13 17:03:00","pinyin_shortcut":"scsbd","product_unit":3,"is_renew":false,"productType":{"id":11,"key":11,"name":"\u4e2a\u4eba\u8ba1\u7b97\u673a"},"productComponent":{"id":179,"key":179,"name":"\u914d\u4ef6"},"productBrand":{"id":134,"key":134,"name":"\u7b2c\u4e09\u65b9"},"productSerie":{"id":1687,"key":1687,"name":"\u9f20\u6807\u57ab"},"productUnit":{"id":3,"key":3,"name":"\u4e2a"}},"erpInventoryProduct":{"id":42,"product_id":2087,"erp_purchase_inbound_id":"","erp_purchase_order_id":"","erp_purchase_inbound_product_id":"","erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-08-08","number":"2","outbound":"2","inventory":"0","amount":"70","total_amount":"140","actual_amount":"70","actual_total_amount":"0","is_build":false,"created_at":"2025-08-08 18:09:45","lost_outbound":"","erp_inventory_start_id":29,"erp_inventory_start_product_id":42,"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":""},"erpInventoryLostProductSns":[]},{"id":5,"erp_inventory_lost_id":2,"erp_inventory_product_id":43,"product_id":2088,"description":"","number":"31","amount":"15.9","total_amount":"492.9","product":{"id":2088,"name":"\u54c1\u80dc4\u5408\u4e00\u8bfb\u5361\u5668","product_type":23,"product_component":193,"product_brand":134,"product_serie":1688,"product_misc":"","product_qa":"","pn":"","description":"","created_by":1001,"created_at":"2025-08-08 18:09:16","updated_at":"2025-08-13 17:03:00","pinyin_shortcut":"ps4hydkq","product_unit":3,"is_renew":false,"productType":{"id":23,"key":23,"name":"\u793c\u54c1"},"productComponent":{"id":193,"key":193,"name":"\u6570\u7801\u7535\u5b50\u4ea7\u54c1"},"productBrand":{"id":134,"key":134,"name":"\u7b2c\u4e09\u65b9"},"productSerie":{"id":1688,"key":1688,"name":"\u54c1\u80dc4\u5408\u4e00\u8bfb\u5361\u5668"},"productUnit":{"id":3,"key":3,"name":"\u4e2a"}},"erpInventoryProduct":{"id":43,"product_id":2088,"erp_purchase_inbound_id":"","erp_purchase_order_id":"","erp_purchase_inbound_product_id":"","erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-08-08","number":"31","outbound":"31","inventory":"0","amount":"15.9","total_amount":"492.9","actual_amount":"15.9","actual_total_amount":"0.0","is_build":false,"created_at":"2025-08-08 18:09:45","lost_outbound":"","erp_inventory_start_id":29,"erp_inventory_start_product_id":43,"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":""},"erpInventoryLostProductSns":[]}],"commentCount":{"object_id":2,"comment":3},"unreadComments":{},"unread":0,"can_update":false,"can_delete":false,"can_resubmit":false,"can_verify":false,"can_refuse":false,"can_stop":false,"can_stop_verify":false,"can_stop_refuse":false,"bgcolor":"#4B7902","status_display":"\u5df2\u901a\u8fc7","can_view_product":true},{"id":1,"serial_no":"BSD-20250811-00001","from_date":"","wrote_date":"2025-08-11","handler":1011,"supplier_id":"","erp_store_id":1,"status":2,"abstract":"","description":"","verify_type":2,"next_verify_user":"","next_stop_verify_user":"","verify_at":"2025-08-11 18:06:47","stop_at":"","refuse_description":"","is_resubmitted":false,"number":"15","amount":"552.48","created_by":1001,"stop_description":"","is_settle":false,"created_at":"2025-08-11 18:03:11","updated_at":"2025-08-11 18:06:47","need_verify_sort":4,"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"}},"handlerPerson":{"id":1011,"key":1011,"name":"\u97e9\u96c5\u82b3","sex":"F","department_id":3,"avatar":{"id":17,"user_id":1011,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b54747f4-248d-380e-93bc-0f62f769e70d.png"},"department":{"id":3,"key":3,"name":"\u5546\u52a1\u90e8"}},"supplier":{},"erpInventoryLostCarbonCopyRels":[],"erpInventoryLostVerifyRels":[{"id":1,"erp_inventory_lost_id":1,"user_id":1011,"status":1,"description":"","verify_at":"2025-08-11 18:03:47","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":2,"erp_inventory_lost_id":1,"user_id":1001,"status":1,"description":"","verify_at":"2025-08-11 18:06:47","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"}}}],"lastErpInventoryLostVerifyRel":{},"haveErpInventoryLostVerifyRel":{"id":1,"erp_inventory_lost_id":1,"user_id":1011,"status":1,"description":"","verify_at":"2025-08-11 18:03:47"},"selfErpInventoryLostVerifyRel":{},"erpInventoryLostStopVerifyRels":[],"lastErpInventoryLostStopVerifyRel":{},"haveErpInventoryLostStopVerifyRel":{},"selfErpInventoryLostStopVerifyRel":{},"attachmentRelationships":[],"files":[],"erpStore":{"id":1,"key":1,"name":"\u62d3\u5b9e\u4ed3\u5e93"},"erpInventoryLostProducts":[{"id":1,"erp_inventory_lost_id":1,"erp_inventory_product_id":48,"product_id":1241,"description":"","number":"3","amount":"120","total_amount":"360","product":{"id":1241,"name":"\u7eaf\u624b\u5de5\u9e7f\u89d2\u9f9f\u7532\u818f\uff08250ml\uff09","product_type":23,"product_component":195,"product_brand":199,"product_serie":825,"product_misc":"","product_qa":"","pn":"","description":"","created_by":1013,"created_at":"2024-01-12 17:46:44","updated_at":"2025-08-11 18:03:11","pinyin_shortcut":"csgljgjg250ml","product_unit":11,"is_renew":false,"productType":{"id":23,"key":23,"name":"\u793c\u54c1"},"productComponent":{"id":195,"key":195,"name":"\u8425\u517b\u98df\u54c1\u6ecb\u8865"},"productBrand":{"id":199,"key":199,"name":"\u624b\u5de5\u52a0\u5de5"},"productSerie":{"id":825,"key":825,"name":"\u9e7f\u89d2\u9f9f\u7532\u818f"},"productUnit":{"id":11,"key":11,"name":"\u74f6"}},"erpInventoryProduct":{"id":48,"product_id":1241,"erp_purchase_inbound_id":"","erp_purchase_order_id":"","erp_purchase_inbound_product_id":"","erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-08-11","number":"3","outbound":"3","inventory":"0","amount":"120","total_amount":"360","actual_amount":"120","actual_total_amount":"0","is_build":false,"created_at":"2025-08-11 18:02:14","lost_outbound":"","erp_inventory_start_id":31,"erp_inventory_start_product_id":48,"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":""},"erpInventoryLostProductSns":[]},{"id":2,"erp_inventory_lost_id":1,"erp_inventory_product_id":47,"product_id":2090,"description":"","number":"2","amount":"49.59","total_amount":"99.18","product":{"id":2090,"name":"\u53e4\u8d8a\u9f99\u5c71\u9ec4\u9152\u5e93\u85cf\u91d1\u516b\u5e74","product_type":23,"product_component":195,"product_brand":134,"product_serie":"","product_misc":"","product_qa":"","pn":"","description":"","created_by":1013,"created_at":"2025-08-11 17:59:31","updated_at":"2025-08-11 18:03:11","pinyin_shortcut":"gylshjkcjbn","product_unit":11,"is_renew":false,"productType":{"id":23,"key":23,"name":"\u793c\u54c1"},"productComponent":{"id":195,"key":195,"name":"\u8425\u517b\u98df\u54c1\u6ecb\u8865"},"productBrand":{"id":134,"key":134,"name":"\u7b2c\u4e09\u65b9"},"productSerie":"","productUnit":{"id":11,"key":11,"name":"\u74f6"}},"erpInventoryProduct":{"id":47,"product_id":2090,"erp_purchase_inbound_id":"","erp_purchase_order_id":"","erp_purchase_inbound_product_id":"","erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-08-11","number":"2","outbound":"2","inventory":"0","amount":"49.59","total_amount":"99.18","actual_amount":"49.59","actual_total_amount":"0.00","is_build":false,"created_at":"2025-08-11 18:02:14","lost_outbound":"","erp_inventory_start_id":31,"erp_inventory_start_product_id":47,"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":""},"erpInventoryLostProductSns":[]},{"id":3,"erp_inventory_lost_id":1,"erp_inventory_product_id":46,"product_id":2091,"description":"","number":"10","amount":"9.33","total_amount":"93.3","product":{"id":2091,"name":"\u5bc6\u5c01\u7f50\u73bb\u7483\u74f6\u5b50","product_type":23,"product_component":195,"product_brand":134,"product_serie":"","product_misc":"","product_qa":"","pn":"","description":"","created_by":1013,"created_at":"2025-08-11 18:00:03","updated_at":"2025-08-11 18:03:11","pinyin_shortcut":"mfgblpz","product_unit":3,"is_renew":false,"productType":{"id":23,"key":23,"name":"\u793c\u54c1"},"productComponent":{"id":195,"key":195,"name":"\u8425\u517b\u98df\u54c1\u6ecb\u8865"},"productBrand":{"id":134,"key":134,"name":"\u7b2c\u4e09\u65b9"},"productSerie":"","productUnit":{"id":3,"key":3,"name":"\u4e2a"}},"erpInventoryProduct":{"id":46,"product_id":2091,"erp_purchase_inbound_id":"","erp_purchase_order_id":"","erp_purchase_inbound_product_id":"","erp_purchase_order_product_id":"","erp_store_id":1,"wrote_date":"2025-08-11","number":"10","outbound":"10","inventory":"0","amount":"9.33","total_amount":"93.3","actual_amount":"9.33","actual_total_amount":"0.00","is_build":false,"created_at":"2025-08-11 18:02:13","lost_outbound":"","erp_inventory_start_id":31,"erp_inventory_start_product_id":46,"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":""},"erpInventoryLostProductSns":[]}],"commentCount":{"object_id":1,"comment":3},"unreadComments":{},"unread":0,"can_update":false,"can_delete":false,"can_resubmit":false,"can_verify":false,"can_refuse":false,"can_stop":false,"can_stop_verify":false,"can_stop_refuse":false,"bgcolor":"#4B7902","status_display":"\u5df2\u901a\u8fc7","can_view_product":true}],"can_create":true,"pagenation":{"totalcount":2,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0}', FALSE, '2025-09-15 14:46:11') RETURNING "id" |