Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie 4 lat temu
rodzic
commit
145f5af4d1

+ 9 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/family/FamilyMemberEndpoint.java

@ -73,7 +73,9 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
                return failed( "该家庭关系已存在成员",-1);
            } else if (result == -6) {
                return failed( "验证码已过期,请重新获取验证码",-1);
            } else if (result == 0) {
            } else if (result == -7) {
                return failed( "您或家人性别信息未填写无法添加成员",-1);
            }else if (result == 0) {
                return failed( "不能添加自己",-1);
            } else {
                return success("添加成功");
@ -112,6 +114,8 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
                return failed( "与该成员的关系不存在",-1);
            } else if(result==-5){
                return failed( "该家庭关系已存在成员",-1);
            }else if (result == -7) {
                return failed( "您或家人性别信息未填写无法添加成员",-1);
            } else {
                return success( "更新成功");
            }
@ -307,6 +311,8 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
                return failed( "该家庭成员已存在",-1);
            }else if(result==-5){
                return failed( "该家庭关系已存在成员",-1);
            }else if (result == -7) {
                return failed( "您或家人性别信息未填写无法添加成员",-1);
            } else {
                return success( "添加成功");
            }
@ -357,6 +363,8 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
                return failed( "该家庭关系已存在成员",-1);
            }else if(result==-6){
                return failed( "验证码已过期,请重新获取验证码",-1);
            }else if (result == -7) {
                return failed( "您或家人性别信息未填写无法添加成员",-1);
            } else {
                return success( "添加成功");
            }

+ 15 - 7
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/assistance/EmergencyAssistanceService.java

