瀏覽代碼

名医查询bug修改

esb 8 年之前
父節點
當前提交
887bb81414
共有 2 個文件被更改,包括 48 次插入41 次删除
  1. 45 39
      src/main/java/com/yihu/wlyy/job/CurrentDayAllQuotaJob.java
  2. 3 2
      src/main/java/com/yihu/wlyy/job/SignJob.java

+ 45 - 39
src/main/java/com/yihu/wlyy/job/CurrentDayAllQuotaJob.java

@ -169,39 +169,44 @@ public class CurrentDayAllQuotaJob implements Job {
            boolean hasGXY = false;//有高血压
            boolean hasTNB = false;//有糖尿病
            //如果是慢病的 统计高血压的 糖尿病  1高血压,2糖尿病  糖尿病和高血压是100
            //如果是慢病的 统计高血压的 糖尿病  1高血压,2糖尿病  糖尿病和高血压是3
            String diseaseType="";
            String jsonString = redisTemplate.opsForValue().get("disease:" + signFamily.getPatient());
            if (StringUtils.isEmpty(jsonString)) {
                continue;
            }
            //排除数据 只留下高血压和糖尿病
            List<JSONObject> jsonObjects = new ArrayList<JSONObject>();
            JSONArray redisValues = new JSONArray(jsonString);
            for (Object obj : redisValues) {
                JSONObject redisValue = new JSONObject(obj);
                if(!redisValue.has("signType")){
                    continue;
                }
                //排除掉三师签约
                if ("1".equals(redisValue.get("signType").toString())) {
                    continue;
                }
                String disease = redisValue.get("disease").toString();
                if (Integer.valueOf(disease).equals("1")) {
                    jsonObjects.add(redisValue);
                    hasGXY = true;//设置有高血压
                    diseaseType="1";
                }
                if (Integer.valueOf(disease).equals("2")) {
                    jsonObjects.add(redisValue);
                    hasTNB = true;//设置有糖尿病
                    diseaseType="2";
                diseaseType="4";//健康人群
            }else{
                //排除数据 只留下高血压和糖尿病
                List<JSONObject> jsonObjects = new ArrayList<JSONObject>();
                JSONArray redisValues = new JSONArray(jsonString);
                if(redisValues.length()>0){
                    for (Object obj : redisValues) {
                        JSONObject redisValue =  (JSONObject)(obj);
                        if(!redisValue.has("signType")){
                            continue;
                        }
                        //排除掉三师签约
                        if ("1".equals(redisValue.getString("signType"))) {
                            continue;
                        }
                        String disease = redisValue.getString("disease");
                        if (("1").equals(disease)) {
                            jsonObjects.add(redisValue);
                            hasGXY = true;//设置有高血压
                            diseaseType="1";
                        }
                        if (("2").equals(disease)) {
                            jsonObjects.add(redisValue);
                            hasTNB = true;//设置有糖尿病
                            diseaseType="2";
                        }
                    }
                    if(hasGXY&&hasTNB){
                        diseaseType="3";
                    }
                }else{
                    diseaseType="4";
                }
            }
            if(hasGXY&&hasTNB){
                diseaseType="100";
            }
            //统计市
            compute(cityAgeMap, Constant.city, ageCode, diseaseType);
            //统计区
@ -222,7 +227,7 @@ public class CurrentDayAllQuotaJob implements Job {
        for (Map.Entry<String, Map<String, Map>> entry : cityAgeMap.entrySet()) {
            Map<String, Map> oneAgeMap = entry.getValue();
            for(int i=1;i<7;i++){
                for(int j=1;j<4;j++){
                for(int j=1;j<5;j++){
                    String key_2=i+"";
                    String key_3=j+"";
                    String name=Constant.cityName;
@ -230,7 +235,7 @@ public class CurrentDayAllQuotaJob implements Job {
                    if (oneAgeMap != null && oneAgeMap.containsKey(key_2)) {
                        Map<String,Long> key3Map=oneAgeMap.get(key_2);
                        if(key3Map!=null&&key3Map.containsKey(key_3)){
                            jsonObject.put("num",entry.getValue().get((key3Map.get(key_3) + "")));
                            jsonObject.put("num",key3Map.get(key_3) + "");
                        }else{
                            jsonObject.put("num",0);
                        }
@ -249,7 +254,7 @@ public class CurrentDayAllQuotaJob implements Job {
            Map<String, Map> oneAgeMap = townAgeMap.get(entry.getKey());//得到当个区的统计数据
            Town townObj = entry.getValue();//得到区级信息
            for(int i=1;i<7;i++){
                for(int j=1;j<4;j++){
                for(int j=1;j<5;j++){
                    String key_2=i+"";
                    String key_3=j+"";
                    String name=townObj.getName();
@ -276,7 +281,7 @@ public class CurrentDayAllQuotaJob implements Job {
            Map<String, Map> oneAgeMap = orgAgeMap.get(entry.getKey());//得到当个机构的统计数据
            Hospital hospital = entry.getValue();//得到机构信息
            for(int i=1;i<7;i++){
                for(int j=1;j<4;j++){
                for(int j=1;j<5;j++){
                    String key_2=i+"";
                    String key_3=j+"";
                    String name=hospital.getName();
@ -869,20 +874,20 @@ public class CurrentDayAllQuotaJob implements Job {
                List<JSONObject> jsonObjects = new ArrayList<JSONObject>();
                JSONArray redisValues = new JSONArray(jsonString);
                for (Object obj : redisValues) {
                    JSONObject redisValue = new JSONObject(obj);
                    JSONObject redisValue = (JSONObject)(obj);
                    if(!redisValue.has("signType")){
                        continue;
                    }
                    //排除掉三师签约
                    if ("1".equals(redisValue.get("signType").toString())) {
                    if ("1".equals(redisValue.getString("signType"))) {
                        continue;
                    }
                    String disease = redisValue.get("disease").toString();
                    if (Integer.valueOf(disease).equals("1")) {
                    String disease = redisValue.getString("disease");
                    if ("1".equals(disease)) {
                        jsonObjects.add(redisValue);
                        hasGXY = true;//设置有高血压
                    }
                    if (Integer.valueOf(disease).equals("2")) {
                    if ("2".equals(disease)) {
                        jsonObjects.add(redisValue);
                        hasTNB = true;//设置有糖尿病
                    }
@ -916,8 +921,9 @@ public class CurrentDayAllQuotaJob implements Job {
                }
                //统计机构
                //统计站
                if (!"00".equals(hospital.getCode().substring(8))) {
                    String orgCodeTemp = hospital.getCode().substring(0, 8) + "00";
                String org=hospital.getCode();
                if (!"00".equals(org.substring(org.length()-2,org.length()))) {
                    String orgCodeTemp =org.substring(0,org.length()-2)+"00";
                    //统计机构
                    if (orgGroupMap.containsKey(orgCodeTemp)) {
                        Map<String, Long> groupMapTemp = orgGroupMap.get(orgCodeTemp);

+ 3 - 2
src/main/java/com/yihu/wlyy/job/SignJob.java

@ -443,8 +443,9 @@ public class SignJob implements Job {
                    }
                    //统计机构
                    //统计站
                    if (!"00".equals(hospital.getCode().substring(8))) {
                        String orgCodeTemp = hospital.getCode().substring(0, 8) + "00";
                    String org=hospital.getCode();
                    if (!"00".equals(org.substring(org.length()-2,org.length()))) {
                        String orgCodeTemp =org.substring(0,org.length()-2)+"00";
                        //统计机构
                        if (orgGroupMap.containsKey(orgCodeTemp)) {
                            Map<String, Long> groupMapTemp = orgGroupMap.get(orgCodeTemp);