|
@ -177,20 +177,12 @@ 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\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\"," +
|
|
|
"a.czrq AS \"czrq\"," +
|
|
|
"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\"," +
|
|
|
"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"d.name AS \"doctorName\"," +
|
|
@ -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;
|
|
@ -1438,7 +1430,11 @@ public class ImService {
|
|
|
|
|
|
ConsultTeamDo consultTeamDo = consultTeamDao.findByConsult(consult);
|
|
|
|
|
|
ConsultDo consultDo = consultDao.findOne(consult);
|
|
|
|
|
|
object.put("doctorCode",consultTeamDo.getDoctor());
|
|
|
//支付状态
|
|
|
object.put("payStatus",consultDo.getPayStatus());
|
|
|
|
|
|
return object;
|
|
|
}
|
|
@ -1596,7 +1592,7 @@ public class ImService {
|
|
|
"a.score as \"score\"," +
|
|
|
"a.score_type as \"score_type\"," +
|
|
|
"a.content as \"content\"," +
|
|
|
"b.create_time as \"create_time\"," +
|
|
|
"to_char(b.create_time,'YYYY-MM-DD hh24:mi:ss') AS \"create_time\"," +
|
|
|
"c.type as \"type\"," +
|
|
|
"c.name as \"patientname\"," +
|
|
|
"b.id as \"id\"," +
|
|
@ -1698,13 +1694,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(",")){
|
|
@ -1713,7 +1703,7 @@ public class ImService {
|
|
|
"a.type AS \"type\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\"," +
|
|
|
"a.czrq AS \"czrq\"," +
|
|
|
"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\"," +
|
|
|
"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"d.name AS \"patientName\"," +
|
|
@ -1733,7 +1723,7 @@ public class ImService {
|
|
|
"a.type AS \"type\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\"," +
|
|
|
"a.czrq AS \"czrq\"," +
|
|
|
"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\"," +
|
|
|
"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"d.name AS \"patientName\"," +
|
|
@ -1787,9 +1777,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,20 +2076,12 @@ 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\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\"," +
|
|
|
"a.czrq AS \"czrq\"," +
|
|
|
"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\"," +
|
|
|
"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"d.name AS \"patientName\"," +
|
|
@ -2151,11 +2133,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);
|
|
|
}
|
|
|
|
|
|
|
|
@ -2402,7 +2384,7 @@ public class ImService {
|
|
|
"a.type AS \"type\"," +
|
|
|
"a.title AS \"title\"," +
|
|
|
"a.symptoms AS \"symptoms\"," +
|
|
|
"a.czrq AS \"czrq\"," +
|
|
|
"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss') AS \"czrq\"," +
|
|
|
"b.status AS \"status\"," +
|
|
|
"b.evaluate AS \"evaluate\"," +
|
|
|
"b.doctor AS \"doctorCode\"," +
|
|
@ -2434,7 +2416,7 @@ public class ImService {
|
|
|
"patient.sex AS \"patientsex\"," +
|
|
|
"patient.photo AS \"patientphoto\"," +
|
|
|
"op.id AS \"outpatientid\"," +
|
|
|
"op.register_date AS \"registerDate\"," +
|
|
|
"to_char(op.register_date,'YYYY-MM-DD hh24:mi:ss') AS \"registerDate\"," +
|
|
|
"op.status AS outpatientstatus " +
|
|
|
"FROM wlyy_outpatient op," +
|
|
|
"base_patient patient " +
|