| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.approve.mapper.ApproveProcessMapper; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.collaborativeApproval.mapper.NoticeMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.Notice; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.mapper.DeviceMaintenanceMapper; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Autowired |
| | | private NoticeMapper noticeMapper; |
| | | |
| | | @Override |
| | | public HomeBusinessDto business() { |
| | |
| | | // 审批协同待办 |
| | | Long aLong = approveProcessMapper.selectCount(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveUserCurrentId, SecurityUtils.getUserId()) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .in(ApproveProcess::getApproveStatus, 0, 1, 3)); |
| | | // 设备报修待办 |
| | | Long aLong1 = deviceRepairMapper.selectCount(new LambdaQueryWrapper<DeviceRepair>() |
| | |
| | | put("deviceRepairTodo", aLong1); |
| | | }}; |
| | | } |
| | | |
| | | @Override |
| | | public Long noticesCount() { |
| | | // 查询未过期的通知数量:状态为发布且过期时间大于等于当前日期 |
| | | return noticeMapper.selectCount(new LambdaQueryWrapper<Notice>() |
| | | .eq(Notice::getStatus, 1) // 1表示发布状态 |
| | | .ge(Notice::getExpirationDate, new Date())); // 过期时间大于等于当前日期 |
| | | } |
| | | } |