Bläddra i källkod

Merge branch 'dev' of lyr/patient-co-management into dev

lyr 8 år sedan
förälder
incheckning
a870a75900

+ 24 - 18
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -133,7 +133,7 @@ public class StatisticsService extends BaseService {
            String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num") && valJson.getInt("num") > 0) {
                if (valJson.has("num")) {
                    todayAmount = valJson.getInt("num");
                }
            }
@ -195,7 +195,7 @@ public class StatisticsService extends BaseService {
            String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num") && valJson.getInt("num") > 0) {
                if (valJson.has("num")) {
                    todayAmount = valJson.getInt("num");
                }
            }
@ -259,7 +259,7 @@ public class StatisticsService extends BaseService {
            String val = redisTemplate.opsForValue().get("quota:16:" + level + ":" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num") && valJson.getInt("num") > 0) {
                if (valJson.has("num")) {
                    todayAmount = valJson.getInt("num");
                }
            }
@ -371,7 +371,7 @@ public class StatisticsService extends BaseService {
            String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num") && valJson.getInt("num") > 0) {
                if (valJson.has("num")) {
                    todayAmount = valJson.getInt("num");
                }
            }
@ -531,7 +531,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + low_level + ":" + code);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -724,7 +724,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + low_level + ":" + code);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -847,7 +847,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = (long) valJson.getInt("num");
                    }
                }
@ -1011,7 +1011,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = valJson.getInt("num");
                    }
                }
@ -1207,7 +1207,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = valJson.getInt("num");
                    }
                }
@ -1505,7 +1505,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + code + ":" + area);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -1651,7 +1651,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:12:" + level + ":6:" + code + ":" + area);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -1734,7 +1734,7 @@ public class StatisticsService extends BaseService {
            String val = redisTemplate.opsForValue().get("quota:8:" + level + ":" + code + ":" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num") && valJson.getInt("num") > 0) {
                if (valJson.has("num")) {
                    total += valJson.getInt("num");
                }
            }
@ -1904,7 +1904,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + low_level + ":" + code);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -2081,7 +2081,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = (long) valJson.getInt("num");
                    }
                }
@ -2277,7 +2277,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = valJson.getInt("num");
                    }
                }
@ -2474,7 +2474,7 @@ public class StatisticsService extends BaseService {
                String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area);
                if (!StringUtils.isEmpty(val)) {
                    JSONObject valJson = new JSONObject(val);
                    if (valJson.has("num") && valJson.getInt("num") > 0) {
                    if (valJson.has("num")) {
                        amount = valJson.getInt("num");
                    }
                }
@ -2636,6 +2636,12 @@ public class StatisticsService extends BaseService {
                unknown.put("amount", Double.valueOf("0.0"));
                resultList.add(unknown);
            } else if (index.equals(GROUP)) {
                Map<String, Object> nogroup = new HashMap<>();
                nogroup.put("code", "0");
                nogroup.put("name", "未分组");
                nogroup.put("amount", Double.valueOf("0.0"));
                resultList.add(nogroup);
                Map<String, Object> normal = new HashMap<>();
                normal.put("code", "1");
                normal.put("name", "普通人群");
@ -2776,7 +2782,7 @@ public class StatisticsService extends BaseService {
                    String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + code + ":" + area);
                    if (!StringUtils.isEmpty(val)) {
                        JSONObject valJson = new JSONObject(val);
                        if (valJson.has("num") && valJson.getInt("num") > 0) {
                        if (valJson.has("num")) {
                            map.put("amount", (long) map.get("amount") + valJson.getInt("num"));
                        }
                    }
@ -2785,7 +2791,7 @@ public class StatisticsService extends BaseService {
                if (index.equals(GROUP)) {
                    // 分组指标总数算法
                    String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
                    if (code.equals("1") || code.equals("2") || code.equals("3")) {
                    if (code.equals("0") || code.equals("1") || code.equals("2") || code.equals("3")) {
                        total += (long) map.get("amount");
                    }
                } else if (index.equals("16")) {