|
@ -1876,17 +1876,18 @@ public class ManagerQuestionnaireService extends BaseService {
|
|
}
|
|
}
|
|
|
|
|
|
tableSql += " , wlyy_patient p ";
|
|
tableSql += " , wlyy_patient p ";
|
|
whereSql += " and p.code=w.patient ";
|
|
|
|
|
|
whereSql += " and p.code = w.patient ";
|
|
if (StringUtils.isNotBlank(labelSexType)) {
|
|
if (StringUtils.isNotBlank(labelSexType)) {
|
|
whereSql += " and p.sex in (" + labelSexType + ") ";
|
|
whereSql += " and p.sex in (" + labelSexType + ") ";
|
|
}
|
|
}
|
|
List<Map<String, Object>> groupPatient = null;
|
|
List<Map<String, Object>> groupPatient = null;
|
|
if (StringUtils.isNotBlank(labelHealthType) || StringUtils.isNotBlank(labelDiseaseType)) {
|
|
if (StringUtils.isNotBlank(labelHealthType) || StringUtils.isNotBlank(labelDiseaseType)) {
|
|
String sql = "SELECT DISTINCT s.patient as servicePatientCode, f.`name` as servicePatientName, f.ssc,f.idcard,f.mobile,f.hospital,f.hospital_name as hospitalName, h.town,h.town_name as townName FROM ( SELECT t.patient," +
|
|
|
|
" GROUP_CONCAT(',',t.label_type,t.label,',') label FROM " +
|
|
|
|
" wlyy_sign_patient_label_info t WHERE t.patient IN ( select p.code " +
|
|
|
|
" from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h , wlyy_sign_family_server s , wlyy_patient p " +
|
|
|
|
whereSql + ") AND t. STATUS = 1 GROUP BY t.patient ) s LEFT JOIN wlyy_sign_family f on s.patient=f.patient LEFT JOIN dm_hospital h on f.hospital=h.`code` where 1=1 ";
|
|
|
|
|
|
String sql = "SELECT DISTINCT s.patient as servicePatientCode, f.`name` as servicePatientName, f.ssc,f.idcard,f.mobile,f.hospital,f.hospital_name as hospitalName, h.town,h.town_name as townName " +
|
|
|
|
" FROM ( SELECT t.patient,GROUP_CONCAT(',',t.label_type,t.label,',') label" +
|
|
|
|
" FROM wlyy_sign_patient_label_info t WHERE t.patient IN ( select p.code " +
|
|
|
|
" from wlyy_sign_family w ,wlyy_admin_team t, dm_hospital h ,wlyy_patient p " +
|
|
|
|
whereSql + ") AND t. STATUS = 1 GROUP BY t.patient ) s LEFT JOIN wlyy_sign_family f on s.patient=f.patient AND f.`status`> 0 AND f.expenses_status = 1 " +
|
|
|
|
" LEFT JOIN dm_hospital h on f.hospital=h.`code` where 1=1 ";
|
|
if (StringUtils.isNotBlank(labelHealthType)) {
|
|
if (StringUtils.isNotBlank(labelHealthType)) {
|
|
String[] aa = labelHealthType.split(",");
|
|
String[] aa = labelHealthType.split(",");
|
|
String bb = "";
|
|
String bb = "";
|