Browse Source

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

yeshijie 3 years ago
parent
commit
032f1d9012

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

@ -989,7 +989,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
    public JSONObject getHealthIndex(JSONObject result,String deviceSn,String patient,Integer page,Integer pageSize){
        String sqlCount = "select count(id) from wlyy_patient_health_index where user ='"+patient+"' and device_sn='"+deviceSn+"' " +
                " and del=1 ";
        String sql = "select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) sign_status from wlyy_patient_health_index where user ='"+patient+"' and device_sn='"+deviceSn+"' " +
        String sql = "select *,CAST(DATE_FORMAT(record_date,'%Y-%m-%d %H:%i:%S') as char) record_date from wlyy_patient_health_index where user ='"+patient+"' and device_sn='"+deviceSn+"' " +
                " and del=1 order by record_date desc limit "+page*pageSize+","+pageSize;
        long count = jdbcTemplate.queryForObject(sqlCount,long.class);
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);

+ 3 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/patient/CarePatientService.java

@ -172,8 +172,9 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
                res.put("capAssRecordDO",recordDO);
            }
        }
        res.put("deviceType",deviceService.getPatientDeviceCategoryCode(patientId));
        JSONObject tmp = res.getJSONObject("patient");
        tmp.put("deviceType",deviceService.getPatientDeviceCategoryCode(patientId));
        res.put("patient",tmp);
        return res;
    }

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -1238,7 +1238,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        result.put("monitorInfo",null);
        String sql = " select dict.code,count(ord.id) total from base_system_dict_entry dict LEFT JOIN base_security_monitoring_order ord " +
                " on dict.code = ord.topic_item COLLATE utf8_unicode_ci and ord.status="+SecurityMonitoringOrderDO.Status.apply.getType()+" where dict.dict_code='service_item' " +
                "and dict.remark='security'  GROUP BY dict.code ";
                "and dict.remark='security' and ord.patient='"+patient+"' GROUP BY dict.code ";
        List<Map<String,Object>> sqlResult = jdbcTemplate.queryForList(sql);
        for (Map<String,Object>tmp:sqlResult){
            switch (tmp.get("code").toString()){

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

@ -606,7 +606,7 @@ public class DeviceService {
                        planDetail.setDeviceSn(device);
                        /***起床***/
                        Long timeDiffer = timeDate.getTime() - bedUp.getTime();
                        if(DateUtil.isInArea(timeDate,bedUpBegin,bedUpEnd)){//起床时间内
                        if(DateUtil.isInArea(timeDate,bedUpBegin,SiestaBegin)){//起床时间内
                            if ("0".equals(bed_status)){//起床
                                if (null==planDetail.getUpStatus()||1==planDetail.getUpStatus()){
                                    planDetail.setUpStatus(0);
@ -655,6 +655,7 @@ public class DeviceService {
                                    if(3600*siestaLongWarn*1000<timeDiffer){//午睡超时未起床
                                        if (planDetail.getSiestaStatus()==1){
                                            planDetail.setBedStatus(1);
                                            planDetail.setSiestaTimeEnd(timeDate);//设置临时结束时间但不计算时长 避免重复发起工单
                                            planDetail.setBreath(breath);
                                            planDetail.setHeartRate(heartrate);
                                            outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"午睡超时未起床",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue));