Browse Source

feat(all): 增加报表

1 增加库存出库报表
2 增加自提任务维度报表
pull/1/head
zhaoqiaobo 1 year ago
parent
commit
95876d656d
  1. 40
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java
  2. 30
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportDeliveryController.java
  3. 42
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportStockController.java
  4. 55
      blade-service/logpm-report/src/main/java/com/logpm/report/excel/BillLoadingReportExcel.java
  5. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.java
  6. 268
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.xml
  7. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapeer.java
  8. 804
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml
  9. 9
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportStockMapeer.java
  10. 44
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportStockMapper.xml
  11. 38
      blade-service/logpm-report/src/main/java/com/logpm/report/query/BillDetailsQuery.java
  12. 38
      blade-service/logpm-report/src/main/java/com/logpm/report/query/BillLoadingTasksQuery.java
  13. 47
      blade-service/logpm-report/src/main/java/com/logpm/report/query/DevilerDetailsQuery.java
  14. 44
      blade-service/logpm-report/src/main/java/com/logpm/report/query/ReportCustomerQuery.java
  15. 41
      blade-service/logpm-report/src/main/java/com/logpm/report/query/ReportDevilerQuery.java
  16. 33
      blade-service/logpm-report/src/main/java/com/logpm/report/query/StockDetailsQuery.java
  17. 47
      blade-service/logpm-report/src/main/java/com/logpm/report/query/StockInQuery.java
  18. 41
      blade-service/logpm-report/src/main/java/com/logpm/report/query/StockOutQuery.java
  19. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/BillLoadingDetailsReader.java
  20. 35
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/BillLoadingTasksReader.java
  21. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryCustomerReader.java
  22. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryDetailReader.java
  23. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryInStocksReader.java
  24. 36
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryOutStocksReader.java
  25. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryStockReader.java
  26. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryTrainReader.java
  27. 11
      blade-service/logpm-report/src/main/java/com/logpm/report/service/ExportReaderService.java
  28. 20
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportBillLoadingAsyncService.java
  29. 17
      blade-service/logpm-report/src/main/java/com/logpm/report/service/ReportDeliverService.java
  30. 18
      blade-service/logpm-report/src/main/java/com/logpm/report/service/ReportStockService.java
  31. 77
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportBillLoadingAsyncService.java
  32. 104
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java
  33. 99
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportStockServiceImpl.java
  34. 83
      blade-service/logpm-report/src/main/java/com/logpm/report/util/QueryUtil.java
  35. 16
      blade-service/logpm-report/src/main/java/com/logpm/report/util/ReportExcelUtil.java
  36. 10
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/BillLoadingDetailsVO.java
  37. 120
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/BillLoadingTasksVO.java
  38. 15
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCustomerVO.java
  39. 17
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportDetailVO.java
  40. 13
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportDevilerVO.java
  41. 17
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportInStockVO.java
  42. 80
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOutStockVO.java
  43. 10
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/StockDetailsVO.java

40
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java

