Forráskód Böngészése

康复计划更新

zd_123 7 éve
szülő
commit
47ddfa8dd4

+ 7 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -351,11 +351,11 @@ public class RehabilitationManageService extends BaseService {
        throw new Exception("请求微服务失败!");
    }
    public String createServiceQrCode(String planDetailId,String sessionId) throws Exception{
    public String createServiceQrCode(String planDetailId,String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("sessionId", sessionId);
        //specialistUrl= "http://localhost:10051";
        param.put("doctorCode", doctorCode);
        specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + createServiceQrCode, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
@ -368,7 +368,7 @@ public class RehabilitationManageService extends BaseService {
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("patientCode", patientCode);
        //specialistUrl= "http://localhost:10051";
        specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + checkAfterQrCode, param);
        JSONObject result = new JSONObject(response.getContent());
        return  result;
@ -446,10 +446,10 @@ public class RehabilitationManageService extends BaseService {
    }
    public JSONObject saveRehabilitationOperateRecodr(String dataJson) throws Exception{
    public JSONObject saveRehabilitationOperateRecord(String dataJson) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("dataJson", dataJson);
        //specialistUrl= "http://localhost:10051";
        specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + saveRehabilitationOperateRecodr, param);
        JSONObject result = new JSONObject(response.getContent());
        return  result;
@ -460,7 +460,7 @@ public class RehabilitationManageService extends BaseService {
        param.put("planDetailId", planDetailId);
        param.put("node", node);
        param.put("image", image);
        //specialistUrl= "http://localhost:10051";
        specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + updateNoteAndImageRehabilitationOperate, param);
        JSONObject result = new JSONObject(response.getContent());
        return  result;

+ 3 - 21
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java

@ -252,13 +252,13 @@ public class DoctorRehabilitationManageController extends BaseController {
    }
    @RequestMapping(value = "createServiceQrCode", method = RequestMethod.POST)
    @ApiOperation("康复管理-根据康复计划明细id和对话sessionId生成服务码")
    @ApiOperation("康复管理-根据康复计划明细id和医生code生成服务码")
    @ObserverRequired
    public String createServiceQrCode(@ApiParam(name = "planDetailId", value = "康复计划项目明细ID")@RequestParam(value = "planDetailId", required = true)String planDetailId,
                                      @ApiParam(name = "sessionId", value = "IM对话sessionId")@RequestParam(value = "sessionId", required = true)String sessionId){
                                      @ApiParam(name = "doctorCode", value = "医生code")@RequestParam(value = "doctorCode", required = true)String doctorCode){
        try {
            return write(200, "获取二维码成功!", "data", rehabilitationManageService.createServiceQrCode(planDetailId,sessionId));
            return write(200, "获取二维码成功!", "data", rehabilitationManageService.createServiceQrCode(planDetailId,doctorCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求二维码失败");
@ -317,24 +317,6 @@ public class DoctorRehabilitationManageController extends BaseController {
        }
    }
    @RequestMapping(value = "saveRehabilitationOperateRecodr", method = RequestMethod.POST)
    @ApiOperation("康复管理-新增operateRecodr")
    @ObserverRequired
    public String saveRehabilitationOperateRecodr(@ApiParam(name = "dataJson", value = "实体json",defaultValue = "{\"rehabilitationDetailId\":\"402803f6657f195301657f4fbd3c0001\",\"patientCode\":\"00\",\"patientName\":\"11\",\"doctorCode\":\"22\",\"doctorName\":\"33\",\"node\":\"jjjjjj\",\"relationRecordType\":\"4\",\"relation_record_code\":\"55\",\"relationRecordImg\":\"666666\",\"status\":\"0\"}")@RequestParam(value = "dataJson", required = true)String dataJson){
        try {
            JSONObject result = rehabilitationManageService.saveRehabilitationOperateRecodr(dataJson);
            if(result.getInt("status")==200){
                return write(200, "新增康复计划日志成功!", "data", result.getJSONObject("obj"));
            }else {
                return error(-1, result.getString("message"));
            }
        } catch (Exception e) {
            error(e);
            return error(-1, "新增康复计划日志失败!");
        }
    }
    @RequestMapping(value = "updateNoteAndImageRehabilitationOperate", method = RequestMethod.POST)
    @ApiOperation("康复管理-康复计划完成时更新服务完成笔记和图片接口并且确认完成")
    @ObserverRequired

+ 21 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

@ -21,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/8/30.
 */
@ -128,10 +130,28 @@ public class PatientRehabilitationManageController extends BaseController {
        try {
            JSONObject result = rehabilitationManageService.checkAfterQrCode(planDetailId,patientCode);
            return write(200, String.valueOf(result.get("message")), "data", result.get("obj"));
            return write(200, String.valueOf(result.get("message")), "data", result.getJSONObject("obj"));
        } catch (Exception e) {
            error(e);
            return error(-1, "验证失败");
        }
    }
    @RequestMapping(value = "saveRehabilitationOperateRecord", method = RequestMethod.POST)
    @ApiOperation("康复管理-新增operateRecord")
    @ObserverRequired
    public String saveRehabilitationOperateRecord(@ApiParam(name = "dataJson", value = "实体json",defaultValue = "{\"rehabilitationDetailId\":\"402803f6657f195301657f4fbd3c0001\",\"patientCode\":\"00\",\"patientName\":\"11\",\"doctorCode\":\"22\",\"doctorName\":\"33\",\"node\":\"jjjjjj\",\"relationRecordType\":\"4\",\"relation_record_code\":\"55\",\"relationRecordImg\":\"666666\",\"status\":\"0\"}")@RequestParam(value = "dataJson", required = true)String dataJson){
        try {
            JSONObject result = rehabilitationManageService.saveRehabilitationOperateRecord(dataJson);
            if(result.getInt("status")==200){
                return write(200, "新增康复计划日志成功!", "data", result.getJSONObject("obj"));
            }else {
                return error(-1, result.getString("message"));
            }
        } catch (Exception e) {
            error(e);
            return error(-1, "新增康复计划日志失败!");
        }
    }
}