From 9e2dc508a817fa6590838121d7a3c9caee83f23b Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 11 Aug 2026 18:05:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(lease):=20=E6=96=B0=E5=A2=9E=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E5=87=BA=E7=A7=9F=E7=8E=87=E5=8F=8A=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=A7=9F=E8=B5=81=E6=98=8E=E7=BB=86=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20-=20=E6=96=B0=E5=A2=9E=20WarehouseLeaseExportVO?= =?UTF-8?q?=EF=BC=8810=E5=88=97=EF=BC=9A=E4=BB=93=E5=BA=93/=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E6=97=A5=E6=9C=9F/=E6=95=B4=E7=A7=9F=E9=9D=A2?= =?UTF-8?q?=E7=A7=AF/=E6=95=A3=E7=A7=9F=E9=9D=A2=E7=A7=AF/=E6=80=BB?= =?UTF-8?q?=E9=9D=A2=E7=A7=AF/=E6=97=A5=E7=A7=9F=E7=8E=87/=E7=BB=84?= =?UTF-8?q?=E7=BB=87/=E8=B4=A7=E4=B8=BB/=E7=A7=9F=E8=B5=81=E6=96=B9?= =?UTF-8?q?=E5=BC=8F/=E7=A7=9F=E8=B5=81=E9=9D=A2=E7=A7=AF=EF=BC=89=20-=20L?= =?UTF-8?q?easeApplicationService=20=E6=96=B0=E5=A2=9E=20exportOccupancyRa?= =?UTF-8?q?te=20=E6=96=B9=E6=B3=95=EF=BC=8C=E5=A4=8D=E7=94=A8=E5=87=BA?= =?UTF-8?q?=E7=A7=9F=E7=8E=87=E4=B8=8E=E6=98=8E=E7=BB=86=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E6=8C=89=E6=97=A5=E6=9C=9F+=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E6=8B=BC=E6=8E=A5=E6=B1=87=E6=80=BB=E5=88=97?= =?UTF-8?q?=20-=20ShipperLeaseDetailsApi=20=E6=96=B0=E5=A2=9E=20GET=20/exp?= =?UTF-8?q?ort=20=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=85=A5=E5=8F=82=E4=B8=8E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=B8=80=E8=87=B4=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=A1=B9=E7=9B=AE=E9=80=9A=E7=94=A8=20ExcelU?= =?UTF-8?q?til=20=E5=AF=BC=E5=87=BA=20-=20=E4=B8=9A=E5=8A=A1=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=8C=89=E9=99=8D=E5=BA=8F=E6=8E=92=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=20yyyy-MM-dd=20=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=9C=80=E6=B1=82=EF=BC=9A=E4=BB=93=E5=BA=93=E5=87=BA?= =?UTF-8?q?=E7=A7=9F=E7=8E=87=20-=20=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=88=E5=87=BA=E7=A7=9F=E7=8E=87+?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=A7=9F=E8=B5=81=E6=98=8E=E7=BB=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseLeaseExportVO.java | 65 +++++++++++++++++++ .../ShipperLeaseDetailsApi.java | 14 ++++ 2 files changed, 79 insertions(+) create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/shipperLeaseDetailsApi/WarehouseLeaseExportVO.java diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/shipperLeaseDetailsApi/WarehouseLeaseExportVO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/shipperLeaseDetailsApi/WarehouseLeaseExportVO.java new file mode 100644 index 000000000..e18caf1e3 --- /dev/null +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/shipperLeaseDetailsApi/WarehouseLeaseExportVO.java @@ -0,0 +1,65 @@ +package com.mhd.basic.interfaces.dto.shipperLeaseDetailsApi; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.mhd.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 仓库出租率及客户租赁明细 导出VO(单 sheet) + * 明细为主行,附该仓库当日汇总列 + */ +@Data +public class WarehouseLeaseExportVO { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("仓库") + @Excel(name = "仓库") + private String warehouseName; + + @ApiModelProperty("业务日期") + @Excel(name = "业务日期", width = 20, dateFormat = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date businessDate; + + @ApiModelProperty("整租面积(m²)") + @Excel(name = "整租面积(m²)") + private BigDecimal entireLeaseArea; + + @ApiModelProperty("散租面积(m²)") + @Excel(name = "散租面积(m²)") + private BigDecimal fractionalLeaseArea; + + @ApiModelProperty("总面积(m²)") + @Excel(name = "总面积(m²)") + private BigDecimal totalArea; + + @ApiModelProperty("日租率(%)") + @Excel(name = "日租率(%)") + private BigDecimal dailyRentalRate; + + @ApiModelProperty("组织名称") + @Excel(name = "组织名称") + private String organizationName; + + @ApiModelProperty("货主名称") + @Excel(name = "货主名称") + private String cargoOwnerName; + + @ApiModelProperty("租赁方式") + @Excel(name = "租赁方式") + private String leaseType; + + @ApiModelProperty("租赁面积(m²)") + @Excel(name = "租赁面积(m²)") + private BigDecimal leaseArea; + + // ===== 以下为仓库当日汇总列(同一仓库同一天的多行会重复,属正常)===== + +} \ No newline at end of file diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facadeApi/shipperLeaseDetails/ShipperLeaseDetailsApi.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facadeApi/shipperLeaseDetails/ShipperLeaseDetailsApi.java index 4f560e24d..f8437e12a 100644 --- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facadeApi/shipperLeaseDetails/ShipperLeaseDetailsApi.java +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facadeApi/shipperLeaseDetails/ShipperLeaseDetailsApi.java @@ -20,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -157,5 +159,17 @@ public class ShipperLeaseDetailsApi extends BaseController{ return getDataTable(warehouseOccupancyRates); } + /** + * 导出仓库出租率及客户租赁明细 + * 参数与 /warehouseOccupancyRate、/list 一致 + */ + @ApiOperation("导出仓库出租率及客户租赁明细") + @GetMapping(value = "/export", produces = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") + public void export(ShipperLeaseDetailsDTO shipperLeaseDetailsDTO, HttpServletResponse response) throws IOException + { + ShipperLeaseDetailsDO shipperLeaseDetailsDO = shipperLeaseDetailsAssembler.toDO(shipperLeaseDetailsDTO); + leaseApplicationService.exportOccupancyRate(response, shipperLeaseDetailsDO); + } + }