|  | @ -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;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1855,6 +1855,9 @@ public class StatisticsService extends BaseService {
 | 
	
		
			
				|  |  |                         List<Hospital> hospitals = hospitalDao.findByTownCode(town.getCode());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         for (Hospital hos : hospitals) {
 | 
	
		
			
				|  |  |                             if(hos.getCode().length() > 10){
 | 
	
		
			
				|  |  |                                 continue;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                             Map<String, Object> obj = new HashMap<>();
 | 
	
		
			
				|  |  |                             obj.put("code", hos.getCode());
 | 
	
		
			
				|  |  |                             obj.put("name", hos.getName());
 | 
	
	
		
			
				|  | @ -1878,6 +1881,9 @@ public class StatisticsService extends BaseService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 if (hospitals != null && hospitals.size() > 0) {
 | 
	
		
			
				|  |  |                     for (Hospital hos : hospitals) {
 | 
	
		
			
				|  |  |                         if(hos.getCode().length() > 10){
 | 
	
		
			
				|  |  |                             continue;
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         List<AdminTeam> teams = adminTeamDao.findByOrgCode(hos.getCode());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         for (AdminTeam team : teams) {
 | 
	
	
		
			
				|  | @ -1918,6 +1924,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 +1933,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"));
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2506,7 +2515,7 @@ public class StatisticsService extends BaseService {
 | 
	
		
			
				|  |  |                 "     quato_code = '" + index + "' " +
 | 
	
		
			
				|  |  |                 "   and level1_type = '" + level + "' and del = '1' " +
 | 
	
		
			
				|  |  |                 "   and quota_date >= '" + startDate + "' " +
 | 
	
		
			
				|  |  |                 "   and quota_date <= '" + endDate + "' " +
 | 
	
		
			
				|  |  |                 "   and quota_date <= '" + dateCon + "' " +
 | 
	
		
			
				|  |  |                 "   and " + areaField + " = '" + area + "' ";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
 | 
	
	
		
			
				|  | @ -2650,7 +2659,7 @@ public class StatisticsService extends BaseService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 Map<String, Object> manbing = new HashMap<>();
 | 
	
		
			
				|  |  |                 manbing.put("code", "2");
 | 
	
		
			
				|  |  |                 manbing.put("name", "慢病人群");
 | 
	
		
			
				|  |  |                 manbing.put("name", "慢病人群65岁以下");
 | 
	
		
			
				|  |  |                 manbing.put("amount", Double.valueOf("0.0"));
 | 
	
		
			
				|  |  |                 resultList.add(manbing);
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -2678,11 +2687,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");
 | 
	
	
		
			
				|  | @ -2791,7 +2800,7 @@ public class StatisticsService extends BaseService {
 | 
	
		
			
				|  |  |                 if (index.equals(GROUP)) {
 | 
	
		
			
				|  |  |                     // 分组指标总数算法
 | 
	
		
			
				|  |  |                     String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
 | 
	
		
			
				|  |  |                     if (code.equals("0") || code.equals("1") || code.equals("2") || code.equals("3")) {
 | 
	
		
			
				|  |  |                     if (code.equals("0") || code.equals("1") || code.equals("2") || code.equals("3") || code.equals("7")) {
 | 
	
		
			
				|  |  |                         total += (long) map.get("amount");
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 } else if (index.equals("16")) {
 |