Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

humingfen 7 lat temu
rodzic
commit
e04c336c87

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

@ -195,8 +195,21 @@ public class RehabilitationManageService extends BaseService {
        param.put("planDetailIds", planDetailIds);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItemList, param);
        JSONObject result = new JSONObject(response.getContent());
        JSONArray jsonArray = null;
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
            jsonArray = result.getJSONArray("obj");
            for(int i=0;i<jsonArray.length();i++){
                String patient = jsonArray.getJSONObject(i).get("patient")+"";
                List<SignFamily> list = signFamilyDao.findByPatientAndExpensesStatusAndStatus(patient,"1",1);
                if(list.size()>0){
                    jsonArray.getJSONObject(i).put("familyDoctorCode",list.get(0).getDoctor());
                    jsonArray.getJSONObject(i).put("familyDoctorName",list.get(0).getDoctorName());
                }else{
                    jsonArray.getJSONObject(i).put("familyDoctorCode","");
                    jsonArray.getJSONObject(i).put("familyDoctorName","");
                }
            }
            return jsonArray;
        }
        throw new Exception("请求微服务失败!");
    }
@ -230,19 +243,18 @@ public class RehabilitationManageService extends BaseService {
    /**
     * 康复管理-保存指导留言
     * @param messageId
     * @param patientCode
     * @param doctorCode
     * @param content
     * @param planDetailId
     * @return
     * @throws Exception
     */
    public void saveGuidanceMessage(String messageId,String patientCode,String doctorCode,String content,String planDetailId) throws Exception{
    public void saveGuidanceMessage(String messageId,String doctorCode,String content,String planDetailId) throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorCode);
        Integer doctorType = doctor.getLevel();
        Map<String, Object> param = new HashedMap();
        param.put("messageId", messageId);
        param.put("patientCode", patientCode);
//        param.put("patientCode", patientCode);
        param.put("doctorCode", doctorCode);
        param.put("doctorType", doctorType);
        param.put("content", content);
@ -448,7 +460,16 @@ public class RehabilitationManageService extends BaseService {
    public JSONObject saveRehabilitationOperateRecodr(String dataJson) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("dataJson", dataJson);
        JSONObject json = new JSONObject(dataJson);
        if(json.has("patientCode")){
            Patient patient = patientDao.findByCode(json.get("patientCode")+"");
            json.put("patientName",patient!=null?patient.getName():"");
        }
        if(json.has("doctorCode")){
            Doctor doctor = doctorDao.findByCode(json.get("doctorCode")+"");
            json.put("doctorName",doctor!=null?doctor.getName():"");
        }
        param.put("dataJson", json.toString());
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + saveRehabilitationOperateRecodr, param);
        JSONObject result = new JSONObject(response.getContent());

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

@ -173,8 +173,8 @@ public class DoctorRehabilitationManageController extends BaseController {
    @ObserverRequired
    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 = "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,
//                                      @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
@ -185,7 +185,7 @@ public class DoctorRehabilitationManageController extends BaseController {
                                      @RequestParam(value = "planDetailId", required = true)String planDetailId){
        try {
            rehabilitationManageService.saveGuidanceMessage(messageId,patientCode,getRepUID(),content,planDetailId);
            rehabilitationManageService.saveGuidanceMessage(messageId,getRepUID(),content,planDetailId);
            return write(200, "保存成功!");
        } catch (Exception e) {
            error(e);

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

@ -134,4 +134,60 @@ public class PatientRehabilitationManageController extends BaseController {
            return error(-1, "验证失败");
        }
    }
    @RequestMapping(value = "recentPlanDetailRecord", method = RequestMethod.GET)
    @ApiOperation("康复管理-近期康复相关记录")
    @ObserverRequired
    public String recentPlanDetailRecord(@ApiParam(name = "patientCode", value = "居民code", required = false)
                                         @RequestParam(value = "patientCode", required = false)String patientCode,
                                         @ApiParam(name = "startTime", value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", required = false)
                                         @RequestParam(value = "startTime", required = false)String startTime,
                                         @ApiParam(name = "endTime", value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", required = false)
                                         @RequestParam(value = "endTime", required = false)String endTime,
                                         @ApiParam(name = "page", value = "第几页,从1开始", required = true)
                                         @RequestParam(value = "page", required = false,defaultValue = "1")Integer page,
                                         @ApiParam(name = "pageSize", value = "每页分页大小", required = true)
                                         @RequestParam(value = "pageSize", required = false,defaultValue = "10")Integer pageSize){
        try {
            if(!StringUtils.isNotEmpty(patientCode)){
                patientCode = getUID();
            }
            JSONObject result = rehabilitationManageService.recentPlanDetailRecord(patientCode,startTime,endTime,page,pageSize);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "serviceItemList", method = RequestMethod.GET)
    @ApiOperation("康复管理-多个康复计划服务项目内容列表")
    @ObserverRequired
    public String serviceItemList(@ApiParam(name = "planDetailIds", value = "康复计划多个服务项目id(多个‘,’分隔)", required = true)
                                  @RequestParam(value = "planDetailIds", required = true)String planDetailIds){
        try {
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "serviceItem", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划服务项目确认详情页")
    @ObserverRequired
    public String serviceItem(@ApiParam(name = "planDetailId", value = "康复计划服务项目id", required = true)
                              @RequestParam(value = "planDetailId", required = true)String planDetailId){
        try {
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}

+ 7 - 4
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -191,22 +191,25 @@ es:
#集美宣教居民端健康文章
jkEdu:
  web:
    #articleBaseUrl: http://172.19.103.87:9088/
    articleBaseUrl: http://192.168.131.131:8088/
    articleBaseUrl: http://172.19.103.87:9088/
#    articleBaseUrl: http://192.168.131.131:8088/
#消息队列
activemq:
  username: admin
  password: admin
  url: tcp://172.19.103.87:61616
  queue:
    healtHarticleQueue: healthArticleChannel_dev  #健康文章推送
    deviceMeasurementRemindingQueue : deviceMeasurementChannel_dev #设备测量提醒
#    healtHarticleQueue: healthArticleChannel_dev  #健康文章推送
#    deviceMeasurementRemindingQueue : deviceMeasurementChannel_dev #设备测量提醒
    healtHarticleQueue: healthArticleChannel_test  #健康文章推送
    deviceMeasurementRemindingQueue : deviceMeasurementChannel_test #设备测量提醒
##如果是外网项目就是flase 内网是true
neiwang:
  enable: true
  #wlyy: http://59.61.92.90:8072/wlyy
  wlyy: http://172.19.103.54:22122/
  #wlyy: http://192.168.131.130:8080/
#系统中使用的双层对称加密使用到的KEY
Riva: