|
@ -1571,26 +1571,41 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
Matcher matcher = pattern1.matcher(filter);
|
|
|
if (matcher.matches()) {
|
|
|
// 身份证校验通过
|
|
|
String sql = "select" +
|
|
|
" p. CODE," +
|
|
|
" p. NAME ," +
|
|
|
" p.idcard," +
|
|
|
" p.sex," +
|
|
|
" f.id," +
|
|
|
" f.type," +
|
|
|
" f.doctor," +
|
|
|
" f.status," +
|
|
|
" f.doctor_health," +
|
|
|
" f.admin_team_code," +
|
|
|
" t.id teamCode," +
|
|
|
" t.`name` teamName" +
|
|
|
" from" +
|
|
|
" wlyy_patient p" +
|
|
|
" LEFT JOIN wlyy_sign_family f ON p.CODE = f.patient" +
|
|
|
" LEFT JOIN wlyy_admin_team t ON f.admin_team_code = t.id" +
|
|
|
" where" +
|
|
|
" p. idcard = ? AND (f.id IS NULL)";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter);
|
|
|
String sql = "SELECT" +
|
|
|
" p. CODE," +
|
|
|
" p. NAME," +
|
|
|
" p.idcard," +
|
|
|
" p.sex," +
|
|
|
" f.id," +
|
|
|
" f.type," +
|
|
|
" f.doctor," +
|
|
|
" f.doctor_health," +
|
|
|
" f.admin_team_code," +
|
|
|
" f. STATUS," +
|
|
|
" t.id teamCode," +
|
|
|
" t.name teamName"+
|
|
|
" FROM" +
|
|
|
" wlyy_patient p" +
|
|
|
" LEFT JOIN (" +
|
|
|
" SELECT" +
|
|
|
" id,type,doctor,doctor_health,admin_team_code,status" +
|
|
|
" FROM" +
|
|
|
" wlyy_sign_family" +
|
|
|
" WHERE" +
|
|
|
" STATUS > 0" +
|
|
|
" AND patient IN (" +
|
|
|
" SELECT" +
|
|
|
" CODE" +
|
|
|
" FROM" +
|
|
|
" wlyy_patient" +
|
|
|
" WHERE" +
|
|
|
" idcard = ?" +
|
|
|
")" +
|
|
|
") f ON p. CODE = f.patient" +
|
|
|
" LEFT JOIN wlyy_admin_team t ON t.id = f.admin_team_code" +
|
|
|
" WHERE" +
|
|
|
" p. idcard = ?";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter,filter);
|
|
|
for (Map<String, Object> p : list) {
|
|
|
JSONObject pJson = new JSONObject();
|
|
|
|
|
@ -1625,26 +1640,41 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
String sql = "select" +
|
|
|
" p. CODE," +
|
|
|
" p. NAME," +
|
|
|
" p.idcard," +
|
|
|
" p.sex," +
|
|
|
" f.id," +
|
|
|
" f.type," +
|
|
|
" f.doctor," +
|
|
|
" f.status," +
|
|
|
" f.doctor_health," +
|
|
|
" f.admin_team_code," +
|
|
|
" t.id teamCode," +
|
|
|
" t.`name` teamName" +
|
|
|
" from" +
|
|
|
" wlyy_patient p" +
|
|
|
" LEFT JOIN wlyy_sign_family f ON p.CODE = f.patient" +
|
|
|
" LEFT JOIN wlyy_admin_team t ON f.admin_team_code = t.id" +
|
|
|
" where" +
|
|
|
" p. name = ? AND (f.id IS NULL)";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter);
|
|
|
String sql = "SELECT" +
|
|
|
" p. CODE," +
|
|
|
" p. NAME," +
|
|
|
" p.idcard," +
|
|
|
" p.sex," +
|
|
|
" f.id," +
|
|
|
" f.type," +
|
|
|
" f.doctor," +
|
|
|
" f.doctor_health," +
|
|
|
" f.admin_team_code," +
|
|
|
" f. STATUS," +
|
|
|
" t.id teamCode," +
|
|
|
" t.name teamName"+
|
|
|
" FROM" +
|
|
|
" wlyy_patient p" +
|
|
|
" LEFT JOIN (" +
|
|
|
" SELECT" +
|
|
|
" id,type,doctor,doctor_health,admin_team_code,status" +
|
|
|
" FROM" +
|
|
|
" wlyy_sign_family" +
|
|
|
" WHERE" +
|
|
|
" STATUS > 0" +
|
|
|
" AND patient IN (" +
|
|
|
" SELECT" +
|
|
|
" CODE" +
|
|
|
" FROM" +
|
|
|
" wlyy_patient" +
|
|
|
" WHERE" +
|
|
|
" name = ?" +
|
|
|
")" +
|
|
|
") f ON p. CODE = f.patient" +
|
|
|
" LEFT JOIN wlyy_admin_team t ON t.id = f.admin_team_code" +
|
|
|
" WHERE" +
|
|
|
" p. name = ?";
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, filter,filter);
|
|
|
for (Map<String, Object> p : list) {
|
|
|
JSONObject pJson = new JSONObject();
|
|
|
|