|
@ -325,7 +325,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
String redisNum = "";
|
|
|
try {
|
|
|
redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
redisNum = "";
|
|
|
}
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
@ -365,12 +365,12 @@ public class StatisticsAllService extends BaseService {
|
|
|
signRate.put("sign", total);
|
|
|
signRate.put("people", num);
|
|
|
signRate.put("rate", df.format((total * 1.0000) / num * 100));
|
|
|
json.put("signRate",signRate);
|
|
|
json.put("signRate", signRate);
|
|
|
JSONObject signTaskRate = new JSONObject();
|
|
|
signTaskRate.put("sign", total);
|
|
|
signTaskRate.put("people", taskNum);
|
|
|
signTaskRate.put("rate", df.format((total * 1.0000) / taskNum * 100));
|
|
|
json.put("signTaskRate",signTaskRate);
|
|
|
json.put("signTaskRate", signTaskRate);
|
|
|
|
|
|
return json;
|
|
|
}
|
|
@ -412,7 +412,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
String redisNum = "";
|
|
|
try {
|
|
|
redisNum = redisTemplate.opsForValue().get("people:num:" + map.get("code").toString());
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
redisNum = "";
|
|
|
}
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
@ -521,7 +521,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
String redisNum = "";
|
|
|
try {
|
|
|
redisNum = redisTemplate.opsForValue().get("people:num:" + map.get("code").toString());
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
redisNum = "";
|
|
|
}
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
@ -567,6 +567,66 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public JSONArray getLowLevelTotalSpecial(String date, String area, int level, String index, int sort, String lowLevel) throws Exception {
|
|
|
JSONArray result = new JSONArray();
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
String low_level = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
|
|
|
String areaField = "";
|
|
|
String lowLevelField = "";
|
|
|
String lowLevelName = "";
|
|
|
|
|
|
if (level == 4) {
|
|
|
// 市级别
|
|
|
areaField = "city";
|
|
|
} else if (level == 3) {
|
|
|
// 区、城镇级别
|
|
|
areaField = "town";
|
|
|
} else if (level == 2) {
|
|
|
// 机构级别
|
|
|
areaField = "org_code";
|
|
|
} else if (level == 1) {
|
|
|
throw new Exception("param level error");
|
|
|
}
|
|
|
|
|
|
if (low_level.equals("3")) {
|
|
|
lowLevelField = "town";
|
|
|
lowLevelName = "town_name";
|
|
|
} else if (low_level.equals("2")) {
|
|
|
lowLevelField = "org_code";
|
|
|
lowLevelName = "org_name";
|
|
|
} else if (low_level.equals("1")) {
|
|
|
lowLevelField = "qkdoctor_code";
|
|
|
lowLevelName = "qkdoctor_name";
|
|
|
} else {
|
|
|
throw new Exception("param lowLevel error");
|
|
|
}
|
|
|
|
|
|
// 查询语句
|
|
|
String sql = " select " +
|
|
|
" ifnull(" + lowLevelField + ",'') code " +
|
|
|
" ,ifnull(" + lowLevelName + ",'') 'name' " +
|
|
|
" ,ifnull(result,'0/0') amount" +
|
|
|
" from " +
|
|
|
" wlyy_quota_result " +
|
|
|
" where " +
|
|
|
" quato_code = '" + index + "' " +
|
|
|
" and level1_type = ? and del = '1'" +
|
|
|
" and quota_date = ? " +
|
|
|
" and " + areaField + " = ? ";
|
|
|
|
|
|
resultList = jdbcTemplate.queryForList(sql, new Object[]{low_level, date, area});
|
|
|
|
|
|
if (resultList != null && resultList.size() > 0) {
|
|
|
|
|
|
} else {
|
|
|
resultList = getLowLevelMapKey(level, low_level, area);
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取过去某个日期某个区域一级指标的下级统计
|
|
|
*
|
|
@ -1430,7 +1490,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
String redisNum = "";
|
|
|
try {
|
|
|
redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
redisNum = "";
|
|
|
}
|
|
|
|
|
@ -1450,7 +1510,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
String redisNum = "";
|
|
|
try {
|
|
|
redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
redisNum = "";
|
|
|
}
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|