@ -87,17 +87,25 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
        assistanceDO.setPatientIdcard(patientDO.getIdcard());
        assistanceDO.setPatientName(patientDO.getName());
        assistanceDO.setPatientPhone(patientDO.getMobile());
        if(patient.equals(proxyPatient)) {//本人发起
        if (proxyPatient==null){//设备发起时该字段为空
            assistanceDO.setProxyPatient(patient);
            assistanceDO.setProxyPatientName(patientDO.getName());
            assistanceDO.setProxyPatientPhone(patientDO.getMobile());
            assistanceDO.setType(1);
        }else {//家人
            BasePatientDO proxyPatientDO = patientDao.findById(proxyPatient);
            assistanceDO.setProxyPatient(proxyPatient);
            assistanceDO.setProxyPatientName(proxyPatientDO.getName());
            assistanceDO.setProxyPatientPhone(proxyPatientDO.getMobile());
            assistanceDO.setType(2);
        }
        else{
            if(patient.equals(proxyPatient)) {//本人发起
                assistanceDO.setProxyPatient(patient);
                assistanceDO.setProxyPatientName(patientDO.getName());
                assistanceDO.setProxyPatientPhone(patientDO.getMobile());
                assistanceDO.setType(1);
            }else {//家人
                BasePatientDO proxyPatientDO = patientDao.findById(proxyPatient);
                assistanceDO.setProxyPatient(proxyPatient);
                assistanceDO.setProxyPatientName(proxyPatientDO.getName());
                assistanceDO.setProxyPatientPhone(proxyPatientDO.getMobile());
                assistanceDO.setType(2);
            }
        }
        if (emergencyAssistanceDao.findByPatientAndStatus(patient,1)!=null){

+ 21 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.service.device;
import com.alibaba.fastjson.JSON;
import com.yihu.jw.care.config.AqgConfig;
import com.yihu.jw.care.dao.device.DeviceDao;
import com.yihu.jw.care.dao.device.DeviceDetailDao;
@ -796,7 +797,26 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
        MultiValueMap<String, String> param = new LinkedMultiValueMap<>();
        param.add("type", type);
        HttpEntity<com.alibaba.fastjson.JSONObject> response = httpClientUtil.aqgCookieHttp(url, param, HttpMethod.GET, getCookie());
        return response.getBody();
        com.alibaba.fastjson.JSONObject responseJSON =  response.getBody();
        if (responseJSON.getBooleanValue("success")){
            if (responseJSON.containsKey("obj")&&responseJSON.getJSONObject("obj")!=null){
                com.alibaba.fastjson.JSONObject tmp= responseJSON.getJSONObject("obj");
                if (tmp.containsKey("locationdata")&&tmp.getJSONObject("locationdata")!=null){
                    com.alibaba.fastjson.JSONObject locationdataJson= tmp.getJSONObject("locationdata");
                    if (locationdataJson.containsKey("point")&&locationdataJson.getJSONObject("point")!=null){
                        com.alibaba.fastjson.JSONObject tmpPoint = locationdataJson.getJSONObject("point");
                        if (tmpPoint.containsKey("coordinates")&&tmpPoint.getJSONArray("coordinates")!=null){
                            com.alibaba.fastjson.JSONArray pointArr = tmpPoint.getJSONArray("coordinates");
                            Double lon = pointArr.getDouble(0);
                            Double lat = pointArr.getDouble(1);
                            com.alibaba.fastjson.JSONObject pointJson = gpsUtil.gcj02_To_Bd09(lat,lon);
                            locationdataJson.put("point",pointJson);
                        }
                    }
                }
            }
        }
        return responseJSON;
    }
    /**

+ 18 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/family/PatientFamilyMemberService.java

@ -65,7 +65,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
        switch (relation) {
            case 1:
            case 2:
                if (patient.getSex() == 1) {
                if (patient.getSex()==null){
                    return -1;
                } else if (patient.getSex() == 1) {
                    relationTrans = 5;
                } else if (patient.getSex() == 2) {
                    relationTrans = 6;
@ -88,7 +90,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
                break;
            case 5:
            case 6:
                if (patient.getSex() == 1) {
                if (patient.getSex()==null){
                    return -1;
                }else if (patient.getSex() == 1) {
                    relationTrans = 1;
                } else if (patient.getSex() == 2) {
                    relationTrans = 2;
@ -180,6 +184,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
        // 对方与自己的关系转换
        int relationTrans = familyRelationTrans(p, relation);
        if (relationTrans==-1){
            return -7;
        }
        fmt.setFamilyRelation(relationTrans);
        fmt.setIsAuthorize(1);//默认授权
@ -251,6 +258,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
        }
        int relationTrans = familyRelationTrans(p, relation);
        if (relationTrans==-1){
            return -7;
        }
        fmt.setFamilyRelation(relationTrans);
        memberDao.save(fm);
@ -455,6 +465,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
                }
                Integer relation = familyRelationTrans(p, member.getFamilyRelation());
                if (relation==-1){
                    return null;
                }
                if (signs.size() > 0){
                    obj.put("signCode",signs.get(0).getId());
@ -689,6 +702,9 @@ public class PatientFamilyMemberService extends BaseJpaService<BasePatientFamily
        // 对方与自己的关系转s
        //int relationTrans = familyRelationTrans(p, relation);
        int relationTrans = familyRelationTrans(p, relation);
        if (relationTrans==-1){
            return -7;
        }
        fmt.setFamilyRelation(relationTrans);
        fmt.setIsAuthorize(0);//默认授权

+ 8 - 2
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java

@ -122,7 +122,7 @@ public class DeviceService {
            DevicePatientDevice deviceDO = devicePatientDeviceDos.get(0);
            BasePatientDO patientDO = patientDao.findById(deviceDO.getUser());
            DeviceSosLogDO logDO = new DeviceSosLogDO();
            logDO.setPatient(patientDO.getIdcard());
            logDO.setPatient(patientDO.getId());
            logDO.setPatientName(patientDO.getName());
            logDO.setIdcard(patientDO.getIdcard());
            logDO.setCategoryCode(deviceDO.getCategoryCode());
@ -170,7 +170,13 @@ public class DeviceService {
                JSONObject result = com.alibaba.fastjson.JSONObject.parseObject(response);
                JSONObject jsonObjectData =JSONObject.parseObject(AesEncryptUtils.agDecrypt(result.getString("data")));
                logDO.setSosSendStatus(jsonObjectData.getInteger("status").toString());
                logDO.setSosSendMessage(jsonObjectData.getString("message"));
                if (jsonObjectData.containsKey("message")){
                    logDO.setSosSendMessage(jsonObjectData.getString("message"));
                }
                if (jsonObjectData.containsKey("msg")){
                    logDO.setSosSendMessage(jsonObjectData.getString("msg"));
                }
            }
            sosLogDao.save(logDO);
        }catch(Exception e){