|
@ -595,19 +595,19 @@ public class PatientService extends TokenService {
|
|
|
public JSONArray getSignByTeamCodeGpbyServer(Long 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.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.expenses_status ='1' GROUP BY f.server_type ORDER BY f.server_type DESC";
|
|
|
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.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type DESC";
|
|
|
List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
|
|
|
|
|
|
//获取关注量分组数量
|
|
|
String fousGSql ="SELECT count(1) As focusAmount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.expenses_status ='1' AND f.openid IS NOT NULL GROUP BY f.server_type ";
|
|
|
String fousGSql ="SELECT count(1) As focusAmount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.openid IS NOT NULL AND f.server_type IS NOT NULL GROUP BY f.server_type ";
|
|
|
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.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.expenses_status ='1' AND f.special_population Is NOT NULL GROUP BY f.special_population ORDER BY f.special_population DESC ";
|
|
|
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.admin_team_code ="+teamCode+" 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 DESC ";
|
|
|
List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
|
|
|
|
|
|
//获取二级节点分组数量
|
|
|
String sesFousGSql ="SELECT count(1) AS focusAmount,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.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.expenses_status ='1' AND f.special_population Is NOT NULL AND f.openid IS NOT NULL GROUP BY f.special_population ";
|
|
|
String sesFousGSql ="SELECT count(1) AS focusAmount,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.admin_team_code ="+teamCode+" AND f.`status`>0 AND f.special_population Is NOT NULL AND f.openid IS NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ";
|
|
|
List<Map<String,Object>> sesFousG =jdbcTemplate.queryForList(sesFousGSql);
|
|
|
|
|
|
List<ServerLabelTree> listTree = new ArrayList<>();
|
|
@ -670,7 +670,7 @@ public class PatientService extends TokenService {
|
|
|
chTree.setLabelCode(tree.getLabelCode()+"-"+specialPopulation);
|
|
|
chTree.setLabelName((String)sesT.get("specialPopulationName"));
|
|
|
chTree.setAmount((Long)sesT.get("Amount"));
|
|
|
|
|
|
chTree.setParentCode(tree.getLabelCode());
|
|
|
Map<String,Object> sFousG = (Map<String,Object>)sesFousGMap.get(specialPopulation);
|
|
|
if(sFousG!=null){
|
|
|
chTree.setFocusAmount((Long)sFousG.get("focusAmount"));
|
|
@ -695,19 +695,19 @@ public class PatientService extends TokenService {
|
|
|
public JSONArray getSignByDoctorCodeGpbyServer(String doctor){
|
|
|
|
|
|
// 获取总分组数量
|
|
|
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+"' AND f.`status`>0 AND f.expenses_status ='1' GROUP BY f.server_type ORDER BY f.server_type DESC";
|
|
|
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+"' AND f.`status`>0 AND f.server_type IS NOT NULL GROUP BY f.server_type ORDER BY f.server_type DESC";
|
|
|
List<Map<String,Object>> totalG = jdbcTemplate.queryForList(totalGSql);
|
|
|
|
|
|
//获取关注量分组数量
|
|
|
String fousGSql ="SELECT count(1) As focusAmount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.doctor ='"+doctor+"' AND f.`status`>0 AND f.expenses_status ='1' AND f.openid IS NOT NULL GROUP BY f.server_type ";
|
|
|
String fousGSql ="SELECT count(1) As focusAmount,f.server_type AS serverType,f.server_type_name AS serverTypeName FROM wlyy_sign_family f WHERE f.doctor ='"+doctor+"' AND f.`status`>0 AND f.openid IS NOT NULL AND f.server_type IS NOT NULL GROUP BY f.server_type ";
|
|
|
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+"' AND f.`status`>0 AND f.expenses_status ='1' AND f.special_population Is NOT NULL GROUP BY f.special_population ORDER BY f.special_population DESC ";
|
|
|
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+"' 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 DESC ";
|
|
|
List<Map<String,Object>> sesTotal = jdbcTemplate.queryForList(sesTotalSql);
|
|
|
|
|
|
//获取二级节点分组数量
|
|
|
String sesFousGSql ="SELECT count(1) AS focusAmount,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+"' AND f.`status`>0 AND f.expenses_status ='1' AND f.special_population Is NOT NULL AND f.openid IS NOT NULL GROUP BY f.special_population ";
|
|
|
String sesFousGSql ="SELECT count(1) AS focusAmount,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+"' AND f.`status`>0 AND f.special_population Is NOT NULL AND f.openid IS NOT NULL AND f.server_type IS NOT NULL GROUP BY f.special_population ";
|
|
|
List<Map<String,Object>> sesFousG =jdbcTemplate.queryForList(sesFousGSql);
|
|
|
|
|
|
List<ServerLabelTree> listTree = new ArrayList<>();
|
|
@ -770,7 +770,7 @@ public class PatientService extends TokenService {
|
|
|
chTree.setLabelCode(tree.getLabelCode()+"-"+specialPopulation);
|
|
|
chTree.setLabelName((String)sesT.get("specialPopulationName"));
|
|
|
chTree.setAmount((Long)sesT.get("Amount"));
|
|
|
|
|
|
chTree.setParentCode(tree.getLabelCode());
|
|
|
Map<String,Object> sFousG = (Map<String,Object>)sesFousGMap.get(specialPopulation);
|
|
|
if(sFousG!=null){
|
|
|
chTree.setFocusAmount((Long)sFousG.get("focusAmount"));
|