|
|
|
@ -37,7 +37,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
|
public class AppTodoItemController extends BaseController { |
|
|
|
|
|
|
|
private final ITodoItemService todoItemService; |
|
|
|
|
|
|
|
|
|
|
|
private final IEnforcementEducationServicesService educationServicesService; |
|
|
|
|
|
|
|
/** |
|
|
|
@ -108,29 +108,29 @@ public class AppTodoItemController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取待办事项统计信息 |
|
|
|
* 获取待办个数 |
|
|
|
* 返回普法服务、执法评价、执法预告的未读个数及总数 |
|
|
|
*/ |
|
|
|
@GetMapping("/statistics") |
|
|
|
public R<TodoStatisticsVo> getStatistics() { |
|
|
|
@GetMapping("/statisticsUnReadCount") |
|
|
|
public R<TodoStatisticsVo> statisticsUnReadCount() { |
|
|
|
TodoStatisticsVo statistics = new TodoStatisticsVo(); |
|
|
|
|
|
|
|
|
|
|
|
// 1. 统计普法服务未读个数
|
|
|
|
Long pffwCount = educationServicesService.countUnreadEducationServices(); |
|
|
|
statistics.setPffwCount(pffwCount != null ? pffwCount : 0L); |
|
|
|
|
|
|
|
|
|
|
|
// 2. 执法评价未读个数(暂时默认为0)
|
|
|
|
statistics.setZfpjCount(0L); |
|
|
|
|
|
|
|
|
|
|
|
// 3. 执法预告未读个数(暂时默认为0)
|
|
|
|
statistics.setZfygCount(0L); |
|
|
|
|
|
|
|
|
|
|
|
// 4. 计算总未读个数
|
|
|
|
Long totalCount = statistics.getPffwCount() |
|
|
|
+ statistics.getZfpjCount() |
|
|
|
Long totalCount = statistics.getPffwCount() |
|
|
|
+ statistics.getZfpjCount() |
|
|
|
+ statistics.getZfygCount(); |
|
|
|
statistics.setTotalCount(totalCount); |
|
|
|
|
|
|
|
|
|
|
|
return R.ok(statistics); |
|
|
|
} |
|
|
|
} |
|
|
|
|