| | |
| | | public void sendVisitTemplateNotice(WxNoticeConfigMapper wxNoticeConfigMapper, Visits visits, 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() |
| | | .in(WxNoticeConfig::getObjType,WxPlatConstants.visit,WxPlatConstants.visitReport) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | | thing1.put("value", visits.getName()); |
| | | Map<String, Object> car_number7 = new HashMap<String,Object>(); |
| | | car_number7.put("value",StringUtils.isNotBlank(visits.getCarNos())?visits.getCarNos():"-"); |
| | | car_number7.put("value",StringUtils.isNotBlank(visits.getCarNos())?visits.getCarNos():"无"); |
| | | dataMap.put("car_number7",car_number7); |
| | | Map<String, Object> character_string6 = new HashMap<String,Object>(); |
| | | character_string6.put("value","1"); |
| | | Map<String, Object> thing4 = new HashMap<String,Object>(); |
| | | thing4.put("value",visits.getReason()); |
| | | dataMap.put("const9",const9); |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("car_number7",car_number7); |
| | | dataMap.put("character_string6",character_string6); |
| | | dataMap.put("thing4",thing4); |
| | | paramMap.put("data", dataMap); |
| | |
| | | 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.carUse) |
| | | .eq(WxNoticeConfig::getObjCode,objCode) |
| | | .eq(WxNoticeConfig::getStatus, Constants.ZERO) |
| | | .last(" limit 1") |
| | |
| | | Map<String, Object> thing3 = new HashMap<String,Object>(); |
| | | if(Constants.equalsInteger(sendType,Constants.ONE)){ |
| | | thing3.put("value","申请待您审批"); |
| | | }else{ |
| | | }else if(Constants.equalsInteger(sendType,Constants.ZERO)){ |
| | | if(Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)){ |
| | | thing3.put("value","申请提交成功待审核"); |
| | | }else if(Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){ |
| | |
| | | }else{ |
| | | thing3.put("value","申请已被驳回"); |
| | | } |
| | | }else{ |
| | | thing3.put("value","申请已被取消"); |
| | | } |
| | | //申请人 |
| | | Map<String, Object> thing1 = new HashMap<String,Object>(); |
| | |
| | | dataMap.put("thing1",thing1); |
| | | dataMap.put("thing11",thing11); |
| | | dataMap.put("time14",time14); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("data", dataMap); |
| | | for (String openId:openIds) { |
| | | paramMap.clear(); |
| | | paramMap.put("template_id", wxNoticeConfig.getTempId()); |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |