|
@ -54,14 +54,13 @@ public class CopdXeekDeviceService {
|
|
|
}
|
|
|
sql.append(" GROUP BY inspect_time,de.id order by de.parameter, lu.inspect_time asc ");
|
|
|
detailList = jdbcTemplate.queryForList(sql.toString());
|
|
|
StringBuilder sqlIn= new StringBuilder("select count(de.id) test1_value ,LEFT(inspect_time,10) dayTime,'次' unit,'吸气训练数据' name,'inCount' parameter from xmiot.wlyy_copd_xeek_lung_detail de,xmiot.wlyy_copd_xeek_lung lu," +
|
|
|
" xmiot.wlyy_iot_tz_dict dict where de.code = lu.id and dict.del=1 \n" +
|
|
|
"and dict.code='COPD_PARAMETER' and dict.value = de.parameter and de.parameter='MIP' GROUP BY LEFT(inspect_time,10) ");
|
|
|
|
|
|
//lu.report_type1=吸气测试;2=呼气测试; 3=吸气训练4=呼气训练6=MVV 测试;7=慢通气测试;
|
|
|
StringBuilder sqlIn= new StringBuilder("select de.times test1_value ,inspect_time dayTime,'次' unit,'吸气训练数据' name,'inCount' parameter " +
|
|
|
"from xmiot.wlyy_copd_xeek_lung_training de,xmiot.wlyy_copd_xeek_lung lu where de.code = lu.id and lu.report_type=3 ");
|
|
|
|
|
|
StringBuilder sqlOut= new StringBuilder("select count(de.id) test1_value ,LEFT(inspect_time,10) dayTime,'次' unit,'呼气训练数据' name,'outCount' parameter from xmiot.wlyy_copd_xeek_lung_detail de,xmiot.wlyy_copd_xeek_lung lu," +
|
|
|
" xmiot.wlyy_iot_tz_dict dict where de.code = lu.id and dict.del=1 \n" +
|
|
|
"and dict.code='COPD_PARAMETER' and dict.value = de.parameter and de.parameter='FVC' GROUP BY LEFT(inspect_time,10)");
|
|
|
StringBuilder sqlOut= new StringBuilder("select de.times test1_value ,inspect_time dayTime,'次' unit,'呼气训练数据' name,'outCount' parameter " +
|
|
|
"from xmiot.wlyy_copd_xeek_lung_training de,xmiot.wlyy_copd_xeek_lung lu where de.code = lu.id and lu.report_type=4 ");
|
|
|
sql = new StringBuilder("");
|
|
|
if (StringUtils.isNotBlank(patient)){
|
|
|
sql.append(" and lu.patient='"+patient+"' ");
|
|
@ -69,15 +68,13 @@ public class CopdXeekDeviceService {
|
|
|
if (StringUtils.isNotBlank(deviceSN)){
|
|
|
sql.append(" and lu.device_sn='"+deviceSN+"' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(reportType)){
|
|
|
sql.append(" and lu.report_type='"+reportType+"' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(begin)){
|
|
|
sql.append(" and lu.inspect_time>='"+begin+"' ");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(end)){
|
|
|
sql.append(" and lu.inspect_time<='"+end+"' ");
|
|
|
}
|
|
|
sql.append(" order by lu.inspect_time asc ");
|
|
|
|
|
|
if ((StringUtils.isNotBlank(parameter)&¶meter.equals("inCount"))||StringUtils.isBlank(parameter)){//吸气训练次数 MIP
|
|
|
List<Map<String,Object>> tmp = jdbcTemplate.queryForList(sqlIn.append(sql).toString());
|