| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | } else if (active.equals("sltd")) { |
| | | //省立同德的短信发送方式 |
| | | String data = MessageSend.sendMsg(sendMagParam.getContent(), "6", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); |
| | | if (StringUtils.isNotEmpty(data) && data.contains("result=0")) { |
| | | s = "true"; |
| | | if (StringUtils.isNotEmpty(data)) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | JsonNode root = mapper.readTree(data); |
| | | String status = root.get("result").get(0).get("status").asText(); |
| | | if (status.equals("00000")) { |
| | | s = "true"; |
| | | } else { |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5"); |
| | | throw new BaseException("短信发送失败"); |
| | | } |
| | | } else { |
| | | setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败: " + data, "5"); |
| | | throw new BaseException("短信发送失败"); |
| | |
| | | if (active.equals("hzszlyy")) { |
| | | wxCode = smsUtils.sendChat(url, patArchive.getTelcode(), serviceSubtask.getSfzh()); |
| | | log.info(wxCode); |
| | | }else { |
| | | } else { |
| | | wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskName(), patArchive.getTelcode(), patArchive.getName(), patArchive.getPatidHis(), wxqqxx); |
| | | log.error("wxCode的值为:{}", wxCode); |
| | | Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); |