瀏覽代碼

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

吴世龙 3 年之前
父節點
當前提交
94c78aea4d

+ 23 - 7
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/third/PatientInfoPlatFormService.java

@ -32,6 +32,7 @@ import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.util.common.GpsUtil;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.LatitudeUtils;
import com.yihu.jw.util.date.DateUtil;
import org.apache.commons.lang.StringUtils;
import org.json.JSONArray;
@ -727,7 +728,7 @@ public class PatientInfoPlatFormService {
                sql = " select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) record_date,  " +
                        " CAST(DATE_FORMAT(sort_date,'%Y-%m-%d %H:%i:%S') as char) sort_date,  " +
                        " CAST(DATE_FORMAT(czrq,'%Y-%m-%d %H:%i:%S') as char) czrq from wlyy_patient_health_index " +
                        " where device_sn='"+deviceSn+"' ORDER BY sort_date DESC LIMIT 1  ";
                        " where device_sn='"+deviceSn+"' and del=1 ORDER BY sort_date DESC LIMIT 1  ";
                List<Map<String,Object>> sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0){
                    detailInfo.put("healthIndex",sqlResult.get(0));
@ -739,7 +740,7 @@ public class PatientInfoPlatFormService {
                sql = " select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) record_date,  " +
                        " CAST(DATE_FORMAT(sort_date,'%Y-%m-%d %H:%i:%S') as char) sort_date,  " +
                        " CAST(DATE_FORMAT(czrq,'%Y-%m-%d %H:%i:%S') as char) czrq from wlyy_patient_health_index " +
                        " where device_sn='"+deviceSn+"' ORDER BY sort_date DESC LIMIT 1  ";
                        " where device_sn='"+deviceSn+"' and del=1 ORDER BY sort_date DESC LIMIT 1  ";
                sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0){
                    detailInfo.put("healthIndex",sqlResult.get(0));
@ -779,14 +780,18 @@ public class PatientInfoPlatFormService {
                } else {
                    detailInfo.put("contact_status",1);
                }
                sql = "select * from base_patient_step where 1=1  and device_sn='"+deviceSn+"' order by create_time desc limit 1";
                sql = "select *,CAST(DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') as char) create_time from base_patient_step where 1=1  and device_sn='"+deviceSn+"' order by create_time desc limit 1";
                sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0) {
                    detailInfo.put("steps",sqlResult.get(0));
                }else {
                    detailInfo.put("steps","无步数数据");
                }
                sql ="SELECT * FROM wlyy_patient_health_index WHERE type = 5 and device_sn = '"+deviceSn+"' AND del = 1 ORDER BY record_date DESC LIMIT 1";
                sql = " select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) record_date,  " +
                        " CAST(DATE_FORMAT(sort_date,'%Y-%m-%d %H:%i:%S') as char) sort_date,  " +
                        " CAST(DATE_FORMAT(czrq,'%Y-%m-%d %H:%i:%S') as char) czrq from wlyy_patient_health_index " +
                        " where type=5 and device_sn='"+deviceSn+"' and del=1 ORDER BY sort_date DESC LIMIT 1  ";
                sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0){
                    detailInfo.put("heartRate",sqlResult.get(0));
@ -933,6 +938,16 @@ public class PatientInfoPlatFormService {
                    detailInfo.put("value",null);
                    detailInfo.put("record_time",null);
                }
                sql = " select temperature_value ,record_time as temperature_value_record_time  from base_device_health_index where device_sn='"+deviceSn+"' and temperature_value is not null  ORDER BY record_time desc limit 1 ";
                sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0){
                    detailInfo.putAll(sqlResult.get(0));
                }
                else {
                    detailInfo.put("temperature_value",null);
                    detailInfo.put("temperature_value_record_time",null);
                }
                break;
            case "16"://拐杖 是否预警
                sql = "  select o.id,p.id patient,p.name,p.idcard,p.residential_area,'20' OrderType,'1' type,o.serve_address,'紧急呼叫' serve_desc,  " +
@ -950,12 +965,13 @@ public class PatientInfoPlatFormService {
                }else {
                    detailInfo.put("warnStatus",false);
                }
                sql = "SELECT * FROM base_yxdevice_index  WHERE sn = '" + deviceSn + "' AND lon != 0 AND lat != 0 ORDER BY create_time DESC limit 1";
                sql = "SELECT *,CAST(DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') as char) create_time FROM base_yxdevice_index  WHERE sn = '" + deviceSn + "' AND lon != 0 AND lat != 0 ORDER BY create_time DESC limit 1";
                sqlResult = jdbcTemplate.queryForList(sql);
                if (sqlResult.size()>0){
                    detailInfo.put("newlonlat",sqlResult.get(0));
                    JSONObject dz =  gpsUtil.gcj02_To_Bd09(Double.parseDouble(sqlResult.get(0).get("lat").toString()),Double.parseDouble(sqlResult.get(0).get("lon").toString()));
                    detailInfo.put("location", dz);
                    String address = LatitudeUtils.getLocationAddress(sqlResult.get(0).get("lat").toString(), sqlResult.get(0).get("lon").toString());
//                    JSONObject dz =  gpsUtil.gcj02_To_Bd09(Double.parseDouble(sqlResult.get(0).get("lat").toString()),Double.parseDouble(sqlResult.get(0).get("lon").toString()));
                    detailInfo.put("location", address);
                }else {
                    detailInfo.put("newlonlat",null);
                    detailInfo.put("location", null);

+ 2 - 2
svr/svr-cloud-job/src/main/resources/system.properties

@ -23,9 +23,9 @@ SAVE_DATA_PUSH_JOB= 0 0 2 * * ? *
#\u5B9A\u65F6\u67E5\u8BE2\u79FB\u52A8\u5E73\u53F0\u7269\u8054\u5361\u4FE1\u606F
UPDATE_SIMS_JOB= 0 30 0 * * ?
#\u5B9A\u65F6\u67E5\u8BE2\u79FB\u52A8\u7269\u8054\u5361\u8BED\u97F3\uFF0C\u6D41\u91CF\u4F7F\u7528\u4FE1\u606F--\u65E5
GET_SIMS_VOICE_FLOW_DAY_JOB= 0 50 1 * * ?
GET_SIMS_VOICE_FLOW_DAY_JOB= 0 50 5 * * ?
#\u5B9A\u65F6\u67E5\u8BE2\u79FB\u52A8\u7269\u8054\u5361\u8BED\u97F3\uFF0C\u6D41\u91CF\u4F7F\u7528\u4FE1\u606F--\u6708
GET_SIMS_VOICE_FLOW_MONTH_JOB= 0 15 2 * * ?
GET_SIMS_VOICE_FLOW_MONTH_JOB= 0 15 6 * * ?
#\u6BCF\u5929\u65E9\u4E0A10\u70B9\u53D1\u9001\u8840\u538B(1\u5929)\u8840\u7CD6(7\u5929)\u672A\u6D4B\u91CF\u901A\u77E5
BLOOD_PRESSURE_GLUCOSE_NOT_MEASURED= 0 0 10 * * ?
#\u751F\u65E5\u795D\u798F\u672A\u53D1\u751F\u8BB0\u5F55