ソースを参照

Merge branch 'dev' of zd_123/patient-co-management into dev

huangwenjie 7 年 前
コミット
daf027a4cf

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

@ -55,6 +55,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 ************************************************************************/
    /**
@ -428,4 +430,25 @@ public class RehabilitationManageService extends BaseService {
        }
        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;
    }
}

+ 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, "更新日志失败");
        }
    }
}