|
@ -76,8 +76,8 @@ public class DemoScoreCal { |
|
|
List<SampleValue<Integer>> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); |
|
|
List<SampleValue<Integer>> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); |
|
|
|
|
|
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
IndexInputVO<Integer> index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), sc1); |
|
|
IndexInputVO<Integer> index1VO = new IndexInputVO<>("aaa", "a:bbb2", index1SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc1); |
|
|
IndexInputVO<Integer> index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), sc2); |
|
|
IndexInputVO<Integer> index2VO = new IndexInputVO<>("bbb", "a:bbb2", index2SampleValues, new BigDecimal(10), new BigDecimal(1), false, sc2); |
|
|
|
|
|
|
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO); |
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO); |
|
|
|
|
|
|
|
@ -102,8 +102,8 @@ public class DemoScoreCal { |
|
|
List<SampleValue> index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); |
|
|
List<SampleValue> index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); |
|
|
|
|
|
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); |
|
|
IndexInputVO index1VO = new IndexInputVO("aaa", "a:aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc1); |
|
|
IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); |
|
|
IndexInputVO index2VO = new IndexInputVO("bbb", "b:bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), false, sc2); |
|
|
|
|
|
|
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO); |
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO); |
|
|
|
|
|
|
|
@ -161,10 +161,10 @@ public class DemoScoreCal { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), sc1); |
|
|
IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), false, sc1); |
|
|
IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), sc2); |
|
|
IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), false, sc2); |
|
|
IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), sc3); |
|
|
IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), false, sc3); |
|
|
IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), sc4); |
|
|
IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), false, sc4); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); |
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); |
|
@ -234,10 +234,10 @@ public class DemoScoreCal { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
// 每个指标的信息,包括样本列表,权重,指标标记
|
|
|
IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb2", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.3), sc1); |
|
|
IndexInputVO index1VO = new IndexInputVO("aaa1", "a:bbb1", index1SampleValues, new BigDecimal(-1), new BigDecimal("0.3"), false, sc1); |
|
|
IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.2), sc2); |
|
|
IndexInputVO index2VO = new IndexInputVO("aaa2", "a:bbb2", index1SampleValues2, new BigDecimal(-1), new BigDecimal("0.2"), false, sc2); |
|
|
IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb2", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.2), sc3); |
|
|
IndexInputVO index3VO = new IndexInputVO("aaa3", "a:bbb3", index1SampleValues3, new BigDecimal(-1), new BigDecimal("0.2"), false, sc3); |
|
|
IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb2", index1SampleValues4, new BigDecimal(0.6), new BigDecimal(0.3), sc4); |
|
|
IndexInputVO index4VO = new IndexInputVO("aaa4", "a:bbb4", index1SampleValues4, new BigDecimal(0.6), new BigDecimal("0.3"), false, sc4); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); |
|
|
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO); |
|
@ -250,7 +250,9 @@ public class DemoScoreCal { |
|
|
|
|
|
|
|
|
System.err.println("----------------11111111----------------"); |
|
|
System.err.println("----------------11111111----------------"); |
|
|
result2.forEach((key, value) -> { |
|
|
result2.forEach((key, value) -> { |
|
|
System.out.println(key.concat("的得分为:").concat(value.toString())); |
|
|
System.out.println(key.concat("的总得分为:") + value.getTotalScore()); |
|
|
|
|
|
//System.out.println(JSON.toJSONString(indexInputVOS));
|
|
|
|
|
|
value.getDetails().forEach(o -> System.out.println(JSON.toJSONString(o))); |
|
|
}); |
|
|
}); |
|
|
System.err.println("-----------------2222222222---------------"); |
|
|
System.err.println("-----------------2222222222---------------"); |
|
|
} |
|
|
} |
|
|