|
@ -698,7 +698,14 @@ public class PatientService extends TokenService {
|
|
teamCodeSql=" and f.admin_team_code="+teamCode+" ";
|
|
teamCodeSql=" and f.admin_team_code="+teamCode+" ";
|
|
}
|
|
}
|
|
// 获取总分组数量
|
|
// 获取总分组数量
|
|
String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') AND f.`status`>0 AND f.server_type IS NOT NULL "+teamCodeSql+" GROUP BY f.server_type ORDER BY f.server_type ASC";
|
|
|
|
|
|
String totalGSql ="SELECT d.`code` AS serverType,d.`name` AS serverTypeName,ifNULL(c.Amount,0) AS Amount FROM " +
|
|
|
|
" wlyy_sign_dict d LEFT JOIN" +
|
|
|
|
" ("+
|
|
|
|
" SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') AND f.`status`>0 AND f.server_type IS NOT NULL "+teamCodeSql+" GROUP BY f.server_type ORDER BY f.server_type ASC"+
|
|
|
|
" ) c ON d.code = c.serverType " +
|
|
|
|
" WHERE d.`year`='"+DateUtil.getSignYear()+"' AND d.`code` NOT LIKE '%-%' ";
|
|
|
|
|
|
|
|
// String totalGSql = "SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') AND f.`status`>0 AND f.server_type IS NOT NULL "+teamCodeSql+" GROUP BY f.server_type ORDER BY f.server_type ASC";
|
|
List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
|
|
List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
|
|
|
|
|
|
//获取关注量分组数量
|
|
//获取关注量分组数量
|
|
@ -706,7 +713,31 @@ public class PatientService extends TokenService {
|
|
List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
|
|
List<Map<String,Object>> fousG = jdbcTemplate.queryForList(fousGSql);
|
|
|
|
|
|
//获取二级节点分组总数
|
|
//获取二级节点分组总数
|
|
String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') "+teamCodeSql+" AND f.`status`>0 AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population ASC ";
|
|
|
|
|
|
String sesTotalSql ="SELECT " +
|
|
|
|
" LEFT ( " +
|
|
|
|
" d.`code`, " +
|
|
|
|
" INSTR(d.`code`, '-') - 1 " +
|
|
|
|
" ) AS serverType, " +
|
|
|
|
" substring( " +
|
|
|
|
" d.`code`, " +
|
|
|
|
" INSTR(d.`code`, '-') + 1 " +
|
|
|
|
" ) AS specialPopulation, " +
|
|
|
|
" d.`name` AS specialPopulationName, " +
|
|
|
|
" ifnull(c.Amount, 0) AS Amount " +
|
|
|
|
" FROM " +
|
|
|
|
" wlyy_sign_dict d " +
|
|
|
|
" LEFT JOIN ( "+
|
|
|
|
" SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName ," +
|
|
|
|
" CONCAT(" +
|
|
|
|
" f.server_type," +
|
|
|
|
" '-'," +
|
|
|
|
" f.special_population" +
|
|
|
|
" ) AS dcode FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') "+teamCodeSql+" AND f.`status`>0 AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population ASC )" +
|
|
|
|
" c ON c.dcode = d.code " +
|
|
|
|
" WHERE\n" +
|
|
|
|
" d.`year` = '"+DateUtil.getSignYear()+"'" +
|
|
|
|
" AND d.`code` LIKE '%-%'";
|
|
|
|
//String sesTotalSql ="SELECT count(1) AS Amount,f.server_type AS serverType,f.server_type_name As serverTypeName ,f.special_population AS specialPopulation,f.special_population_name AS specialPopulationName FROM wlyy_sign_family f WHERE (f.doctor ='"+doctor+"' OR f.doctor_health ='"+doctor+"') "+teamCodeSql+" AND f.`status`>0 AND f.special_population Is NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ORDER BY f.special_population ASC ";
|
|
List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
|
|
List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
|
|
|
|
|
|
//获取二级节点分组数量
|
|
//获取二级节点分组数量
|