result = [{'productid': '', 'productid_text': '全部'}] try: db = DBPools() dbname = get_module_dbname('supplychain') async with db.sqlorContext(dbname) as sor: rows = await sor.sqlExe( "select id as productid, product_name as productid_text from products order by product_name", {} ) return json.dumps(result + list(rows), ensure_ascii=False) except Exception as e: debug(f'get_search_productid error: {e}') return json.dumps(result, ensure_ascii=False)