导出报表 11点报表
This commit is contained in:
@@ -25,6 +25,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -429,6 +430,30 @@ public class LbDeductionAmountServiceImpl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, BigDecimal> sumDikouAmtByUserNameForReportDate(String tenantId, LocalDate reportDate) {
|
||||
Map<String, BigDecimal> byUserName = new HashMap<>();
|
||||
if (tenantId == null || tenantId.trim().isEmpty() || reportDate == null) {
|
||||
return byUserName;
|
||||
}
|
||||
LocalDateTime start = reportDate.atStartOfDay();
|
||||
LocalDateTime end = reportDate.plusDays(1).atStartOfDay();
|
||||
LambdaQueryWrapper<LbDeductionAmount> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(LbDeductionAmount::getTenantId, tenantId.trim())
|
||||
.ge(LbDeductionAmount::getCreateTime, start)
|
||||
.lt(LbDeductionAmount::getCreateTime, end);
|
||||
List<LbDeductionAmount> records = list(queryWrapper);
|
||||
for (LbDeductionAmount record : records) {
|
||||
if (record.getUserName() == null || record.getUserName().trim().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
String key = record.getUserName().trim();
|
||||
BigDecimal amt = record.getDikouAmt() == null ? BigDecimal.ZERO : record.getDikouAmt();
|
||||
byUserName.merge(key, amt, BigDecimal::add);
|
||||
}
|
||||
return byUserName;
|
||||
}
|
||||
|
||||
private static LocalDateTime parseDateTime(String text) {
|
||||
if (text == null || text.trim().isEmpty()) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user