소스 검색

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

lyr 8 년 전
부모
커밋
a91a1ea185
1개의 변경된 파일12개의 추가작업 그리고 9개의 파일을 삭제
  1. 12 9
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

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

@ -206,7 +206,7 @@ public class StatisticsService extends BaseService {
        if (result != null && result.size() > 0) {
            return (result.get(0).get("amount") != null ? (Long.valueOf(result.get(0).get("amount").toString()) + todayAmount) : todayAmount);
        } else {
            return 0;
            return todayAmount;
        }
    }
@ -256,7 +256,7 @@ public class StatisticsService extends BaseService {
        // 截止日期包含当天,则从redis查询当天统计数据
        if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
            String val = redisTemplate.opsForValue().get("quota:16:" + level + ":" + area);
            String val = redisTemplate.opsForValue().get("quota:16:" + level + ":0:" + area);
            if (!StringUtils.isEmpty(val)) {
                JSONObject valJson = new JSONObject(val);
                if (valJson.has("num")) {
@ -270,7 +270,7 @@ public class StatisticsService extends BaseService {
        if (result != null && result.size() > 0) {
            return (result.get(0).get("amount") != null ? (Long.valueOf(result.get(0).get("amount").toString()) + todayAmount) : todayAmount);
        } else {
            return 0;
            return todayAmount;
        }
    }
@ -1918,6 +1918,8 @@ public class StatisticsService extends BaseService {
                        PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(map.get("code").toString(), Calendar.getInstance().get(Calendar.YEAR));
                        if (peopleNum != null) {
                            map.put("rate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getNum() * 100));
                            map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getTaskNum() * 100));
                            map.put("targetRate",  df.format(peopleNum.getTaskNum() * 1.0000/ peopleNum.getNum() * 100));
                            map.put("num", peopleNum.getNum());
                            map.put("task", peopleNum.getTaskNum());
                        }
@ -1925,11 +1927,12 @@ public class StatisticsService extends BaseService {
                        JSONObject peopleNum = new JSONObject(redisNum);
                        if (peopleNum != null) {
                            map.put("rate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getInt("num") * 100));
                            map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / peopleNum.getInt("taskNum") * 100));
                            map.put("targetRate", df.format(peopleNum.getInt("taskNum") * 1.0000 / peopleNum.getInt("num") * 100));
                            map.put("num", peopleNum.getInt("num"));
                            map.put("task", peopleNum.getInt("taskNum"));
                        }
                    }
                }
            }
@ -2678,11 +2681,11 @@ public class StatisticsService extends BaseService {
                tnbGxy.put("amount", Double.valueOf("0.0"));
                resultList.add(tnb);
//                Map<String, Object> mn65LowGxy = new HashMap<>();
//                mn65LowGxy.put("code", "7");
//                mn65LowGxy.put("name", "慢病人群65岁以上");
//                mn65LowGxy.put("amount", Double.valueOf("0.0"));
//                resultList.add(mn65LowGxy);
                Map<String, Object> mb65UpGxy = new HashMap<>();
                mb65UpGxy.put("code", "7");
                mb65UpGxy.put("name", "慢病人群65岁以上");
                mb65UpGxy.put("amount", Double.valueOf("0.0"));
                resultList.add(mb65UpGxy);
            } else if (index.equals(AGE)) {
                Map<String, Object> map1 = new HashMap<>();
                map1.put("code", "1");