ソースを参照

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

# Conflicts:
#	patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java
liuwenbin 7 年 前
コミット
c6268759b6

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

@ -59,6 +59,8 @@ public class RehabilitationManageService extends BaseService {
    private String serviceDoctorList = "/svr-specialist/serviceDoctorList";//康复管理-医生端居民详情服务医生列表
    private String appCalendarPlanDetailList = "/svr-specialist/appCalendarPlanDetailList";//康复管理-app端、微信端计划的服务项目列表
    private String dailyJob = "/svr-specialist/dailyJob";//每日康复服务通知
    private String saveRehabilitationOperateRecodr ="/svr-specialist/saveRehabilitationOperateRecodr";//新增operateRecodr
    private String updateNoteAndImageRehabilitationOperate ="/svr-specialist/updateNoteAndImageRehabilitationOperate";//康复计划完成时更新服务完成笔记和图片接口;
    /************************************************************* end ************************************************************************/
    /**
@ -206,7 +208,7 @@ public class RehabilitationManageService extends BaseService {
     */
    public JSONObject serviceItem(String planDetailId) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("planDetailIds", planDetailId);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItem, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
@ -390,15 +392,7 @@ public class RehabilitationManageService extends BaseService {
        param.put("generalDoctorName", generalDoctorName);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceDoctorList, param);
        JSONObject result = new JSONObject(response.getContent());
        String doctorCode ="";
        Doctor doctor = null;
        if(result.getInt("status")==200){
            JSONArray jsonArray = result.getJSONArray("obj");
            for(int i=0;i<jsonArray.length();i++){
                doctorCode = jsonArray.getJSONObject(i).get("doctorCode")+"";
                doctor = doctorDao.findByCode(doctorCode);
                jsonArray.getJSONObject(i).put("doctorPhoto",doctor!=null?doctor.getPhoto():"");
            }
            return result.getJSONArray("obj");
        }
        throw new Exception("请求微服务失败!");
@ -429,18 +423,40 @@ public class RehabilitationManageService extends BaseService {
        throw new Exception("请求微服务失败!");
    }
    public JSONArray dailyJob(String startTime,String endTime) throws Exception{
    public JSONObject dailyJob(String executeStartTime, String executeEndTime, String planId, Integer searchTask, Integer status) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("startTime", startTime);
        param.put("endTime", endTime);
        HttpResponse response = HttpUtils.doGet(specialistUrl + dailyJob, param);
        param.put("executeStartTime", executeStartTime);
        param.put("executeEndTime", executeEndTime);
        HttpResponse response = HttpUtils.doGet(specialistUrl + appCalendarPlanDetailList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    public JSONObject saveRehabilitationOperateRecodr(String dataJson) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("dataJson", dataJson);
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + saveRehabilitationOperateRecodr, param);
        JSONObject result = new JSONObject(response.getContent());
        return  result;
    }
    public JSONObject updateNodeAndRelationRecordImg(String planDetailId,String node,String image) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("node", node);
        param.put("image", image);
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + updateNoteAndImageRehabilitationOperate, param);
        JSONObject result = new JSONObject(response.getContent());
        return  result;
    }
    /**
     * 每天8点,16点的job
     * @param startTime

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -378,7 +378,7 @@ public class DataHandingService {
    @Transactional(rollbackFor = Exception.class)
    public void updateDevice()throws Exception{
        //String patientDeviceSql = "SELECT pd.*,sf.admin_team_code,sf.hospital FROM wlyy_patient_device pd LEFT JOIN wlyy_sign_family sf ON pd.`user` = sf.patient where sf.`status`>0 GROUP BY pd.id";
        String patientDeviceSql = "SELECT pd.id,pd.device_id AS deviceId,pd.category_code categoryCode,pd.device_name deviceName,pd.device_sn deviceSn,pd.`user`,pd.user_type userType,pd.czrq FROM wlyy_patient_device pd where pd.category_code in(1,2) GROUP BY pd.id";
        String patientDeviceSql = "SELECT pd.id,pd.device_id AS deviceId,pd.category_code categoryCode,pd.device_name deviceName,pd.device_sn deviceSn,pd.`user`,pd.user_type userType,pd.czrq FROM wlyy_patient_device pd where pd.del =0 and pd.category_code in(1,2) GROUP BY pd.id";
        List<Map<String,Object>> patientDeviceList = jdbcTemplate.queryForList(patientDeviceSql);
        String deviceSql = "SELECT * FROM device.wlyy_devices";
        List<DeviceDetail> deviceDetailList = jdbcTemplate.query(deviceSql,new BeanPropertyRowMapper<>(DeviceDetail.class));

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

@ -311,4 +311,41 @@ 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, "新增康复计划日志失败!");
            }
        } catch (Exception e) {
            error(e);
            return error(-1, "新增康复计划日志失败!");
        }
    }
    @RequestMapping(value = "updateNoteAndImageRehabilitationOperate", method = RequestMethod.POST)
    @ApiOperation("康复管理-康复计划完成时更新服务完成笔记和图片接口")
    @ObserverRequired
    public String updateNoteAndImageRehabilitationOperate(@ApiParam(name = "planDetailId", value = "康复计划项目明细ID")@RequestParam(value = "planDetailId", required = true)String planDetailId,
                                                          @ApiParam(name = "node", value = "服务完成笔记", required = true)@RequestParam(value = "node", required = true)String node,
                                                          @ApiParam(name = "image", value = "相关记录图片,json格式", required = true)@RequestParam(value = "image", required = true)String image){
        try {
            JSONObject result = rehabilitationManageService.updateNodeAndRelationRecordImg(planDetailId, node, image);
            if (result.getInt("status")==200){
                return write(200, "更新日志成功!");
            }else {
                return error(-1, "更新日志失败");
            }
        } catch (Exception e) {
            error(e);
            return error(-1, "更新日志失败");
        }
    }
}

+ 5 - 2
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -47,7 +47,7 @@ healthBank:
#康复计划配置
rehabilitation:
  url: http://localhost:10055/svr-rehabilitation/
  url: http://localhost:10051/svr-wlyy-rehabilitation/
#小程序
applets:
@ -153,8 +153,11 @@ images:
  renew_path: /usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/renew.png
  sign_path: /usr/local/apache-tomcat-8.0.26/webapps/wlyy/images/familycontract.png
#sign:
#  check_upload: http://172.19.103.87:8011/wlyy_service
#  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
sign:
  check_upload: http://172.19.103.87:8011/wlyy_service
  check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
express: