|
|
@ -42,7 +42,6 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
|
List<IndexModel> indexModelList = new ArrayList<>(); |
|
|
|
private String preWheight; |
|
|
|
|
|
|
|
private Integer wheightSum = 0; |
|
|
|
/** |
|
|
|
* 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 |
|
|
|
*/ |
|
|
@ -104,6 +103,17 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//指标值类型 无:none;整数:integer;小数: decimal;百分比:percent
|
|
|
|
if (StringUtils.isNotBlank(data.getValueType())) { |
|
|
|
if ("整数".equals(data.getValueType())) { |
|
|
|
data.setValueType("integer"); |
|
|
|
} else if ("小数".equals(data.getValueType())) { |
|
|
|
data.setValueType("decimal"); |
|
|
|
} else if ("百分比".equals(data.getValueType())) { |
|
|
|
data.setValueType("percent"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IndexDictEntity entity = new IndexDictEntity(); |
|
|
|
IndexDictEntity entity2 = new IndexDictEntity(); |
|
|
|
IndexDictEntity entity3 = new IndexDictEntity(); |
|
|
@ -306,6 +316,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> { |
|
|
|
entity5.setCorrelation(data.getCorrelation()); |
|
|
|
entity5.setLevel("5"); |
|
|
|
entity5.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel5Index(), false, 4)); |
|
|
|
entity.setValueType(data.getValueType()); |
|
|
|
indexDicMap.put(data.getLevel5Index(), entity5); |
|
|
|
} |
|
|
|
} |
|
|
|