|
@ -829,30 +829,27 @@ public class ConsultController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "oneLog")
|
|
|
@ResponseBody
|
|
|
public String oneLog(String consult, Long logId) {
|
|
|
public String oneLog(@RequestParam String consult, @RequestParam Long logId,@RequestParam int msgType) {
|
|
|
try {
|
|
|
ConsultTeam consultModel = consultTeamService.findByCode(consult);
|
|
|
if (consultModel == null) {
|
|
|
return error(-1, "咨询记录不存在!");
|
|
|
}
|
|
|
// // 查询日志列表
|
|
|
// JSONObject json = new JSONObject();
|
|
|
// ConsultTeamLog log = consultTeamService.oneLog(logId);
|
|
|
// if (log != null) {
|
|
|
// json.put("id", log.getId());
|
|
|
// // 设置回复医生姓名
|
|
|
// json.put("doctorName", log.getDoctorName());
|
|
|
// // 设置回复内容
|
|
|
// json.put("content", log.getContent());
|
|
|
// // 设置咨询或回复时间
|
|
|
// json.put("time", DateUtil.dateToStr(log.getCzrq(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
|
|
// // 设置记录类型:1文字,2图片,3语音
|
|
|
// json.put("msgType", log.getChatType());
|
|
|
// // 设置类型:0患者问,1医生回复,2患者追问,3患者评价
|
|
|
// json.put("type", log.getType());
|
|
|
// }
|
|
|
|
|
|
JSONObject obj = new JSONObject();
|
|
|
|
|
|
String url = SystemConf.getInstance().getSystemProperties().getProperty("im_list_get")
|
|
|
+ "api/v1/chats/message";
|
|
|
String reG = HttpUtil.sendGet(url, "id=" + logId + "&type=" + msgType);
|
|
|
JSONObject obj = null;
|
|
|
if (!org.springframework.util.StringUtils.isEmpty(reG)) {
|
|
|
obj = new JSONObject(new String(reG.getBytes(), "utf-8"));
|
|
|
} else {
|
|
|
return error(-1,"查询失败");
|
|
|
}
|
|
|
|
|
|
if(obj == null){
|
|
|
return error(-1,"查询失败");
|
|
|
}
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
|
|
json.put("id", obj.getInt("id"));
|