| | |
| | | @Autowired |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | private VisitsJoinMapper visitsMapper; |
| | | @Autowired |
| | | private ApproveMapper approveMapper; |
| | | @Autowired |
| | |
| | | //发送微信公众号通知 - 申请提交成功待审核 |
| | | if(StringUtils.isNotBlank(visits.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visits, |
| | | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | |
| | | //初始化访客信息 |
| | | // initVisitInfo(visits,date); |
| | | visitsMapper.insert(visits); |
| | | if(Objects.nonNull(visits.getLoginUserInfo())){ |
| | | SystemUser systemUser = systemUserMapper.selectById(visits.getLoginUserInfo().getId()); |
| | | if(Objects.nonNull(systemUser)&&StringUtils.isNotBlank(systemUser.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visits, |
| | | Constants.equalsInteger(visits.getType(),Constants.TWO)?WxPlatConstants.visitReportContent.visitReportUpload:WxPlatConstants.visitContent.visitUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(systemUser.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | approveService.createApproveFlow(visits.getType(),visits.getId(),visits.getReceptMemberId()); |
| | | return visits.getId(); |
| | | } |
| | |
| | | result.setBusinessStatus(result.getStatus()); |
| | | } |
| | | |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | | .eq(Notices::getType,Constants.equalsInteger(result.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .orderByDesc(Notices::getId).last(" limit 1 ")); |
| | | if(Objects.nonNull(notices)){ |
| | | if(Constants.equalsInteger(notices.getStatus(),Constants.ZERO)){ |
| | | result.setInfo("待我处理"); |
| | | }else{ |
| | | result.setInfo(notices.getInfo()); |
| | | } |
| | | } |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | |
| | | queryWrapper.isNull(Visits::getParentId); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Visits::getMemberId,pageWrap.getModel().getMemberId()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getReceptMemberId()),Visits::getReceptMemberId,pageWrap.getModel().getReceptMemberId()); |
| | | |
| | | if(Objects.nonNull(pageWrap.getModel().getBusinessStatus())){ |
| | | if(Constants.equalsInteger(pageWrap.getModel().getBusinessStatus(),Constants.TWO)){ |
| | | queryWrapper.in(Visits::getStatus, |
| | | Constants.VisitStatus.xfSuccess, |
| | | Constants.VisitStatus.xfFail, |
| | | Constants.VisitStatus.signin, |
| | | Constants.VisitStatus.signout, |
| | | Constants.VisitStatus.invalid, |
| | | Constants.VisitStatus.pass |
| | | ); |
| | | }else{ |
| | | queryWrapper.eq(Visits::getStatus,pageWrap.getModel().getBusinessStatus()); |
| | | } |
| | | |
| | | } |
| | | |
| | | queryWrapper.orderByDesc(Visits::getCreateDate); |
| | | IPage<Visits> result = visitsJoinMapper.selectJoinPage(page, Visits.class,queryWrapper); |
| | | |
| | |
| | | memberId) |
| | | ); |
| | | // } |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | | .eq(Notices::getType,Constants.equalsInteger(visits.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .orderByDesc(Notices::getId).last(" limit 1 ")); |
| | | if(Objects.nonNull(notices)){ |
| | | if(Constants.equalsInteger(notices.getStatus(),Constants.ZERO)){ |
| | | visitDetailVO.setInfo("待我处理"); |
| | | }else{ |
| | | visitDetailVO.setInfo(notices.getInfo()); |
| | | } |
| | | } |
| | | |
| | | return visitDetailVO; |
| | | } |
| | | |
| | |
| | | SmsEmailServiceImpl.sendVisitTimeOutSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper, |
| | | SmsConstants.visitContent.visitTimeOutSignOutNum, |
| | | visitReportTimeCount.toString(),Arrays.asList(mobile.split(",")) |
| | | visitTimeCount.toString(),Arrays.asList(mobile.split(",")) |
| | | ); |
| | | } |
| | | } |