|
@ -1295,6 +1295,13 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
" LEFT(pr.create_time,19) AS createTime, " +
|
|
|
" pr.doctor, " +
|
|
|
" pr.dispensary_type AS dispensaryType," +
|
|
|
" e.address, " +
|
|
|
" e.province_name AS provinceName, " +
|
|
|
" e.city_name AS cityName," +
|
|
|
" e.town_name AS townName," +
|
|
|
" e.street_name AS streetName," +
|
|
|
" e.hospital_name AS hospitalName," +
|
|
|
" e.hospital_address AS hospitalAddress," +
|
|
|
" e.expressage_code AS expressageCode, " +
|
|
|
" e.expressage_name AS expressageName, " +
|
|
|
" e.expressage_hospital_address AS expressageHospitalAddress, " +
|
|
@ -1360,7 +1367,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
param.add(endDate + " 23:59:59");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
|
pre_sql.append(" AND e.hospital_code = ? ");
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
param.add(hospital);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(state)) {
|
|
@ -1402,7 +1409,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
param.add(endDate + " 23:59:59");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
|
pre_sql.append(" AND e.hospital_code = ? ");
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
param.add(hospital);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(state)) {
|
|
@ -1446,13 +1453,13 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
}
|
|
|
|
|
|
public JSONArray getHospitalListTitle(String teamCode) {
|
|
|
StringBuffer pre_sql = new StringBuffer("SELECT e.hospital_code AS hospitalCode ,e.hospital_name AS hospitalName FROM " +
|
|
|
StringBuffer pre_sql = new StringBuffer("SELECT e.patient_hospital_code AS hospitalCode ,e.patient_hospital_name AS hospitalName FROM " +
|
|
|
" wlyy_prescription pr " +
|
|
|
" JOIN wlyy_prescription_expressage e ON pr.code = e.prescription_code " +
|
|
|
" WHERE pr.admin_team_id = ? " +
|
|
|
" AND (e.expressage_code IS NULL OR e.expressage_code ='') " +
|
|
|
" AND pr.dispensary_type =3 " +
|
|
|
" GROUP BY e.hospital_code ");
|
|
|
" GROUP BY e.patient_hospital_code ");
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(pre_sql.toString(), new Object[]{teamCode});
|
|
|
return new JSONArray(list);
|
|
|
}
|
|
@ -1708,7 +1715,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
sql +=" AND d.`name` LIKE '%"+name+"%' ";
|
|
|
}
|
|
|
if(page!=null&&size!=null){
|
|
|
sql += " LIMIT "+(page-1)+","+size;
|
|
|
sql += " LIMIT "+(page-1)*size+","+size;
|
|
|
}
|
|
|
String totalSql = "SELECT " +
|
|
|
" count(1) AS total" +
|