package com.zyh.factory.repositories;

import org.springframework.data.repository.CrudRepository;
import com.zyh.factory.entity.WorkEntity;

public interface WorkRepository extends CrudRepository<WorkEntity, Long> {

}
@@ -32,16 +32,94 @@
 ories;%0A%0A
+import java.util.List;%0A%0Aimport org.springframework.data.jpa.repository.Query;%0A
 import o
@@ -292,5 +292,158 @@
  %7B%0A%0A
-%7D
+%09@Query(%22select new map(count(v) as count, v.workStatus as label) from WorkEntity v group by v.workStatus%22)%0A%09public List%3C?%3E countGroupByWorkStatus();%0A%09%0A%7D%0A

Update WorkRepository.java