mirror of
https://gitee.com/freshday/radar.git
synced 2024-11-29 18:37:42 +08:00
buf fix.
feihu.wang
This commit is contained in:
parent
ded0d76d1c
commit
ab0b2aae9a
@ -123,12 +123,14 @@ public class AggregateCommandImpl implements AggregateCommand {
|
||||
} else {
|
||||
int model = docList.size() % 2;
|
||||
if (model == 1) {
|
||||
doc = docList.get(model);
|
||||
int pos = docList.size() / 2;
|
||||
doc = docList.get(pos);
|
||||
median = new BigDecimal(doc.get(funcField).toString());
|
||||
} else {
|
||||
doc = docList.get(model);
|
||||
int pos = docList.size() / 2;
|
||||
doc = docList.get(pos);
|
||||
median = new BigDecimal(doc.get(funcField).toString());
|
||||
doc = docList.get(model - 1);
|
||||
doc = docList.get(pos - 1);
|
||||
BigDecimal tmp = new BigDecimal(doc.get(funcField).toString());
|
||||
median = median.add(tmp).divide(new BigDecimal(2), 2, 4);
|
||||
}
|
||||
|
@ -2,4 +2,4 @@ ALTER TABLE `engine_rule`
|
||||
ADD COLUMN `MAX` int(11) NOT NULL DEFAULT 0 COMMENT '最大得分值' AFTER `RATE`;
|
||||
|
||||
ALTER TABLE `engine_data_list_records`
|
||||
ADD COLUMN `DATA_REMARK` varchar(32) NULL COMMENT '数据备注';
|
||||
ADD COLUMN `DATA_REMARK` varchar(32) NULL COMMENT '数据备注' AFTER `DATA_RECORD`;
|
||||
|
Loading…
Reference in New Issue
Block a user