|
@ -181,7 +181,7 @@ public class WlyygcStatisticsService {
|
|
* @param code
|
|
* @param code
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public JSONArray emeAndSecInfo(Integer page, Integer size,String code){
|
|
|
|
|
|
public JSONArray emeAndSecInfo(Integer page, Integer size,String code,Integer type,Integer status){
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
String filter = "";
|
|
String filter = "";
|
|
if("1".equals(code)){
|
|
if("1".equals(code)){
|
|
@ -189,6 +189,9 @@ public class WlyygcStatisticsService {
|
|
}else {
|
|
}else {
|
|
return jsonArray;
|
|
return jsonArray;
|
|
}
|
|
}
|
|
|
|
if(status!=null){
|
|
|
|
filter += " and o.status = "+status;
|
|
|
|
}
|
|
if(page==null){
|
|
if(page==null){
|
|
page =1;
|
|
page =1;
|
|
}
|
|
}
|
|
@ -206,13 +209,18 @@ public class WlyygcStatisticsService {
|
|
", base_service_package_record r, base_emergency_assistance_order o " +
|
|
", base_service_package_record r, base_emergency_assistance_order o " +
|
|
"WHERE p.del = 1 and p.archive_type =1 and r.patient = p.id " +
|
|
"WHERE p.del = 1 and p.archive_type =1 and r.patient = p.id " +
|
|
"and p.id = o.patient " + filter +
|
|
"and p.id = o.patient " + filter +
|
|
"UNION ALL " +
|
|
|
|
|
|
" UNION ALL " +
|
|
"select o.id,p.name,p.idcard,p.residential_area,'2' type,o.serve_address,o.serve_desc,o.status,o.create_time FROM " +
|
|
"select o.id,p.name,p.idcard,p.residential_area,'2' type,o.serve_address,o.serve_desc,o.status,o.create_time FROM " +
|
|
"base_patient p INNER JOIN base_service_package_sign_record sr on p.id = sr.patient and sr.`status`=1 " +
|
|
"base_patient p INNER JOIN base_service_package_sign_record sr on p.id = sr.patient and sr.`status`=1 " +
|
|
", base_service_package_record r, base_security_monitoring_order o " +
|
|
", base_service_package_record r, base_security_monitoring_order o " +
|
|
"WHERE p.del = 1 and p.archive_type =1 and r.patient = p.id " +
|
|
"WHERE p.del = 1 and p.archive_type =1 and r.patient = p.id " +
|
|
"and p.id = o.patient " + filter +
|
|
"and p.id = o.patient " + filter +
|
|
" ) a ORDER BY a.create_time desc limit "+(page*size)+","+size;
|
|
|
|
|
|
" ) a where 1=1 ";
|
|
|
|
if(type!=null){
|
|
|
|
sql += " and a.type = '"+type+"'";
|
|
|
|
}
|
|
|
|
sql += "ORDER BY a.create_time desc limit "+(page*size)+","+size;
|
|
|
|
|
|
List<Map<String,Object>> res = jdbcTemplate.queryForList(sql);
|
|
List<Map<String,Object>> res = jdbcTemplate.queryForList(sql);
|
|
for (Map<String,Object> map : res){
|
|
for (Map<String,Object> map : res){
|
|
JSONObject json = new JSONObject();
|
|
JSONObject json = new JSONObject();
|