Browse Source

添加指标值类型

dev_shibei_match
jianjun 5 years ago
parent
commit
2117069874
  1. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java
  2. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java
  4. BIN
      epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java

@ -59,4 +59,9 @@ public class IndexDictEntity extends BaseEpmetEntity {
* 正相关positive负相关negative
*/
private String correlation;
/**
* 指标值类型 none整数integer小数: decimal;百分比percent
*/
private String valueType;
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java

@ -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);
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java

@ -26,6 +26,11 @@ public class IndexModel {
//没有阈值:无,有就是百分数
@ExcelProperty(value = "阈值")
private String threshold;
/**
* 指标值类型 none整数integer小数: decimal;百分比percent
*/
@ExcelProperty(value = "五级指标值类型")
private String valueType;
/**
* 正相关positive负相关negative
*/

BIN
epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx

Binary file not shown.
Loading…
Cancel
Save