优化:开店管理导出

This commit is contained in:
shuo.wang
2025-02-10 15:49:09 +08:00
parent 5485835abf
commit 4a56a29b4c
2 changed files with 13 additions and 10 deletions

View File

@@ -54,7 +54,7 @@ public class ExportBranchShopDTO {
@ColumnWidth(30)
private String firstYearStartTime;
@ExcelProperty(value = "第一年加盟开始时间",order = 9)
@ExcelProperty(value = "第一年加盟结束时间",order = 10)
@ColumnWidth(30)
private String firstYearEndTime;

View File

@@ -28,6 +28,7 @@ import com.cool.store.utils.poi.StringUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
@@ -120,15 +121,17 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
}
for (BranchShopResponse response : list) {
ExportBranchShopDTO dto = new ExportBranchShopDTO();
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.getOrDefault(response.getShopId(), new FranchiseFeeDTO());
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
String total =(new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee())).add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
dto.setTotalAmountContributions(total);
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
dto.setPerformanceBondBill(franchiseFeeDTO.getPerformanceBond());
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)){
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
String total =(new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee())).add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
dto.setTotalAmountContributions(total);
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
dto.setPerformanceBondBill(franchiseFeeDTO.getPerformanceBond());
}
dto.setUserName(response.getUsername());
dto.setMobile(response.getMobile());
dto.setShopName(response.getShopName());