|
@ -177,14 +177,6 @@ public class ImService {
|
|
|
public List<Map<String,Object>> findConsultRecordByPatient(String patient, String id,String type, int page,int pagesize, String title,Integer status,Integer payStatus) {
|
|
|
|
|
|
|
|
|
if(page >=1){
|
|
|
page --;
|
|
|
}
|
|
|
|
|
|
if (pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}
|
|
|
|
|
|
String sql = "SELECT " +
|
|
|
"a.id AS \"id\"," +
|
|
|
"a.type AS \"type\"," +
|
|
@ -229,8 +221,8 @@ public class ImService {
|
|
|
if (!StringUtils.isEmpty(payStatus)) {
|
|
|
sql += " and a.pay_status = " + payStatus + "";
|
|
|
}
|
|
|
sql += " ORDER BY a.czrq desc limit "+page * pagesize+","+pagesize+"";
|
|
|
List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql);
|
|
|
sql += " ORDER BY a.czrq desc ";
|
|
|
List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pagesize);
|
|
|
/*result = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConsultVO.class));*/
|
|
|
return result;
|
|
|
}
|
|
@ -265,7 +257,7 @@ public class ImService {
|
|
|
List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
|
|
|
Long count = 0L;
|
|
|
if (rstotal != null && rstotal.size() > 0) {
|
|
|
count = (Long) rstotal.get(0).get("total");
|
|
|
count = Long.parseLong(rstotal.get(0).get("total").toString());
|
|
|
}
|
|
|
|
|
|
return count;
|
|
@ -1698,13 +1690,7 @@ public class ImService {
|
|
|
String type, Integer status,
|
|
|
int page,int pagesize,
|
|
|
String title,String start_time,String end_time) {
|
|
|
if(page >=1){
|
|
|
page --;
|
|
|
}
|
|
|
|
|
|
if (pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}
|
|
|
|
|
|
String sql = "";
|
|
|
//专家咨询
|
|
|
if("1".equals(type) || "15".equals(type) || type.contains(",")){
|
|
@ -1787,9 +1773,9 @@ public class ImService {
|
|
|
if (!StringUtils.isEmpty(id)) {
|
|
|
sql += " and a.id = '" + id + "'";
|
|
|
}
|
|
|
sql += " ORDER BY a.czrq desc limit "+page * pagesize+","+pagesize+"";
|
|
|
sql += " ORDER BY a.czrq desc ";
|
|
|
|
|
|
return hibenateUtils.createSQLQuery(sql);
|
|
|
return hibenateUtils.createSQLQuery(sql,page,pagesize);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -2086,14 +2072,6 @@ public class ImService {
|
|
|
int page,int pagesize,
|
|
|
String title,String start_time,String end_time,String patinet) {
|
|
|
|
|
|
if(page >=1){
|
|
|
page --;
|
|
|
}
|
|
|
|
|
|
if (pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}
|
|
|
|
|
|
String sql = "SELECT " +
|
|
|
"a.id AS \"id\"," +
|
|
|
"a.type AS \"type\"," +
|
|
@ -2151,11 +2129,11 @@ public class ImService {
|
|
|
if (!StringUtils.isEmpty(id)) {
|
|
|
sql += " and a.id = '" + id + "'";
|
|
|
}
|
|
|
sql += " ORDER BY a.czrq desc limit "+page * pagesize+","+pagesize+"";
|
|
|
sql += " ORDER BY a.czrq desc ";
|
|
|
|
|
|
// result = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConsultVO.class));
|
|
|
|
|
|
return hibenateUtils.createSQLQuery(sql);
|
|
|
return hibenateUtils.createSQLQuery(sql,page,pagesize);
|
|
|
}
|
|
|
|
|
|
|