稳态报告接口迁移(后续需要合并代码)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package com.njcn.csharmonic.util;
|
||||
|
||||
import com.njcn.harmonic.pojo.vo.ReportValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RegroupData {
|
||||
public static void regroupData(List<ReportValue> list, boolean... b) {
|
||||
if (1 == b.length || (2 == b.length && b[1] == false)) {
|
||||
if (0 < list.size()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Float value = null;
|
||||
int length = b[0] ? 3 : 1;
|
||||
|
||||
length = (b.length == 2 && !b[1]) ? 4 : length;
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
String str = null;
|
||||
|
||||
if (b[0]) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
str = "A";
|
||||
break;
|
||||
case 1:
|
||||
str = "B";
|
||||
break;
|
||||
case 2:
|
||||
str = "C";
|
||||
break;
|
||||
case 3:
|
||||
str = "T";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ReportValue reportValue = new ReportValue(str, value, value, value, value);
|
||||
list.add(reportValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user