|
@@ -71,11 +71,13 @@ import java.time.format.DateTimeFormatter;
|
|
import java.time.temporal.ChronoUnit;
|
|
import java.time.temporal.ChronoUnit;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
+import java.util.Collection;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.Set;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -560,7 +562,7 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
|
|
//计算总金额,课时费+超课时费
|
|
//计算总金额,课时费+超课时费
|
|
Double totalAmount = classTimeAmount + beyondClassTimeAmount + reduceTimeAmount.doubleValue();
|
|
Double totalAmount = classTimeAmount + beyondClassTimeAmount + reduceTimeAmount.doubleValue();
|
|
record.setTotalAmount(totalAmount);
|
|
record.setTotalAmount(totalAmount);
|
|
- record.setAllClassTimeData(calculateClassTime(allClassTimeDataArray, weightSetMap, allDateList));
|
|
|
|
|
|
+ record.setAllClassTimeData(calculateClassTime(allClassTimeDataArray, weightSetMap, allDateList, new ArrayList<>(CourseTimeTypeMap.values())));
|
|
record.setCreateDate(new Date());
|
|
record.setCreateDate(new Date());
|
|
|
|
|
|
insertList.add(record);
|
|
insertList.add(record);
|
|
@@ -1220,7 +1222,7 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
|
|
return dates;
|
|
return dates;
|
|
}
|
|
}
|
|
|
|
|
|
- String calculateClassTime(JsonArray allClassTimeDataArray, Map<String, Double> weightSetMap, List<LocalDate> allDateList){
|
|
|
|
|
|
+ String calculateClassTime(JsonArray allClassTimeDataArray, Map<String, Double> weightSetMap, List<LocalDate> allDateList, List<String> CourseTimeTypeSet){
|
|
JsonObject result = new JsonObject();
|
|
JsonObject result = new JsonObject();
|
|
//计算纵向的合计
|
|
//计算纵向的合计
|
|
Double allClassTime = 0d;
|
|
Double allClassTime = 0d;
|
|
@@ -1279,8 +1281,7 @@ public class ClassTimeStatisticsServiceImpl extends MPJBaseServiceImpl<ClassTime
|
|
columnTitleJson.addProperty("adjustType", "");
|
|
columnTitleJson.addProperty("adjustType", "");
|
|
columnTitle.add(columnTitleJson);
|
|
columnTitle.add(columnTitleJson);
|
|
}
|
|
}
|
|
- String[] courseTimeTypes = CourseTimeTypeEnum.getValues();
|
|
|
|
- for (String courseTimeType : courseTimeTypes) {
|
|
|
|
|
|
+ for (String courseTimeType : CourseTimeTypeSet) {
|
|
double sum = 0d;
|
|
double sum = 0d;
|
|
JsonObject columnTitleJson = new JsonObject();
|
|
JsonObject columnTitleJson = new JsonObject();
|
|
for (JsonElement jsonElement : allClassTimeDataArray) {
|
|
for (JsonElement jsonElement : allClassTimeDataArray) {
|