| | |
| | | import com.doumee.core.wms.model.response.WmsBaseDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsInventoryDataResponse; |
| | | 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 EmayService emayService; |
| | | @Autowired |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | /** |
| | | * 入库通知任务业务处理 |
| | | * @param job 参数 |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,job.getId(), |
| | | SmsConstants.platformJobContent.platformJobNewJob,null,null |
| | | ); |
| | | //查询司机信息 发送公众号通知 |
| | | if(Objects.nonNull(job.getDriverId())){ |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getPhone,job.getDriverId())); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobNewJob, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | .set(PlatformJob::getStatus,Constants.PlatformJobStatus.CANCEL.getKey()) |
| | | .in(PlatformJob::getId,setJobIds) |
| | | ); |
| | | |
| | | for (Integer jobId:setJobIds |
| | | ) { |
| | | //短信通知 |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,jobId, |
| | | SmsConstants.platformJobContent.platformJobStopJob,null,null |
| | | ); |
| | | //公众号通知司机 任务取消 |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,jobId, |
| | | SmsConstants.platformJobContent.platformJobStopJob,null,null |
| | | ); |
| | | |
| | | //公众号通知司机 任务取消 |
| | | PlatformJob job = platformJobMapper.selectById(jobId); |
| | | if(Objects.nonNull(job)){ |
| | | Member member = memberMapper.selectById(job.getDriverId()); |
| | | if(Objects.nonNull(member) && StringUtils.isNotBlank(member.getOpenid())){ |
| | | WxPlatNotice wxPlatNotice = new WxPlatNotice(); |
| | | wxPlatNotice.sendWmsCancelTemplateNotice( |
| | | wxNoticeConfigMapper,job, |
| | | WxPlatConstants.platformJobContent.platformJobCancel, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(member.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |