|
@ -58,20 +58,21 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/id")
|
|
|
@ResponseBody
|
|
|
public String getHealthGuidance(Long id){
|
|
|
public String getHealthGuidance(@RequestParam String id){
|
|
|
Long idl = Long.parseLong(id);
|
|
|
try{
|
|
|
if(id == null || id < 1){
|
|
|
if(idl == null || idl < 1){
|
|
|
return error(-1,"参数错误");
|
|
|
}
|
|
|
|
|
|
JSONObject guidance = patientHealthGuidanceService.findById(id);
|
|
|
JSONObject guidance = patientHealthGuidanceService.findById(idl);
|
|
|
return write(200,"查询成功","data",guidance);
|
|
|
}catch (Exception e){
|
|
|
return error(-1,"查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
/*/**
|
|
|
* 添加患者健康指导
|
|
|
* @param patient 患者标识
|
|
|
* @param content 指导内容
|
|
@ -111,6 +112,12 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
|
|
|
}
|
|
|
}*/
|
|
|
// ====================修改代码========================
|
|
|
/**
|
|
|
* 添加患者健康指导
|
|
|
* @param patient 患者标识
|
|
|
* @param content 指导内容
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "add")
|
|
|
@ResponseBody
|
|
|
public String add(@RequestParam String patient,@RequestParam String content, @RequestParam(required = false) String images, @RequestParam(required = false) String voice) {
|
|
@ -152,21 +159,29 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
|
|
|
/**
|
|
|
* 查询患者的健康指导
|
|
|
* @param patient 患者标识
|
|
|
* @param begin 开始时间
|
|
|
* @param end 结束时间
|
|
|
* @param begin 开始时间
|
|
|
* @param end 结束时间
|
|
|
* @param id 指导编码
|
|
|
* @param pagesize 展示页数
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "list")
|
|
|
@ResponseBody
|
|
|
public String list(@RequestParam(required = false) String patient, @RequestParam(required = false) String begin, @RequestParam(required = false) String end, long id, int pagesize) {
|
|
|
public String list(@RequestParam(required = false) String patient,
|
|
|
@RequestParam(required = false) String begin,
|
|
|
@RequestParam(required = false) String end,
|
|
|
@RequestParam String id,
|
|
|
@RequestParam String pagesize) {
|
|
|
try {
|
|
|
Long idl = Long.parseLong(id);
|
|
|
int page = Integer.parseInt(pagesize);
|
|
|
if (StringUtils.isNotEmpty(begin)) {
|
|
|
begin = begin + " 00:00:00";
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(end)) {
|
|
|
end = end + " 23:59:59";
|
|
|
}
|
|
|
JSONArray array = patientHealthGuidanceService.findPatientGuidanceByDoctor(getUID(), patient, begin, end, id, pagesize);
|
|
|
JSONArray array = patientHealthGuidanceService.findPatientGuidanceByDoctor(getUID(), patient, begin, end, idl, page);
|
|
|
return write(200, "查询成功!", "list", array);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|