@ -2,25 +2,20 @@ package com.logpm.report.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.query.BillDetailsQuery;
import com.logpm.report.query.BillLoadingTasksQuery;
import com.logpm.report.service.IReportBillLoadingAsyncService;
import com.logpm.report.vo.BillLoadingDetailsVO;
import com.logpm.report.vo.BillLoadingTasksVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 自提单包条控制器
@ -33,34 +28,35 @@ public class ReportBillLoadingController {
private IReportBillLoadingAsyncService reportBillLoadingAsyncService;
/**
* 导出数据
*/
@GetMapping("/export-billLoading")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList")
public R exportBillLoading(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
List<BillLoadingReportExcel> list = reportBillLoadingAsyncService.exportBillLoading(param);
ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, BillLoadingReportExcel.class);
@GetMapping("/tasks")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "自提任务维度", notes = "自提任务维度")
public R<IPage<BillLoadingTasksVO>> tasksPage(BillLoadingTasksVO vo, BillLoadingTasksQuery query) {
IPage<BillLoadingTasksVO> pages = reportBillLoadingAsyncService.tasksPage(vo, query);
return R.data(pages);
}
return R.status(true);
@GetMapping("/exportTasks")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "导出自提任务维度", notes = "导出自提任务维度")
public void exportTasks(HttpServletResponse response, BillLoadingTasksVO vo, BillLoadingTasksQuery query) {
reportBillLoadingAsyncService.exportTasks(response, vo, query);
}
@GetMapping("/details")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "自提明细报表", notes = "自提明细报表")
public R<IPage<BillLoadingDetailsVO>> detailsPage(BillLoadingDetailsVO vo, Query query) {
public R<IPage<BillLoadingDetailsVO>> detailsPage(BillLoadingDetailsVO vo, BillDetailsQuery query) {
IPage<BillLoadingDetailsVO> pages = reportBillLoadingAsyncService.detailsPage(vo, query);
return R.data(pages);
}
@GetMapping("/exportDetails")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "导出自提明细报表", notes = "导出自提明细报表")
public void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo) {
public void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo, BillDetailsQuery query) {
try {
reportBillLoadingAsyncService.exportDetails(response, vo);
reportBillLoadingAsyncService.exportDetails(response, vo, query);
} catch (Exception e) {
e.printStackTrace();
}

30
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportDeliveryController.java

@ -18,6 +18,9 @@ package com.logpm.report.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.query.DevilerDetailsQuery;
import com.logpm.report.query.ReportCustomerQuery;
import com.logpm.report.query.ReportDevilerQuery;
import com.logpm.report.service.ReportDeliverService;
import com.logpm.report.vo.ReportCustomerVO;
import com.logpm.report.vo.ReportDetailVO;
@ -26,7 +29,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -51,7 +53,7 @@ public class ReportDeliveryController extends BladeController {
@GetMapping("/train")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "配送车次报表", notes = "配送车次报表")
public R<IPage<ReportDevilerVO>> deliveryTrainPage(ReportDevilerVO vo, Query query) {
public R<IPage<ReportDevilerVO>> deliveryTrainPage(ReportDevilerVO vo, ReportDevilerQuery query) {
IPage<ReportDevilerVO> pages = reportDeliverService.deliveryTrainPage(vo, query);
return R.data(pages);
@ -60,18 +62,14 @@ public class ReportDeliveryController extends BladeController {
@GetMapping("/exportTrain")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "导出配送车次报表", notes = "导出配送车次报表")
public void exportTrain(HttpServletResponse response, ReportDevilerVO vo) {
try {
reportDeliverService.exportTrain(response, vo);
} catch (Exception e) {
e.printStackTrace();
}
public void exportTrain(HttpServletResponse response, ReportDevilerVO vo, ReportDevilerQuery query) {
reportDeliverService.exportTrain(response, vo, query);
}
@GetMapping("/customer")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "配送客户报表", notes = "配送客户报表")
public R<IPage<ReportCustomerVO>> customerPage(ReportCustomerVO vo, Query query) {
public R<IPage<ReportCustomerVO>> customerPage(ReportCustomerVO vo, ReportCustomerQuery query) {
IPage<ReportCustomerVO> pages = reportDeliverService.customerPage(vo, query);
return R.data(pages);
}
@ -79,18 +77,14 @@ public class ReportDeliveryController extends BladeController {
@GetMapping("/exportCustomer")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "导出配送客户报表", notes = "导出配送客户报表")
public void exportCustomer(HttpServletResponse response, ReportCustomerVO vo) {
try {
reportDeliverService.exportCustomer(response, vo);
} catch (Exception e) {
e.printStackTrace();
}
public void exportCustomer(HttpServletResponse response, ReportCustomerVO vo, ReportCustomerQuery query) {
reportDeliverService.exportCustomer(response, vo, query);
}
@GetMapping("/details")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "配送明细报表", notes = "配送明细报表")
public R<IPage<ReportDetailVO>> detailsPage(ReportDetailVO vo, Query query) {
public R<IPage<ReportDetailVO>> detailsPage(ReportDetailVO vo, DevilerDetailsQuery query) {
IPage<ReportDetailVO> pages = reportDeliverService.detailsPage(vo, query);
return R.data(pages);
}
@ -98,9 +92,9 @@ public class ReportDeliveryController extends BladeController {
@GetMapping("/exportDetails")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "导出配送明细报表", notes = "导出配送明细报表")
public void exportDetails(HttpServletResponse response, ReportDetailVO vo) {
public void exportDetails(HttpServletResponse response, ReportDetailVO vo, DevilerDetailsQuery query) {
try {
reportDeliverService.exportDetails(response, vo);
reportDeliverService.exportDetails(response, vo, query);
} catch (Exception e) {
e.printStackTrace();
}

42
blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportStockController.java

@ -18,14 +18,17 @@ package com.logpm.report.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.report.query.StockDetailsQuery;
import com.logpm.report.query.StockInQuery;
import com.logpm.report.query.StockOutQuery;
import com.logpm.report.service.ReportStockService;
import com.logpm.report.vo.ReportInStockVO;
import com.logpm.report.vo.ReportOutStockVO;
import com.logpm.report.vo.StockDetailsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -50,7 +53,7 @@ public class ReportStockController extends BladeController {
@GetMapping("/details")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "库存品表", notes = "库存品表")
public R<IPage<StockDetailsVO>> detailsPage(StockDetailsVO vo, Query query) {
public R<IPage<StockDetailsVO>> detailsPage(StockDetailsVO vo, StockDetailsQuery query) {
IPage<StockDetailsVO> pages = stockService.detailsPage(vo, query);
return R.data(pages);
}
@ -58,31 +61,38 @@ public class ReportStockController extends BladeController {
@GetMapping("/exportDetails")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "导出配送明细报表", notes = "导出配送明细报表")
public void exportDetails(HttpServletResponse response, StockDetailsVO vo) {
try {
stockService.exportDetails(response, vo);
} catch (Exception e) {
e.printStackTrace();
}
public void exportDetails(HttpServletResponse response, StockDetailsVO vo, StockDetailsQuery query) {
stockService.exportDetails(response, vo, query);
}
@GetMapping("/inStocks")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "库存入库明细", notes = "库存入库明细")
public R<IPage<ReportInStockVO>> inStocks(ReportInStockVO vo, Query query) {
public R<IPage<ReportInStockVO>> inStocks(ReportInStockVO vo, StockInQuery query) {
IPage<ReportInStockVO> pages = stockService.inStocks(vo, query);
return R.data(pages);
}
@GetMapping("/exportInStocks")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "导出配送明细报表", notes = "导出配送明细报表")
public void exportInStocks(HttpServletResponse response, ReportInStockVO vo) {
try {
stockService.exportInStocks(response, vo);
} catch (Exception e) {
e.printStackTrace();
}
@ApiOperation(value = "导出库存入库明细", notes = "导出库存入库明细")
public void exportInStocks(HttpServletResponse response, ReportInStockVO vo, StockInQuery query) {
stockService.exportInStocks(response, vo, query);
}
@GetMapping("/outStocks")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "库存出库明细", notes = "库存出库明细")
public R<IPage<ReportOutStockVO>> outStocks(ReportOutStockVO vo, StockOutQuery query) {
IPage<ReportOutStockVO> pages = stockService.outStocks(vo, query);
return R.data(pages);
}
@GetMapping("/exportOutStocks")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "导出库存出库明细", notes = "导出库存出库明细")
public void exportOutStocks(HttpServletResponse response, ReportOutStockVO vo, StockOutQuery query) {
stockService.exportOutStocks(response, vo, query);
}
}

55
blade-service/logpm-report/src/main/java/com/logpm/report/excel/BillLoadingReportExcel.java

@ -1,55 +0,0 @@
package com.logpm.report.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
* 自提导出Excle实体
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BillLoadingReportExcel implements Serializable {
private static final long serialVersionUID = 1L;
@ColumnWidth(20)
@ExcelProperty("提货件数")
private String BillLoadingNum;
@ColumnWidth(20)
@ExcelProperty("到付运费")
private String collectPaymentFee;
@ColumnWidth(20)
@ExcelProperty("搬运费")
private String transportFee;
@ColumnWidth(20)
@ExcelProperty("仓储费")
private String storageFee;
@ColumnWidth(20)
@ExcelProperty("叉车费")
private String forkliftFee;
@ColumnWidth(20)
@ExcelProperty("增值费")
private String addValueFee;
@ColumnWidth(20)
@ExcelProperty("增值费")
private String amountToFee;
@ColumnWidth(20)
@ExcelProperty("创建时间")
private String createdTime;
}

14
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.java

@ -1,26 +1,20 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.vo.BillLoadingDetailsVO;
import com.logpm.report.vo.BillLoadingTasksVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface ReportBillLoadingMapper extends BaseMapper {
List<BillLoadingDetailsVO> getDetailsPage(IPage<BillLoadingDetailsVO> page,@Param("ew") Wrapper<BillLoadingDetailsVO> queryWrapper);
/**
* 导出自提单
* @param param
* @return
*/
List<BillLoadingReportExcel> exportBillLoading(@Param("param") Map<String, Object> param);
List<BillLoadingTasksVO> getTasksPage(IPage<BillLoadingTasksVO> page,@Param("ew") Wrapper<BillLoadingTasksVO> queryWrapper);
List<BillLoadingDetailsVO> getDetailsPage(IPage<BillLoadingDetailsVO> page,@Param("ew") QueryWrapper<BillLoadingDetailsVO> queryWrapper);
}

268
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportBillLoadingMapper.xml

@ -2,81 +2,72 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.report.mapper.ReportBillLoadingMapper">
<select id="exportBillLoading" resultType="com.logpm.report.excel.BillLoadingReportExcel">
SELECT ldbl.create_time AS createdTime,
IF(SUM(ldbll.quantity) is null, 0, SUM(ldbll.quantity)) AS BillLoadingNum,
IF((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id AND cost = '1' AND is_deleted = 0) is null, 0, (SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '1'
AND is_deleted = 0)) AS collectPaymentFee,
IF((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id AND cost = '2' AND is_deleted = 0) is null, 0, (SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '2'
AND is_deleted = 0)) AS transportFee,
IF((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id AND cost = '3' AND is_deleted = 0) is null, 0, (SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '3'
AND is_deleted = 0)) AS storageFee,
IF((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id AND cost = '4' AND is_deleted = 0) is null, 0, (SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '4'
AND is_deleted = 0)) AS forkliftFee,
IF((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id AND cost = '5' AND is_deleted = 0) is null, 0, (SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '5'
AND is_deleted = 0)) AS addValueFee
FROM logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distribution_delivery_charge AS lddc ON ldbl.id = lddc.bill_lading
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbll ON ldbll.bill_lading_id = ldbl.id
GROUP BY ldbl.id
</select>
<select id="getDetailsPage" resultType="com.logpm.report.vo.BillLoadingDetailsVO">
select *
select pickup_batch,
warehouse,
consignee_unit,
waybill_number,
order_code,
packet_bar_code,
train_number,
firsts,
second,
third_product,
material_code,
material_name,
start_ware_in_time,
start_ware_out_time,
warehouse_entry_time_end,
scan_user,
scan_time,
examine_time,
examine_user
from (select dbl.pickup_batch,
dsa.warehouse,
dsa.consignee_unit,
dsa.waybill_number,
dsa.order_code,
t.packet_bar_code,
dsa.train_number,
dpl.firsts,
dpl.second,
dpl.third_product,
dpl.material_code,
dpl.material_name,
'' start_ware_in_time,
'' start_ware_out_time,
dpl.warehouse_entry_time_end,
dbls.create_user scan_user,
dbls.create_time scan_time,
dbl.update_time examine_time,
dbl.create_user examine_user
from logpm_distrilbution_bill_package t
left join logpm_distrilbution_bill_lading dbl on dbl.id = t.bill_lading_id
left join logpm_distribution_parcel_list dpl on dpl.id = t.parce_list_id
left join logpm_distribution_stock_article dsa on dsa.id = t.stock_article_id
left join logpm_distribution_bill_lading_scan dbls on dbls.parcel_list_id = dpl.id
) t ${ew.customSqlSegment}
dsa.warehouse,
dsa.consignee_unit,
dsa.waybill_number,
dsa.order_code,
t.packet_bar_code,
dsa.train_number,
dpl.firsts,
dpl.second,
dpl.third_product,
dpl.material_code,
dpl.material_name,
'' start_ware_in_time,
'' start_ware_out_time,
dpl.warehouse_entry_time_end,
dbls.create_user scan_user,
dbls.create_time scan_time,
dbl.update_time examine_time,
dbl.create_user examine_user
from logpm_distrilbution_bill_package t
left join logpm_distrilbution_bill_lading dbl on dbl.id = t.bill_lading_id
left join logpm_distribution_parcel_list dpl on dpl.id = t.parce_list_id
left join logpm_distribution_stock_article dsa on dsa.id = t.stock_article_id
left join logpm_distribution_bill_lading_scan dbls on dbls.parcel_list_id = dpl.id) t ${ew.customSqlSegment}
union all
select *
select pickup_batch,
warehouse,
consignee_unit,
waybill_number,
order_code,
packet_bar_code,
train_number,
firsts,
second,
third_product,
material_code,
material_name,
start_ware_in_time,
start_ware_out_time,
warehouse_entry_time_end,
scan_user,
scan_time,
examine_time,
examine_user
from (select dbl.pickup_batch,
dsa.warehouse,
dsa.consignee_unit,
@ -103,4 +94,141 @@
left join logpm_distribution_bill_lading_scan dbls on dbls.stock_list_id = dpl.id
) t ${ew.customSqlSegment}
</select>
<select id="getTasksPage" resultType="com.logpm.report.vo.BillLoadingTasksVO">
select pickup_atch,
warehouse,
waybill_number,
order_code,
consignee_unit,
consignee_user,
consignee_phone,
bill_user,
bill_user_phone,
bill_registration_number,
id_type,
bill_paper,
bill_status,
plan_bill_number,
bill_loading_num,
collect_payment_fee,
transport_fee,
storage_fee,
forklift_fee,
add_value_fee,
goods_info,
created_time
from (SELECT ldbl.pickup_batch AS pickup_atch,
lww.name As warehouse,
GROUP_CONCAT(DISTINCT ldsa.waybill_number) AS waybill_number,
GROUP_CONCAT(DISTINCT ldsa.order_code) AS order_code,
GROUP_CONCAT(DISTINCT ww.consignee) AS consignee_unit,
GROUP_CONCAT(DISTINCT ww.consignee_name) AS consignee_user,
GROUP_CONCAT(DISTINCT ww.consignee_mobile) AS consignee_phone,
ldbl.consignee AS bill_user,
ldbl.consignee_phone AS bill_user_phone,
ldbl.pick_up_plate AS bill_registration_number,
CASE ldbl.certificate_type
WHEN 1 THEN '身份证'
WHEN 2 THEN '护照'
WHEN 3 THEN '驾驶证'
ELSE
''
END id_type,
ldbl.delivery_document AS bill_paper,
CASE ldbl.conditions
WHEN 10 THEN '待提货'
WHEN 20 THEN '已提货'
WHEN 10 THEN '待提货'
ELSE
'已签收'
END bill_status,
sum(ldsa.total_number) plan_bill_number,
IF
(
SUM(ldbll.quantity) IS NULL,
0,
SUM(ldbll.quantity)) AS bill_loading_num,
IF
((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '1'
AND is_deleted = 0) IS NULL,
0,
(SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '1'
AND is_deleted = 0)) AS collect_payment_fee,
IF
((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '2'
AND is_deleted = 0) IS NULL,
0,
(SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '2'
AND is_deleted = 0)) AS transport_fee,
IF
((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '3'
AND is_deleted = 0) IS NULL,
0,
(SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '3'
AND is_deleted = 0)) AS storage_fee,
IF
((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '4'
AND is_deleted = 0) IS NULL,
0,
(SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '4'
AND is_deleted = 0)) AS forklift_fee,
IF
((SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '5'
AND is_deleted = 0) IS NULL,
0,
(SELECT money
FROM logpm_distribution_delivery_charge
WHERE bill_lading = ldbl.id
AND cost = '5'
AND is_deleted = 0)) AS add_value_fee,
(SELECT GROUP_CONCAT(splice)
from (SELECT dbl2.id as id,
if(ldpl2.second = null or ldpl2.second = '', '',
CONCAT(ldpl2.second, '(', count(*), ')'))
as splice
from logpm_distrilbution_bill_lading dbl2
LEFT JOIN logpm_distrilbution_bill_package dbp2
ON dbp2.bill_lading_id = dbl2.id AND dbp2.packet_bar_status IN (1, 3)
LEFT JOIN logpm_distribution_parcel_list ldpl2 ON dbp2.parce_list_id = ldpl2.id
GROUP BY dbl2.pickup_batch, ldpl2.second) as aimdate
WHERE id = ldbl.id
GROUP BY id) AS goods_info,
ldbl.pick_up_time AS created_time
FROM logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distribution_delivery_charge AS lddc ON ldbl.id = lddc.bill_lading
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbll ON ldbll.bill_lading_id = ldbl.id
LEFT JOIN logpm_distrilbution_bill_stock AS ldbs ON ldbs.bill_lading_id = ldbl.id
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldbs.stock_article_id = ldsa.id
LEFT JOIN logpm_warehouse_warehouse AS lww ON ldbl.warehouse_id = lww.id
LEFT JOIN logpm_warehouse_waybill AS ww ON ldsa.waybill_number = ww.waybill_no
GROUP BY ldbl.id) t ${ew.customSqlSegment}
</select>
</mapper>

6
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapeer.java

@ -18,10 +18,10 @@ import java.util.List;
@Mapper
public interface ReportDeliverMapeer extends BaseMapper {
List<ReportDevilerVO> getDeliveryTrainPage(IPage<ReportDevilerVO> page, @Param("ew") Wrapper<ReportDevilerVO> query);
List<ReportDevilerVO> getDeliveryTrainPage(IPage<ReportDevilerVO> page, @Param("ew") Wrapper query);
List<ReportCustomerVO> getCustomerPage(IPage<ReportCustomerVO> page, @Param("ew") Wrapper<ReportCustomerVO> query);
List<ReportCustomerVO> getCustomerPage(IPage<ReportCustomerVO> page, @Param("ew") Wrapper query);
List<ReportDetailVO> getDetailsPage(IPage<ReportDetailVO> page, @Param("ew") Wrapper<ReportDetailVO> query);
List<ReportDetailVO> getDetailsPage(IPage<ReportDetailVO> page, @Param("ew") Wrapper query);
}

804
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

@ -3,111 +3,147 @@
<mapper namespace="com.logpm.report.mapper.ReportDeliverMapeer">
<select id="getDeliveryTrainPage" resultType="com.logpm.report.vo.ReportDevilerVO">
select * from (SELECT d.train_number train_number,
d.task_time task_time,
d.warehouse_name warehouse_name,
CASE
WHEN d.type = 1 THEN
'市配'
WHEN d.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN d.kind = 1 THEN
'自主配送'
WHEN d.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
d.vehicle_name vehicle_name,
d.driver_name driver_name,
d.distribution_company distribution_company,
CASE
WHEN d.delivery_status = 1 THEN
'待配送'
WHEN d.delivery_status = 2 THEN
'配送中'
WHEN d.delivery_status = 3 THEN
'已完成'
ELSE ''
END delivery_status,
d.customers_number customers_number,
d.price,
d.order_number order_number,
rn.num reservation_num,
rsln.num reservation_stock_listNum,
IFNULL(loadScan.loadedNum,0) loaded_num,
IFNULL(loadscaninvn.loadedNum,0) invn_loaded_num,
IFNULL(loadScan.exLoadedNum,0) ex_loaded_num,
IFNULL(loadScan.reNum,0) re_num,
IFNULL(loadscaninvn.reNum,0) invn_re_num,
IFNULL(loadScan.exReNum,0) ex_reNum,
ifnull(ds.dsNum,0)ds_num,
ifnull(ds.ssNum,0)ss_num,
ifnull(d.unloading_team_name,'') unloading_team_name
FROM
logpm_distribution_delivery_list d
LEFT JOIN (
SELECT
lds.delivery_id,
COALESCE ( sum( ldr.reservation_num ), 0 ) num
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE
ldr.reservation_status != '40'
GROUP BY
lds.delivery_id
) rn ON rn.delivery_id = d.id
select train_number,
task_time,
warehouse_name,
type,
kind,
vehicle_name,
driver_name,
distribution_company,
delivery_status,
customers_number,
price,
order_number,
reservation_num,
reservation_stock_listNum,
loaded_num,
invn_loaded_num,
ex_loaded_num,
re_num,
invn_re_num,
ex_reNum,
ds_num,
ss_num,
unloading_team_name
from (SELECT d.train_number train_number,
d.task_time task_time,
d.warehouse_name warehouse_name,
CASE
WHEN d.type = 1 THEN
'市配'
WHEN d.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN d.kind = 1 THEN
'自主配送'
WHEN d.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
d.vehicle_name vehicle_name,
d.driver_name driver_name,
d.distribution_company distribution_company,
CASE
WHEN d.delivery_status = 1 THEN
'待配送'
WHEN d.delivery_status = 2 THEN
'配送中'
WHEN d.delivery_status = 3 THEN
'已完成'
ELSE ''
END delivery_status,
d.customers_number customers_number,
d.price,
d.order_number order_number,
rn.num reservation_num,
rsln.num reservation_stock_listNum,
IFNULL(loadScan.loadedNum, 0) loaded_num,
IFNULL(loadscaninvn.loadedNum, 0) invn_loaded_num,
IFNULL(loadScan.exLoadedNum, 0) ex_loaded_num,
IFNULL(loadScan.reNum, 0) re_num,
IFNULL(loadscaninvn.reNum, 0) invn_re_num,
IFNULL(loadScan.exReNum, 0) ex_reNum,
ifnull(ds.dsNum, 0) ds_num,
ifnull(ds.ssNum, 0) ss_num,
ifnull(d.unloading_team_name, '') unloading_team_name
FROM logpm_distribution_delivery_list d
LEFT JOIN (SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE ldr.reservation_status != '40'
GROUP BY lds.delivery_id) rn ON rn.delivery_id = d.id
LEFT JOIN (
SELECT
lds.delivery_id,
COALESCE ( sum( ldr.reservation_stock_list_num ), 0 ) num
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
GROUP BY
lds.delivery_id
) rsln ON rsln.delivery_id = d.id
LEFT JOIN (SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_stock_list_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
GROUP BY lds.delivery_id) rsln ON rsln.delivery_id = d.id
left join (
select
t.delivery_id,SUM(t.loaded_nub) loadedNum,sum(t.received_quantity) reNum,sum(t.is_abnormal_loading) exLoadedNum,sum(t.is_abnormal_signing) exReNum
from logpm_distribution_loadscan t
group by t.delivery_id
) loadScan on loadScan.delivery_id = d.id
left join (select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum,
sum(t.is_abnormal_loading) exLoadedNum,
sum(t.is_abnormal_signing) exReNum
from logpm_distribution_loadscan t
group by t.delivery_id) loadScan on loadScan.delivery_id = d.id
left join (
select
t.delivery_id,SUM(t.loaded_nub) loadedNum,sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t
group by t.delivery_id
) loadscaninvn on loadscaninvn.delivery_id = d.id
left join (select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t
group by t.delivery_id) loadscaninvn on loadscaninvn.delivery_id = d.id
left join (
select
t.delivery_id,
SUM(CASE
WHEN t.driver_signing = 2 THEN
1
ELSE
0
END) dsNum,
SUM(CASE
WHEN t.signing_status = 2 THEN
1
ELSE
0
END) ssNum
from logpm_distribution_signfor t
group by t.delivery_id
) ds on ds.delivery_id = d.id) t
${ew.customSqlSegment}
left join (select t.delivery_id,
SUM(CASE
WHEN t.driver_signing = 2 THEN
1
ELSE
0
END) dsNum,
SUM(CASE
WHEN t.signing_status = 2 THEN
1
ELSE
0
END) ssNum
from logpm_distribution_signfor t
group by t.delivery_id) ds on ds.delivery_id = d.id) t
${ew.customSqlSegment}
</select>
<select id="getCustomerPage" resultType="com.logpm.report.vo.ReportCustomerVO">
select *
select train_number,
reservation_code,
stock_article_id,
task_time,
warehouse_name,
receiving_unit,
mall_name,
consignee,
delivery_phone,
delivery_address,
type,
kind,
vehicle_name,
driver_name,
distribution_company,
delivery_status,
order_number,
reservation_num,
reservation_stock_sist_num,
loaded_num,
invn_loaded_num,
ex_loaded_num,
re_num,
invn_re_num,
ex_re_num,
sjsigning_time,
signee_name,
signing_time,
examine_user_name
from (select lddl.train_number train_number,
obj.reservation_code reservation_code,
obj.stock_article_id stock_article_id,
@ -160,270 +196,344 @@
from logpm_distribution_reservation obj
left join logpm_distribution_signfor lds on lds.reservation_id = obj.id
left join logpm_distribution_delivery_list lddl on lds.delivery_id = lddl.id
LEFT JOIN (
SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE ldr.reservation_status != '40'
GROUP BY
lds.delivery_id
) rn ON rn.delivery_id = lddl.id
LEFT JOIN (SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
WHERE ldr.reservation_status != '40'
GROUP BY lds.delivery_id) rn ON rn.delivery_id = lddl.id
LEFT JOIN (
SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_stock_list_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
GROUP BY lds.delivery_id
) rsln ON rsln.delivery_id = lddl.id
LEFT JOIN (SELECT lds.delivery_id,
COALESCE(sum(ldr.reservation_stock_list_num), 0) num
FROM logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
GROUP BY lds.delivery_id) rsln ON rsln.delivery_id = lddl.id
left join (
select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum,
sum(t.is_abnormal_loading) exLoadedNum,
sum(t.is_abnormal_signing) exReNum
from logpm_distribution_loadscan t
group by t.delivery_id
) loadScan on loadScan.delivery_id = lddl.id
left join (select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum,
sum(t.is_abnormal_loading) exLoadedNum,
sum(t.is_abnormal_signing) exReNum
from logpm_distribution_loadscan t
group by t.delivery_id) loadScan on loadScan.delivery_id = lddl.id
left join (
select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t
group by t.delivery_id
) loadscaninvn on loadscaninvn.delivery_id = lddl.id
)t
${ew.customSqlSegment}
left join (select t.delivery_id,
SUM(t.loaded_nub) loadedNum,
sum(t.received_quantity) reNum
from logpm_distribution_loadscaninvn t
group by t.delivery_id) loadscaninvn on loadscaninvn.delivery_id = lddl.id) t
${ew.customSqlSegment}
</select>
<select id="getDetailsPage" resultType="com.logpm.report.vo.ReportDetailVO">
select *
select
id,
train_number,
reservation_code,
task_time,
warehouse_name,
type,
kind,
vehicle_name,
driver_name,
distribution_company,
dr_consignee,
delivery_phone,
delivery_address,
consignee,
consignee_name,
consignee_mobile,
waybill_no,
stock_article_id,
order_package_code,
customer_train,
conditions,
firsts,
decond,
third_product,
material_code,
material_name,
start_war,
start_war_in_time,
start_war_out_time,
warehouse_entry_time_end,
unload_time,
un_administrators_name,
sjsigning_time,
lds_signee_name,
signing_status,
signing_time,
examine_user_name,
abnormal_signing,
abnormal_loading,
auditing_status,
auditing_user,
auditing_time
from (
SELECT drp.reservation_id id,
lddl.train_number train_number,
obj.reservation_code reservation_code,
lddl.task_time task_time,
lddl.warehouse_name warehouse_name,
CASE
WHEN lddl.type = 1 THEN
'市配'
WHEN lddl.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN lddl.kind = 1 THEN
'自主配送'
WHEN lddl.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
lddl.vehicle_name vehicle_name,
lddl.driver_name driver_name,
lddl.distribution_company distribution_company,
obj.consignee dr_consignee,
obj.delivery_phone delivery_phone,
obj.delivery_address delivery_address,
wi.consignee,
wi.consignee_name consignee_name,
wi.consignee_mobile consignee_mobile,
wi.waybill_no waybill_no,
obj.stock_article_id stock_article_id,
dpl.order_package_code order_package_code,
wi.customer_train customer_train,
CASE
SELECT drp.reservation_id id,
lddl.train_number train_number,
obj.reservation_code reservation_code,
lddl.task_time task_time,
lddl.warehouse_name warehouse_name,
CASE
WHEN lddl.type = 1 THEN
'市配'
WHEN lddl.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN lddl.kind = 1 THEN
'自主配送'
WHEN lddl.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
lddl.vehicle_name vehicle_name,
lddl.driver_name driver_name,
lddl.distribution_company distribution_company,
obj.consignee dr_consignee,
obj.delivery_phone delivery_phone,
obj.delivery_address delivery_address,
wi.consignee,
wi.consignee_name consignee_name,
wi.consignee_mobile consignee_mobile,
wi.waybill_no waybill_no,
obj.stock_article_id stock_article_id,
dpl.order_package_code order_package_code,
wi.customer_train customer_train,
CASE
WHEN dpl.conditions = 1 THEN
'定制品'
WHEN dpl.conditions = 2 THEN
'库存品'
ELSE '零担'
END conditions,
dpl.firsts,
dpl.SECOND decond,
dpl.third_product third_product,
dpl.material_code material_code,
dpl.material_name material_name,
'' start_war,
'' start_war_in_time,
'' start_war_out_time,
dpl.warehouse_entry_time_end warehouse_entry_time_end,
ldl.unload_time unload_time,
ldl.un_administrators_name un_administrators_name,
WHEN dpl.conditions = 1 THEN
'定制品'
WHEN dpl.conditions = 2 THEN
'库存品'
ELSE '零担'
END conditions,
dpl.firsts,
dpl.SECOND decond,
dpl.third_product third_product,
dpl.material_code material_code,
dpl.material_name material_name,
'' start_war,
'' start_war_in_time,
'' start_war_out_time,
dpl.warehouse_entry_time_end warehouse_entry_time_end,
ldl.unload_time unload_time,
ldl.un_administrators_name un_administrators_name,
lds.sjsigning_time sjsigning_time,
lds.signee_name lds_signee_name,
CASE
lds.sjsigning_time sjsigning_time,
lds.signee_name lds_signee_name,
CASE
WHEN lds.signing_status = 1 THEN
'未签收'
WHEN lds.signing_status = 1 THEN
'签收'
ELSE ''
END signing_status,
lds.signing_time signing_time,
lds.examine_user_name examine_user_name,
CASE
WHEN lds.signing_status = 1 THEN
'未签收'
WHEN lds.signing_status = 1 THEN
'签收'
ELSE ''
END signing_status,
lds.signing_time signing_time,
lds.examine_user_name examine_user_name,
CASE
WHEN ldl.is_abnormal_signing = 1 THEN
'是'
ELSE '否'
END abnormal_signing,
CASE
WHEN ldl.is_abnormal_signing = 1 THEN
'是'
ELSE '否'
END abnormal_signing,
CASE
WHEN ldl.is_abnormal_loading = 1 THEN
'是'
ELSE '否'
END abnormal_loading,
CASE
WHEN ldl.is_abnormal_loading = 1 THEN
'是'
ELSE '否'
END abnormal_loading,
CASE
WHEN ldla.auditing_status = 3 THEN
'异常'
WHEN ldla.auditing_status = 1 THEN
'未审核'
WHEN ldla.auditing_status = 2 THEN
'已审核'
ELSE ''
END auditing_status,
ldla.auditing_user auditing_user,
ldla.auditing_time auditing_time
FROM logpm_distribution_reservation_package drp
LEFT JOIN logpm_distribution_parcel_list dpl
ON dpl.order_package_code = drp.packet_bar_code AND dpl.is_deleted = 0
left join logpm_distribution_reservation obj on drp.reservation_id = obj.id
LEFT JOIN logpm_distribution_signfor lds ON lds.reservation_id = drp.reservation_id
LEFT JOIN logpm_distribution_delivery_list lddl ON lds.delivery_id = lddl.id
LEFT JOIN logpm_warehouse_waybill wi ON wi.id = obj.waybill_id
LEFT JOIN logpm_distribution_loadscan ldl
ON ldl.order_package_code = dpl.order_package_code
AND ldl.type = 2
LEFT JOIN logpm_distribution_loadscan_abnormal ldla
ON ldla.package_code = dpl.order_package_code
) t
${ew.customSqlSegment}
<if test="ew!=null and ew.customSqlSegment !=null and ew.customSqlSegment!=''">
and
</if>
<if test="ew==null or ew.customSqlSegment ==null or ew.customSqlSegment==''">
where
</if>
EXISTS(
SELECT obj.id
FROM logpm_distribution_reservation obj
WHERE obj.id = t.id)
WHEN ldla.auditing_status = 3 THEN
'异常'
WHEN ldla.auditing_status = 1 THEN
'未审核'
WHEN ldla.auditing_status = 2 THEN
'已审核'
ELSE ''
END auditing_status,
ldla.auditing_user auditing_user,
ldla.auditing_time auditing_time
FROM logpm_distribution_reservation_package drp
LEFT JOIN logpm_distribution_parcel_list dpl
ON dpl.order_package_code = drp.packet_bar_code AND dpl.is_deleted = 0
left join logpm_distribution_reservation obj on drp.reservation_id = obj.id
LEFT JOIN logpm_distribution_signfor lds ON lds.reservation_id = drp.reservation_id
LEFT JOIN logpm_distribution_delivery_list lddl ON lds.delivery_id = lddl.id
LEFT JOIN logpm_warehouse_waybill wi ON wi.id = obj.waybill_id
LEFT JOIN logpm_distribution_loadscan ldl
ON ldl.order_package_code = dpl.order_package_code
AND ldl.type = 2
LEFT JOIN logpm_distribution_loadscan_abnormal ldla
ON ldla.package_code = dpl.order_package_code
) t
${ew.customSqlSegment}
<if test="ew!=null and ew.customSqlSegment !=null and ew.customSqlSegment!=''">
and
</if>
<if test="ew==null or ew.customSqlSegment ==null or ew.customSqlSegment==''">
where
</if>
EXISTS(
SELECT obj.id
FROM logpm_distribution_reservation obj
WHERE obj.id = t.id)
union all
select *
from (SELECT drp.reservation_id id,
lddl.train_number train_number,
obj.reservation_code reservation_code,
lddl.task_time task_time,
lddl.warehouse_name warehouse_name,
CASE
WHEN lddl.type = 1 THEN
'市配'
WHEN lddl.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN lddl.kind = 1 THEN
'自主配送'
WHEN lddl.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
lddl.vehicle_name vehicle_name,
lddl.driver_name driver_name,
lddl.distribution_company distribution_company,
obj.consignee dr_consignee,
obj.delivery_phone delivery_phone,
obj.delivery_address delivery_address,
wi.consignee,
wi.consignee_name consignee_name,
wi.consignee_mobile consignee_mobile,
wi.waybill_no waybill_no,
obj.stock_article_id stock_article_id,
dpl.order_package_code order_package_code,
wi.customer_train customer_train,
CASE
WHEN dpl.conditions = 1 THEN
'定制品'
WHEN dpl.conditions = 2 THEN
'库存品'
ELSE '零担'
END conditions,
dpl.firsts,
dpl.SECOND decond,
dpl.third_product third_product,
dpl.material_code material_code,
dpl.material_name material_name,
'' start_war,
'' start_war_in_time,
'' start_war_out_time,
dpl.warehouse_entry_time_end warehouse_entry_time_end,
ldl.unload_time unload_time,
ldl.un_administrators_name un_administrators_name,
lds.sjsigning_time sjsigning_time,
lds.signee_name lds_signee_name,
CASE
WHEN lds.signing_status = 1 THEN
'未签收'
WHEN lds.signing_status = 1 THEN
'签收'
ELSE ''
END signing_status,
lds.signing_time signing_time,
lds.examine_user_name examine_user_name,
CASE
WHEN ldl.is_abnormal_signing = 1 THEN
'是'
ELSE '否'
END abnormal_signing,
CASE
WHEN ldl.is_abnormal_loading = 1 THEN
'是'
ELSE '否'
END abnormal_loading,
CASE
WHEN ldla.auditing_status = 3 THEN
'异常'
WHEN ldla.auditing_status = 1 THEN
'未审核'
WHEN ldla.auditing_status = 2 THEN
'已审核'
ELSE ''
END auditing_status,
ldla.auditing_user auditing_user,
ldla.auditing_time auditing_time
FROM logpm_distribution_reservation_zero_package drp
LEFT JOIN logpm_distribution_parcel_list dpl
ON dpl.id = drp.parcel_list_id
left join logpm_distribution_reservation obj on drp.reservation_id = obj.id
LEFT JOIN logpm_distribution_signfor lds ON lds.reservation_id = drp.reservation_id
LEFT JOIN logpm_distribution_delivery_list lddl ON lds.delivery_id = lddl.id
LEFT JOIN logpm_warehouse_waybill wi ON wi.id = obj.waybill_id
LEFT JOIN logpm_distribution_loadscan ldl
ON ldl.order_package_code = dpl.order_package_code
AND ldl.type = 2
LEFT JOIN logpm_distribution_loadscan_abnormal ldla
ON ldla.package_code = dpl.order_package_code
) t
${ew.customSqlSegment}
<if test="ew!=null and ew.customSqlSegment !=null and ew.customSqlSegment!=''">
and
</if>
<if test="ew==null or ew.customSqlSegment ==null or ew.customSqlSegment==''">
where
</if>
EXISTS(
SELECT obj.id
FROM logpm_distribution_reservation obj
WHERE obj.id = t.id)
select
id,
train_number,
reservation_code,
task_time,
warehouse_name,
type,
kind,
vehicle_name,
driver_name,
distribution_company,
dr_consignee,
delivery_phone,
delivery_address,
consignee,
consignee_name,
consignee_mobile,
waybill_no,
stock_article_id,
order_package_code,
customer_train,
conditions,
firsts,
decond,
third_product,
material_code,
material_name,
start_war,
start_war_in_time,
start_war_out_time,
warehouse_entry_time_end,
unload_time,
un_administrators_name,
sjsigning_time,
lds_signee_name,
signing_status,
signing_time,
examine_user_name,
abnormal_signing,
abnormal_loading,
auditing_status,
auditing_user,
auditing_time
from (SELECT drp.reservation_id id,
lddl.train_number train_number,
obj.reservation_code reservation_code,
lddl.task_time task_time,
lddl.warehouse_name warehouse_name,
CASE
WHEN lddl.type = 1 THEN
'市配'
WHEN lddl.type = 2 THEN
'商配'
ELSE ''
END type,
CASE
WHEN lddl.kind = 1 THEN
'自主配送'
WHEN lddl.kind = 2 THEN
'自主配送'
ELSE ''
END kind,
lddl.vehicle_name vehicle_name,
lddl.driver_name driver_name,
lddl.distribution_company distribution_company,
obj.consignee dr_consignee,
obj.delivery_phone delivery_phone,
obj.delivery_address delivery_address,
wi.consignee,
wi.consignee_name consignee_name,
wi.consignee_mobile consignee_mobile,
wi.waybill_no waybill_no,
obj.stock_article_id stock_article_id,
dpl.order_package_code order_package_code,
wi.customer_train customer_train,
CASE
WHEN dpl.conditions = 1 THEN
'定制品'
WHEN dpl.conditions = 2 THEN
'库存品'
ELSE '零担'
END conditions,
dpl.firsts,
dpl.SECOND decond,
dpl.third_product third_product,
dpl.material_code material_code,
dpl.material_name material_name,
'' start_war,
'' start_war_in_time,
'' start_war_out_time,
dpl.warehouse_entry_time_end warehouse_entry_time_end,
ldl.unload_time unload_time,
ldl.un_administrators_name un_administrators_name,
lds.sjsigning_time sjsigning_time,
lds.signee_name lds_signee_name,
CASE
WHEN lds.signing_status = 1 THEN
'未签收'
WHEN lds.signing_status = 1 THEN
'签收'
ELSE ''
END signing_status,
lds.signing_time signing_time,
lds.examine_user_name examine_user_name,
CASE
WHEN ldl.is_abnormal_signing = 1 THEN
'是'
ELSE '否'
END abnormal_signing,
CASE
WHEN ldl.is_abnormal_loading = 1 THEN
'是'
ELSE '否'
END abnormal_loading,
CASE
WHEN ldla.auditing_status = 3 THEN
'异常'
WHEN ldla.auditing_status = 1 THEN
'未审核'
WHEN ldla.auditing_status = 2 THEN
'已审核'
ELSE ''
END auditing_status,
ldla.auditing_user auditing_user,
ldla.auditing_time auditing_time
FROM logpm_distribution_reservation_zero_package drp
LEFT JOIN logpm_distribution_parcel_list dpl
ON dpl.id = drp.parcel_list_id
left join logpm_distribution_reservation obj on drp.reservation_id = obj.id
LEFT JOIN logpm_distribution_signfor lds ON lds.reservation_id = drp.reservation_id
LEFT JOIN logpm_distribution_delivery_list lddl ON lds.delivery_id = lddl.id
LEFT JOIN logpm_warehouse_waybill wi ON wi.id = obj.waybill_id
LEFT JOIN logpm_distribution_loadscan ldl
ON ldl.order_package_code = dpl.order_package_code
AND ldl.type = 2
LEFT JOIN logpm_distribution_loadscan_abnormal ldla
ON ldla.package_code = dpl.order_package_code
) t
${ew.customSqlSegment}
<if test="ew!=null and ew.customSqlSegment !=null and ew.customSqlSegment!=''">
and
</if>
<if test="ew==null or ew.customSqlSegment ==null or ew.customSqlSegment==''">
where
</if>
EXISTS(
SELECT obj.id
FROM logpm_distribution_reservation obj
WHERE obj.id = t.id)
</select>
</mapper>

9
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportStockMapeer.java

@ -1,9 +1,10 @@
package com.logpm.report.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.vo.ReportInStockVO;
import com.logpm.report.vo.ReportOutStockVO;
import com.logpm.report.vo.StockDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -17,8 +18,10 @@ import java.util.List;
@Mapper
public interface ReportStockMapeer extends BaseMapper {
List<StockDetailsVO> getDetailPage(IPage<StockDetailsVO> page,@Param("ew") QueryWrapper<StockDetailsVO> queryWrapper);
List<StockDetailsVO> getDetailPage(IPage<StockDetailsVO> page, @Param("ew") Wrapper<StockDetailsVO> queryWrapper);
List<ReportInStockVO> getInStocks(IPage<ReportInStockVO> page,@Param("ew") QueryWrapper<ReportInStockVO> queryWrapper);
List<ReportInStockVO> getInStocks(IPage<ReportInStockVO> page, @Param("ew") Wrapper<ReportInStockVO> queryWrapper);
List<ReportOutStockVO> getOutStocks(IPage<ReportOutStockVO> page, @Param("ew") Wrapper<ReportOutStockVO> queryWrapper);
}

44
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportStockMapper.xml

@ -57,14 +57,56 @@
t.warehousing_time,
t.despatch,
t.order_code,
'' package_code,
dpl.order_package_code package_code,
t.quantity_stock,
lwug.allocation_title
from logpm_distribution_stock_list t
left join logpm_distribution_stock_list_info dsli on dsli.stock_list_id = t.id and dsli.is_deleted = 0 and dsli.parcel_list_id is not null
left join logpm_distribution_parcel_list dpl on dpl.id = dsli.parcel_list_id
left join (select group_concat(t.allocation_title) allocation_title, t.association_value
from logpm_warehouse_updown_goods t
where t.association_type = 4
group by t.association_value) lwug on lwug.association_value = t.cargo_number
) t ${ew.customSqlSegment}
</select>
<select id="getOutStocks" resultType="com.logpm.report.vo.ReportOutStockVO">
select goods_allocation_name,
stock_quantity,
coding,
warehouse_name,
market_name,
cargo_number,
material_name,
create_time,
out_type,
note_number,
train_number,
reservation_code,
client_name
from (SELECT b.goods_allocation_name -- 货位
, a.stock_quantity -- 数量
, a.coding -- 包条码
, w.name as warehouse_name -- 仓库
, c.market_name -- 商场
, c.cargo_number -- 物料编码
, m.name as material_name -- 物料名称
, a.create_time -- 时间
, a.conditions as out_type -- 出库类型
, e.note_number -- 配送单号
, e.train_number -- 车次号
, a.reservation_code -- 预约单号
, r.consignee as client_name -- 收货人(客户名称)
FROM logpm_distribution_stock a
INNER JOIN logpm_warehouse_goods_allocation b ON a.allocation_id = b.id AND b.is_deleted = 0
INNER JOIN logpm_warehouse_warehouse w ON w.id = b.warehouse_id AND w.is_deleted = 0
INNER JOIN logpm_distribution_stock_list_info c
ON c.package_code = a.coding AND c.is_deleted = 0
INNER JOIN logpm_basicdata_material m ON m.id = c.material_id AND c.is_deleted = 0
INNER JOIN logpm_distribution_signfor d
ON d.reservation_id = a.reservation_id AND a.outbound_type IN (1, 2) AND
d.is_deleted = 0
INNER JOIN logpm_distribution_delivery_list e ON e.id = d.delivery_id AND e.is_deleted = 0
INNER JOIN logpm_distribution_reservation r ON r.id = d.reservation_id AND r.is_deleted = 0
) t ${ew.customSqlSegment}
</select>
</mapper>

38
blade-service/logpm-report/src/main/java/com/logpm/report/query/BillDetailsQuery.java

@ -0,0 +1,38 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 自提明细报表 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "自提明细报表查询对象", description = "自提明细报表查询对象")
@Data
public class BillDetailsQuery extends Query {
@ApiModelProperty(value = "提货扫描时间(范围)", position = 2)
private Date startScanTime;
@ApiModelProperty(value = "提货扫描时间(范围)", position = 3)
private Date endScanTime;
@ApiModelProperty(value = "仓库(范围)", position = 5)
private String warehouseRange;
@ApiModelProperty(value = "收货单位(范围)", position = 7)
private String consigneeUnitRange;
@ApiModelProperty(value = "订单自编号(范围)", position = 9)
private String orderCodeRange;
@ApiModelProperty(value = "文员复核人(范围)", position = 11)
private String examineUserRange;
}

38
blade-service/logpm-report/src/main/java/com/logpm/report/query/BillLoadingTasksQuery.java

@ -0,0 +1,38 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 自提任务维度报表 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "自提任务维度报表查询对象", description = "自提任务维度报表查询对象")
@Data
public class BillLoadingTasksQuery extends Query {
@ApiModelProperty(value = "仓库(范围)", position = 3)
private String warehouseRange;
@ApiModelProperty(value = "收货单位(范围)", position = 5)
private String consigneeUnitRange;
@ApiModelProperty(value = "收货人(范围)", position = 7)
private String consigneeUserRange;
@ApiModelProperty(value = "提货人(范围)", position = 9)
private String billUserRange;
@ApiModelProperty(value = "提货时间开始(范围)", position = 13)
private Date startCreatedTime;
@ApiModelProperty(value = "提货时间结束(范围)", position = 14)
private Date endCreatedTime;
}

