| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private VisitParkMapper visitParkMapper; |
| | | |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | |
| | | @Override |
| | |
| | | this.organizeApproveCopyData(approveTempl,approveCopyList,businessId,approveList); |
| | | } |
| | | approveJoinMapper.insert(approveList); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | approve.setAddrParam(approveParam.getAddrParam()); |
| | | approve.setType(Constants.ZERO); |
| | | approveList.add(approve); |
| | | |
| | | if(Constants.equalsInteger(approve.getStatus(),Constants.ONE)){ |
| | | //发送短信通知 |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.reason)){ |
| | | //物流车预约 |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,businessId, |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | null,null |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | .in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList()))); |
| | | } |
| | | /**开启下一级别的数据为待审核**/ |
| | | |
| | | List<Approve> waitAuditList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .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()); |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.reason)){ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,approveDTO.getObjId(), |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)) { |
| | |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.ONE).eq(Visits::getId,visits.getId())); |
| | | } |
| | | } |
| | | |
| | | |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,false); |
| | |
| | | visits.setEditDate(new Date()); |
| | | visits.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | //下发访客报备车辆信息 |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)&&approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | Boolean sendStatus = true; |
| | | //查询当前启用的停车场 |
| | | List<Parks> parksList = parksMapper.selectList(new QueryWrapper<Parks>() |
| | |
| | | platformBooks.setStatus(approveDTO.getStatus()); |
| | | platformBooks.setEditDate(new Date()); |
| | | platformBooks.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)){ |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooks.getReasonId()); |
| | | if(Objects.isNull(platformReason)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到入园原因数据"); |
| | |
| | | platformLog.setObjId(platformJob.getId().toString()); |
| | | platformLog.setAfterContent(JSONObject.toJSONString(platformJob)); |
| | | platformLogMapper.insert(platformLog); |
| | | } |
| | | //发送短信通知 |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,platformBooks.getId(), |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?SmsConstants.platformBookContent.platformBookAuditSuccess: |
| | | SmsConstants.platformBookContent.platformBookAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | |
| | | //TODO 发送微信公众号消息 |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |