|
@@ -36,6 +36,7 @@ import com.jzg.commons.util.idgen.IdGenerate;
|
|
|
import com.jzg.organization.client.EsmInsCompanyClient;
|
|
import com.jzg.organization.client.EsmInsCompanyClient;
|
|
|
import com.jzg.organization.client.InsFeeOrdersClient;
|
|
import com.jzg.organization.client.InsFeeOrdersClient;
|
|
|
import com.jzg.organization.client.InsOrdersClient;
|
|
import com.jzg.organization.client.InsOrdersClient;
|
|
|
|
|
+import com.jzg.organization.entity.dto.CalRes;
|
|
|
import com.jzg.organization.excel.listener.*;
|
|
import com.jzg.organization.excel.listener.*;
|
|
|
import com.jzg.organization.mapper.*;
|
|
import com.jzg.organization.mapper.*;
|
|
|
import com.jzg.organization.service.ReceivableService;
|
|
import com.jzg.organization.service.ReceivableService;
|
|
@@ -848,8 +849,8 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public boolean updateIncomeSettlementStatus(String invoiceType, List<String> invoiceIds) {
|
|
|
|
|
- log.info("更新结算状态: invoiceType=[{}],invoiceIds=[{}]", invoiceType, JSONUtil.toJsonStr(invoiceIds));
|
|
|
|
|
|
|
+ public boolean updateIncomeSettlementStatus(String invoiceType, List<String> invoiceIds, LocalDateTime settlementTime) {
|
|
|
|
|
+ log.info("更新结算状态: invoiceType=[{}],invoiceIds=[{}],settlementTime=[{}]", invoiceType, JSONUtil.toJsonStr(invoiceIds), settlementTime);
|
|
|
if (CollectionUtils.isEmpty(invoiceIds)) {
|
|
if (CollectionUtils.isEmpty(invoiceIds)) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
@@ -858,22 +859,31 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
result = switch (invoiceType) {
|
|
result = switch (invoiceType) {
|
|
|
case number -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case number -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getSuperviseSettlement, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getSuperviseSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime)
|
|
|
|
|
+ );
|
|
|
case "2" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case "2" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getOtherSettlement, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getOtherSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime));
|
|
|
case "3" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case "3" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getJySuperviseSettlement, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getJySuperviseSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime));
|
|
|
case "4" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case "4" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getJyOtherSettlement, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getJyOtherSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime));
|
|
|
case "5" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case "5" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getPlatformSuperviseSettlement, number).set(InsPlyIncome::getSettlementStatus, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getPlatformSuperviseSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementStatus, number));
|
|
|
case "6" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
case "6" -> baseMapper.update(new LambdaUpdateWrapper<InsPlyIncome>()
|
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
.in(InsPlyIncome::getId, invoiceIds)
|
|
|
- .set(InsPlyIncome::getPlatformOtherSettlement, number).set(InsPlyIncome::getSettlementStatus, number));
|
|
|
|
|
|
|
+ .set(InsPlyIncome::getPlatformOtherSettlement, number)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementTime,settlementTime)
|
|
|
|
|
+ .set(InsPlyIncome::getSettlementStatus, number));
|
|
|
default -> 0;
|
|
default -> 0;
|
|
|
};
|
|
};
|
|
|
return result > 0;
|
|
return result > 0;
|
|
@@ -909,8 +919,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
public boolean platformSettlement(PlatformSettlementVo platformSettlementVo) {
|
|
public boolean platformSettlement(PlatformSettlementVo platformSettlementVo) {
|
|
|
SettlementVo settlementVo = platformSettlementVo.getSettlementVo();
|
|
SettlementVo settlementVo = platformSettlementVo.getSettlementVo();
|
|
|
InvoicingVo invoicingVo = platformSettlementVo.getInvoicingVo();
|
|
InvoicingVo invoicingVo = platformSettlementVo.getInvoicingVo();
|
|
|
-
|
|
|
|
|
log.info("平台结算:platformSettlement=[{}]", JSONUtil.toJsonStr(platformSettlementVo));
|
|
log.info("平台结算:platformSettlement=[{}]", JSONUtil.toJsonStr(platformSettlementVo));
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ LocalDateTime settlementDateTime = LocalDateTime.parse(platformSettlementVo.getSettlementVo().getReceivePaymentDate(), formatter);
|
|
|
try {
|
|
try {
|
|
|
// ============================开票逻辑============================
|
|
// ============================开票逻辑============================
|
|
|
invoicingVo.setReceivablePremium(this.getReceivableAmount(invoicingVo));
|
|
invoicingVo.setReceivablePremium(this.getReceivableAmount(invoicingVo));
|
|
@@ -986,7 +997,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
invoice.setStatus("1");
|
|
invoice.setStatus("1");
|
|
|
insPlyIncomeInvoiceMapper.insert(invoice);
|
|
insPlyIncomeInvoiceMapper.insert(invoice);
|
|
|
// 判断是需要更新哪个字段
|
|
// 判断是需要更新哪个字段
|
|
|
- this.updateIncomeSettlementStatus(invoice.getInvoiceType(), invoicingVo.getIncomeIds());
|
|
|
|
|
|
|
+ this.updateIncomeSettlementStatus(invoice.getInvoiceType(), invoicingVo.getIncomeIds(), settlementDateTime);
|
|
|
}else{
|
|
}else{
|
|
|
log.info("invoiceId=[{}], 还剩[{}]钱没有结算",settlementVo.getInvoicingId(), surplusPremium.subtract(settlementVo.getActualReceivedAmount()));
|
|
log.info("invoiceId=[{}], 还剩[{}]钱没有结算",settlementVo.getInvoicingId(), surplusPremium.subtract(settlementVo.getActualReceivedAmount()));
|
|
|
}
|
|
}
|
|
@@ -1361,7 +1372,13 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean settlement(SettlementVo settlementVo) {
|
|
public boolean settlement(SettlementVo settlementVo) {
|
|
|
- log.info("结算:settlementVo=[{}]", JSONUtil.toJsonStr(settlementVo));
|
|
|
|
|
|
|
+ log.info("结算:settlementVo=[{}].DateTimeFormatter", JSONUtil.toJsonStr(settlementVo));
|
|
|
|
|
+ AssertionUtils.isFail(StrUtil.isEmpty(settlementVo.getReceivePaymentDate()), "结算日期不能为空");
|
|
|
|
|
+
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ LocalDateTime settlementDateTime = LocalDateTime.parse(settlementVo.getReceivePaymentDate(), formatter);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
// 获取应收的金额
|
|
// 获取应收的金额
|
|
|
InsPlyIncomeInvoice insPlyIncomeInvoice = insPlyIncomeInvoiceMapper.selectById(settlementVo.getInvoicingId());
|
|
InsPlyIncomeInvoice insPlyIncomeInvoice = insPlyIncomeInvoiceMapper.selectById(settlementVo.getInvoicingId());
|
|
@@ -1410,7 +1427,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
.eq(InsPlyIncomeInvoiceLink::getInvoiceId, settlementVo.getInvoicingId()))
|
|
.eq(InsPlyIncomeInvoiceLink::getInvoiceId, settlementVo.getInvoicingId()))
|
|
|
.forEach(item -> incomeIds.add(item.getIncomeId()));
|
|
.forEach(item -> incomeIds.add(item.getIncomeId()));
|
|
|
// 判断是需要更新哪个字段
|
|
// 判断是需要更新哪个字段
|
|
|
- this.updateIncomeSettlementStatus(insPlyIncomeInvoice.getInvoiceType(), incomeIds);
|
|
|
|
|
|
|
+ this.updateIncomeSettlementStatus(insPlyIncomeInvoice.getInvoiceType(), incomeIds, settlementDateTime);
|
|
|
}else{
|
|
}else{
|
|
|
log.info("invoiceId=[{}], 还剩[{}]钱没有结算",settlementVo.getInvoicingId(), surplusPremium.subtract(settlementVo.getActualReceivedAmount()));
|
|
log.info("invoiceId=[{}], 还剩[{}]钱没有结算",settlementVo.getInvoicingId(), surplusPremium.subtract(settlementVo.getActualReceivedAmount()));
|
|
|
}
|
|
}
|
|
@@ -2563,10 +2580,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
// 累计应收金额, 应收手续费(手续费), 应收手续费(手续费)
|
|
// 累计应收金额, 应收手续费(手续费), 应收手续费(手续费)
|
|
|
List<CompanySuperviseSettlementReportDto> allCompaniesIncomeDatas = baseMapper.queryCumulativeAccountsReceivable(systemCode);
|
|
List<CompanySuperviseSettlementReportDto> allCompaniesIncomeDatas = baseMapper.queryCumulativeAccountsReceivable(systemCode);
|
|
|
allCompaniesIncomeDatas = allCompaniesIncomeDatas.stream().peek(action-> action.setId(action.getCompanyId())).toList();
|
|
allCompaniesIncomeDatas = allCompaniesIncomeDatas.stream().peek(action-> action.setId(action.getCompanyId())).toList();
|
|
|
- // for test
|
|
|
|
|
- //allCompaniesIncomeDatas = allCompaniesIncomeDatas.stream().filter(action-> "1738811735599338932".equals(action.getCompanyId())).toList();
|
|
|
|
|
- // temp, 将不可变对象变成 可变对象
|
|
|
|
|
- // allCompaniesIncomeDatas = new ArrayList<>(allCompaniesIncomeDatas);
|
|
|
|
|
|
|
+ // for test, 查看一家公司的数据,将不可变对象变成 可变对象
|
|
|
|
|
+// allCompaniesIncomeDatas = allCompaniesIncomeDatas.stream().filter(action-> "1738811735599338932".equals(action.getCompanyId())).toList();
|
|
|
|
|
+// allCompaniesIncomeDatas = new ArrayList<>(allCompaniesIncomeDatas);
|
|
|
if (CollUtil.isEmpty(allCompaniesIncomeDatas)) {
|
|
if (CollUtil.isEmpty(allCompaniesIncomeDatas)) {
|
|
|
String msg = String.format("租户%s下暂时没有手续费",systemCode);
|
|
String msg = String.format("租户%s下暂时没有手续费",systemCode);
|
|
|
log.info(msg);
|
|
log.info(msg);
|
|
@@ -2594,10 +2610,8 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
private List<CompanySuperviseSettlementReportDto> calStatisAmount(List<CompanySuperviseSettlementReportDto> allCompaniesIncomeDatas,
|
|
private List<CompanySuperviseSettlementReportDto> calStatisAmount(List<CompanySuperviseSettlementReportDto> allCompaniesIncomeDatas,
|
|
|
SettlementReportQueryVo queryVo,
|
|
SettlementReportQueryVo queryVo,
|
|
|
String systemCode) {
|
|
String systemCode) {
|
|
|
- log.info("计算保险公司的统计维度。 要计算的保险公司的个数[{}]", CollUtil.size(allCompaniesIncomeDatas));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ log.info("计算保险公司的统计维度。 要计算的保险公司的个数[{}].queryVo=[{}], systemCode=[{}]", CollUtil.size(allCompaniesIncomeDatas), JSONUtil.toJsonStr(queryVo), systemCode);
|
|
|
Map<String, EsmInsCompany> bsMap = esmInsCompanyClient.queryAllCompanyMap().getData();
|
|
Map<String, EsmInsCompany> bsMap = esmInsCompanyClient.queryAllCompanyMap().getData();
|
|
|
-
|
|
|
|
|
// companyId -> dto
|
|
// companyId -> dto
|
|
|
Map<String, CompanySuperviseSettlementReportDto> companyMap;
|
|
Map<String, CompanySuperviseSettlementReportDto> companyMap;
|
|
|
companyMap = allCompaniesIncomeDatas.stream()
|
|
companyMap = allCompaniesIncomeDatas.stream()
|
|
@@ -2616,54 +2630,55 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
|
|
|
|
|
// 已开票(手续费)
|
|
// 已开票(手续费)
|
|
|
// 已开票(跟单费)
|
|
// 已开票(跟单费)
|
|
|
- Map<String, BigDecimal> sxfInvoicedAmountMap = baseMapper.queryInvoicedAmount(systemCode, List.of(1, 3), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
- Map<String, BigDecimal> gdfInvoicedAmountMap = baseMapper.queryInvoicedAmount(systemCode, List.of(2, 4), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
- Map<String, BigDecimal> ptInvoicedAmountMap = baseMapper.queryInvoicedAmount(systemCode, List.of(4, 6), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
|
|
|
|
|
|
|
+ List<CalRes> calRes;
|
|
|
|
|
+ calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(1, 3), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
+ Map<String, BigDecimal> sxfInvoicedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
|
|
|
|
|
+ calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(2, 4), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
+ Map<String, BigDecimal> gdfInvoicedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
|
|
|
|
|
+ calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(4, 6), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
+ Map<String, BigDecimal> ptInvoicedAmountMap =calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
|
|
|
|
|
+
|
|
|
|
|
+ // 结算费用
|
|
|
|
|
+ calRes = baseMapper.querySettledAmount(systemCode, queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime());
|
|
|
|
|
+ Map<String, BigDecimal> sxfSettledAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getSxfSettlement, (o1,o2)->o1));
|
|
|
|
|
+ Map<String, BigDecimal> gdfSettledAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getGdfSettlement, (o1,o2)->o1));
|
|
|
|
|
+
|
|
|
|
|
+ // 计算已开票和未开票
|
|
|
for (String companyId : companyMap.keySet()) {
|
|
for (String companyId : companyMap.keySet()) {
|
|
|
|
|
+ log.info("计算保险公司的开票金额:companyId=[{}]",companyId);
|
|
|
CompanySuperviseSettlementReportDto companySuperviseSettlementReportDto = companyMap.get(companyId);
|
|
CompanySuperviseSettlementReportDto companySuperviseSettlementReportDto = companyMap.get(companyId);
|
|
|
- if(sxfInvoicedAmountMap != null){
|
|
|
|
|
- BigDecimal sxf = sxfInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
- companySuperviseSettlementReportDto.setSxfInvoicedAmount(Objects.toString(sxf,BigDecimal.ZERO+""));
|
|
|
|
|
- }else{
|
|
|
|
|
- companySuperviseSettlementReportDto.setSxfInvoicedAmount(BigDecimal.ZERO+"");
|
|
|
|
|
- }
|
|
|
|
|
- if(gdfInvoicedAmountMap != null){
|
|
|
|
|
- BigDecimal gdf = gdfInvoicedAmountMap.getOrDefault(companyId,BigDecimal.ZERO);
|
|
|
|
|
- companySuperviseSettlementReportDto.setGdfInvoicedAmount(Objects.toString(gdf,BigDecimal.ZERO+""));
|
|
|
|
|
- }else{
|
|
|
|
|
- companySuperviseSettlementReportDto.setGdfInvoicedAmount(Objects.toString(BigDecimal.ZERO));
|
|
|
|
|
- }
|
|
|
|
|
- if(ptInvoicedAmountMap != null){
|
|
|
|
|
- BigDecimal pt = ptInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
- companySuperviseSettlementReportDto.setPtInvoicedAmount(Objects.toString(BigDecimal.ZERO));
|
|
|
|
|
- }else{
|
|
|
|
|
- companySuperviseSettlementReportDto.setPtInvoicedAmount(Objects.toString(BigDecimal.ZERO));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ BigDecimal sxf = sxfInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfInvoicedAmount(Objects.toString(sxf,BigDecimal.ZERO+""));
|
|
|
|
|
+ BigDecimal gdf = gdfInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfInvoicedAmount(Objects.toString(gdf,BigDecimal.ZERO+""));
|
|
|
|
|
+ BigDecimal pt = ptInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
+ companySuperviseSettlementReportDto.setPtInvoicedAmount(Objects.toString(pt,BigDecimal.ZERO+""));
|
|
|
|
|
+
|
|
|
|
|
+ CompanySuperviseSettlementReportDto dto;
|
|
|
|
|
+ dto = companyMap.get(companyId);
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfUnInvoicedAmount(BigDecimalUtil.subtract(new BigDecimal(dto.getSuperviseFee()),sxf).toString());
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfUnInvoicedAmount(BigDecimalUtil.subtract(new BigDecimal(dto.getFollowFee()),gdf).toString());
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal sxfS = sxfSettledAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
+ BigDecimal gdfS = gdfSettledAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfSettledAmount(Objects.toString(sxfS, BigDecimal.ZERO+""));
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfUnSettledAmount(BigDecimalUtil.subtract(sxf,sxfS).toString());
|
|
|
|
|
+
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfSettledAmount(Objects.toString(gdfS, BigDecimal.ZERO+""));
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfUnSettledAmount(BigDecimalUtil.subtract(gdf,gdfS).toString());
|
|
|
|
|
+
|
|
|
|
|
+ // 当起始日期有值的时候,计算的没有意义
|
|
|
if(StrUtil.isNotEmpty(queryVo.getInvoiceStartTime())){
|
|
if(StrUtil.isNotEmpty(queryVo.getInvoiceStartTime())){
|
|
|
- companySuperviseSettlementReportDto.setSxfUnInvoicedAmount("-"+queryVo.getInvoiceStartTime());
|
|
|
|
|
- companySuperviseSettlementReportDto.setGdfUnInvoicedAmount("-"+queryVo.getInvoiceStartTime());
|
|
|
|
|
- companySuperviseSettlementReportDto.setPtUnInvoicedAmount("-"+queryVo.getInvoiceStartTime());
|
|
|
|
|
- }else{
|
|
|
|
|
- // TODO 计算
|
|
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfUnInvoicedAmount("-");
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfUnInvoicedAmount("-");
|
|
|
|
|
+ companySuperviseSettlementReportDto.setPtUnInvoicedAmount("-");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StrUtil.isNotEmpty(queryVo.getSettlementStartTime())){
|
|
|
|
|
+ companySuperviseSettlementReportDto.setSxfUnSettledAmount("-");
|
|
|
|
|
+ companySuperviseSettlementReportDto.setGdfUnSettledAmount("-");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 已结算(手续费)
|
|
|
|
|
- // 已结算(跟单费)
|
|
|
|
|
-// Map<String, BigDecimal> sxfSettlementedAmount = baseMapper.querySettledAmount(systemCode,List.of(1,3));
|
|
|
|
|
-// Map<String, BigDecimal> gdfSettlementedAmount = baseMapper.querySettledAmount(systemCode,List.of(2,4));
|
|
|
|
|
-// Map<String, BigDecimal> ptSettlementedAmount = baseMapper.querySettledAmount(systemCode,List.of(4,6));
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // 未开票(手续费)
|
|
|
|
|
- // 未开票(跟单费)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // 未结算(手续费)
|
|
|
|
|
- // 未结算(跟单费)
|
|
|
|
|
-
|
|
|
|
|
return new ArrayList<>(companyMap.values().stream().toList());
|
|
return new ArrayList<>(companyMap.values().stream().toList());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2766,7 +2781,10 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
tree.putExtra("gdfUnInvoicedAmount",dto.getGdfUnInvoicedAmount());
|
|
tree.putExtra("gdfUnInvoicedAmount",dto.getGdfUnInvoicedAmount());
|
|
|
tree.putExtra("ptInvoicedAmount",dto.getPtInvoicedAmount());
|
|
tree.putExtra("ptInvoicedAmount",dto.getPtInvoicedAmount());
|
|
|
tree.putExtra("ptUnInvoicedAmount",dto.getPtUnInvoicedAmount());
|
|
tree.putExtra("ptUnInvoicedAmount",dto.getPtUnInvoicedAmount());
|
|
|
- tree.putExtra("settledAmount",dto.getSettledAmount());
|
|
|
|
|
|
|
+ tree.putExtra("sxfSettledAmount",dto.getSxfSettledAmount());
|
|
|
|
|
+ tree.putExtra("sxfUnSettledAmount",dto.getSxfUnSettledAmount());
|
|
|
|
|
+ tree.putExtra("gdfSettledAmount",dto.getGdfSettledAmount());
|
|
|
|
|
+ tree.putExtra("gdfUnSettledAmount",dto.getGdfUnSettledAmount());
|
|
|
});
|
|
});
|
|
|
log.info("树形结构构建:一级数据[{}]个", CollUtil.size(build));
|
|
log.info("树形结构构建:一级数据[{}]个", CollUtil.size(build));
|
|
|
return build;
|
|
return build;
|