| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | | import com.doumee.dao.business.join.CarUseBookJoinMapper; |
| | |
| | | import com.doumee.dao.business.vo.ApproveDataVO; |
| | | import com.doumee.dao.business.vo.DateIntervalVO; |
| | | |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.CarUseBookService; |
| | |
| | | private ApproveJoinMapper approveJoinMapper; |
| | | |
| | | @Autowired |
| | | private NoticesJoinMapper noticesJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | carUseBookMapper.insert(carUseBook); |
| | | //用车申请 审批记录创建 |
| | | approveService.createApproveFlow(carUseBook.getType()==0?3:4,carUseBook.getId(),carUseBook.getMemberId()); |
| | | //发送微信公众号通知 |
| | | //发送微信公众号通知 |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | wxPlatNotice.sendCarUseBookTemplateNotice( |
| | | wxNoticeConfigMapper,carUseBook, |
| | | WxPlatConstants.carUseBookContent.carUseBookUpload, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")),0); |
| | | } |
| | | |
| | | return carUseBook.getId(); |
| | | } |
| | | |
| | |
| | | .in(Approve::getObjType,Constants.approveObjectType.cityUseCar,Constants.approveObjectType.unCityUseCar) |
| | | .eq(Approve::getObjId,id) |
| | | ); |
| | | |
| | | //处理待办信息 |
| | | noticesJoinMapper.update(null,new UpdateWrapper<Notices>().lambda() |
| | | .set(Notices::getStatus,Constants.ONE) |
| | | .eq(Notices::getType,Constants.TWO) |
| | | .eq(Notices::getObjId,carUseBook.getId()) |
| | | ); |
| | | |
| | | |
| | | Member member = memberMapper.selectById(carUseBook.getMemberId()); |
| | | if(Objects.nonNull(member)&&StringUtils.isNotBlank(member.getPhone())){ |
| | | //用车申请取消 |