|
|
|
@ -26,7 +26,7 @@ public class DashboardBlockConfigDao { |
|
|
|
if (buildingId == null) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
String sql = "SELECT id, building_id, start_time, end_time, block_big_class_id " + |
|
|
|
String sql = "SELECT id, building_id, start_time, end_time, block_big_class_id, category_type " + |
|
|
|
"FROM dashboard_block_config " + |
|
|
|
"WHERE building_id = ? AND flag = 0 AND status = 0 "; |
|
|
|
return jdbcTemplate.query(sql, (rs, rowNum) -> { |
|
|
|
@ -39,6 +39,22 @@ public class DashboardBlockConfigDao { |
|
|
|
if (blockBigClassIdStr != null && !blockBigClassIdStr.trim().isEmpty()) { |
|
|
|
dto.setBlockBigClassId(JSON.parseArray(blockBigClassIdStr, Long.class)); |
|
|
|
} |
|
|
|
|
|
|
|
String categoryType = rs.getString("category_type"); |
|
|
|
if (categoryType != null && !categoryType.trim().isEmpty()) { |
|
|
|
if (categoryType.contains("f10")) { |
|
|
|
dto.getCategoryTypeId().add(1011L); |
|
|
|
} |
|
|
|
if (categoryType.contains("csdj")) { |
|
|
|
dto.getCategoryTypeId().add(1012L); |
|
|
|
} |
|
|
|
if (categoryType.contains("main")) { |
|
|
|
for (long i = 1001L; i <= 1010L; i++) { |
|
|
|
dto.getCategoryTypeId().add(i); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dto; |
|
|
|
}, buildingId); |
|
|
|
} |
|
|
|
|