| | |
| | | import com.doumee.core.haikang.model.param.request.ParkReservationAddRequest; |
| | | import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dao.MemberMapper; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.dto.ApproveDTO; |
| | |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.dto.NoticesDTO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | |
| | | |
| | | @Autowired |
| | | private CarUseBookMapper carUseBookMapper; |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | |
| | | @Autowired |
| | | private VisitsJoinMapper visitsJoinMapper; |
| | | private VisitsJoinMapper visitsMapper; |
| | | |
| | | @Autowired |
| | | private CarUseBookJoinMapper carUseBookJoinMapper; |
| | |
| | | * @param tempType 模板类型 0非施工人员访客申请 1施工人员访客申请 2访客报备 3公车市内用车 4公车室外用车 5市公司物流车预约 |
| | | * @param businessId 业务主键 根据 tempType |
| | | * @param createMemberId 提交流程人员 |
| | | * @param applyMember 申请人对象(如果为空,默认为提交人) |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void createApproveFlow(Integer tempType,Integer businessId,Integer createMemberId){ |
| | | public void createApproveFlow(Integer tempType,Integer businessId,Integer createMemberId,Member applyMember){ |
| | | //查询处理模板 |
| | | ApproveTempl approveTempl = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda() |
| | | .eq(ApproveTempl::getType,tempType) |
| | |
| | | } |
| | | List<ApproveParam> approveCopyList = approveParamAllList.stream().filter(i->i.getType().equals(Constants.ONE)).collect(Collectors.toList()); |
| | | |
| | | Member createMember = memberMapper.selectById(createMemberId); |
| | | Member createMember = memberMapper.selectById(createMemberId); |
| | | if(Objects.isNull(createMember)|| Objects.isNull(createMember.getCompanyId())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"申请人组织信息异常"); |
| | | } |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,businessId,approveList); |
| | | |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,applyMember,businessId,approveList); |
| | | if(CollectionUtils.isEmpty(approveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批流配置错误"); |
| | | } |
| | | |
| | | //处理抄送数据 |
| | | if(CollectionUtils.isNotEmpty(approveCopyList)){ |
| | | this.organizeApproveCopyData(approveTempl,approveCopyList,businessId,approveList); |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void createApproveForPlatfrom(Integer tempId,Integer businessId,Integer createMemberId){ |
| | | public void createApproveForPlatfrom(Integer tempId,Integer businessId,Integer createMemberId ){ |
| | | //查询处理模板 |
| | | ApproveTempl approveTempl = approveTemplMapper.selectById(tempId); |
| | | if(Objects.isNull(approveTempl)){ |
| | |
| | | } |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,businessId,approveList); |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,null,businessId,approveList); |
| | | |
| | | if(CollectionUtils.isEmpty(approveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批流配置错误"); |
| | |
| | | * @param businessId |
| | | * @param approveList |
| | | */ |
| | | public void organizeApproveData(ApproveTempl approveTempl,List<ApproveParam> approveParamList,Member createMember,Integer businessId,List<Approve> approveList){ |
| | | public void organizeApproveData(ApproveTempl approveTempl,List<ApproveParam> approveParamList,Member createMember,Member applyMember,Integer businessId,List<Approve> approveList){ |
| | | |
| | | if(applyMember ==null){ |
| | | applyMember = createMember; |
| | | } |
| | | //创建默认人信息 |
| | | Approve createUserApprove = new Approve(); |
| | | createUserApprove.setRemark("发起申请"); |
| | | createUserApprove.setCreateDate(new Date()); |
| | | createUserApprove.setIsdeleted(Constants.ZERO); |
| | | createUserApprove.setTemplatId(approveTempl.getId()); |
| | | createUserApprove.setChekorId(createMember.getId()); |
| | | createUserApprove.setChekorId(applyMember.getId()); |
| | | createUserApprove.setCheckDate(createUserApprove.getCreateDate()); |
| | | createUserApprove.setStatus(Constants.approveStatus.pass); |
| | | createUserApprove.setTitle("发起申请"); |
| | |
| | | null,Arrays.asList(member.getPhone().split(",")) |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | platformBooksMapper.selectById(businessId), |
| | | WxPlatConstants.platformBookContent.platformBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getOpenid().split(",")), |
| | | Arrays.asList(member.getSystemOpenid().split(",")), |
| | | Constants.ONE); |
| | | } |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit)){ |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitContent.visitWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")) |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitReportContent.visitReportWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")) |
| | |
| | | ); |
| | | //公众号通知 |
| | | if(StringUtils.isNotBlank(member.getSystemOpenid())){ |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxNoticeConfigMapper, |
| | | carUseBookMapper.selectById(businessId), |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")), |
| | | Constants.ONE); |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(businessId); |
| | | if(Objects.nonNull(carUseBook)){ |
| | | SystemUser systemUser = systemUserMapper.selectById(carUseBook.getCreator()); |
| | | if(Objects.nonNull(systemUser)){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | carUseBookMapper.selectById(businessId), |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | | token, |
| | | Arrays.asList(member.getSystemOpenid().split(",")), |
| | | Constants.ONE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit) |
| | | || Constants.equalsInteger(noticeType,Constants.noticesObjectType.visitReporting)){ |
| | | //访客记录与访客报备 |
| | | Visits visits = visitsJoinMapper.selectJoinOne(Visits.class, |
| | | Visits visits = visitsMapper.selectJoinOne(Visits.class, |
| | | new MPJLambdaWrapper<Visits>().selectAll(Visits.class) |
| | | .selectAs(Member::getName,Visits::getReceptMemberName) |
| | | .selectAs(Company::getName,Visits::getReceptMemberDepartment) |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void approved(ApproveDTO approveDTO){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | if(Objects.isNull(approveDTO) |
| | | || Objects.isNull(approveDTO.getObjId()) |
| | | || Objects.isNull(approveDTO.getObjType()) |
| | |
| | | .set(Notices::getInfo,"已拒绝") |
| | | .eq(Notices::getObjId,notices.getObjId()) |
| | | .eq(Notices::getObjType,notices.getObjType()) |
| | | .eq(Notices::getReaded,Constants.ZERO) |
| | | // .eq(Notices::getReaded,Constants.ZERO) |
| | | .ne(Notices::getId,notices.getId()) |
| | | ); |
| | | } |
| | |
| | | new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .selectAs(SystemUser::getOpenid,Approve::getSystemOpenid) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .leftJoin(SystemUser.class,SystemUser::getMemberId,Member::getId) |
| | | .eq(Approve::getStatus,Constants.approveStatus.wait) |
| | | .eq(Approve::getObjId,approve.getObjId()) |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1)) |
| | | ); |
| | | |
| | | //发送短信通知 下级审批人 |
| | | List<String> memberPhone = waitAuditList.stream().filter(i->StringUtils.isNotBlank(i.getMemberPhone())).map(i->i.getMemberPhone()).collect(Collectors.toList()); |
| | | //物流车预约 |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.reason)){ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,approveDTO.getObjId(), |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone |
| | | ); |
| | | } |
| | | List<String> openIdList =waitAuditList.stream().filter(i->StringUtils.isNotBlank(i.getSystemOpenid())).map(i->i.getSystemOpenid()).collect(Collectors.toList()); |
| | | |
| | | else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar) |
| | | || approveDTO.getObjType().equals(Constants.approveObjectType.unCityUseCar)){ |
| | | SmsEmailServiceImpl.sendCarUseSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,carUseBookMapper,approveDTO.getObjId(), |
| | | SmsConstants.hiddenDangerContent.hiddenDangerDealUser, |
| | | approveDTO.getCheckInfo(),memberPhone); |
| | | } |
| | | this.sendNextLvSms(approve,approveDTO,memberPhone,openIdList); |
| | | |
| | | //访客申请/报备 |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)) { |
| | | Visits visits = visitsMapper.selectById(approve.getObjId()); |
| | | if(Objects.nonNull(visits)){ |
| | | if(Constants.equalsInteger(visits.getStatus(),Constants.ZERO)){ |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.ONE).eq(Visits::getId,visits.getId())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,false); |
| | | } |
| | | // if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | // Constants.approveObjectType.unCityUseCar)){ |
| | | // this.updDriver(approveDTO,approve,false); |
| | | // } |
| | | }else if(approve.getApproveType().equals(Constants.ONE)){ |
| | | //会签 且终审 |
| | | //无他人审批的情况 则修改数据状态 |
| | |
| | | }else{ |
| | | if(Constants.equalsInteger(approveList.size(),Constants.ZERO)&&Constants.equalsInteger(approve.getIsEndCheck(),Constants.ZERO)){ |
| | | /**开启下一级别的数据为待审核**/ |
| | | |
| | | List<Approve> waitAuditList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .selectAs(SystemUser::getOpenid,Approve::getSystemOpenid) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .leftJoin(SystemUser.class,SystemUser::getMemberId,Member::getId) |
| | | .eq(Approve::getStatus,Constants.approveStatus.wait) |
| | | .eq(Approve::getObjId,approve.getObjId()) |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1))); |
| | | |
| | | |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.auditIng) |
| | |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1)) |
| | | ); |
| | | |
| | | |
| | | //发送短信通知 下级审批人 |
| | | List<String> memberPhone = waitAuditList.stream().filter(i->StringUtils.isNotBlank(i.getMemberPhone())).map(i->i.getMemberPhone()).collect(Collectors.toList()); |
| | | List<String> openIdList =waitAuditList.stream().filter(i->StringUtils.isNotBlank(i.getSystemOpenid())).map(i->i.getSystemOpenid()).collect(Collectors.toList()); |
| | | |
| | | this.sendNextLvSms(approve,approveDTO,memberPhone,openIdList); |
| | | |
| | | } |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,false); |
| | | } |
| | | // if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | // Constants.approveObjectType.unCityUseCar)){ |
| | | // this.updDriver(approveDTO,approve,false); |
| | | // } |
| | | } |
| | | } |
| | | this.passNextNotices(dealBusinessBean,notices,approve,approveList,approveCopyList,approveDTO); |
| | |
| | | this.dealBusinessData(approveDTO,approve); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public void sendNextLvSms(Approve approve ,ApproveDTO approveDTO , List<String> memberPhone ,List<String> openIdList){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | //物流车预约 |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.reason)){ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,approveDTO.getObjId(), |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone |
| | | ); |
| | | //公众号通知 |
| | | if(CollectionUtils.isNotEmpty(openIdList)){ |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, |
| | | platformBooksMapper.selectById(approveDTO.getObjId()), |
| | | WxPlatConstants.platformBookContent.platformBookWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | openIdList, |
| | | Constants.ONE); |
| | | } |
| | | |
| | | } else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar) |
| | | || approveDTO.getObjType().equals(Constants.approveObjectType.unCityUseCar)){ |
| | | |
| | | this.updDriver(approveDTO,approve,false); |
| | | |
| | | SmsEmailServiceImpl.sendCarUseSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,carUseBookMapper,approveDTO.getObjId(), |
| | | SmsConstants.carUseBookContent.carUseBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone); |
| | | //发送公众号通知 |
| | | if(CollectionUtils.isNotEmpty(openIdList)){ |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(approve.getObjId()); |
| | | if(Objects.nonNull(carUseBook)){ |
| | | SystemUser systemUser = systemUserMapper.selectById(carUseBook.getCreator()); |
| | | if(Objects.nonNull(systemUser)){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,carUseBook, |
| | | WxPlatConstants.carUseBookContent.carUseBookWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | openIdList,1); |
| | | } |
| | | } |
| | | } |
| | | }else |
| | | //访客申请/报备 |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)) { |
| | | Visits visits = visitsMapper.selectById(approve.getObjId()); |
| | | if(Objects.nonNull(visits)){ |
| | | if(Constants.equalsInteger(visits.getStatus(),Constants.ZERO)){ |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.ONE).eq(Visits::getId,visits.getId())); |
| | | } |
| | | SmsEmailServiceImpl.sendVisitSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,visitsMapper,approveDTO.getObjId(), |
| | | approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)? |
| | | SmsConstants.visitReportingContent.visitReportingNotice:SmsConstants.visitContent.visitNotice, |
| | | null,memberPhone |
| | | ); |
| | | //公众号通知 |
| | | if(CollectionUtils.isNotEmpty(openIdList)){ |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visitsMapper.selectById(approveDTO.getObjId()), |
| | | approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)?WxPlatConstants.visitReportContent.visitReportWaitAudit:WxPlatConstants.visitContent.visitWaitAudit, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | openIdList |
| | | ); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理待办信息 |
| | |
| | | SmsConstants.visitContent.visitAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)){ |
| | | SmsEmailServiceImpl.sendVisitSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,visitsMapper,visits.getId(), |
| | | SmsConstants.visitContent.visitAuditSuccessToVisiter, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | } |
| | | objCode = Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? WxPlatConstants.visitContent.visitAuditSuccess: |
| | | WxPlatConstants.visitContent.visitAuditFail; |
| | | } |
| | |
| | | //发送微信公众号 |
| | | if(StringUtils.isNotBlank(objCode)){ |
| | | if(Objects.nonNull(visits) && StringUtils.isNotBlank(visits.getOpenid())){ |
| | | wxPlatNotice.sendVisitTemplateNotice( |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,visits, objCode, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(visits.getOpenid().split(",")) |
| | |
| | | this.updDriver(approveDTO,approve,true); |
| | | CarUseBook carUseBook = carUseBookJoinMapper.selectById(approveDTO.getObjId()); |
| | | if(Objects.nonNull(carUseBook)){ |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | SystemUser systemUser = systemUserMapper.selectById(carUseBook.getCreator()); |
| | | //发送通知短息 |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getPhone())){ |
| | | if(Objects.nonNull(systemUser)&&StringUtils.isNotBlank(systemUser.getMobile())){ |
| | | SmsEmailServiceImpl.sendCarUseSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,carUseBookMapper,approveDTO.getObjId(), |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?SmsConstants.carUseBookContent.carUseBookAuditSuccess: |
| | | SmsConstants.carUseBookContent.carUseBookAuditFail, |
| | | approveDTO.getCheckInfo(),Arrays.asList(member.getPhone().split(",")) |
| | | approveDTO.getCheckInfo(),Arrays.asList(systemUser.getMobile().split(",")) |
| | | ); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getOpenid())){ |
| | | if(Objects.nonNull(systemUser)&&StringUtils.isNotBlank(systemUser.getOpenid())){ |
| | | carUseBook.setMemberName(systemUser.getRealname()); |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,carUseBook, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.carUseBookContent.carUseBookAuditSuccess: WxPlatConstants.carUseBookContent.carUseBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | Arrays.asList(systemUser.getOpenid().split(",")),0); |
| | | } |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | //发送微信公众号消息 |
| | | Member member = memberMapper.selectById(platformBooks.getDriverId() ); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .eq(SystemUser::getMobile,platformBooks.getDriverPhone()) |
| | | .last(" limit 1 ")); |
| | | if(Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())){ |
| | | //发送微信公众号通知 |
| | | wxPlatNotice.sendPlatformBookTemplateNotice( |
| | | wxNoticeConfigMapper,platformBooks, |
| | | wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper, platformBooks, |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.platformBookContent.platformBookAuditSuccess: WxPlatConstants.platformBookContent.platformBookAuditFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | Arrays.asList(driver.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | }else{ |