| | |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.system.dto.NoticesDTO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public InternalHomeVO getHomeData(Integer memberId,Integer isDetail){ |
| | | public InternalHomeVO getHomeDataH5(Integer memberId,Integer isDetail){ |
| | | InternalHomeVO internalHomeVO = new InternalHomeVO(); |
| | | internalHomeVO.setHomeImg(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HOME_IMAGE).getCode()); |
| | | //任务数据 |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public InternalHomeVO getHomeDataPC(NoticesDTO noticesDTO){ |
| | | InternalHomeVO internalHomeVO = new InternalHomeVO(); |
| | | internalHomeVO.setHomeImg(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HOME_IMAGE).getCode()); |
| | | //任务数据 |
| | | List<Notices> noticesList = noticesJoinMapper. |
| | | selectList(new QueryWrapper<Notices>().lambda() |
| | | .ge(noticesDTO.getStartDate() != null, Notices::getCreateDate, Utils.Date.getStart(noticesDTO.getStartDate() )) |
| | | .le(noticesDTO.getEndDate() != null, Notices::getCreateDate, Utils.Date.getEnd(noticesDTO.getEndDate() )) |
| | | .eq(Notices::getUserId,noticesDTO.getMemberId()).orderByDesc(Notices::getCreateDate) |
| | | ); |
| | | internalHomeVO.setTaskNum(noticesList.size()); |
| | | if(CollectionUtils.isNotEmpty(noticesList)){ |
| | | //待我处理的数据 |
| | | internalHomeVO.setNoticeWaitNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),noticesDTO.getMemberId()) |
| | | &&Constants.equalsInteger(i.getStatus(),Constants.ZERO) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | ).count() |
| | | ); |
| | | internalHomeVO.setNoticeDealNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),noticesDTO.getMemberId()) |
| | | &&Constants.equalsInteger(i.getStatus(),Constants.ONE) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO) |
| | | ).count() |
| | | ); |
| | | |
| | | internalHomeVO.setNoticeCreateNum( |
| | | noticesJoinMapper.selectCount(new QueryWrapper<Notices>().lambda().eq(Notices::getParam3,noticesDTO.getMemberId())) |
| | | ); |
| | | |
| | | internalHomeVO.setNoticeCopyNum( |
| | | noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),noticesDTO.getMemberId()) |
| | | &&Constants.equalsInteger(i.getSendacopy(),Constants.ONE) |
| | | ).count() |
| | | ); |
| | | } |
| | | |
| | | return internalHomeVO; |
| | | } |
| | | |
| | | /** |
| | | * 创建审批流程 |
| | | * @param tempType 模板类型 0非施工人员访客申请 1施工人员访客申请 2访客报备 3公车市内用车 4公车室外用车 5市公司物流车预约 |