|
@ -3919,7 +3919,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
* @param general_doctor
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String,Object>> getVideoPrescriptionByDoctor(String doctor,String general_doctor) {
|
|
|
public List<Map<String,Object>> getVideoPrescriptionByDoctor(String doctor,String general_doctor,String wxId) {
|
|
|
String condition = "";
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
condition+= "to_char(room.reservation_time,'YYYY-MM-DD hh24:mi:ss') AS \"time\",";
|
|
|
}else{
|
|
|
condition += "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS \"time\",";
|
|
|
}
|
|
|
String sql ="SELECT " +
|
|
|
"room.outpatient_id AS id," +
|
|
|
"room.patient_id AS patient_id," +
|
|
@ -3929,8 +3935,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"patient.photo AS photo," +
|
|
|
"patient.birthday AS birthday," +
|
|
|
"patient.mobile AS mobile," +
|
|
|
"room.consult_type AS consult_type," +
|
|
|
"date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS time," +
|
|
|
"room.consult_type AS consult_type," +condition +
|
|
|
"room.reservation_type AS reservation_type," +
|
|
|
"outpatient.disease_img AS disease_img," +
|
|
|
"outpatient.description AS description," +
|
|
@ -3978,25 +3983,31 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
public com.alibaba.fastjson.JSONArray getWaitingForVisitVideoPrescriptionByDoctor(String doctor) {
|
|
|
public com.alibaba.fastjson.JSONArray getWaitingForVisitVideoPrescriptionByDoctor(String doctor,String wxId) {
|
|
|
String condition = "";
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
condition+= "to_char(room.reservation_time,'YYYY-MM-DD hh24:mi:ss') AS \"time\",";
|
|
|
condition+= "to_char(room.reservation_time,'YYYY-MM-DD') AS \"group_date\",";
|
|
|
}else{
|
|
|
condition += "date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS \"time\",";
|
|
|
condition += "date_format(room.reservation_time ,'%Y-%m-%d' ) AS \"group_date\",";
|
|
|
}
|
|
|
String sql ="SELECT " +
|
|
|
"room.outpatient_id AS id," +
|
|
|
"room.patient_id AS patient_id," +
|
|
|
"room.patient_name AS name," +
|
|
|
"patient.sex AS sex," +
|
|
|
"patient.idcard AS idcard," +
|
|
|
"patient.photo AS photo," +
|
|
|
"patient.birthday AS birthday," +
|
|
|
"patient.mobile AS mobile," +
|
|
|
"outpatient.mobile AS outpatient_mobile," +
|
|
|
"room.consult_type AS consult_type," +
|
|
|
"date_format(room.reservation_time ,'%Y-%m-%d %H:%i:%S' ) AS time," +
|
|
|
"date_format(room.reservation_time ,'%Y-%m-%d' ) AS group_date," +
|
|
|
"room.reservation_type AS reservation_type," +
|
|
|
"outpatient.disease_img AS disease_img," +
|
|
|
"outpatient.description AS description," +
|
|
|
"outpatient.origin_con_no AS origin_con_no, " +
|
|
|
"room.reservation_type AS reservation_type " +
|
|
|
"room.outpatient_id AS \"id\"," +
|
|
|
"room.patient_id AS \"patient_id\"," +
|
|
|
"room.patient_name AS \"name\"," +
|
|
|
"patient.sex AS \"sex\"," +
|
|
|
"patient.idcard AS \"idcard\"," +
|
|
|
"patient.photo AS \"photo\"," +
|
|
|
"patient.birthday AS \"birthday\"," +
|
|
|
"patient.mobile AS \"mobile\"," +
|
|
|
"outpatient.mobile AS \"outpatient_mobile\"," +
|
|
|
"room.consult_type AS \"consult_type\"," +condition+
|
|
|
"room.reservation_type AS \"reservation_type\"," +
|
|
|
"outpatient.disease_img AS \"disease_img\"," +
|
|
|
"outpatient.description AS \"description\"," +
|
|
|
"outpatient.origin_con_no AS \"origin_con_no\", " +
|
|
|
"room.reservation_type AS \"reservation_type\" " +
|
|
|
"FROM " +
|
|
|
"wlyy_hospital_waiting_room room," +
|
|
|
"base_patient patient," +
|
|
@ -4007,9 +4018,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"AND outpatient.status = 0 " +
|
|
|
"AND room.doctor='"+doctor+"' " +
|
|
|
"AND room.reservation_time is not null " +
|
|
|
"AND room.consult_type= 2 AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' order by room.reservation_time ASC ";
|
|
|
// "AND room.reservation_time>='"+DateUtil.getStringDate("yyyy-MM-dd")+" 00:00:00"+"' ";
|
|
|
"AND room.consult_type= 2 ";/* +
|
|
|
"AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' order by room.reservation_time ASC ";
|
|
|
// "AND room.reservation_time>='"+DateUtil.getStringDate("yyyy-MM-dd")+" 00:00:00"+"' ";*/
|
|
|
|
|
|
if("xm_ykyy_wx".equals(wxId)){
|
|
|
sql+=" AND room.reservation_time >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
|
|
|
}else {
|
|
|
sql +=" AND room.reservation_time >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
|
|
|
}
|
|
|
sql+=" order by room.reservation_time ASC ";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
Set<String> datelist = new HashSet<>();
|