47
blade-service/logpm-report/src/main/java/com/logpm/report/query/DevilerDetailsQuery.java

@ -0,0 +1,47 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 配送明细报表查询对象 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "配送明细报表查询对象", description = "配送明细报表查询对象")
@Data
public class DevilerDetailsQuery extends Query {
@ApiModelProperty(value = "配送日期开始(范围)", position = 2)
private Date startTaskTime;
@ApiModelProperty(value = "配送日期结束(范围)", position = 3)
private Date endTaskTime;
@ApiModelProperty(value = "仓库(范围)", position = 5)
private String warehouseNameRange;
@ApiModelProperty(value = "配送类型(范围)", position = 7)
private String typeRange;
@ApiModelProperty(value = "配送种类(范围)", position = 9)
private String kindRange;
@ApiModelProperty(value = "配送车辆(范围)", position = 11)
private String vehicleNameRange;
@ApiModelProperty(value = "配送司机(范围)", position = 13)
private String driverNameRange;
@ApiModelProperty(value = "客户名称(范围)", position = 15)
private String consigneeRange;
@ApiModelProperty(value = "运单收货人", position = 17)
private String consigneeNameRange;
}

44
blade-service/logpm-report/src/main/java/com/logpm/report/query/ReportCustomerQuery.java

@ -0,0 +1,44 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 配送客户维度报表查询对象 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "配送客户维度报表查询对象", description = "配送客户维度报表查询对象")
@Data
public class ReportCustomerQuery extends Query {
@ApiModelProperty(value = "配送日期开始(范围)", position = 2)
private Date startTaskTime;
@ApiModelProperty(value = "配送日期结束(范围)", position = 3)
private Date endTaskTime;
@ApiModelProperty(value = "仓库(范围)", position = 5)
private String warehouseNameRange;
@ApiModelProperty(value = "客户名称(范围)", position = 7)
private String consigneeRange;
@ApiModelProperty(value = "配送类型(范围)", position = 9)
private String typeRange;
@ApiModelProperty(value = "配送种类(范围)", position = 11)
private String kindRange;
@ApiModelProperty(value = "配送车辆(范围)", position = 13)
private String vehicleNameRange;
@ApiModelProperty(value = "配送司机(范围)", position = 15)
private String driverNameRange;
}

