|  |  |  | 
|---|
|  |  |  | * @param objCode  visitUpload,visitAuditSuccess,visitWaitAudit,visitWaitAudit,visitReportUpload,visitReportAuditSuccess,visitReportAuditFail, visitReportAuditSuccess | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendVisitTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, Visits visits, String objCode, String token, List<String> openIds){ | 
|---|
|  |  |  | public void  sendVisitTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, Visits visits, String objCode, String token, List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda() | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Constants.WxUrlParams wxUrlParams =  Constants.WxUrlParams.VISIT_REPORT_RECORD_USER; | 
|---|
|  |  |  | if(!Constants.equalsInteger(visits.getType(),Constants.TWO)){ | 
|---|
|  |  |  | if(!objCode.equals(WxPlatConstants.visitContent.visitWaitAudit)){ | 
|---|
|  |  |  | wxUrlParams = Constants.WxUrlParams.VISIT_RECORD_VISIT; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | wxUrlParams = Constants.WxUrlParams.VISIT_RECORD_USER; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | wxUrlParams | 
|---|
|  |  |  | ,visits.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url", jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息跳转地址:{}·--++==·", jumpUrl); | 
|---|
|  |  |  | if(StringUtils.isBlank(response)){ | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param objCode hiddenDangerUpload | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendHiddenDangerUploadTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ | 
|---|
|  |  |  | public void  sendHiddenDangerUploadTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.hiddenDanger) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getObjCode,objCode) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getStatus, Constants.ZERO) | 
|---|
|  |  |  | .last(" limit 1") | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.HIDDEN_DANGER,hiddenDanger.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | thing12.put("value",hiddenDanger.getMemberName()); | 
|---|
|  |  |  | //提报时间 | 
|---|
|  |  |  | Map<String, Object> time11 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time11.put("value", DateUtil.getDate(hiddenDanger.getCreateDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time11.put("value", DateUtil.getFomartDate(hiddenDanger.getCreateDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("thing9",thing9); | 
|---|
|  |  |  | dataMap.put("thing1",thing1); | 
|---|
|  |  |  | dataMap.put("thing12",thing12); | 
|---|
|  |  |  | dataMap.put("time11",time11); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("url", jumpUrl); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息跳转地址:{}", jumpUrl); | 
|---|
|  |  |  | if(StringUtils.isBlank(response)){ | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param objCode hiddenDangerDeal | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendHiddenDangerDealTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ | 
|---|
|  |  |  | public void  sendHiddenDangerDealTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, HiddenDanger hiddenDanger, String objCode,String token, List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.hiddenDanger) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getObjCode,objCode) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getStatus, Constants.ZERO) | 
|---|
|  |  |  | .last(" limit 1") | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.HIDDEN_DANGER,hiddenDanger.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | thing13.put("value",Constants.equalsInteger(hiddenDanger.getStatus(),Constants.ONE)?"隐患已整改":"隐患已退回"); | 
|---|
|  |  |  | //提交人 | 
|---|
|  |  |  | Map<String, Object> thing10 = new HashMap<String,Object>(); | 
|---|
|  |  |  | thing10.put("value",hiddenDanger.getCheckorName()); | 
|---|
|  |  |  | thing10.put("value",hiddenDanger.getMemberName()); | 
|---|
|  |  |  | //通知时间 | 
|---|
|  |  |  | Map<String, Object> time16 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time16.put("value", DateUtil.getDate(hiddenDanger.getDealTime(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time16.put("value", DateUtil.getFomartDate(hiddenDanger.getDealTime(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("thing17",thing17); | 
|---|
|  |  |  | dataMap.put("thing3",thing3); | 
|---|
|  |  |  | dataMap.put("thing13",thing13); | 
|---|
|  |  |  | dataMap.put("thing10",thing10); | 
|---|
|  |  |  | dataMap.put("time16",time16); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url", jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息跳转地址:{}", jumpUrl); | 
|---|
|  |  |  | if(StringUtils.isBlank(response)){ | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | * @param sendType 0=申请人;1=审批人 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendCarUseBookTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, CarUseBook carUseBook, String objCode,String token, | 
|---|
|  |  |  | public void  sendCarUseBookTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, CarUseBook carUseBook, String objCode,String token, | 
|---|
|  |  |  | List<String> openIds,Integer sendType){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.CAR_USE,carUseBook.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url", jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | * @param sendType 0=申请人;1=审批人 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendPlatformBookTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformBooks platformBooks, String objCode,String token, | 
|---|
|  |  |  | public void  sendPlatformBookTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, PlatformBooks platformBooks, String objCode,String token, | 
|---|
|  |  |  | List<String> openIds,Integer sendType){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.platformBook) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getObjCode,objCode) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getStatus, Constants.ZERO) | 
|---|
|  |  |  | .last(" limit 1") | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Constants.WxUrlParams  wxUrlParams = Constants.WxUrlParams.PLATFORM_BOOK_DRIVER; | 
|---|
|  |  |  | if(!objCode.equals(WxPlatConstants.platformBookContent.platformBookUpload)){ | 
|---|
|  |  |  | wxUrlParams = Constants.WxUrlParams.PLATFORM_BOOK; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | wxUrlParams,platformBooks.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | }else if(Constants.equalsInteger(platformBooks.getStatus(),Constants.TWO)){ | 
|---|
|  |  |  | const9.put("value","申请已审核通过"); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | const9.put("value","申请已被驳回"); | 
|---|
|  |  |  | const9.put("value","申请已审核驳回"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //车牌号 | 
|---|
|  |  |  | 
|---|
|  |  |  | thing8.put("value", platformBooks.getDriverName()); | 
|---|
|  |  |  | //时间 | 
|---|
|  |  |  | Map<String, Object> time4 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time4.put("value", DateUtil.getDate(platformBooks.getArriveDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time4.put("value", DateUtil.getFomartDate(platformBooks.getArriveDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("const9",const9); | 
|---|
|  |  |  | dataMap.put("car_number3",car_number3); | 
|---|
|  |  |  | dataMap.put("phrase4",phrase4); | 
|---|
|  |  |  | dataMap.put("thing8",thing8); | 
|---|
|  |  |  | dataMap.put("time4",time4); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | dataMap.put("time2",time4); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url", jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param objCode   platformJobNewJob | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendWmsTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | public void  sendWmsTemplateNotice(SystemDictDataBiz systemDictDataBiz, WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.PLATFORM_JOB_DRIVER,platformJob.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | thing3.put("value", platformJob.getDriverName()); | 
|---|
|  |  |  | //下达时间 | 
|---|
|  |  |  | Map<String, Object> time4 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time4.put("value", DateUtil.getDate(platformJob.getCreateDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time4.put("value", DateUtil.getFomartDate(platformJob.getCreateDate(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("character_string1",character_string1); | 
|---|
|  |  |  | dataMap.put("thing3",thing3); | 
|---|
|  |  |  | dataMap.put("time4",time4); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url",jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param objCode   platformJobNewJob | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendWmsCancelTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | public void  sendWmsCancelTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.PLATFORM_JOB_DRIVER,platformJob.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | character_string1.put("value",platformJob.getBillCode()); | 
|---|
|  |  |  | //取消时间 | 
|---|
|  |  |  | Map<String, Object> time6 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time6.put("value", DateUtil.getDate(new Date(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time6.put("value", DateUtil.getFomartDate(new Date(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("character_string1",character_string1); | 
|---|
|  |  |  | dataMap.put("time6",time6); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url",jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param token | 
|---|
|  |  |  | * @param openIds | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void  sendPlatformJobTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | public void  sendPlatformJobTemplateNotice(SystemDictDataBiz systemDictDataBiz,WxNoticeConfigMapper wxNoticeConfigMapper, PlatformJob platformJob, String objCode,String token, | 
|---|
|  |  |  | List<String> openIds){ | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | if(CollectionUtils.isNotEmpty(openIds)){ | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.visit) | 
|---|
|  |  |  | WxNoticeConfig wxNoticeConfig =  wxNoticeConfigMapper.selectOne(new QueryWrapper<WxNoticeConfig>().lambda().eq(WxNoticeConfig::getObjType,WxPlatConstants.platformJob) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getObjCode,objCode) | 
|---|
|  |  |  | .eq(WxNoticeConfig::getStatus, Constants.ZERO) | 
|---|
|  |  |  | .last(" limit 1") | 
|---|
|  |  |  | 
|---|
|  |  |  | if(Objects.isNull(wxNoticeConfig)){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String jumpUrl = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(), | 
|---|
|  |  |  | Constants.WxUrlParams.PLATFORM_JOB_DRIVER,platformJob.getId().toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; | 
|---|
|  |  |  | //整体参数map | 
|---|
|  |  |  | Map<String, Object> paramMap = new HashMap<String, Object>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | Map<String, Object> const6 = new HashMap<String,Object>(); | 
|---|
|  |  |  | const6.put("value",wxNoticeConfig.getTitile()); | 
|---|
|  |  |  | //车牌号 | 
|---|
|  |  |  | Map<String, Object> character_string1 = new HashMap<String,Object>(); | 
|---|
|  |  |  | character_string1.put("value",platformJob.getCarCodeFront()); | 
|---|
|  |  |  | Map<String, Object> car_number3 = new HashMap<String,Object>(); | 
|---|
|  |  |  | car_number3.put("value",platformJob.getCarCodeFront()); | 
|---|
|  |  |  | //月台号 | 
|---|
|  |  |  | Map<String, Object> thing3 = new HashMap<String,Object>(); | 
|---|
|  |  |  | thing3.put("value", platformJob.getPlatformName()); | 
|---|
|  |  |  | Map<String, Object> thing9 = new HashMap<String,Object>(); | 
|---|
|  |  |  | thing9.put("value", platformJob.getPlatformName()); | 
|---|
|  |  |  | //时间 | 
|---|
|  |  |  | Map<String, Object> time4 = new HashMap<String,Object>(); | 
|---|
|  |  |  | time4.put("value", DateUtil.getDate(new Date(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | time4.put("value", DateUtil.getFomartDate(new Date(),"yyyy年MM月dd日 HH:mm:ss") ); | 
|---|
|  |  |  | dataMap.put("const6",const6); | 
|---|
|  |  |  | dataMap.put("character_string1",character_string1); | 
|---|
|  |  |  | dataMap.put("thing3",thing3); | 
|---|
|  |  |  | dataMap.put("car_number3",car_number3); | 
|---|
|  |  |  | dataMap.put("thing9",thing9); | 
|---|
|  |  |  | dataMap.put("time4",time4); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | for (String openId:openIds) { | 
|---|
|  |  |  | paramMap.clear(); | 
|---|
|  |  |  | paramMap.put("url",jumpUrl); | 
|---|
|  |  |  | paramMap.put("template_id", wxNoticeConfig.getTempId()); | 
|---|
|  |  |  | paramMap.put("touser", openId); | 
|---|
|  |  |  | paramMap.put("data", dataMap); | 
|---|
|  |  |  | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息内容:{}", JSONObject.toJSONString(paramMap)); | 
|---|
|  |  |  | if(StringUtils.isBlank(response)){ | 
|---|
|  |  |  | log.warn("·==++--·推送微信模板信息:{}·--++==·", "失败"); | 
|---|
|  |  |  | }else{ | 
|---|