|
@ -241,6 +241,218 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取签约分组信息
|
|
|
*
|
|
|
* @param endDate
|
|
|
* @param lowCode
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getGroupInfo(String endDate, String lowCode, String area, int level) {
|
|
|
JSONObject json = new JSONObject();
|
|
|
long total = 0;
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
boolean preFlag = false;
|
|
|
String preDate = endDate;
|
|
|
|
|
|
if (endDate.compareTo(dateFormat.format(new Date())) >= 0) {
|
|
|
String val = redisTemplate.opsForValue().get("quota:7:" + level + ":" + area + ":" + lowCode + ":" + getQuotaTimeStamp());
|
|
|
if (!StringUtils.isEmpty(val)) {
|
|
|
JSONObject valJson = new JSONObject(val);
|
|
|
if (valJson.has("num")) {
|
|
|
total = valJson.getInt("num");
|
|
|
}
|
|
|
} else {
|
|
|
preFlag = true;
|
|
|
Calendar today = Calendar.getInstance();
|
|
|
today.add(Calendar.DATE, -1);
|
|
|
preDate = dateFormat.format(today.getTime());
|
|
|
}
|
|
|
} else {
|
|
|
preFlag = true;
|
|
|
}
|
|
|
if (preFlag) {
|
|
|
// 查询语句
|
|
|
String sql = " select " +
|
|
|
" ifnull(result,'0') amount" +
|
|
|
" from " +
|
|
|
" wlyy_quota_result " +
|
|
|
" where " +
|
|
|
" quato_code = '7' " +
|
|
|
" and level1_type = ? and del = '1'" +
|
|
|
" and quota_date = ? " +
|
|
|
" and level2_type = ? ";
|
|
|
|
|
|
if (level == 4) {
|
|
|
// 市级别
|
|
|
sql += " and city = ? ";
|
|
|
} else if (level == 3) {
|
|
|
// 区、城镇级别
|
|
|
sql += " and town = ? ";
|
|
|
} else if (level == 2) {
|
|
|
// 机构级别
|
|
|
sql += " and org_code = ? ";
|
|
|
} else if (level == 1) {
|
|
|
sql += " and qkdoctor_code = ? ";
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> result = jdbcTemplate.queryForList(sql, new Object[]{level, preDate, lowCode, area});
|
|
|
|
|
|
if (result != null && result.size() > 0) {
|
|
|
total = (result.get(0).get("amount") != null ? Long.valueOf(result.get(0).get("amount").toString()) : 0L);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
int num = 0;
|
|
|
int taskNum = 0;
|
|
|
String redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
|
PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Calendar.getInstance().get(Calendar.YEAR));
|
|
|
if (peopleNum != null) {
|
|
|
if (lowCode.equals("3")) {
|
|
|
num = peopleNum.getSixFiveNum();
|
|
|
taskNum = peopleNum.getSixFiveTaskNum();
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
num = peopleNum.getGxyNum();
|
|
|
taskNum = peopleNum.getGxyTaskNum();
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
num = peopleNum.getTnbNum();
|
|
|
taskNum = peopleNum.getTnbTaskNum();
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
JSONObject peopleNum = new JSONObject(redisNum);
|
|
|
if (peopleNum != null) {
|
|
|
|
|
|
if (lowCode.equals("3")) {
|
|
|
num = peopleNum.getInt("sixFiveNum");
|
|
|
taskNum = peopleNum.getInt("sixFiveTaskNum");
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
num = peopleNum.getInt("gxyNum");
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
num = peopleNum.getInt("gxyNum");
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
DecimalFormat df = new DecimalFormat("0.0000");
|
|
|
json.put("sign", total);
|
|
|
json.put("signRate", df.format((total * 1.0000) / num));
|
|
|
json.put("signTaskRate", df.format((total * 1.0000) / taskNum));
|
|
|
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询某个级别的某个指标到达量
|
|
|
*
|
|
|
* @param date
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @param index
|
|
|
* @param sort
|
|
|
* @param lowLevel
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray getLevelTwoLowLevelTotal(String date, String area, int level, String index, int sort, String lowLevel, String lowCode) throws Exception {
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String low_level = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
|
|
|
if (date.compareTo(dateFormat.format(new Date())) >= 0) {
|
|
|
resultList = getLevelTwoTodayLowLevelTotal(area, level, index, sort, lowLevel, lowCode);
|
|
|
} else {
|
|
|
resultList = getLevelTwoTodayBeforeLowLevelTotal(date, area, level, index, sort, lowLevel, lowCode);
|
|
|
}
|
|
|
|
|
|
// 结果为空时,自建结果集
|
|
|
if (resultList == null || resultList.size() < 1) {
|
|
|
resultList = getLowLevelMapKey(level, low_level, area);
|
|
|
}
|
|
|
|
|
|
if (resultList != null) {
|
|
|
DecimalFormat df = new DecimalFormat("0.0000");
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Long.valueOf(map.get("amount").toString()) : 0L);
|
|
|
|
|
|
if (!low_level.equals("1")) {
|
|
|
String redisNum = redisTemplate.opsForValue().get("people:num:" + map.get("code").toString());
|
|
|
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
|
PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(map.get("code").toString(), Calendar.getInstance().get(Calendar.YEAR));
|
|
|
if (peopleNum != null) {
|
|
|
int num = 0;
|
|
|
int taskNum = 0;
|
|
|
|
|
|
if (lowCode.equals("3")) {
|
|
|
num = peopleNum.getSixFiveNum();
|
|
|
taskNum = peopleNum.getSixFiveTaskNum();
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
num = peopleNum.getGxyNum();
|
|
|
taskNum = peopleNum.getGxyTaskNum();
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
num = peopleNum.getTnbNum();
|
|
|
taskNum = peopleNum.getTnbTaskNum();
|
|
|
}
|
|
|
map.put("rate", df.format(((long) map.get("amount") * 1.0000) / num * 100));
|
|
|
map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / taskNum * 100));
|
|
|
map.put("targetRate", df.format(taskNum * 1.0000 / num * 100));
|
|
|
map.put("num", num);
|
|
|
map.put("task", taskNum);
|
|
|
}
|
|
|
} else {
|
|
|
JSONObject peopleNum = new JSONObject(redisNum);
|
|
|
if (peopleNum != null) {
|
|
|
int num = 0;
|
|
|
int taskNum = 0;
|
|
|
|
|
|
if (lowCode.equals("3")) {
|
|
|
num = peopleNum.getInt("sixFiveNum");
|
|
|
taskNum = peopleNum.getInt("sixFiveTaskNum");
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
num = peopleNum.getInt("gxyNum");
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
num = peopleNum.getInt("gxyNum");
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
}
|
|
|
map.put("rate", df.format(((long) map.get("amount") * 1.0000) / num * 100));
|
|
|
map.put("taskRate", df.format(((long) map.get("amount") * 1.0000) / taskNum * 100));
|
|
|
map.put("targetRate", df.format(taskNum * 1.0000 / num * 100));
|
|
|
map.put("num", num);
|
|
|
map.put("task", taskNum);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Collections.sort(resultList, new Comparator<Map<String, Object>>() {
|
|
|
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
|
|
long map1value = (long) o1.get("amount");
|
|
|
long map2value = (long) o2.get("amount");
|
|
|
|
|
|
if (map1value - map2value > 0) {
|
|
|
return sort == 1 ? -1 : 1;
|
|
|
} else if (map1value - map2value < 0) {
|
|
|
return sort == 1 ? 1 : -1;
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return new JSONArray(resultList);
|
|
|
} else {
|
|
|
return new JSONArray();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询某个级别的某个指标到达量
|
|
|
*
|
|
@ -320,6 +532,74 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取过去某个日期某个区域一级指标的下级统计
|
|
|
*
|
|
|
* @param date
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @param index
|
|
|
* @param lowLevel
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String, Object>> getLevelTwoTodayBeforeLowLevelTotal(String date, String area, int level, String index, int sort, String lowLevel, String lowCode) throws Exception {
|
|
|
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') amount" +
|
|
|
" from " +
|
|
|
" wlyy_quota_result " +
|
|
|
" where " +
|
|
|
" quato_code = '" + index + "' " +
|
|
|
" and level1_type = ? and del = '1'" +
|
|
|
" and quota_date = ? " +
|
|
|
" and " + areaField + " = ? " +
|
|
|
" and level2_type = ? ";
|
|
|
|
|
|
if (sort == 1) {
|
|
|
sql += " order by amount desc ";
|
|
|
} else {
|
|
|
sql += " order by amount asc ";
|
|
|
}
|
|
|
|
|
|
resultList = jdbcTemplate.queryForList(sql, new Object[]{low_level, date, area, lowCode});
|
|
|
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取过去某个日期某个区域一级指标的下级统计
|
|
|
*
|
|
@ -388,6 +668,32 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取今天某个区域一级指标的下级统计
|
|
|
*
|
|
|
* @param area
|
|
|
* @param level
|
|
|
* @param index
|
|
|
* @param lowLevel
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Map<String, Object>> getLevelTwoTodayLowLevelTotal(String area, int level, String index, int sort, String lowLevel, String lowCode) throws Exception {
|
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
|
String low_level = String.valueOf(StringUtils.isEmpty(lowLevel) ? (level - 1) : lowLevel);
|
|
|
resultList = getLowLevelMapKey(level, low_level, area);
|
|
|
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
String redisData = redisTemplate.opsForValue().get("quota:" + index + ":" + low_level + ":" + String.valueOf(map.get("code")) + ":" + lowCode + ":" + getQuotaTimeStamp());
|
|
|
|
|
|
if (!StringUtils.isEmpty(redisData)) {
|
|
|
JSONObject json = new JSONObject(redisData);
|
|
|
map.put("amount", Long.valueOf(String.valueOf(json.get("num"))));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取今天某个区域一级指标的下级统计
|
|
|
*
|
|
@ -429,6 +735,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
return resultList;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取下级统计key
|
|
|
*
|
|
@ -1058,11 +1365,11 @@ public class StatisticsAllService extends BaseService {
|
|
|
* @param index
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getDateTotal(String startDate, String endDate, int interval, String area, int level, String index) throws Exception {
|
|
|
public JSONObject getDateTotal(String startDate, String endDate, int interval, String area, int level, String index, String lowCode) throws Exception {
|
|
|
int taskNum = 0;
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
|
|
if (level > 1) {
|
|
|
if (level > 1 && StringUtils.isEmpty(lowCode)) {
|
|
|
String redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
@ -1077,19 +1384,46 @@ public class StatisticsAllService extends BaseService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(lowCode)) {
|
|
|
String redisNum = redisTemplate.opsForValue().get("people:num:" + area);
|
|
|
|
|
|
if (StringUtils.isEmpty(redisNum)) {
|
|
|
PopulationBase peopleNum = peopleNumDao.findByCodeAndYear(area, Calendar.getInstance().get(Calendar.YEAR));
|
|
|
if (peopleNum != null) {
|
|
|
if (lowCode.equals("3")) {
|
|
|
taskNum = peopleNum.getSixFiveTaskNum();
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
taskNum = peopleNum.getGxyTaskNum();
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
taskNum = peopleNum.getTnbTaskNum();
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
JSONObject peopleNum = new JSONObject(redisNum);
|
|
|
if (peopleNum != null) {
|
|
|
if (lowCode.equals("3")) {
|
|
|
taskNum = peopleNum.getInt("sixFiveTaskNum");
|
|
|
} else if (lowCode.equals("4")) {
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
} else if (lowCode.equals("5")) {
|
|
|
taskNum = peopleNum.getInt("gxyTaskNum");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
json.put("taskNum", taskNum);
|
|
|
|
|
|
if (interval == 1) {
|
|
|
JSONArray jsonArray = dateTotalStatistics(startDate, endDate, area, level, index);
|
|
|
JSONArray jsonArray = dateTotalStatistics(startDate, endDate, area, level, index, lowCode);
|
|
|
json.put("data", jsonArray);
|
|
|
return json;
|
|
|
} else if (interval == 2) {
|
|
|
JSONArray jsonArray = weekTotalStatistics(startDate, endDate, area, level, index);
|
|
|
JSONArray jsonArray = weekTotalStatistics(startDate, endDate, area, level, index, lowCode);
|
|
|
json.put("data", jsonArray);
|
|
|
return json;
|
|
|
} else if (interval == 3) {
|
|
|
JSONArray jsonArray = monthTotalStatistics(startDate, endDate, area, level, index);
|
|
|
JSONArray jsonArray = monthTotalStatistics(startDate, endDate, area, level, index, lowCode);
|
|
|
json.put("data", jsonArray);
|
|
|
return json;
|
|
|
}
|
|
@ -1105,7 +1439,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
* @param index
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray dateTotalStatistics(String startDate, String endDate, String area, int level, String index) throws ParseException {
|
|
|
public JSONArray dateTotalStatistics(String startDate, String endDate, String area, int level, String index, String lowCode) throws ParseException {
|
|
|
String areaField = "";
|
|
|
String sql = "";
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
@ -1170,7 +1504,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
|
|
|
// 当前范围包含当天,则需添加当天的统计数据
|
|
|
if (startStr.compareTo(df.format(new Date())) == 0) {
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + getQuotaTimeStamp());
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + (!StringUtils.isEmpty(lowCode) ? (lowCode + ":") : "") + getQuotaTimeStamp());
|
|
|
if (!StringUtils.isEmpty(val)) {
|
|
|
JSONObject valJson = new JSONObject(val);
|
|
|
if (valJson.has("num")) {
|
|
@ -1205,6 +1539,10 @@ public class StatisticsAllService extends BaseService {
|
|
|
" and quota_date <= '" + dateCon + "' " +
|
|
|
" and " + areaField + " = '" + area + "' ";
|
|
|
|
|
|
if (!StringUtils.isEmpty(lowCode)) {
|
|
|
sql += " and level2_type = '" + lowCode + "' ";
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
if (resultList != null) {
|
|
@ -1248,7 +1586,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
* @param index
|
|
|
* @return
|
|
|
*/
|
|
|
private JSONArray weekTotalStatistics(String startDate, String endDate, String area, int level, String index) throws Exception {
|
|
|
private JSONArray weekTotalStatistics(String startDate, String endDate, String area, int level, String index, String lowCode) throws Exception {
|
|
|
String areaField = "";
|
|
|
String sql = "";
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
@ -1347,7 +1685,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
|
|
|
// 当前范围包含当天,则需添加当天的统计数据
|
|
|
if (startStr.compareTo(df.format(new Date())) <= 0 && endStr.compareTo(df.format(new Date())) >= 0) {
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + getQuotaTimeStamp());
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + (!StringUtils.isEmpty(lowCode) ? (lowCode + ":") : "") + getQuotaTimeStamp());
|
|
|
if (!StringUtils.isEmpty(val)) {
|
|
|
JSONObject valJson = new JSONObject(val);
|
|
|
if (valJson.has("num")) {
|
|
@ -1385,6 +1723,10 @@ public class StatisticsAllService extends BaseService {
|
|
|
" and quota_date <= '" + dateCon + "' " +
|
|
|
" and " + areaField + " = '" + area + "' ";
|
|
|
|
|
|
if (!StringUtils.isEmpty(lowCode)) {
|
|
|
sql += " and level2_type = '" + lowCode + "' ";
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
if (resultList != null) {
|
|
@ -1432,7 +1774,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private JSONArray monthTotalStatistics(String startDate, String endDate, String area, int level, String index) throws Exception {
|
|
|
private JSONArray monthTotalStatistics(String startDate, String endDate, String area, int level, String index, String lowCode) throws Exception {
|
|
|
String areaField = "";
|
|
|
String sql = "";
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
@ -1521,7 +1863,7 @@ public class StatisticsAllService extends BaseService {
|
|
|
|
|
|
// 当天数据计算
|
|
|
if (startStr.compareTo(df.format(new Date())) <= 0 && endStr.compareTo(df.format(new Date())) >= 0) {
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + getQuotaTimeStamp());
|
|
|
String val = redisTemplate.opsForValue().get("quota:" + index + ":" + level + ":" + area + ":" + (!StringUtils.isEmpty(lowCode) ? (lowCode + ":") : "") + getQuotaTimeStamp());
|
|
|
if (!StringUtils.isEmpty(val)) {
|
|
|
JSONObject valJson = new JSONObject(val);
|
|
|
if (valJson.has("num")) {
|
|
@ -1559,6 +1901,10 @@ public class StatisticsAllService extends BaseService {
|
|
|
" and quota_date <= '" + dateCon + "' " +
|
|
|
" and " + areaField + " = '" + area + "' ";
|
|
|
|
|
|
if (!StringUtils.isEmpty(lowCode)) {
|
|
|
sql += " and level2_type = '" + lowCode + "' ";
|
|
|
}
|
|
|
|
|
|
List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
if (resultList != null) {
|