fix 开店管理导出

This commit is contained in:
shuo.wang
2025-02-13 18:29:24 +08:00
parent abfad1f11d
commit e782a9044f

View File

@@ -122,10 +122,10 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
for (BranchShopResponse response : list) { for (BranchShopResponse response : list) {
ExportBranchShopDTO dto = new ExportBranchShopDTO(); ExportBranchShopDTO dto = new ExportBranchShopDTO();
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId()); FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)){ if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime())); dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime())); dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
String total =(new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee())) String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee())).add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString()); .add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee())).add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
dto.setTotalAmountContributions(total); dto.setTotalAmountContributions(total);
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee()); dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
@@ -147,20 +147,20 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
dto.setContractEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime())); dto.setContractEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime()));
} }
Date payTime = payTimeMap.get(response.getShopId()); Date payTime = payTimeMap.get(response.getShopId());
if (Objects.nonNull(payTime)){ if (Objects.nonNull(payTime)) {
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1,payTime)); dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime));
} }
InvoicingDO invoicingDO = InvoicingMap.get(response.getShopId()); InvoicingDO invoicingDO = InvoicingMap.get(response.getShopId());
if (invoicingDO != null) { if (invoicingDO != null) {
dto.setInvoicingTime(invoicingDO.getInvoiceDate()); dto.setInvoicingTime(invoicingDO.getInvoiceDate());
dto.setFirstYearManagementFeeTax(invoicingDO.getManagementFeeTax().toString()); dto.setFirstYearManagementFeeTax(toString(invoicingDO.getManagementFeeTax()));
dto.setFirstYearManagementFee(invoicingDO.getManagementFee().toString()); dto.setFirstYearManagementFee(toString(invoicingDO.getManagementFee()));
dto.setFirstYearBrandingFeeTax(invoicingDO.getBrandUsageFeeTax().toString()); dto.setFirstYearBrandingFeeTax(toString(invoicingDO.getBrandUsageFeeTax()));
dto.setFirstYearBrandingFee(invoicingDO.getBrandUsageFee().toString()); dto.setFirstYearBrandingFee(toString(invoicingDO.getBrandUsageFee()));
dto.setFranchiseFeeTax(invoicingDO.getFranchiseFeeTax().toString()); dto.setFranchiseFeeTax(toString(invoicingDO.getFranchiseFeeTax()));
dto.setFranchiseFee(invoicingDO.getFranchiseFee().toString()); dto.setFranchiseFee(toString(invoicingDO.getFranchiseFee()));
dto.setDesignFeeTax(invoicingDO.getDesignServiceFeeTax().toString()); dto.setDesignFeeTax(toString(invoicingDO.getDesignServiceFeeTax()));
dto.setDesignFee(invoicingDO.getDesignServiceFee().toString()); dto.setDesignFee(toString(invoicingDO.getDesignServiceFee().toString()));
} }
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn()); dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
dto.setShopStatus(response.getShopStatus()); dto.setShopStatus(response.getShopStatus());
@@ -185,5 +185,12 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
} }
} }
private String toString(Object o) {
if (o == null) {
return "";
}
return o.toString();
}
} }