|
@ -9,6 +9,7 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
|
|
@ -34,9 +35,11 @@ public class PatientHealthGuidanceController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "list")
|
|
|
@ResponseBody
|
|
|
public String list(long id, int pagesize) {
|
|
|
public String list(@RequestParam String id, @RequestParam String pagesize) {
|
|
|
try {
|
|
|
JSONArray array = patientHealthGuidanceService.findGuidanceByPatient(getUID(), id, pagesize);
|
|
|
Long idl = Long.parseLong(id);
|
|
|
int pageSize = Integer.parseInt(pagesize);
|
|
|
JSONArray array = patientHealthGuidanceService.findGuidanceByPatient(getUID(), idl, pageSize);
|
|
|
return write(200, "查询成功!", "list", array);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
@ -52,13 +55,14 @@ public class PatientHealthGuidanceController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/id")
|
|
|
@ResponseBody
|
|
|
public String getHealthGuidance(Long id){
|
|
|
public String getHealthGuidance(@RequestParam String id){
|
|
|
try{
|
|
|
if(id == null || id < 1){
|
|
|
Long idl = Long.parseLong(id);
|
|
|
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,"查询失败");
|