Parcourir la source

康复计划代码提交

liuwenbin il y a 7 ans
Parent
commit
afe66add52

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

@ -105,6 +105,10 @@ public class RehabilitationManageService extends BaseService {
                patientCode = json.getJSONObject(i).get("patientCode")+"";
                patient = patientDao.findByCode(patientCode);
                json.getJSONObject(i).put("photo",patient!=null?patient.getPhoto():"");
                Integer age = IdCardUtil.getAgeForIdcard(patient.getIdcard());
                String sex = IdCardUtil.getSexForIdcard_new(patient.getIdcard());
                json.getJSONObject(i).put("age",age);
                json.getJSONObject(i).put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
            }
            return result;
        }
@ -249,7 +253,7 @@ public class RehabilitationManageService extends BaseService {
     * @return
     * @throws Exception
     */
    public void saveGuidanceMessage(String messageId,String doctorCode,String content,String planDetailId) throws Exception{
    public void saveGuidanceMessage(String messageId,String doctorCode,String content,String planDetailId,Integer contentType) throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorCode);
        Integer doctorType = doctor.getLevel();
        Map<String, Object> param = new HashedMap();
@ -259,6 +263,7 @@ public class RehabilitationManageService extends BaseService {
        param.put("doctorType", doctorType);
        param.put("content", content);
        param.put("planDetailId", planDetailId);
        param.put("contentType", contentType);
        HttpResponse response = HttpUtils.doPost(specialistUrl + saveGuidanceMessage, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")!=200){

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

@ -174,18 +174,23 @@ public class DoctorRehabilitationManageController extends BaseController {
    public String saveGuidanceMessage(@ApiParam(name = "messageId", value = "消息id", required = true)
                                      @RequestParam(value = "messageId", required = true)String messageId,
//                                      @ApiParam(name = "patientCode", value = "居民code", required = true)
//                                      @RequestParam(value = "patientCode", required = true)String patientCode,
//                                      @ApiParam(name = "doctorCode", value = "医生code", required = true)
//                                      @RequestParam(value = "doctorCode", required = true)String doctorCode,
//                                      @RequestParam(value = "patientCode", required = false)String patientCode,
                                      @ApiParam(name = "doctorCode", value = "医生code", required = false)
                                      @RequestParam(value = "doctorCode", required = false)String doctorCode,
//                                      @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
//                                      @RequestParam(value = "doctorType", required = true)Integer doctorType,
                                      @ApiParam(name = "content", value = "聊天内容", required = true)
                                      @RequestParam(value = "content", required = true)String content,
                                      @ApiParam(name = "planDetailId", value = "服务项目id", required = true)
                                      @RequestParam(value = "planDetailId", required = true)String planDetailId){
                                      @RequestParam(value = "planDetailId", required = true)String planDetailId,
                                      @ApiParam(name = "contentType", value = "内容类型(1,6,8 - 文本, 2,9- 图片, 3 - 语音, 4-文章, 5,7系统消息。12-语音 18-居民名片, 19-聊天记录)", required = true)
                                      @RequestParam(value = "contentType", required = true)Integer contentType){
        try {
            rehabilitationManageService.saveGuidanceMessage(messageId,getRepUID(),content,planDetailId);
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            rehabilitationManageService.saveGuidanceMessage(messageId,doctorCode,content,planDetailId,contentType);
            return write(200, "保存成功!");
        } catch (Exception e) {
            error(e);

+ 3 - 3
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -37,8 +37,8 @@ im:
#专病配置
specialist:
  url: http://172.19.103.33:9797/svr-wlyy-specialist/
#  url: http://localhost:10051/
#  url: http://172.19.103.33:9797/svr-wlyy-specialist/
  url: http://localhost:10051/
#物联网配置
iot:
#  url: http://192.168.131.24:8088/svr-iot/
@ -49,7 +49,7 @@ healthBank:
#康复计划配置
rehabilitation:
  url: http://localhost:10055/svr-rehabilitation/
  url: http://localhost:10055/svr-wlyy-rehabilitation/
#小程序
applets: