|
@ -2079,7 +2079,37 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
|
|
|
filter += " and EXISTS (select 1 from wlyy_patient_safe_area sf where sf.patient = p.id and sf.del=1 and sf.manage_status=1) ";
|
|
|
}
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql+filter);
|
|
|
result.put("patientList",list);
|
|
|
if (1 == detail){//获取详情
|
|
|
JSONArray monitorInfos = new JSONArray();
|
|
|
page = page>0?page-1:0;
|
|
|
Integer totalPage = 0;
|
|
|
if(list.size()%pageSize==0){
|
|
|
totalPage =list.size()/pageSize;
|
|
|
}else{
|
|
|
totalPage = list.size()/pageSize+1;
|
|
|
}
|
|
|
Integer currentIndexFrom = page*pageSize;
|
|
|
Integer currentIndexEnd = page*pageSize+pageSize;
|
|
|
result.put("total",list.size());
|
|
|
result.put("totalPage",totalPage);
|
|
|
result.put("currentPage",page+1);
|
|
|
for (int i=currentIndexFrom;i<list.size()&&i<currentIndexEnd;i++){
|
|
|
Map<String,Object> patientTmp = list.get(i);
|
|
|
JSONObject object = patientMonitoringInfo(patientTmp.get("id").toString(),topicItem);
|
|
|
object.put("patientInfo",patientTmp);
|
|
|
monitorInfos.add(object);
|
|
|
}
|
|
|
result.put("topicInfo",monitorInfos);
|
|
|
}else {
|
|
|
JSONArray monitorInfos = new JSONArray();
|
|
|
for (int i=0;i<list.size();i++){
|
|
|
Map<String,Object> patientTmp = list.get(i);
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("patientInfo",patientTmp);
|
|
|
monitorInfos.add(object);
|
|
|
}
|
|
|
result.put("topicInfo",monitorInfos);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|