فهرست منبع

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

huangwenjie 7 سال پیش
والد
کامیت
caa36cb5af

+ 20 - 19
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/DeviceHealthIndexService.java

@ -87,10 +87,10 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
            filter.append(" and (s.doctor_name like '%"+doctorName+"%' or s.doctor_health_name like '%"+doctorName+"%') ");
        }
        if(!StringUtils.isEmpty(deviceSn)){
            filter.append(" and i.deviceSn="+deviceSn);
            filter.append(" and i.device_sn='"+deviceSn+"' ");
        }
        if(!StringUtils.isEmpty(idcard)){
            filter.append(" and i.idcard="+idcard);
            filter.append(" and i.idcard='"+idcard+"' ");
        }
        //体征数据创建时间
        if(!StringUtils.isEmpty(date)){
@ -102,15 +102,15 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
            calendar.set(Calendar.SECOND,59);
            calendar.set(Calendar.MILLISECOND,999);
            Date endTimeTemp = calendar.getTime();
            filter.append(" and i.czrq>=" + DateTimeUtil.utcDateTimeFormat(startTimeTemp));
            filter.append(" and i.czrq<=" + DateTimeUtil.utcDateTimeFormat(endTimeTemp));
            filter.append(" and i.czrq>='" + DateTimeUtil.simpleDateTimeFormat(startTimeTemp)+"'");
            filter.append(" and i.czrq<='" + DateTimeUtil.simpleDateTimeFormat(endTimeTemp)+"'");
        }
        //指标类型
        if(!StringUtils.isEmpty(indexType)){
            filter.append(" and i.type="+indexType);
        }
        //体征数据
        if("1".equals(indexType)||"2".equals(indexType)||"4".equals(indexType)){
//        if("1".equals(indexType)||"2".equals(indexType)||"4".equals(indexType)){
            if(indexTypeMin1!=null){
                filter.append(" and value1>="+indexTypeMin1);
            }
@ -123,21 +123,22 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
            if(indexTypeMax2!=null){
                filter.append(" and value2<="+indexTypeMax2);
            }
        }else{
            if(indexTypeMin1!=null){
                filter.append(" and value3>="+indexTypeMin1);
            }
            if(indexTypeMax1!=null){
                filter.append(" and value3<="+indexTypeMax1);
            }
            if(indexTypeMin2!=null){
                filter.append(" and value4>="+indexTypeMin2);
            }
            if(indexTypeMax2!=null){
                filter.append(" and value4<="+indexTypeMax2);
            }
        }
//        }else{
//            if(indexTypeMin1!=null){
//                filter.append(" and value3>="+indexTypeMin1);
//            }
//            if(indexTypeMax1!=null){
//                filter.append(" and value3<="+indexTypeMax1);
//            }
//            if(indexTypeMin2!=null){
//                filter.append(" and value4>="+indexTypeMin2);
//            }
//            if(indexTypeMax2!=null){
//                filter.append(" and value4<="+indexTypeMax2);
//            }
//        }
        String f = filter.toString();
        System.out.println("sql:"+sql+f+" order by i.czrq desc "+" limit "+(page-1)+","+pageSize);
        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql+f+" order by i.czrq desc "+" limit "+(page-1)+","+pageSize);
        if(resultList.size()<=0){
            return new PageImpl<DeviceHealthIndexVO>(new ArrayList<>(), pageRequest, 0);

+ 4 - 4
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/deviceHealthIndex_list_js.jsp

@ -76,10 +76,10 @@
                            if(value){
                                var valueNum1='value1';
                                var valueNum2='value2';
                                if(value==3){
                                    valueNum1='value3';
                                    valueNum2='value4';
                                }
//                                if(value==3){
//                                    valueNum1='value3';
//                                    valueNum2='value4';
//                                }
                                $("#search-max-1").attr('placeholder',name+valueNum1+"最大值");
                                $("#search-min-1").attr('placeholder',name+valueNum1+'最小值');
                                $("#search-max-1").val('');