|
@ -182,12 +182,13 @@ public class DeviceUploadService {
|
|
|
messageDO.setReceiver(patientDO.getId());
|
|
|
messageDO.setReceiverName(patientDO.getName());
|
|
|
messageDO.setOver("1");
|
|
|
|
|
|
String url = "";
|
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity("http://127.0.0.1:10301/common/open/wordToVoice?text={1}", String.class, typeName);
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(forEntity.getBody());
|
|
|
if (jsonObject.getInteger("status") == 200) {
|
|
|
//语音生成
|
|
|
messageDO.setAudioUrl(jsonObject.getString("message"));
|
|
|
url = jsonObject.getString("message");
|
|
|
messageDO.setAudioUrl(url);
|
|
|
}
|
|
|
messageDO.setCode(type);//与体征类型对应
|
|
|
JSONArray errorIndex = healthIndexUtil.verifyHealthIndex(Integer.parseInt(type), result.getValue1(), result.getValue2(),
|
|
@ -204,6 +205,7 @@ public class DeviceUploadService {
|
|
|
message.put("relation_code", messageDO.getRelationCode());
|
|
|
message.put("content_type", 42);
|
|
|
message.put("content_notice", "");
|
|
|
message.put("audioUrl", url);
|
|
|
String content_notice = "";
|
|
|
for (int i = 0; i < errorIndex.size(); i++) {
|
|
|
com.alibaba.fastjson.JSONObject tmp = errorIndex.getJSONObject(i);
|