
--- src/main/java/com/takensoft/taken_bi_manager/custom/service/impl/CustomServiceImpl.java
+++ src/main/java/com/takensoft/taken_bi_manager/custom/service/impl/CustomServiceImpl.java
... | ... | @@ -439,7 +439,8 @@ |
439 | 439 |
List<ComponentColumn> categoryAxis = customDAO.componentColumnSelect(xColumnSearch); |
440 | 440 |
List<HashMap<String, Object>> categoryAxisList = new ArrayList<>(); |
441 | 441 |
for (ComponentColumn column : categoryAxis) { |
442 |
- ColumnData columnData = lastDataTable.getColumnDatas().get(column.getTable_loc_idx()); |
|
442 |
+ int x = column.getTable_loc_idx(); |
|
443 |
+ ColumnData columnData = lastDataTable.getColumnDatas().get(x); |
|
443 | 444 |
|
444 | 445 |
HashMap<String, Object> columnMap = new HashMap<>(); |
445 | 446 |
putColumnDataToMap(columnMap, columnData, column); |
... | ... | @@ -473,11 +474,20 @@ |
473 | 474 |
|
474 | 475 |
for (List<Object> row : dataTable.getRowData()) { |
475 | 476 |
HashMap<String, Object> data = new HashMap<>(); |
476 |
- data.put("categoryData", row.get(xAxis).toString()); |
|
477 |
+ String x = null; |
|
478 |
+ if (row.get(xAxis) != null) { |
|
479 |
+ x = row.get(xAxis).toString(); |
|
480 |
+ } |
|
481 |
+ data.put("categoryData", x); |
|
477 | 482 |
|
478 | 483 |
for (ComponentColumn yAxis : valueAxis) { |
479 | 484 |
int idx = yAxis.getTable_loc_idx(); |
480 |
- data.put(yAxis.getCol_nm(), Double.parseDouble(row.get(idx).toString())); |
|
485 |
+ String valueString = "0"; |
|
486 |
+ if (row.get(idx) != null) { |
|
487 |
+ valueString = row.get(idx).toString(); |
|
488 |
+ } |
|
489 |
+ Double value = Double.parseDouble(valueString); |
|
490 |
+ data.put(yAxis.getCol_nm(), value); |
|
481 | 491 |
} |
482 | 492 |
dataList.add(data); |
483 | 493 |
} |
--- src/main/resources/spring/mapper/custom/custom-SQL.xml
+++ src/main/resources/spring/mapper/custom/custom-SQL.xml
... | ... | @@ -159,10 +159,9 @@ |
159 | 159 |
where page_id = #{page_id} |
160 | 160 |
</select> |
161 | 161 |
|
162 |
+ <!-- splitter 데이터 조회 ( 최상위 경우 null 체크 , 자식 경우 parent_splitter_id) --> |
|
162 | 163 |
<select id="splitterTopSelect" parameterType="java.lang.String" resultType="CustomSplitterVO"> |
163 |
- <!-- splitter 데이터 조회 ( 최상위 경우 null 체크 , 자식 경우 parent_splitter_id) --> |
|
164 |
- select |
|
165 |
- splitter_id |
|
164 |
+ select splitter_id |
|
166 | 165 |
, page_id |
167 | 166 |
, style_group_id |
168 | 167 |
, layout_nm |
... | ... | @@ -175,14 +174,13 @@ |
175 | 174 |
, layout_size2 |
176 | 175 |
, layout_type |
177 | 176 |
from splitter |
178 |
- where page_id = #{page.page_id} |
|
177 |
+ where page_id = #{page_id} |
|
179 | 178 |
and parents_splitter_id is null |
180 | 179 |
</select> |
181 | 180 |
|
181 |
+ <!-- splitter 데이터 조회 ( 최상위 경우 null 체크 , 자식 경우 parent_splitter_id) --> |
|
182 | 182 |
<select id="splitterOneSelect" parameterType="CustomSplitterVO" resultType="CustomSplitterVO"> |
183 |
- <!-- splitter 데이터 조회 ( 최상위 경우 null 체크 , 자식 경우 parent_splitter_id) --> |
|
184 |
- select |
|
185 |
- splitter_id |
|
183 |
+ select splitter_id |
|
186 | 184 |
, page_id |
187 | 185 |
, style_group_id |
188 | 186 |
, layout_nm |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?