Browse Source

代码修改

liubing 3 years ago
parent
commit
babeabf1d6

+ 3 - 11
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java

@ -478,7 +478,6 @@ public class DeviceUploadService {
                        if("A".equals(tmp1[4])){
                        if("A".equals(tmp1[4])){
                            lat = tmp1[5];
                            lat = tmp1[5];
                            lon = tmp1[7];
                            lon = tmp1[7];
                            //判断是否超出围栏,
                        }else{
                        }else{
                            lat = tmp1[4];
                            lat = tmp1[4];
                            lon = tmp1[6];
                            lon = tmp1[6];
@ -493,14 +492,8 @@ public class DeviceUploadService {
                            DevicePatientDevice patientDevice = null;
                            DevicePatientDevice patientDevice = null;
                            if (patientDeviceList.size()>0){
                            if (patientDeviceList.size()>0){
                                patientDevice = patientDeviceList.get(0);
                                patientDevice = patientDeviceList.get(0);
//                                for (DevicePatientDevice pd2:patientDeviceList){
//                                    if (StringUtils.isNotBlank(pd2.getSafeAreaGz())){
//                                        patientDevice = pd2;
//                                        break;
//                                    }
//                                }
                            }
                            }
                            if (null!=patientDevice){//存在围栏地址
                            if (null!=patientDevice){//存在围栏地址 判断是否超出围栏,
                                List<PatientSafeAreaDO> safeAreaDOS = safeAreaDao.findByPatient(patientDevice.getUser());
                                List<PatientSafeAreaDO> safeAreaDOS = safeAreaDao.findByPatient(patientDevice.getUser());
                                String safeArea=null;
                                String safeArea=null;
                                if (safeAreaDOS.size()>0){
                                if (safeAreaDOS.size()>0){
@ -537,12 +530,11 @@ public class DeviceUploadService {
                        yxDeviceIndexDao.save(deviceIndex);
                        yxDeviceIndexDao.save(deviceIndex);
                        hvDeviceService.updContactStatus(sn,1);
                        hvDeviceService.updContactStatus(sn,1);
                    }
                    }
                    if ("AL".equals(tmp1[0])){//触发报警
                    if ("AL".equals(tmp1[0])){//触发报警 SOS
                        String lat,lon;
                        String lat,lon;
                        if("A".equals(tmp1[4])){
                        if("A".equals(tmp1[4])){
                            lat = tmp1[5];
                            lat = tmp1[5];
                            lon = tmp1[7];
                            lon = tmp1[7];
                            //判断是否超出围栏,
                        }else{
                        }else{
                            lat = tmp1[4];
                            lat = tmp1[4];
                            lon = tmp1[6];
                            lon = tmp1[6];
@ -577,7 +569,7 @@ public class DeviceUploadService {
                                            dulat = Double.parseDouble(pointss[0]);
                                            dulat = Double.parseDouble(pointss[0]);
                                        }
                                        }
                                        if (StringUtils.isNotBlank(pointss[1])){
                                        if (StringUtils.isNotBlank(pointss[1])){
                                            dulat = Double.parseDouble(pointss[1]);
                                            dulon = Double.parseDouble(pointss[1]);
                                        }
                                        }
                                    }
                                    }
                                }else {
                                }else {

+ 1 - 1
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/job/device/PatientSosContactsJob.java

@ -93,7 +93,7 @@ public class PatientSosContactsJob implements Job {
                            sosContactsDO.setUpdateInfo(sosContactsDO.getUpdateInfo()+",{deviceSn:"+device_sn+":"+-1+"}");
                            sosContactsDO.setUpdateInfo(sosContactsDO.getUpdateInfo()+",{deviceSn:"+device_sn+":"+-1+"}");
                        }
                        }
                    }else if ("16".equals(category_code)){
                    }else if ("16".equals(category_code)){
                        sql =" select sos_phone from base_patient_sos_contacts where patient='"+patient+"' order by phone_seqid asc ";
                        sql =" select sos_phone from base_patient_sos_contacts where patient='"+patient+"' and del=1 order by phone_seqid asc ";
                        List<String> nums = jdbcTemplate.queryForList(sql,String.class);
                        List<String> nums = jdbcTemplate.queryForList(sql,String.class);
                        String phone1 = null;
                        String phone1 = null;
                        String phone2 = null;
                        String phone2 = null;