| | |
| | | import com.doumee.core.tms.model.response.TmsBaseResponse; |
| | | import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse; |
| | | 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; |
| | |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private PlatformWarnEventServiceImpl platformWarnEventService; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformJob platformJob) { |
| | |
| | | SmsConstants.platformJobContent.platformJobCallIn,null,null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobCallIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | SmsConstants.platformJobContent.platformJobSingIn,platform.getName(),null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobSingIn, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.CALLING.getInfo(), |
| | |
| | | SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName() |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobMove, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(oldPlatform.getName()); |
| | | platformJob.setPlatformId(oldPlatform.getId()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobOverNum,null,null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper,platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobOverNum, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | | null |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobError,platform.getName(),null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobError, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobWorking, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.WORKING.getInfo(), |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobFinish,platform.getName(),null |
| | | ); |
| | | |
| | | //公众号模板消息 |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | Member member = memberMapper.selectById(platformJob.getDriverId()); |
| | | if (Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())) { |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendPlatformJobTemplateNotice( |
| | | wxNoticeConfigMapper, platformJob, |
| | | WxPlatConstants.platformJobContent.platformJobFinish, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM, Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.DONE.getInfo(), |