增加应收应付
This commit is contained in:
@@ -58,6 +58,7 @@ public class LbDailyUserTradeReportController {
|
|||||||
if (tradeReport.getDiffAmt() == null) {
|
if (tradeReport.getDiffAmt() == null) {
|
||||||
tradeReport.setDiffAmt(BigDecimal.ZERO);
|
tradeReport.setDiffAmt(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
tradeReport.setActualReceiptsPayments(tradeReport.getDiffAmt().subtract(tradeReport.getServiceAmt()));
|
||||||
if (tradeReport.getReportDate() == null) {
|
if (tradeReport.getReportDate() == null) {
|
||||||
tradeReport.setReportDate(LocalDateTime.now());
|
tradeReport.setReportDate(LocalDateTime.now());
|
||||||
}
|
}
|
||||||
@@ -175,7 +176,8 @@ public class LbDailyUserTradeReportController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queryWrapper.orderByDesc(LbDailyUserTradeReport::getCreatedAt);
|
queryWrapper.orderByDesc(LbDailyUserTradeReport::getDiffAmt)
|
||||||
|
.orderByDesc(LbDailyUserTradeReport::getCreatedAt);
|
||||||
Page<LbDailyUserTradeReport> page = lbDailyUserTradeReportService.page(new Page<>(current, size), queryWrapper);
|
Page<LbDailyUserTradeReport> page = lbDailyUserTradeReportService.page(new Page<>(current, size), queryWrapper);
|
||||||
|
|
||||||
result.put("success", true);
|
result.put("success", true);
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ public class LbDailyUserTradeReport implements Serializable {
|
|||||||
@TableField("dikou_amt")
|
@TableField("dikou_amt")
|
||||||
private BigDecimal dikouAmt;
|
private BigDecimal dikouAmt;
|
||||||
|
|
||||||
|
@Schema(description = "实收实付")
|
||||||
|
@TableField("actual_receipts_payments")
|
||||||
|
private BigDecimal actualReceiptsPayments;
|
||||||
|
|
||||||
@Schema(description = "描述")
|
@Schema(description = "描述")
|
||||||
@TableField("desc_content")
|
@TableField("desc_content")
|
||||||
private String descContent;
|
private String descContent;
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class LbDailyUserTradeReportServiceImpl extends ServiceImpl<LbDailyUserTr
|
|||||||
summary.setServiceAmt(serviceAmt);
|
summary.setServiceAmt(serviceAmt);
|
||||||
summary.setDiffAmt(diffAmt);
|
summary.setDiffAmt(diffAmt);
|
||||||
summary.setDikouAmt(dikouAmt);
|
summary.setDikouAmt(dikouAmt);
|
||||||
|
summary.setActualReceiptsPayments(diffAmt.subtract(serviceAmt));
|
||||||
summary.setDescContent("系统汇总记录");
|
summary.setDescContent("系统汇总记录");
|
||||||
summary.setCreatedAt(LocalDateTime.now());
|
summary.setCreatedAt(LocalDateTime.now());
|
||||||
summary.setUpdatedAt(LocalDateTime.now());
|
summary.setUpdatedAt(LocalDateTime.now());
|
||||||
|
|||||||
@@ -122,12 +122,18 @@ public class LbDailyUserTradeServiceImpl extends ServiceImpl<LbDailyUserTradeMap
|
|||||||
report.setDailyBuyAmt(dailyBuyAmt);
|
report.setDailyBuyAmt(dailyBuyAmt);
|
||||||
report.setServiceAmt(dailyBuyAmt.multiply(SERVICE_RATE));
|
report.setServiceAmt(dailyBuyAmt.multiply(SERVICE_RATE));
|
||||||
report.setDiffAmt(diffAmt);
|
report.setDiffAmt(diffAmt);
|
||||||
|
report.setActualReceiptsPayments(diffAmt.subtract(report.getServiceAmt()));
|
||||||
report.setReportDate(reportDate.atStartOfDay());
|
report.setReportDate(reportDate.atStartOfDay());
|
||||||
report.setDataType("report_detail");
|
report.setDataType("report_detail");
|
||||||
report.setCreatedAt(now);
|
report.setCreatedAt(now);
|
||||||
report.setUpdatedAt(now);
|
report.setUpdatedAt(now);
|
||||||
reportList.add(report);
|
reportList.add(report);
|
||||||
}
|
}
|
||||||
|
// 保存前先删除同租户同报表日期的历史报表,避免重复插入
|
||||||
|
LambdaQueryWrapper<LbDailyUserTradeReport> reportDeleteWrapper = new LambdaQueryWrapper<>();
|
||||||
|
reportDeleteWrapper.eq(LbDailyUserTradeReport::getTenantId, normalizedTenantId)
|
||||||
|
.eq(LbDailyUserTradeReport::getReportDate, reportDate.atStartOfDay());
|
||||||
|
lbDailyUserTradeReportService.remove(reportDeleteWrapper);
|
||||||
|
|
||||||
boolean saved = lbDailyUserTradeReportService.saveBatch(reportList);
|
boolean saved = lbDailyUserTradeReportService.saveBatch(reportList);
|
||||||
if (!saved) {
|
if (!saved) {
|
||||||
|
|||||||
Reference in New Issue
Block a user