소스 검색

新增劳保导出

donglang 12 시간 전
부모
커밋
faf43c6843

+ 15 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/enterpriseApp/AppWayBillController.java

@@ -14,6 +14,7 @@ import com.sckw.transport.model.vo.OrderTotalTakeVo;
 import com.sckw.transport.model.vo.StatisticsWaybillResp;
 import com.sckw.transport.model.vo.WaybillOrderRawOreReportRespExcelVO;
 import com.sckw.transport.model.vo.WaybillOrderReportRespExcelVO;
+import com.sckw.transport.model.vo.execlVo.WaybillOrderReportRespExcel2VO;
 import com.sckw.transport.service.KwtLogisticsConsignmentService;
 import com.sckw.transport.service.KwtWaybillManagementService;
 import com.sckw.transport.service.KwtWaybillManagementV1Service;
@@ -464,6 +465,20 @@ public class AppWayBillController {
         ExcelUtil.downData(response, WaybillOrderReportRespExcelVO.class, list);
     }
 
+    /**
+     * 销售报表导出2
+     * @param params
+     * @param response
+     */
+    @PostMapping(value = "/export2")
+    public void export2(@RequestBody @Validated WaybillOrderReportQueryParam params, HttpServletResponse response) {
+        List<WaybillOrderReportRespExcel2VO> list = waybillOrderService.export2Report(params);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
+        }
+        ExcelUtil.downData(response, WaybillOrderReportRespExcel2VO.class, list);
+    }
+
     /**
      * 运单每日内转报表
      *

+ 93 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/WaybillOrderReportRespExcel2VO.java

@@ -0,0 +1,93 @@
+package com.sckw.transport.model.vo.execlVo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.excel.annotation.ExcelContext;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author :chenXiaoFei
+ * @version :1.0
+ * @description : 分页查询运单每日报表
+ * @create :2025-11-11 20:16:00
+ */
+@Data
+@ExcelContext(fileName = "销售每日报表", sheetName = "销售报表台账")
+public class WaybillOrderReportRespExcel2VO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 7250765223450002066L;
+
+    /**
+     * 序号(汇总行显示为空)
+     */
+    @ExcelProperty(value = "序号", index = 0)
+    private String serialNumber;
+
+    /**
+     * 采购单位名称
+     */
+    @ExcelProperty(value = "客户名称" )
+    private String procurementEntName;
+
+    /**
+     * 贸易订单编号
+     */
+    @ExcelProperty(value = "订单号" )
+    private String tradeOrderNo;
+
+    /**
+     * 运单编号
+     */
+    @ExcelProperty(value = "运单号" )
+    private String waybillNo;
+
+    /**
+     * 商品名称
+     */
+    @ExcelProperty(value = "商品名称" )
+    private String goodsName;
+
+    /**
+     * 车牌号
+     */
+    @ExcelProperty(value = "车牌号")
+    private String truckNo;
+
+    /**
+     * 毛重
+     */
+    @ExcelProperty(value = "毛重(吨)")
+    private BigDecimal grossAmount;
+
+    /**
+     * 皮重
+     */
+    @ExcelProperty(value = "皮重(吨)")
+    private BigDecimal tareAmount;
+
+    /**
+     * 净重
+     */
+    @ExcelProperty(value = "净重(吨)")
+    private BigDecimal amount;
+
+    /**
+     * 离场时间
+     */
+    @ExcelProperty(value = "离场时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date leaveTime;
+
+    /**
+     * 卸货联系人
+     */
+    @ExcelProperty(value = "联系人")
+    private String unloadingPerson;
+
+}

+ 14 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/app/WaybillOrderService.java

@@ -38,6 +38,7 @@ import com.sckw.transport.model.vo.OrderTotalTakeVo;
 import com.sckw.transport.model.vo.StatisticsWaybillResp;
 import com.sckw.transport.model.vo.WaybillOrderRawOreReportRespExcelVO;
 import com.sckw.transport.model.vo.WaybillOrderReportRespExcelVO;
+import com.sckw.transport.model.vo.execlVo.WaybillOrderReportRespExcel2VO;
 import com.sckw.transport.repository.*;
 import com.sckw.transport.service.KwtWaybillOrderV1Service;
 import jakarta.annotation.Resource;
@@ -2304,6 +2305,19 @@ public class WaybillOrderService {
         return BeanUtils.copyToList(orderGroupedReportList, WaybillOrderReportRespExcelVO.class);
     }
 
+    /**
+     * 查询运单每日报表
+     * @param param
+     * @return
+     */
+    public List<WaybillOrderReportRespExcel2VO> export2Report(WaybillOrderReportQueryParam param) {
+        log.info("[报表]导出销售运单每日报表:{}", JSON.toJSONString(param));
+        // 查询运单数据
+        List<WaybillOrderReportResp> orderGroupedReportList = queryWaybillOrderReport(param);
+
+        return BeanUtils.copyToList(orderGroupedReportList, WaybillOrderReportRespExcel2VO.class);
+    }
+
     /**
      * 查询运单每日内转报表
      * @param param