springboot JPA查询报错

使用JPA查询复杂的sql报错,
sql大致如下

select a.teamcode        
       a.costcentercode  ,
       b.account         ,
       c.persomcount     
  from (select a.teamcode teamcode, count(1) persomcount
          from  person a
         where a.validstatus = '1'
           and a.VirtualStaff = '1'
         group by a.teamcode
        having count(1) > 0) c
  left join  team a
    on a.teamcode = c.teamcode
  left join  company b
    on a.comcode = b.comcode
 order by a.teamcode;
org.springframework.core.convert.ConverterNotFoundException: No converter found
 capable of converting from type [org.springframework.data.jpa.repository.query.
AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [com.xxxVo]

img

构造方法这种也试了,但是报错 找不到from关键字

img

jpa是否支持复杂的子查询呢,应该怎么实现

转来转去嫌麻烦,最终改成直接查个map出来

public List<Map<String, Object>> getPersonAccount();

不知是复制代码的问题还是啥原因 a.teamcode后面少了个逗号

select a.teamcode        
       a.costcentercode  ,

xxxVo 类代码截图