|
|
@@ -11,7 +11,9 @@ import org.dromara.main.domain.MainExamEvaluation;
|
|
|
import org.dromara.main.domain.MainPostApply;
|
|
|
import org.dromara.main.mapper.MainExamEvaluationMapper;
|
|
|
import org.dromara.main.mapper.MainPostApplyMapper;
|
|
|
+import org.dromara.system.domain.SysDept;
|
|
|
import org.dromara.system.domain.SysUser;
|
|
|
+import org.dromara.system.mapper.SysDeptMapper;
|
|
|
import org.dromara.system.mapper.SysUserMapper;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -31,6 +33,7 @@ public class MainDashboardController {
|
|
|
private final MainPostApplyMapper mainPostApplyMapper;
|
|
|
private final MainExamEvaluationMapper mainExamEvaluationMapper;
|
|
|
private final SysUserMapper sysUserMapper;
|
|
|
+ private final SysDeptMapper sysDeptMapper;
|
|
|
|
|
|
/**
|
|
|
* 岗位管理近日发布数量报表 (近7日)
|
|
|
@@ -66,14 +69,11 @@ public class MainDashboardController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 测评管理今日发布数量报表
|
|
|
+ * 测评管理总发布数量报表
|
|
|
*/
|
|
|
- @GetMapping("/evaluationTodayStats")
|
|
|
- public R<Long> evaluationTodayStats() {
|
|
|
- DateTime todayStart = DateUtil.beginOfDay(new Date());
|
|
|
- long count = mainExamEvaluationMapper.selectCount(new LambdaQueryWrapper<MainExamEvaluation>()
|
|
|
- .ge(MainExamEvaluation::getCreateTime, todayStart));
|
|
|
-
|
|
|
+ @GetMapping("/evaluationTotalStats")
|
|
|
+ public R<Long> evaluationTotalStats() {
|
|
|
+ long count = mainExamEvaluationMapper.selectCount(new LambdaQueryWrapper<MainExamEvaluation>());
|
|
|
return R.ok(count);
|
|
|
}
|
|
|
|
|
|
@@ -86,4 +86,27 @@ public class MainDashboardController {
|
|
|
Long count = sysUserMapper.selectCount(new LambdaQueryWrapper<SysUser>());
|
|
|
return R.ok(count);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 当前租户的真实部门数量统计(排除顶级公司节点)
|
|
|
+ */
|
|
|
+ @GetMapping("/deptStats")
|
|
|
+ public R<Long> deptStats() {
|
|
|
+ Long count = sysDeptMapper.selectCount(new LambdaQueryWrapper<SysDept>()
|
|
|
+ .ne(SysDept::getParentId, 0L));
|
|
|
+ return R.ok(count);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 昨日加入公司(新增用户)人数统计
|
|
|
+ */
|
|
|
+ @GetMapping("/userYesterdayStats")
|
|
|
+ public R<Long> userYesterdayStats() {
|
|
|
+ DateTime yesterdayStart = DateUtil.beginOfDay(DateUtil.offsetDay(new Date(), -1));
|
|
|
+ DateTime yesterdayEnd = DateUtil.endOfDay(DateUtil.offsetDay(new Date(), -1));
|
|
|
+ Long count = sysUserMapper.selectCount(new LambdaQueryWrapper<SysUser>()
|
|
|
+ .ge(SysUser::getCreateTime, yesterdayStart)
|
|
|
+ .le(SysUser::getCreateTime, yesterdayEnd));
|
|
|
+ return R.ok(count);
|
|
|
+ }
|
|
|
}
|