|
@@ -3390,8 +3390,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
Optional<Map<String, Object>> op = worktimeList.stream().filter(m -> ((String) m.get("createDate")).equals(fDateStr)).findFirst();
|
|
Optional<Map<String, Object>> op = worktimeList.stream().filter(m -> ((String) m.get("createDate")).equals(fDateStr)).findFirst();
|
|
if (op.isPresent()) {
|
|
if (op.isPresent()) {
|
|
Map<String, Object> createDateHour = op.get();
|
|
Map<String, Object> createDateHour = op.get();
|
|
- double workingTime = (double)createDateHour.get("workingTime");
|
|
|
|
- dataItem.add(""+decimalFormat.format(workingTime));
|
|
|
|
|
|
+ //格式可能是:1.5(请假) 当天请假 7.48
|
|
|
|
+ Object obj = createDateHour.get("workingTime");
|
|
|
|
+ String processVal = "";
|
|
|
|
+ if (obj instanceof Double) {
|
|
|
|
+ double workingTime = (double)obj;
|
|
|
|
+ processVal = decimalFormat.format(workingTime);
|
|
|
|
+ } else if (obj instanceof String) {
|
|
|
|
+ processVal = (String)obj;
|
|
|
|
+ if (processVal.contains("(")) {
|
|
|
|
+ String[] split = processVal.split("\\(");
|
|
|
|
+ processVal = decimalFormat.format(Double.valueOf(split[0])) + "(" + split[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ dataItem.add(processVal);
|
|
} else {
|
|
} else {
|
|
dataItem.add("0");
|
|
dataItem.add("0");
|
|
}
|
|
}
|