trick9191 7 år sedan
förälder
incheckning
5eb571030f

+ 9 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/ServerLabelTree.java

@ -11,6 +11,7 @@ public class ServerLabelTree {
    private String labelCode;
    private String labelName;
    private Long focusAmount;
    private String  parentCode;
    private List<ServerLabelTree> ch;
    public Long getAmount() {
@ -52,4 +53,12 @@ public class ServerLabelTree {
    public void setLabelCode(String labelCode) {
        this.labelCode = labelCode;
    }
    public String getParentCode() {
        return parentCode;
    }
    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }
}

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -292,7 +292,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        "    wlyy_sign_family t1 " +
                        " WHERE (t1.doctor = ? or t1.doctor_health = ?) " +
                        "    AND t1.status > 0 " +
                        "    AND t1.admin_team_code = ? AND  t1.special_population = '"+label[0]+"'";
                        "    AND t1.admin_team_code = ? AND  t1.special_population = '"+label[1]+"'";
                args = new Object[]{doctor, doctor, teamCode};
            }else{
                sql = "SELECT " +
@ -2870,7 +2870,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        " FROM " +
                        "    wlyy_sign_family t1 " +
                        " WHERE t1.status > 0 " +
                        "    AND t1.admin_team_code = ? AND  t1.special_population = '"+label[0]+"'";
                        "    AND t1.admin_team_code = ? AND  t1.special_population = '"+label[1]+"'";
                args = new Object[]{teamCode};
            }else{
                sql = "SELECT " +

+ 5 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -1587,16 +1587,18 @@ public class SignWebService extends BaseService {
                String sql = "select d.name from wlyy_sign_dict d where d.code = '" + sevId + "' and d.year ='2017' ";
                List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
                String[] keys = sevId.split("-");
                if (list != null && list.size() > 0) {
                    Map<String, Object> name = list.get(0);
                    String populationName = (String) name.get("name");
                    if (StringUtils.isNotBlank(populationName)) {
                        renew.setSpecialPopulation(sevId);
                        renew.setSpecialPopulation(keys[1]);
                        renew.setSpecialPopulationName(populationName);
                    }
                }
                String[] keys = sevId.split("-");
                if (keys != null && keys.length > 0) {
                    String sql2 = "select d.name from wlyy_sign_dict d where d.code = '" + keys[0] + "' and d.year ='2017' ";
                    List<Map<String, Object>> list2 = jdbcTemplate.queryForList(sql2);
@ -1611,7 +1613,7 @@ public class SignWebService extends BaseService {
                    }
                }
            } else {
                String sql2 = "select d.name from wlyy_sign_dict d where d.code = '" + sevId + "' and d.year ='2017' ";
                String sql2 = "select d.name from wlyy_sign_dict d where d.code = '" + DateUtil.getSignYear() + "' and d.year ='2017' ";
                List<Map<String, Object>> list2 = jdbcTemplate.queryForList(sql2);
                if (list2 != null && list2.size() > 0) {
                    Map<String, Object> name = list2.get(0);

+ 10 - 10
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -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"));

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -268,6 +268,7 @@ public class SignPatientLabelInfoController extends BaseController {
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }