|
@ -4011,6 +4011,24 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
public List<WlyyQuotaResult> findQuotaResults(String date, int level, String index, String area) {
|
|
|
String sql = " select * from wlyy_quota_result w where w.quota_date ='" + date + "' and w.quato_code='" + index + "' and w.level1_type= " + level;
|
|
|
if (level == 4) {
|
|
|
// 市级别
|
|
|
sql += " and city='" + area + "' ";
|
|
|
} else if (level == 3) {
|
|
|
// 区、城镇级别
|
|
|
sql += " and town='" + area + "' ";
|
|
|
} else if (level == 2) {
|
|
|
// 机构级别
|
|
|
sql += " and org_code='" + area + "' ";
|
|
|
} else if (level == 1) {
|
|
|
// 机构级别
|
|
|
sql += " and qkdoctor_code ='" + area + "'";
|
|
|
}
|
|
|
List<WlyyQuotaResult> results = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyyQuotaResult.class));
|
|
|
return results;
|
|
|
}
|
|
|
|
|
|
public JSONObject getRenewPercentAndChangePercent(String level, String code, String year) {
|
|
|
String renewIndex="";
|
|
@ -4260,12 +4278,18 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
public JSONObject getCoutListByTimeYear(String level, String area, String year) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
WlyyQuotaResult wlyyQuotaResult = findOneQuotaResult((Integer.valueOf(year) + 1) + "-06-30", Integer.valueOf(level), "24", area);
|
|
|
if (wlyyQuotaResult != null) {
|
|
|
result.put("name", getNameByLevel(wlyyQuotaResult, Integer.valueOf(level)));
|
|
|
result.put("code", getCodeByLevel(wlyyQuotaResult, Integer.valueOf(level)));
|
|
|
result.put("num", Integer.valueOf(wlyyQuotaResult.getResult()));
|
|
|
List<WlyyQuotaResult> wlyyQuotaResult = findQuotaResults((Integer.valueOf(year) + 1) + "-06-30", Integer.valueOf(level), "24", area);
|
|
|
JSONArray jo=new JSONArray();
|
|
|
if (wlyyQuotaResult != null&&wlyyQuotaResult.size()>0) {
|
|
|
wlyyQuotaResult.stream().forEach(one->{
|
|
|
JSONObject temp1 = new JSONObject();
|
|
|
temp1.put("name", getNameByLevel(one, Integer.valueOf(level)));
|
|
|
temp1.put("code", getCodeByLevel(one, Integer.valueOf(level)));
|
|
|
temp1.put("num", Integer.valueOf(one.getResult()));
|
|
|
jo.put(temp1);
|
|
|
});
|
|
|
}
|
|
|
result.put("resultList", jo);
|
|
|
return result;
|
|
|
}
|
|
|
|