41
blade-service/logpm-report/src/main/java/com/logpm/report/query/ReportDevilerQuery.java

@ -0,0 +1,41 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 配送车次报表查询对象 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "配送车次报表查询对象", description = "配送车次报表查询对象")
@Data
public class ReportDevilerQuery extends Query {
@ApiModelProperty(value = "配送日期开始(范围)", position = 2)
private Date startTaskTime;
@ApiModelProperty(value = "配送日期结束(范围)", position = 3)
private Date endTaskTime;
@ApiModelProperty(value = "仓库(范围)", position = 6)
private String warehouseNameRange;
@ApiModelProperty(value = "配送类型(范围)", position = 8)
private String typeRange;
@ApiModelProperty(value = "配送种类(范围)", position = 10)
private String kindRange;
@ApiModelProperty(value = "配送车辆(范围)", position = 12)
private String vehicleNameRange;
@ApiModelProperty(value = "配送司机(范围)", position = 14)
private String driverNameRange;
}

33
blade-service/logpm-report/src/main/java/com/logpm/report/query/StockDetailsQuery.java

@ -0,0 +1,33 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
/**
* 库存品报表 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "库存品报表查询对象", description = "库存品报表查询对象")
@Data
public class StockDetailsQuery extends Query {
@ApiModelProperty(value = "仓库(范围)", position = 3)
private String warehouseNameRange;
@ApiModelProperty(value = "商场名称(范围)", position = 5)
private String marketNameRange;
@ApiModelProperty(value = "类型(范围)", position = 7)
private String serviceTypeRange;
@ApiModelProperty(value = "物料编码(范围)", position = 9)
private String cargoNumberRange;
@ApiModelProperty(value = "物料名称(范围)", position = 11)
private String descriptionGoodsRange;
}

47
blade-service/logpm-report/src/main/java/com/logpm/report/query/StockInQuery.java

@ -0,0 +1,47 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 库存入库报表 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "库存入库报表查询对象", description = "库存入库报表查询对象")
@Data
public class StockInQuery extends Query {
@ApiModelProperty(value = "仓库(范围)", position = 3)
private String warehouseNameRange;
@ApiModelProperty(value = "商场名称(范围)", position = 5)
private String marketNameRange;
@ApiModelProperty(value = "类型(范围)", position = 7)
private String serviceTypeRange;
@ApiModelProperty(value = "物料编码(范围)", position = 9)
private String cargoNumberRange;
@ApiModelProperty(value = "物料名称(范围)", position = 11)
private String descriptionGoodsRange;
@ApiModelProperty(value = "入库时间开始(范围)", position = 13)
private Date startWarehousingTime;
@ApiModelProperty(value = "入库时间结束(范围)", position = 14)
private Date endWarehousingTime;
@ApiModelProperty(value = "订单自编码(范围)", position = 17)
private String orderCodeRange;
@ApiModelProperty(value = "包条码(范围)", position = 19)
private String packageCodeRange;
}

41
blade-service/logpm-report/src/main/java/com/logpm/report/query/StockOutQuery.java

@ -0,0 +1,41 @@
package com.logpm.report.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.mp.support.Query;
import java.util.Date;
/**
* 库存出库报表 query
*
* @author zhaoqiaobo
* @create 2024-03-13 14:21
*/
@ApiModel(value = "库存出库报表查询对象", description = "库存出库报表查询对象")
@Data
public class StockOutQuery extends Query {
@ApiModelProperty(value = "仓库(范围)", position = 3)
private String warehouseNameRange;
@ApiModelProperty(value = "商场名称(范围)", position = 5)
private String marketNameRange;
@ApiModelProperty(value = "出库类型(范围)", position = 7)
private String outTypeRange;
@ApiModelProperty(value = "物料编码(范围)", position = 9)
private String cargoNumberRange;
@ApiModelProperty(value = "物料名称(范围)", position = 11)
private String materialNameRange;
@ApiModelProperty(value = "出库时间开始(范围)", position = 13)
private Date startCreateTime;
@ApiModelProperty(value = "出库时间结束(范围)", position = 14)
private Date endCreateTime;
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/BillLoadingDetailsReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportBillLoadingMapper;
import com.logpm.report.service.ExportReaderService;
@ -21,14 +21,14 @@ public class BillLoadingDetailsReader implements ExportReaderService {
private ReportBillLoadingMapper billLoadingMapper;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
billLoadingMapper.getDetailsPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return billLoadingMapper.getDetailsPage(page, query);
}

35
blade-service/logpm-report/src/main/java/com/logpm/report/reader/BillLoadingTasksReader.java

@ -0,0 +1,35 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportBillLoadingMapper;
import com.logpm.report.service.ExportReaderService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
* @author zhaoqiaobo
* @create 2024-03-08 9:50
*/
@Component
public class BillLoadingTasksReader implements ExportReaderService {
@Resource
private ReportBillLoadingMapper billLoadingMapper;
@Override
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
billLoadingMapper.getTasksPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, Wrapper query) {
return billLoadingMapper.getTasksPage(page, query);
}
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryCustomerReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportDeliverMapeer;
import com.logpm.report.service.ExportReaderService;
@ -22,14 +22,14 @@ public class DeliveryCustomerReader implements ExportReaderService {
private ReportDeliverMapeer reportDeliverMapeer;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportDeliverMapeer.getCustomerPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return reportDeliverMapeer.getCustomerPage(page,query);
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryDetailReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportDeliverMapeer;
import com.logpm.report.service.ExportReaderService;
@ -22,14 +22,14 @@ public class DeliveryDetailReader implements ExportReaderService {
private ReportDeliverMapeer reportDeliverMapeer;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportDeliverMapeer.getDetailsPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return reportDeliverMapeer.getDetailsPage(page,query);
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryInStocksReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportStockMapeer;
import com.logpm.report.service.ExportReaderService;
@ -22,14 +22,14 @@ public class DeliveryInStocksReader implements ExportReaderService {
private ReportStockMapeer reportStockMapeer;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportStockMapeer.getInStocks(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return reportStockMapeer.getInStocks(page,query);
}

36
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryOutStocksReader.java

@ -0,0 +1,36 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportStockMapeer;
import com.logpm.report.service.ExportReaderService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
*
* @author zhaoqiaobo
* @create 2024-03-08 9:50
*/
@Component
public class DeliveryOutStocksReader implements ExportReaderService {
@Resource
private ReportStockMapeer reportStockMapeer;
@Override
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportStockMapeer.getOutStocks(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, Wrapper query) {
return reportStockMapeer.getOutStocks(page,query);
}
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryStockReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportStockMapeer;
import com.logpm.report.service.ExportReaderService;
@ -22,14 +22,14 @@ public class DeliveryStockReader implements ExportReaderService {
private ReportStockMapeer reportStockMapeer;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportStockMapeer.getDetailPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return reportStockMapeer.getDetailPage(page,query);
}

6
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryTrainReader.java

@ -1,6 +1,6 @@
package com.logpm.report.reader;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.mapper.ReportDeliverMapeer;
import com.logpm.report.service.ExportReaderService;
@ -22,14 +22,14 @@ public class DeliveryTrainReader implements ExportReaderService {
private ReportDeliverMapeer reportDeliverMapeer;
@Override
public Long getCount(QueryWrapper query) {
public Long getCount(Wrapper query) {
Page page = new Page(1, 1);
reportDeliverMapeer.getDeliveryTrainPage(page, query);
return page.getTotal();
}
@Override
public List<T> findList(Page page, QueryWrapper query) {
public List<T> findList(Page page, Wrapper query) {
return reportDeliverMapeer.getDeliveryTrainPage(page,query);
}

11
blade-service/logpm-report/src/main/java/com/logpm/report/service/ExportReaderService.java

@ -1,6 +1,6 @@
package com.logpm.report.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.poi.ss.formula.functions.T;
@ -8,6 +8,7 @@ import java.util.List;
/**
* 导出数据读取器接口
*
* @author zhaoqiaobo
* @create 2024-03-07 18:14
*/
@ -15,17 +16,19 @@ public interface ExportReaderService {
/**
* 导出的总条数
*
* @param query 分页查询对象
* @return
*/
Long getCount(QueryWrapper query);
Long getCount(Wrapper query);
/**
* 导出数据的分页查询
* @param page 分页对象
*
* @param page 分页对象
* @param query 分页查询对象
* @return
*/
List<T> findList(Page page, QueryWrapper query);
List<T> findList(Page page, Wrapper query);
}

20
blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportBillLoadingAsyncService.java

@ -1,25 +1,21 @@
package com.logpm.report.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.query.BillDetailsQuery;
import com.logpm.report.query.BillLoadingTasksQuery;
import com.logpm.report.vo.BillLoadingDetailsVO;
import org.springblade.core.mp.support.Query;
import com.logpm.report.vo.BillLoadingTasksVO;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
public interface IReportBillLoadingAsyncService {
/**
* 导出自提单报表
* @param param
* @return
*/
List<BillLoadingReportExcel> exportBillLoading(Map<String, Object> param);
IPage<BillLoadingDetailsVO> detailsPage(BillLoadingDetailsVO vo, BillDetailsQuery query);
IPage<BillLoadingDetailsVO> detailsPage(BillLoadingDetailsVO vo, Query query);
void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo, BillDetailsQuery query);
void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo);
IPage<BillLoadingTasksVO> tasksPage(BillLoadingTasksVO vo, BillLoadingTasksQuery query);
void exportTasks(HttpServletResponse response, BillLoadingTasksVO vo, BillLoadingTasksQuery query);
}

17
blade-service/logpm-report/src/main/java/com/logpm/report/service/ReportDeliverService.java

@ -1,13 +1,14 @@
package com.logpm.report.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.query.DevilerDetailsQuery;
import com.logpm.report.query.ReportCustomerQuery;
import com.logpm.report.query.ReportDevilerQuery;
import com.logpm.report.vo.ReportCustomerVO;
import com.logpm.report.vo.ReportDetailVO;
import com.logpm.report.vo.ReportDevilerVO;
import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author zhaoqiaobo
@ -15,15 +16,15 @@ import java.io.IOException;
*/
public interface ReportDeliverService {
IPage<ReportDevilerVO> deliveryTrainPage(ReportDevilerVO vo, Query query);
IPage<ReportDevilerVO> deliveryTrainPage(ReportDevilerVO vo, ReportDevilerQuery query);
void exportTrain(HttpServletResponse response, ReportDevilerVO vo) throws InterruptedException, IOException;
void exportTrain(HttpServletResponse response, ReportDevilerVO vo, ReportDevilerQuery query);
IPage<ReportCustomerVO> customerPage(ReportCustomerVO vo, Query query);
IPage<ReportCustomerVO> customerPage(ReportCustomerVO vo, ReportCustomerQuery query);
void exportCustomer(HttpServletResponse response, ReportCustomerVO vo) throws InterruptedException, IOException;
void exportCustomer(HttpServletResponse response, ReportCustomerVO vo, ReportCustomerQuery query);
IPage<ReportDetailVO> detailsPage(ReportDetailVO vo, Query query);
IPage<ReportDetailVO> detailsPage(ReportDetailVO vo, DevilerDetailsQuery query);
void exportDetails(HttpServletResponse response, ReportDetailVO vo) throws InterruptedException, IOException;
void exportDetails(HttpServletResponse response, ReportDetailVO vo, DevilerDetailsQuery query);
}

18
blade-service/logpm-report/src/main/java/com/logpm/report/service/ReportStockService.java

@ -1,12 +1,14 @@
package com.logpm.report.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.query.StockDetailsQuery;
import com.logpm.report.query.StockInQuery;
import com.logpm.report.query.StockOutQuery;
import com.logpm.report.vo.ReportInStockVO;
import com.logpm.report.vo.ReportOutStockVO;
import com.logpm.report.vo.StockDetailsVO;
import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author zhaoqiaobo
@ -14,11 +16,15 @@ import java.io.IOException;
*/
public interface ReportStockService {
IPage<StockDetailsVO> detailsPage(StockDetailsVO vo, Query query);
IPage<StockDetailsVO> detailsPage(StockDetailsVO vo, StockDetailsQuery query);
void exportDetails(HttpServletResponse response, StockDetailsVO vo) throws InterruptedException, IOException;
void exportDetails(HttpServletResponse response, StockDetailsVO vo, StockDetailsQuery query);
IPage<ReportInStockVO> inStocks(ReportInStockVO vo, Query query);
IPage<ReportInStockVO> inStocks(ReportInStockVO vo, StockInQuery query);
void exportInStocks(HttpServletResponse response, ReportInStockVO vo) throws InterruptedException, IOException;
void exportInStocks(HttpServletResponse response, ReportInStockVO vo, StockInQuery query);
IPage<ReportOutStockVO> outStocks(ReportOutStockVO vo, StockOutQuery query);
void exportOutStocks(HttpServletResponse response, ReportOutStockVO vo, StockOutQuery query);
}

77
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportBillLoadingAsyncService.java

@ -1,26 +1,27 @@
package com.logpm.report.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.excel.BillLoadingReportExcel;
import com.logpm.report.mapper.ReportBillLoadingMapper;
import com.logpm.report.query.BillDetailsQuery;
import com.logpm.report.query.BillLoadingTasksQuery;
import com.logpm.report.reader.BillLoadingDetailsReader;
import com.logpm.report.reader.BillLoadingTasksReader;
import com.logpm.report.service.IReportBillLoadingAsyncService;
import com.logpm.report.util.QueryUtil;
import com.logpm.report.util.ReportExcelUtil;
import com.logpm.report.vo.BillLoadingDetailsVO;
import com.logpm.report.vo.BillLoadingTasksVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IUserClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
@ -38,26 +39,45 @@ public class ReportBillLoadingAsyncService implements IReportBillLoadingAsyncSer
private ReportBillLoadingMapper reportBillLoadingMapper;
private final BillLoadingDetailsReader billLoadingDetailsReader;
private final BillLoadingTasksReader billLoadingTasksReader;
private final IUserClient userClient;
/**
* @param param
* @return
*/
@Override
@Async
public List<BillLoadingReportExcel> exportBillLoading(Map<String, Object> param) {
List<BillLoadingReportExcel> list = reportBillLoadingMapper.exportBillLoading(param);
log.info("导出数据条数:{}", list.size());
list.stream().forEach(l -> l.setAmountToFee(l.getForkliftFee() + l.getAddValueFee() + l.getStorageFee() + l.getCollectPaymentFee() + l.getTransportFee()));
return list;
public IPage<BillLoadingTasksVO> tasksPage(BillLoadingTasksVO vo, BillLoadingTasksQuery query) {
IPage<BillLoadingTasksVO> page = Condition.getPage(query);
QueryWrapper<BillLoadingTasksVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, BillLoadingTasksVO.class);
tasksCustomQuery(query, queryWrapper);
List<BillLoadingTasksVO> detailsPage = reportBillLoadingMapper.getTasksPage(page, queryWrapper);
return page.setRecords(detailsPage);
}
private void tasksCustomQuery(BillLoadingTasksQuery query, QueryWrapper<BillLoadingTasksVO> queryWrapper) {
// 仓库
QueryUtil.splitEqQuery("warehouse", query.getWarehouseRange(), queryWrapper);
// 收货单位
QueryUtil.splitEqQuery("consignee_unit", query.getConsigneeUnitRange(), queryWrapper);
// 收货人
QueryUtil.splitEqQuery("consignee_user", query.getConsigneeUserRange(), queryWrapper);
// 提货人
QueryUtil.splitEqQuery("bill_user", query.getBillUserRange(), queryWrapper);
// 提货时间
QueryUtil.timeGe("create_time", query.getStartCreatedTime(), queryWrapper);
QueryUtil.timeLe("create_time", query.getEndCreatedTime(), queryWrapper);
}
@Override
public void exportTasks(HttpServletResponse response, BillLoadingTasksVO vo, BillLoadingTasksQuery query) {
QueryWrapper<BillLoadingTasksVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, BillLoadingTasksVO.class);
tasksCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, billLoadingTasksReader, BillLoadingTasksVO.class, queryWrapper, "自提任务维度报表");
}
@Override
public IPage<BillLoadingDetailsVO> detailsPage(BillLoadingDetailsVO vo, Query query) {
public IPage<BillLoadingDetailsVO> detailsPage(BillLoadingDetailsVO vo, BillDetailsQuery query) {
IPage<BillLoadingDetailsVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<BillLoadingDetailsVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, BillLoadingDetailsVO.class);
QueryWrapper<BillLoadingDetailsVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, BillLoadingDetailsVO.class);
// 自定义查询
detailsCustomQuery(query, queryWrapper);
List<BillLoadingDetailsVO> detailsPage = reportBillLoadingMapper.getDetailsPage(page, queryWrapper);
if (CollUtil.isNotEmpty(detailsPage)) {
// 组装数据批量去查询用户名称
@ -71,7 +91,7 @@ public class ReportBillLoadingAsyncService implements IReportBillLoadingAsyncSer
}
}
R<List<User>> listR = userClient.userInfoByIds(AuthUtil.getTenantId(), CollUtil.join(userIds, ","));
if(ObjectUtil.equal(200,listR.getCode())){
if (ObjectUtil.equal(200, listR.getCode())) {
List<User> data = listR.getData();
Map<Long, String> collect = data.stream().collect(Collectors.toMap(User::getId, User::getName));
for (BillLoadingDetailsVO detailsVO : detailsPage) {
@ -84,10 +104,25 @@ public class ReportBillLoadingAsyncService implements IReportBillLoadingAsyncSer
return page.setRecords(detailsPage);
}
private void detailsCustomQuery(BillDetailsQuery query, QueryWrapper<BillLoadingDetailsVO> queryWrapper) {
// 提货扫描时间开始
QueryUtil.timeGe("scan_time", query.getStartScanTime(), queryWrapper);
// 提货扫描时间结束
QueryUtil.timeLe("scan_time", query.getEndScanTime(), queryWrapper);
// 仓库
QueryUtil.splitEqQuery("warehouse", query.getWarehouseRange(), queryWrapper);
// 收货单位
QueryUtil.splitEqQuery("consignee_unit", query.getConsigneeUnitRange(), queryWrapper);
// 订单自编号
QueryUtil.splitEqQuery("order_code", query.getOrderCodeRange(), queryWrapper);
// 文员复核人
QueryUtil.splitEqQuery("examine_user", query.getExamineUserRange(), queryWrapper);
}
@Override
public void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo) {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<BillLoadingDetailsVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, BillLoadingDetailsVO.class);
public void exportDetails(HttpServletResponse response, BillLoadingDetailsVO vo, BillDetailsQuery query) {
QueryWrapper<BillLoadingDetailsVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, BillLoadingDetailsVO.class);
detailsCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, billLoadingDetailsReader, BillLoadingDetailsVO.class, queryWrapper, "自提明细");
}
}

104
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

@ -1,25 +1,25 @@
package com.logpm.report.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.mapper.ReportDeliverMapeer;
import com.logpm.report.query.DevilerDetailsQuery;
import com.logpm.report.query.ReportCustomerQuery;
import com.logpm.report.query.ReportDevilerQuery;
import com.logpm.report.reader.DeliveryCustomerReader;
import com.logpm.report.reader.DeliveryDetailReader;
import com.logpm.report.reader.DeliveryTrainReader;
import com.logpm.report.service.ReportDeliverService;
import com.logpm.report.util.QueryUtil;
import com.logpm.report.util.ReportExcelUtil;
import com.logpm.report.vo.ReportCustomerVO;
import com.logpm.report.vo.ReportDetailVO;
import com.logpm.report.vo.ReportDevilerVO;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
/**
* @author zhaoqiaobo
@ -35,47 +35,107 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
private final DeliveryDetailReader deliveryDetailReader;
@Override
public IPage<ReportDevilerVO> deliveryTrainPage(ReportDevilerVO vo, Query query) {
public IPage<ReportDevilerVO> deliveryTrainPage(ReportDevilerVO vo, ReportDevilerQuery query) {
IPage<ReportDevilerVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportDevilerVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportDevilerVO.class);
QueryWrapper<ReportDevilerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDevilerVO.class);
// 自定义 sql 查询条件
trainCustomQuery(query, queryWrapper);
return page.setRecords(reportDeliverMapeer.getDeliveryTrainPage(page, queryWrapper));
}
private void trainCustomQuery(ReportDevilerQuery query, QueryWrapper<ReportDevilerVO> queryWrapper) {
// 配送时间开始
QueryUtil.timeGe("task_time", query.getStartTaskTime(), queryWrapper);
// 配送时间结束
QueryUtil.timeLe("task_time", query.getEndTaskTime(), queryWrapper);
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 配送类型
QueryUtil.splitEqQuery("type", query.getTypeRange(), queryWrapper);
// 配送种类
QueryUtil.splitEqQuery("kind", query.getKindRange(), queryWrapper);
// 配送车辆
QueryUtil.splitEqQuery("vehicle_name", query.getVehicleNameRange(), queryWrapper);
// 配送司机
QueryUtil.splitEqQuery("driver_name", query.getDriverNameRange(), queryWrapper);
}
@Override
public void exportTrain(HttpServletResponse response,ReportDevilerVO vo) throws InterruptedException, IOException {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportDevilerVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportDevilerVO.class);
public void exportTrain(HttpServletResponse response, ReportDevilerVO vo, ReportDevilerQuery query) {
QueryWrapper<ReportDevilerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDevilerVO.class);
trainCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, deliveryTrainReader, ReportDevilerVO.class, queryWrapper, "配送车次维度报表");
}
@Override
public IPage<ReportCustomerVO> customerPage(ReportCustomerVO vo, Query query) {
public IPage<ReportCustomerVO> customerPage(ReportCustomerVO vo, ReportCustomerQuery query) {
// 构建前端查询参数
IPage<ReportCustomerVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportCustomerVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportCustomerVO.class);
QueryWrapper<ReportCustomerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportCustomerVO.class);
// 自定义查询
customerCustomQuery(query, queryWrapper);
return page.setRecords(reportDeliverMapeer.getCustomerPage(page, queryWrapper));
}
private void customerCustomQuery(ReportCustomerQuery query, QueryWrapper<ReportCustomerVO> queryWrapper) {
// 配送时间开始
QueryUtil.timeGe("task_time", query.getStartTaskTime(), queryWrapper);
// 配送时间结束
QueryUtil.timeLe("task_time", query.getEndTaskTime(), queryWrapper);
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 客户名称
QueryUtil.splitEqQuery("consignee", query.getConsigneeRange(), queryWrapper);
// 配送类型
QueryUtil.splitEqQuery("type", query.getTypeRange(), queryWrapper);
// 配送种类
QueryUtil.splitEqQuery("kind", query.getKindRange(), queryWrapper);
// 配送车辆
QueryUtil.splitEqQuery("vehicle_name", query.getVehicleNameRange(), queryWrapper);
// 配送司机
QueryUtil.splitEqQuery("driver_name", query.getDriverNameRange(), queryWrapper);
}
@Override
public void exportCustomer(HttpServletResponse response, ReportCustomerVO vo) throws InterruptedException, IOException {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportDevilerVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportDevilerVO.class);
public void exportCustomer(HttpServletResponse response, ReportCustomerVO vo, ReportCustomerQuery query) {
QueryWrapper<ReportCustomerVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportCustomerVO.class);
customerCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, deliveryCustomerReader, ReportCustomerVO.class, queryWrapper, "配送客户维度报表");
}
@Override
public IPage<ReportDetailVO> detailsPage(ReportDetailVO vo,Query query) {
public IPage<ReportDetailVO> detailsPage(ReportDetailVO vo, DevilerDetailsQuery query) {
IPage<ReportDetailVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportDetailVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportDetailVO.class);
QueryWrapper<ReportDetailVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDetailVO.class);
detailsCustomQuery(query, queryWrapper);
return page.setRecords(reportDeliverMapeer.getDetailsPage(page, queryWrapper));
}
private void detailsCustomQuery(DevilerDetailsQuery query, QueryWrapper<ReportDetailVO> queryWrapper) {
// 配送时间开始
QueryUtil.timeGe("task_time", query.getStartTaskTime(), queryWrapper);
// 配送时间结束
QueryUtil.timeLe("task_time", query.getEndTaskTime(), queryWrapper);
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 配送类型
QueryUtil.splitEqQuery("type", query.getTypeRange(), queryWrapper);
// 配送种类
QueryUtil.splitEqQuery("kind", query.getKindRange(), queryWrapper);
// 配送车辆
QueryUtil.splitEqQuery("vehicle_name", query.getVehicleNameRange(), queryWrapper);
// 配送司机
QueryUtil.splitEqQuery("driver_name", query.getDriverNameRange(), queryWrapper);
// 客户名称
QueryUtil.splitEqQuery("dr_consignee", query.getConsigneeRange(), queryWrapper);
// 运单收货人
QueryUtil.splitEqQuery("consignee_name", query.getConsigneeNameRange(), queryWrapper);
}
@Override
public void exportDetails(HttpServletResponse response, ReportDetailVO vo) throws InterruptedException, IOException {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportDetailVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportDetailVO.class);
public void exportDetails(HttpServletResponse response, ReportDetailVO vo, DevilerDetailsQuery query) {
QueryWrapper<ReportDetailVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportDetailVO.class);
detailsCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, deliveryDetailReader, ReportDetailVO.class, queryWrapper, "配送明细报表");
}

99
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportStockServiceImpl.java

@ -1,23 +1,25 @@
package com.logpm.report.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.mapper.ReportStockMapeer;
import com.logpm.report.query.StockDetailsQuery;
import com.logpm.report.query.StockInQuery;
import com.logpm.report.query.StockOutQuery;
import com.logpm.report.reader.DeliveryInStocksReader;
import com.logpm.report.reader.DeliveryOutStocksReader;
import com.logpm.report.reader.DeliveryStockReader;
import com.logpm.report.service.ReportStockService;
import com.logpm.report.util.QueryUtil;
import com.logpm.report.util.ReportExcelUtil;
import com.logpm.report.vo.ReportInStockVO;
import com.logpm.report.vo.ReportOutStockVO;
import com.logpm.report.vo.StockDetailsVO;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
/**
* @author zhaoqiaobo
@ -30,35 +32,100 @@ public class ReportStockServiceImpl implements ReportStockService {
private final ReportStockMapeer reportStockMapeer;
private final DeliveryStockReader deliveryStockReader;
private final DeliveryInStocksReader inStocksReader;
private final DeliveryOutStocksReader outStocksReader;
@Override
public IPage<StockDetailsVO> detailsPage(StockDetailsVO vo, Query query) {
public IPage<StockDetailsVO> detailsPage(StockDetailsVO vo, StockDetailsQuery query) {
IPage<StockDetailsVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<StockDetailsVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, StockDetailsVO.class);
QueryWrapper<StockDetailsVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, StockDetailsVO.class);
detailsCustomQuery(query, queryWrapper);
return page.setRecords(reportStockMapeer.getDetailPage(page, queryWrapper));
}
private void detailsCustomQuery(StockDetailsQuery query, QueryWrapper<StockDetailsVO> queryWrapper) {
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 商场名称
QueryUtil.splitEqQuery("market_name", query.getMarketNameRange(), queryWrapper);
// 类型
QueryUtil.splitEqQuery("service_type", query.getServiceTypeRange(), queryWrapper);
// 物料编码
QueryUtil.splitEqQuery("cargo_number", query.getCargoNumberRange(), queryWrapper);
// 物料名称
QueryUtil.splitEqQuery("description_goods", query.getDescriptionGoodsRange(), queryWrapper);
}
@Override
public void exportDetails(HttpServletResponse response, StockDetailsVO vo) throws InterruptedException, IOException {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<StockDetailsVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, StockDetailsVO.class);
public void exportDetails(HttpServletResponse response, StockDetailsVO vo, StockDetailsQuery query) {
QueryWrapper<StockDetailsVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, StockDetailsVO.class);
detailsCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, deliveryStockReader, StockDetailsVO.class, queryWrapper, "库存品表");
}
@Override
public IPage<ReportInStockVO> inStocks(ReportInStockVO vo, Query query) {
public IPage<ReportInStockVO> inStocks(ReportInStockVO vo, StockInQuery query) {
IPage<ReportInStockVO> page = Condition.getPage(query);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportInStockVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportInStockVO.class);
QueryWrapper<ReportInStockVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportInStockVO.class);
inStocksCustomQuery(query, queryWrapper);
return page.setRecords(reportStockMapeer.getInStocks(page, queryWrapper));
}
private void inStocksCustomQuery(StockInQuery query, QueryWrapper<ReportInStockVO> queryWrapper) {
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 商场名称
QueryUtil.splitEqQuery("market_name", query.getMarketNameRange(), queryWrapper);
// 类型
QueryUtil.splitEqQuery("service_type", query.getServiceTypeRange(), queryWrapper);
// 物料编码
QueryUtil.splitEqQuery("cargo_number", query.getCargoNumberRange(), queryWrapper);
// 物料名称
QueryUtil.splitEqQuery("description_goods", query.getDescriptionGoodsRange(), queryWrapper);
// 入库时间
QueryUtil.timeGe("warehousing_time", query.getStartWarehousingTime(), queryWrapper);
QueryUtil.timeLe("warehousing_time", query.getEndWarehousingTime(), queryWrapper);
//订单自编码
QueryUtil.splitEqQuery("order_code", query.getOrderCodeRange(), queryWrapper);
// 包条码
QueryUtil.splitEqQuery("package_code", query.getPackageCodeRange(), queryWrapper);
}
@Override
public void exportInStocks(HttpServletResponse response, ReportInStockVO vo) throws InterruptedException, IOException {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
QueryWrapper<ReportInStockVO> queryWrapper = Condition.getQueryWrapper(stringObjectMap, ReportInStockVO.class);
public void exportInStocks(HttpServletResponse response, ReportInStockVO vo, StockInQuery query) {
QueryWrapper<ReportInStockVO> queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportInStockVO.class);
inStocksCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, inStocksReader, ReportInStockVO.class, queryWrapper, "库存入库表");
}
@Override
public IPage<ReportOutStockVO> outStocks(ReportOutStockVO vo, StockOutQuery query) {
IPage<ReportOutStockVO> page = Condition.getPage(query);
QueryWrapper queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportOutStockVO.class);
outStocksCustomQuery(query, queryWrapper);
return page.setRecords(reportStockMapeer.getOutStocks(page, queryWrapper));
}
private void outStocksCustomQuery(StockOutQuery query, QueryWrapper<ReportOutStockVO> queryWrapper) {
// 仓库
QueryUtil.splitEqQuery("warehouse_name", query.getWarehouseNameRange(), queryWrapper);
// 商场名称
QueryUtil.splitEqQuery("market_name", query.getMarketNameRange(), queryWrapper);
// 出库类型
QueryUtil.splitEqQuery("out_type", query.getOutTypeRange(), queryWrapper);
// 物料编码
QueryUtil.splitEqQuery("cargo_number", query.getCargoNumberRange(), queryWrapper);
// 物料名称
QueryUtil.splitEqQuery("material_name", query.getMaterialNameRange(), queryWrapper);
// 出库时间
QueryUtil.timeGe("create_time", query.getStartCreateTime(), queryWrapper);
QueryUtil.timeLe("create_time", query.getEndCreateTime(), queryWrapper);
}
@Override
public void exportOutStocks(HttpServletResponse response, ReportOutStockVO vo, StockOutQuery query) {
QueryWrapper queryWrapper = QueryUtil.buildQueryWrapper(vo, ReportOutStockVO.class);
outStocksCustomQuery(query, queryWrapper);
new ReportExcelUtil().export(response, outStocksReader, ReportOutStockVO.class, queryWrapper, "库存出库表");
}
}

83
blade-service/logpm-report/src/main/java/com/logpm/report/util/QueryUtil.java

@ -0,0 +1,83 @@
package com.logpm.report.util;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springblade.core.mp.support.Condition;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* QueryWrapper查询对象工具类
*
* @author zhaoqiaobo
* @create 2024-03-13 15:43
*/
public class QueryUtil {
/**
* vo 对象构建成指定类型的 QueryWrapper 对象
*
* @param vo
* @param classz
* @return
*/
public static QueryWrapper buildQueryWrapper(Object vo, Class classz) {
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(vo);
return Condition.getQueryWrapper(stringObjectMap, classz);
}
/**
* QueryWrapper 查询大于指定时间范围
*
* @param field 字段名
* @param value 时间值
* @param wrapper mybatisplus查询对象
*/
public static void timeGe(String field, Date value, QueryWrapper wrapper) {
if (ObjectUtil.isNotEmpty(value)) {
wrapper.ge(field, value);
}
}
/**
* QueryWrapper 查询小于指定时间范围
*
* @param field 字段名
* @param value 时间值
* @param wrapper mybatisplus查询对象
*/
public static void timeLe(String field, Date value, QueryWrapper wrapper) {
if (ObjectUtil.isNotEmpty(value)) {
wrapper.le(field, value);
}
}
/**
* 拆分后精准匹配查询
*
* @param field 字段名
* @param value 1,2,3/12,3
* @param wrapper mybatisplus 查询对象
*/
public static void splitEqQuery(String field, String value, QueryWrapper wrapper) {
if (StrUtil.isNotBlank(value)) {
String splitValue = value.replaceAll(",", ",");
if (value.contains(",")) {
List<String> splits = StrUtil.split(splitValue, ",");
if (CollUtil.isNotEmpty(splits)) {
StrUtil.trim(splits.toArray(new String[0]));
wrapper.in(field, splits);
}
} else {
wrapper.like(field, value);
}
}
}
}

16
blade-service/logpm-report/src/main/java/com/logpm/report/util/ReportExcelUtil.java

@ -4,7 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.report.service.ExportReaderService;
import org.apache.poi.ss.formula.functions.T;
@ -57,13 +57,13 @@ public class ReportExcelUtil {
/**
* 多线程导出数据到excel 带默认参数 pageSize onceSheetDataNum
* @param response
* @param service
* @param classz
* @param query
* @param fileName
* @param response HttpServletResponse对象
* @param service ExportReaderService读取器接口实现类
* @param classz easyexcel 导出数据定义对象
* @param query 数据查询对象
* @param fileName 导出文件名称
*/
public void export(HttpServletResponse response, ExportReaderService service, Class classz, QueryWrapper query, String fileName) {
public void export(HttpServletResponse response, ExportReaderService service, Class classz, Wrapper query, String fileName) {
export(response, service, classz, query, fileName, PAGESIZE, SHEETDATANUM);
}
@ -80,7 +80,7 @@ public class ReportExcelUtil {
* @param pageSize 每次查询多少条数据
* @param onceSheetDataNum 一个sheet页最大装多少条数据
*/
public void export(HttpServletResponse response, ExportReaderService service, Class classz, QueryWrapper query, String fileName, Long pageSize, Long onceSheetDataNum) {
public void export(HttpServletResponse response, ExportReaderService service, Class classz, Wrapper query, String fileName, Long pageSize, Long onceSheetDataNum) {
// 设置响应头
ReportExcelUtil.setExportHeader(response, fileName);
// 获取需要导出的总条数

10
blade-service/logpm-report/src/main/java/com/logpm/report/vo/BillLoadingDetailsVO.java

@ -29,11 +29,11 @@ public class BillLoadingDetailsVO implements Serializable {
@ExcelProperty("自提批次号")
private String pickupBatch;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 4)
@ExcelProperty("仓库")
private String warehouse;
@ApiModelProperty(value = "收货单位")
@ApiModelProperty(value = "收货单位", position = 6)
@ExcelProperty("收货单位")
private String consigneeUnit;
@ -41,7 +41,7 @@ public class BillLoadingDetailsVO implements Serializable {
@ExcelProperty("运单号")
private String waybillNumber;
@ApiModelProperty(value = "订单自编码")
@ApiModelProperty(value = "订单自编码", position = 8)
@ExcelProperty("订单自编码")
private String orderCode;
@ -89,7 +89,7 @@ public class BillLoadingDetailsVO implements Serializable {
@ExcelProperty("提货扫码人")
private String scanUser;
@ApiModelProperty(value = "提货扫描时间")
@ApiModelProperty(value = "提货扫描时间", position = 1)
@ExcelProperty("提货扫描时间")
private String scanTime;
@ -97,7 +97,7 @@ public class BillLoadingDetailsVO implements Serializable {
@ExcelProperty("文员复核时间")
private String examineTime;
@ApiModelProperty(value = "文员复核人")
@ApiModelProperty(value = "文员复核人", position = 10)
@ExcelProperty("文员复核人")
private String examineUser;

120
blade-service/logpm-report/src/main/java/com/logpm/report/vo/BillLoadingTasksVO.java

@ -0,0 +1,120 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 自提任务维度 报表 vo
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
@ApiModel(value = "自提任务维度", description = "自提任务维度")
@Data
public class BillLoadingTasksVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自提批次号")
@ExcelProperty("自提批次号")
private String pickupBatch;
@ApiModelProperty(value = "仓库")
@ExcelProperty("仓库")
private String warehouse;
@ApiModelProperty(value = "运单号")
@ExcelProperty("运单号")
private String waybillNumber;
@ApiModelProperty(value = "订单自编码")
@ExcelProperty("订单自编码")
private String orderCode;
@ApiModelProperty(value = "收货单位")
@ExcelProperty("收货单位")
private String consigneeUnit;
@ApiModelProperty(value = "收货人")
@ExcelProperty("收货人")
private String consigneeUser;
@ApiModelProperty(value = "联系电话")
@ExcelProperty("联系电话")
private String consigneePhone;
@ApiModelProperty(value = "提货人")
@ExcelProperty("提货人")
private String billUser;
@ApiModelProperty(value = "提货人联系电话")
@ExcelProperty("提货人联系电话")
private String billUserPhone;
@ApiModelProperty(value = "提货车牌")
@ExcelProperty("提货车牌")
private String billRegistrationNumber;
@ApiModelProperty(value = "证件类型")
@ExcelProperty("证件类型")
private String idType;
@ApiModelProperty(value = "提货证件")
@ExcelProperty("提货证件")
private String billPaper;
@ApiModelProperty(value = "提货状态")
@ExcelProperty("提货状态")
private String billStatus;
@ApiModelProperty(value = "计划提货件数")
@ExcelProperty("计划提货件数")
private String planBillNumber;
@ApiModelProperty(value = "货物信息")
@ExcelProperty("货物信息")
private String goodsInfo;
@ApiModelProperty(value = "实际提货件数")
@ExcelProperty("实际提货件数")
private String BillLoadingNum;
@ApiModelProperty(value = "到付运费")
@ExcelProperty("到付运费")
private String collectPaymentFee;
@ApiModelProperty(value = "搬运费")
@ExcelProperty("搬运费")
private String transportFee;
@ApiModelProperty(value = "仓储费")
@ExcelProperty("仓储费")
private String storageFee;
@ApiModelProperty(value = "叉车费")
@ExcelProperty("叉车费")
private String forkliftFee;
@ApiModelProperty(value = "增值费")
@ExcelProperty("增值费")
private String addValueFee;
@ApiModelProperty(value = "增值费")
@ExcelProperty("增值费")
private String amountToFee;
@ApiModelProperty(value = "提货时间")
@ExcelProperty("提货时间")
private String createdTime;
}

15
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCustomerVO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
/**
* 配送报表 客户维度
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ -36,11 +37,11 @@ public class ReportCustomerVO implements Serializable {
@ExcelProperty("订单自编码")
private String stockArticleId;
@ApiModelProperty(value = "配送日期")
@ApiModelProperty(value = "配送日期", position = 1)
@ExcelProperty("配送日期")
private String taskTime;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 4)
@ExcelProperty("仓库")
private String warehouseName;
@ -52,7 +53,7 @@ public class ReportCustomerVO implements Serializable {
@ExcelProperty("商场名称")
private String mallName;
@ApiModelProperty(value = "客户名称")
@ApiModelProperty(value = "客户名称", position = 6)
@ExcelProperty("客户名称")
private String consignee;
@ -64,19 +65,19 @@ public class ReportCustomerVO implements Serializable {
@ExcelProperty("地址")
private String deliveryAddress;
@ApiModelProperty(value = "配送类型")
@ApiModelProperty(value = "配送类型", position = 8)
@ExcelProperty("配送类型")
private String type;
@ApiModelProperty(value = "配送种类")
@ApiModelProperty(value = "配送种类", position = 10)
@ExcelProperty("配送种类")
private String kind;
@ApiModelProperty(value = "配送车辆")
@ApiModelProperty(value = "配送车辆", position = 12)
@ExcelProperty("配送车辆")
private String vehicleName;
@ApiModelProperty(value = "配送司机")
@ApiModelProperty(value = "配送司机", position = 14)
@ExcelProperty("配送司机")
private String driverName;

17
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportDetailVO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
/**
* 配送报表 车次维度
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ -32,27 +33,27 @@ public class ReportDetailVO implements Serializable {
@ExcelProperty("预约单号")
private String reservationCode;
@ApiModelProperty(value = "配送日期")
@ApiModelProperty(value = "配送日期", position = 1)
@ExcelProperty("配送日期")
private String taskTime;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 4)
@ExcelProperty("仓库")
private String warehouseName;
@ApiModelProperty(value = "配送类型")
@ApiModelProperty(value = "配送类型", position = 6)
@ExcelProperty("配送类型")
private String type;
@ApiModelProperty(value = "配送种类")
@ApiModelProperty(value = "配送种类", position = 8)
@ExcelProperty("配送种类")
private String kind;
@ApiModelProperty(value = "配送车辆")
@ApiModelProperty(value = "配送车辆", position = 10)
@ExcelProperty("配送车辆")
private String vehicleName;
@ApiModelProperty(value = "配送司机")
@ApiModelProperty(value = "配送司机", position = 12)
@ExcelProperty("配送司机")
private String driverName;
@ -60,7 +61,7 @@ public class ReportDetailVO implements Serializable {
@ExcelProperty("配送公司")
private String distributionCompany;
@ApiModelProperty(value = "客户名称")
@ApiModelProperty(value = "客户名称", position = 14)
@ExcelProperty("客户名称")
private String drConsignee;
@ -76,7 +77,7 @@ public class ReportDetailVO implements Serializable {
@ExcelProperty("运单收货单位")
private String consignee;
@ApiModelProperty(value = "运单收货人")
@ApiModelProperty(value = "运单收货人", position = 16)
@ExcelProperty("运单收货人")
private String consigneeName;

13
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportDevilerVO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
/**
* 配送报表 车次维度
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ -28,27 +29,27 @@ public class ReportDevilerVO implements Serializable {
@ExcelProperty("车次")
private String trainNumber;
@ApiModelProperty(value = "配送日期")
@ApiModelProperty(value = "配送日期", position = 1)
@ExcelProperty("配送日期")
private String taskTime;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 5)
@ExcelProperty("仓库")
private String warehouseName;
@ApiModelProperty(value = "配送类型")
@ApiModelProperty(value = "配送类型", position = 7)
@ExcelProperty("配送类型")
private String type;
@ApiModelProperty(value = "配送种类")
@ApiModelProperty(value = "配送种类", position = 9)
@ExcelProperty("配送种类")
private String kind;
@ApiModelProperty(value = "配送车辆")
@ApiModelProperty(value = "配送车辆", position = 11)
@ExcelProperty("配送车辆")
private String vehicleName;
@ApiModelProperty(value = "配送司机")
@ApiModelProperty(value = "配送司机", position = 13)
@ExcelProperty("配送司机")
private String driverName;

17
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportInStockVO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
/**
* 库存入库明细
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ -24,27 +25,27 @@ public class ReportInStockVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 2)
@ExcelProperty("仓库")
private String warehouseName;
@ApiModelProperty(value = "商场名称")
@ApiModelProperty(value = "商场名称", position = 4)
@ExcelProperty("商场名称")
private String marketName;
@ApiModelProperty(value = "类型")
@ApiModelProperty(value = "类型", position = 6)
@ExcelProperty("类型")
private String serviceType;
@ApiModelProperty(value = "物料编码")
@ApiModelProperty(value = "物料编码", position = 8)
@ExcelProperty("物料编码")
private String cargoNumber;
@ApiModelProperty(value = "物料名称")
@ApiModelProperty(value = "物料名称", position = 10)
@ExcelProperty("物料名称")
private String descriptionGoods;
@ApiModelProperty(value = "入库时间")
@ApiModelProperty(value = "入库时间", position = 12)
@ExcelProperty("入库时间")
private String warehousingTime;
@ -52,11 +53,11 @@ public class ReportInStockVO implements Serializable {
@ExcelProperty("运单号")
private String despatch;
@ApiModelProperty(value = "订单自编码")
@ApiModelProperty(value = "订单自编码", position = 16)
@ExcelProperty("订单自编码")
private String orderCode;
@ApiModelProperty(value = "包条码")
@ApiModelProperty(value = "包条码", position = 18)
@ExcelProperty("包条码")
private String packageCode;

80
blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOutStockVO.java

@ -0,0 +1,80 @@
package com.logpm.report.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 库存出库明细
*
* @author zhaoqiaobo
* @create 2024-03-06 16:02
*/
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
@ApiModel(value = "库存出库明细", description = "库存出库明细")
@Data
public class ReportOutStockVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "货位信息")
@ExcelProperty("货位信息")
private String goodsAllocationName;
@ApiModelProperty(value = "出库件数")
@ExcelProperty("出库件数")
private String stockQuantity;
@ApiModelProperty(value = "包条码")
@ExcelProperty("包条码")
private String coding;
@ApiModelProperty(value = "仓库", position = 2)
@ExcelProperty("仓库")
private String warehouseName;
@ApiModelProperty(value = "商场名称", position = 4)
@ExcelProperty("商场名称")
private String marketName;
@ApiModelProperty(value = "物料编码", position = 8)
@ExcelProperty("物料编码")
private String cargoNumber;
@ApiModelProperty(value = "物料名称", position = 10)
@ExcelProperty("物料名称")
private String materialName;
@ApiModelProperty(value = "出库时间", position = 12)
@ExcelProperty("出库时间")
private String createTime;
@ApiModelProperty(value = "出库类型", position = 6)
@ExcelProperty("出库类型")
private String outType;
@ApiModelProperty(value = "配送单号")
@ExcelProperty("配送单号")
private String noteNumber;
@ApiModelProperty(value = "车次号")
@ExcelProperty("车次号")
private String trainNumber;
@ApiModelProperty(value = "预约单号")
@ExcelProperty("预约单号")
private String reservationCode;
@ApiModelProperty(value = "配送客户")
@ExcelProperty("配送客户")
private String clientName;
}

10
blade-service/logpm-report/src/main/java/com/logpm/report/vo/StockDetailsVO.java

@ -25,23 +25,23 @@ public class StockDetailsVO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "仓库")
@ApiModelProperty(value = "仓库", position = 2)
@ExcelProperty("仓库")
private String warehouseName;
@ApiModelProperty(value = "商场名称")
@ApiModelProperty(value = "商场名称", position = 4)
@ExcelProperty("商场名称")
private String marketName;
@ApiModelProperty(value = "类型")
@ApiModelProperty(value = "类型", position = 6)
@ExcelProperty("类型")
private String serviceType;
@ApiModelProperty(value = "物料编码")
@ApiModelProperty(value = "物料编码", position = 8)
@ExcelProperty("物料编码")
private String cargoNumber;
@ApiModelProperty(value = "物料名称")
@ApiModelProperty(value = "物料名称", position = 10)
@ExcelProperty("物料名称")
private String descriptionGoods;

Loading…
Cancel
Save