|
@ -6,6 +6,7 @@ package com.yihu.wlyy.web.patient.specialist.rehabilitation;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.service.specialist.rehabilitation.RehabilitationManageService;
|
|
|
import com.yihu.wlyy.util.ImUtill;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -30,6 +31,8 @@ public class PatientRehabilitationManageController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private RehabilitationManageService rehabilitationManageService;
|
|
|
@Autowired
|
|
|
private ImUtill imUtill;
|
|
|
|
|
|
@RequestMapping(value = "patientRehabilitationDetail", method = RequestMethod.GET)
|
|
|
@ApiOperation("康复管理-微信端-居民详情页")
|
|
@ -100,4 +103,35 @@ public class PatientRehabilitationManageController extends BaseController {
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "sendMessageIm", method = RequestMethod.POST)
|
|
|
@ApiOperation("康复管理-扫描二维码发送消息")
|
|
|
@ObserverRequired
|
|
|
public String sendMessageIm(@ApiParam(name = "sendId", value = "发送者id")@RequestParam(value = "sendId", required = true)String sendId,
|
|
|
@ApiParam(name = "receiverId", value = "接受者id", required = true)@RequestParam(value = "receiverId", required = true)String receiverId,
|
|
|
@ApiParam(name = "content", value = "内容", required = true)@RequestParam(value = "content", required = true)String content){
|
|
|
|
|
|
try {
|
|
|
imUtill.sendMessage(sendId,receiverId,"1",content);
|
|
|
return write(200,"发送成功!");
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "发送失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "checkAfterQrCode", method = RequestMethod.POST)
|
|
|
@ApiOperation("康复管理-居民扫码后验证是否是关联的居民扫码")
|
|
|
@ObserverRequired
|
|
|
public String checkAfterQrCode(@ApiParam(name = "planDetailId", value = "康复计划项目明细ID")@RequestParam(value = "planDetailId", required = true)String planDetailId,
|
|
|
@ApiParam(name = "patientCode", value = "居民端登录的居民code")@RequestParam(value = "patientCode", required = true)String patientCode){
|
|
|
|
|
|
try {
|
|
|
JSONObject result = rehabilitationManageService.checkAfterQrCode(planDetailId,patientCode);
|
|
|
return write(200, String.valueOf(result.get("message")), "data", result.get("obj"));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "验证失败");
|
|
|
}
|
|
|
}
|
|
|
}
|