From 6305d0c86c23e9a583e8ca798645885d167f4dc5 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 10 六月 2026 17:20:58 +0800
Subject: [PATCH] feat:1.销售台账导出按照查询条件 2.导出订单和产品明细
---
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java | 10 +
src/main/java/com/ruoyi/sales/dto/SalesLedgerProductExportDto.java | 64 +++++++++
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml | 2
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java | 233 +++++++++++++++++++++++++++++++++
src/main/java/com/ruoyi/sales/service/ISalesLedgerService.java | 10 +
src/main/resources/mapper/sales/ShippingInfoMapper.xml | 6
src/main/java/com/ruoyi/sales/dto/SalesLedgerExportDto.java | 62 ++++++++
7 files changed, 383 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
index 994b390..f74c85c 100644
--- a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -161,6 +161,16 @@
}
/**
+ * 瀵煎嚭閿�鍞彴璐﹀垪琛紙鍖呭惈浜у搧鏄庣粏锛屼袱涓猻heet椤碉級
+ */
+ @Log(title = "閿�鍞彴璐�", businessType = BusinessType.EXPORT)
+ @PostMapping("/exportWithProducts")
+ @ApiOperation("瀵煎嚭閿�鍞彴璐﹀強浜у搧鏄庣粏锛堜袱涓猻heet椤碉級")
+ public void exportWithProducts(HttpServletResponse response, SalesLedgerDto salesLedgerDto) {
+ salesLedgerService.exportWithProducts(response, salesLedgerDto);
+ }
+
+ /**
* 瀵煎嚭寮�绁ㄧ櫥璁板垪琛�
*/
@Log(title = "瀵煎嚭寮�绁ㄧ櫥璁板垪琛�", businessType = BusinessType.EXPORT)
diff --git a/src/main/java/com/ruoyi/sales/dto/SalesLedgerExportDto.java b/src/main/java/com/ruoyi/sales/dto/SalesLedgerExportDto.java
new file mode 100644
index 0000000..4354fe2
--- /dev/null
+++ b/src/main/java/com/ruoyi/sales/dto/SalesLedgerExportDto.java
@@ -0,0 +1,62 @@
+package com.ruoyi.sales.dto;
+
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 閿�鍞彴璐﹀鍑篋TO
+ */
+@Data
+public class SalesLedgerExportDto {
+
+ @Excel(name = "閿�鍞悎鍚屽彿")
+ private String salesContractNo;
+
+ @Excel(name = "瀹㈡埛鍚堝悓鍙�")
+ private String customerContractNo;
+
+ @Excel(name = "椤圭洰鍚嶇О")
+ private String projectName;
+
+ @Excel(name = "瀹㈡埛鍚嶇О")
+ private String customerName;
+
+ @Excel(name = "涓氬姟鍛�")
+ private String salesman;
+
+ @Excel(name = "褰曞叆浜�")
+ private String entryPersonName;
+
+ @Excel(name = "褰曞叆鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date entryDate;
+
+ @Excel(name = "绛捐鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date executionDate;
+
+ @Excel(name = "浜よ揣鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date deliveryDate;
+
+ @Excel(name = "鍚堝悓閲戦(鍏�)")
+ private BigDecimal contractAmount;
+
+ @Excel(name = "鍙戣揣鐘舵��")
+ private String deliveryStatusText;
+
+ @Excel(name = "鍏ュ簱鐘舵��")
+ private String stockStatusText;
+
+ @Excel(name = "瀹℃牳鐘舵��")
+ private String reviewStatusText;
+
+ @Excel(name = "璁㈠崟鐘舵��")
+ private String orderStatusText;
+
+ @Excel(name = "澶囨敞")
+ private String remarks;
+
+ @Excel(name = "瀹㈡埛澶囨敞")
+ private String customerRemarks;
+}
\ No newline at end of file
diff --git a/src/main/java/com/ruoyi/sales/dto/SalesLedgerProductExportDto.java b/src/main/java/com/ruoyi/sales/dto/SalesLedgerProductExportDto.java
new file mode 100644
index 0000000..8a05da3
--- /dev/null
+++ b/src/main/java/com/ruoyi/sales/dto/SalesLedgerProductExportDto.java
@@ -0,0 +1,64 @@
+package com.ruoyi.sales.dto;
+
+import com.ruoyi.framework.aspectj.lang.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 閿�鍞彴璐︿骇鍝佸鍑篋TO
+ */
+@Data
+public class SalesLedgerProductExportDto {
+
+ @Excel(name = "閿�鍞悎鍚屽彿")
+ private String salesContractNo;
+
+ @Excel(name = "浜у搧澶х被")
+ private String productCategory;
+
+ @Excel(name = "瑙勬牸鍨嬪彿")
+ private String specificationModel;
+
+ @Excel(name = "鍘氬害(mm)")
+ private BigDecimal thickness;
+
+ @Excel(name = "妤煎眰缂栧彿")
+ private String floorCode;
+
+ @Excel(name = "瀹�(mm)")
+ private BigDecimal width;
+
+ @Excel(name = "楂�(mm)")
+ private BigDecimal height;
+
+ @Excel(name = "鏁伴噺")
+ private BigDecimal quantity;
+
+ @Excel(name = "缁撶畻鍗曠墖闈㈢Н(銕�)")
+ private BigDecimal settlePieceArea;
+
+ @Excel(name = "缁撶畻鎬婚潰绉�(銕�)")
+ private BigDecimal settleTotalArea;
+
+ @Excel(name = "鍚◣鍗曚环(鍏�)")
+ private BigDecimal taxInclusiveUnitPrice;
+
+ @Excel(name = "绋庣巼(%)")
+ private BigDecimal taxRate;
+
+ @Excel(name = "鍚◣鎬讳环(鍏�)")
+ private BigDecimal taxInclusiveTotalPrice;
+
+ @Excel(name = "涓嶅惈绋庢�讳环(鍏�)")
+ private BigDecimal taxExclusiveTotalPrice;
+
+ @Excel(name = "鍙戠エ绫诲瀷")
+ private String invoiceType;
+
+ @Excel(name = "鍔犲伐瑕佹眰")
+ private String processRequirement;
+
+ @Excel(name = "澶囨敞")
+ private String remark;
+}
\ No newline at end of file
diff --git a/src/main/java/com/ruoyi/sales/service/ISalesLedgerService.java b/src/main/java/com/ruoyi/sales/service/ISalesLedgerService.java
index a7f88f7..bfa28aa 100644
--- a/src/main/java/com/ruoyi/sales/service/ISalesLedgerService.java
+++ b/src/main/java/com/ruoyi/sales/service/ISalesLedgerService.java
@@ -3,9 +3,9 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.approve.pojo.ApproveProcess;
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.common.enums.SaleEnum;
-import com.ruoyi.approve.pojo.ApproveProcess;
import com.ruoyi.sales.dto.*;
import com.ruoyi.sales.pojo.SalesLedger;
import com.ruoyi.sales.pojo.SalesLedgerProcessRoute;
@@ -13,6 +13,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Nullable;
+import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
@@ -118,4 +119,11 @@
* @param printType 鎵撳嵃绫诲瀷锛歭abel=鏍囩鎵撳嵃锛宒ocument=鍗曟嵁鎵撳嵃
*/
void incrementPrintCount(Long id, String printType);
+
+ /**
+ * 瀵煎嚭閿�鍞彴璐﹀強浜у搧鏄庣粏锛堜袱涓猻heet椤碉級
+ * @param response HttpServletResponse
+ * @param salesLedgerDto 鏌ヨ鏉′欢
+ */
+ void exportWithProducts(HttpServletResponse response, SalesLedgerDto salesLedgerDto);
}
diff --git a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
index 527268f..e209855 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -78,11 +78,13 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
+import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.RoundingMode;
+import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -3694,4 +3696,235 @@
);
}
}
+
+ @Override
+ public void exportWithProducts(HttpServletResponse response, SalesLedgerDto salesLedgerDto) {
+ try {
+ // 1. 鏌ヨ閿�鍞彴璐﹀垪琛紙瀵煎嚭浣跨敤鍗囧簭鎺掑簭锛�
+ Page<SalesLedger> page = new Page<>(-1, -1);
+ // 浣跨敤 Wrappers 鏋勫缓鍗囧簭鏌ヨ
+ LambdaQueryWrapper<SalesLedger> queryWrapper = Wrappers.<SalesLedger>lambdaQuery()
+ .orderByAsc(SalesLedger::getEntryDate)
+ .orderByAsc(SalesLedger::getId);
+
+ // 娣诲姞鏌ヨ鏉′欢
+ if (salesLedgerDto.getCustomerName() != null && !salesLedgerDto.getCustomerName().isEmpty()) {
+ queryWrapper.like(SalesLedger::getCustomerName, salesLedgerDto.getCustomerName());
+ }
+ if (salesLedgerDto.getSalesContractNo() != null && !salesLedgerDto.getSalesContractNo().isEmpty()) {
+ queryWrapper.like(SalesLedger::getSalesContractNo, salesLedgerDto.getSalesContractNo());
+ }
+ if (salesLedgerDto.getProjectName() != null && !salesLedgerDto.getProjectName().isEmpty()) {
+ queryWrapper.like(SalesLedger::getProjectName, salesLedgerDto.getProjectName());
+ }
+ if (salesLedgerDto.getEntryDateStart() != null && !salesLedgerDto.getEntryDateStart().isEmpty()) {
+ queryWrapper.ge(SalesLedger::getEntryDate, salesLedgerDto.getEntryDateStart());
+ }
+ if (salesLedgerDto.getEntryDateEnd() != null && !salesLedgerDto.getEntryDateEnd().isEmpty()) {
+ queryWrapper.le(SalesLedger::getEntryDate, salesLedgerDto.getEntryDateEnd());
+ }
+ if (salesLedgerDto.getDeliveryStatus() != null) {
+ queryWrapper.eq(SalesLedger::getDeliveryStatus, salesLedgerDto.getDeliveryStatus());
+ }
+ if (salesLedgerDto.getStockStatus() != null) {
+ queryWrapper.eq(SalesLedger::getStockStatus, salesLedgerDto.getStockStatus());
+ }
+ if (salesLedgerDto.getReviewStatus() != null) {
+ queryWrapper.eq(SalesLedger::getReviewStatus, salesLedgerDto.getReviewStatus());
+ }
+ if (salesLedgerDto.getOrderStatus() != null) {
+ queryWrapper.eq(SalesLedger::getOrderStatus, salesLedgerDto.getOrderStatus());
+ }
+ if (salesLedgerDto.getReviewStatusList() != null && !salesLedgerDto.getReviewStatusList().isEmpty()) {
+ queryWrapper.and(w -> w.in(SalesLedger::getReviewStatus, salesLedgerDto.getReviewStatusList())
+ .or().isNull(SalesLedger::getReviewStatus));
+ }
+
+ List<SalesLedger> ledgerList = salesLedgerMapper.selectList(page, queryWrapper);
+
+ // 2. 鏀堕泦鏁版嵁
+ List<SalesLedgerExportDto> ledgerExportList = new ArrayList<>();
+ List<SalesLedgerProductExportDto> productExportList = new ArrayList<>();
+
+ for (SalesLedger ledger : ledgerList) {
+ // 杞崲鍙拌处鏁版嵁
+ SalesLedgerExportDto ledgerDto = new SalesLedgerExportDto();
+ ledgerDto.setSalesContractNo(ledger.getSalesContractNo());
+ ledgerDto.setCustomerContractNo(ledger.getCustomerContractNo());
+ ledgerDto.setProjectName(ledger.getProjectName());
+ ledgerDto.setCustomerName(ledger.getCustomerName());
+ ledgerDto.setSalesman(ledger.getSalesman());
+ ledgerDto.setEntryPersonName(ledger.getEntryPersonName());
+ ledgerDto.setEntryDate(ledger.getEntryDate());
+ ledgerDto.setExecutionDate(ledger.getExecutionDate() != null ?
+ java.sql.Date.valueOf(ledger.getExecutionDate()) : null);
+ ledgerDto.setDeliveryDate(ledger.getDeliveryDate() != null ?
+ java.sql.Date.valueOf(ledger.getDeliveryDate()) : null);
+ ledgerDto.setContractAmount(ledger.getContractAmount());
+ ledgerDto.setRemarks(ledger.getRemarks());
+ ledgerDto.setCustomerRemarks(ledger.getCustomerRemarks());
+ ledgerDto.setDeliveryStatusText(getDeliveryStatusText(ledger.getDeliveryStatus()));
+ ledgerDto.setStockStatusText(getStockStatusText(ledger.getStockStatus()));
+ ledgerDto.setReviewStatusText(getReviewStatusText(ledger.getReviewStatus()));
+ ledgerDto.setOrderStatusText(getOrderStatusText(ledger.getOrderStatus()));
+ ledgerExportList.add(ledgerDto);
+
+ // 鏌ヨ璇ュ彴璐︾殑浜у搧鍒楄〃
+ List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(
+ Wrappers.<SalesLedgerProduct>lambdaQuery()
+ .eq(SalesLedgerProduct::getSalesLedgerId, ledger.getId())
+ .eq(SalesLedgerProduct::getType, 1)
+ );
+
+ for (SalesLedgerProduct product : products) {
+ SalesLedgerProductExportDto productDto = new SalesLedgerProductExportDto();
+ productDto.setSalesContractNo(ledger.getSalesContractNo());
+ productDto.setProductCategory(product.getProductCategory());
+ productDto.setSpecificationModel(product.getSpecificationModel());
+ productDto.setThickness(product.getThickness());
+ productDto.setFloorCode(product.getFloorCode());
+ productDto.setWidth(product.getWidth());
+ productDto.setHeight(product.getHeight());
+ productDto.setQuantity(product.getQuantity());
+ productDto.setSettlePieceArea(product.getSettlePieceArea());
+ productDto.setSettleTotalArea(product.getSettleTotalArea());
+ productDto.setTaxInclusiveUnitPrice(product.getTaxInclusiveUnitPrice());
+ productDto.setTaxRate(product.getTaxRate());
+ productDto.setTaxInclusiveTotalPrice(product.getTaxInclusiveTotalPrice());
+ productDto.setTaxExclusiveTotalPrice(product.getTaxExclusiveTotalPrice());
+ productDto.setInvoiceType(product.getInvoiceType());
+ productDto.setProcessRequirement(product.getProcessRequirement());
+ productDto.setRemark(product.getRemark());
+ productExportList.add(productDto);
+ }
+ }
+
+ // 3. 浣跨敤ExcelUtil瀵煎嚭锛堝唴閮ㄤ細鍒涘缓Workbook骞跺啓鍏ュ搷搴旓級
+ // 鍏堝垱寤轰复鏃舵枃浠讹紝鍐嶅悎骞朵袱涓猻heet
+ response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+ response.setCharacterEncoding("utf-8");
+ String fileName = URLEncoder.encode("閿�鍞彴璐�.xlsx", "utf-8").replaceAll("\\+", "%20");
+ response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName);
+
+ org.apache.poi.xssf.usermodel.XSSFWorkbook workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook();
+
+ // Sheet1: 閿�鍞彴璐� - 鎵嬪姩濉厖
+ fillSheetWithData(workbook, "閿�鍞彴璐�", SalesLedgerExportDto.class, ledgerExportList);
+
+ // Sheet2: 浜у搧鏄庣粏 - 鎵嬪姩濉厖
+ fillSheetWithData(workbook, "浜у搧鏄庣粏", SalesLedgerProductExportDto.class, productExportList);
+
+ workbook.write(response.getOutputStream());
+ workbook.close();
+
+ } catch (Exception e) {
+ log.error("瀵煎嚭閿�鍞彴璐﹀け璐�", e);
+ throw new ServiceException("瀵煎嚭澶辫触锛�" + e.getMessage());
+ }
+ }
+
+ /**
+ * 鎵嬪姩濉厖Sheet鏁版嵁
+ */
+ private <T> void fillSheetWithData(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, String sheetName, Class<T> clazz, List<T> dataList) throws Exception {
+ org.apache.poi.ss.usermodel.Sheet sheet = workbook.createSheet(sheetName);
+
+ // 鑾峰彇瀛楁涓婄殑@Excel娉ㄨВ
+ java.lang.reflect.Field[] fields = clazz.getDeclaredFields();
+ List<java.lang.reflect.Field> excelFields = new ArrayList<>();
+ for (java.lang.reflect.Field field : fields) {
+ com.ruoyi.framework.aspectj.lang.annotation.Excel excel = field.getAnnotation(com.ruoyi.framework.aspectj.lang.annotation.Excel.class);
+ if (excel != null) {
+ excelFields.add(field);
+ }
+ }
+
+ // 鍒涘缓琛ㄥご
+ org.apache.poi.ss.usermodel.Row headerRow = sheet.createRow(0);
+ org.apache.poi.ss.usermodel.CellStyle headerStyle = workbook.createCellStyle();
+ headerStyle.setFillForegroundColor(org.apache.poi.ss.usermodel.IndexedColors.GREY_50_PERCENT.getIndex());
+ headerStyle.setFillPattern(org.apache.poi.ss.usermodel.FillPatternType.SOLID_FOREGROUND);
+ headerStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
+ org.apache.poi.ss.usermodel.Font headerFont = workbook.createFont();
+ headerFont.setBold(true);
+ headerStyle.setFont(headerFont);
+
+ for (int i = 0; i < excelFields.size(); i++) {
+ java.lang.reflect.Field field = excelFields.get(i);
+ field.setAccessible(true);
+ com.ruoyi.framework.aspectj.lang.annotation.Excel excel = field.getAnnotation(com.ruoyi.framework.aspectj.lang.annotation.Excel.class);
+ org.apache.poi.ss.usermodel.Cell cell = headerRow.createCell(i);
+ cell.setCellValue(excel.name());
+ cell.setCellStyle(headerStyle);
+ sheet.setColumnWidth(i, 20 * 256);
+ }
+
+ // 鍒涘缓鏁版嵁琛�
+ org.apache.poi.ss.usermodel.CellStyle dataStyle = workbook.createCellStyle();
+ dataStyle.setAlignment(org.apache.poi.ss.usermodel.HorizontalAlignment.CENTER);
+
+ for (int rowIndex = 0; rowIndex < dataList.size(); rowIndex++) {
+ T data = dataList.get(rowIndex);
+ org.apache.poi.ss.usermodel.Row row = sheet.createRow(rowIndex + 1);
+ for (int colIndex = 0; colIndex < excelFields.size(); colIndex++) {
+ java.lang.reflect.Field field = excelFields.get(colIndex);
+ field.setAccessible(true);
+ Object value = field.get(data);
+ org.apache.poi.ss.usermodel.Cell cell = row.createCell(colIndex);
+ if (value == null) {
+ cell.setCellValue("");
+ } else if (value instanceof Number) {
+ cell.setCellValue(((Number) value).doubleValue());
+ } else if (value instanceof Date) {
+ cell.setCellValue(new java.text.SimpleDateFormat("yyyy-MM-dd").format((Date) value));
+ } else {
+ cell.setCellValue(value.toString());
+ }
+ cell.setCellStyle(dataStyle);
+ }
+ }
+ }
+
+ private String getDeliveryStatusText(Integer status) {
+ if (status == null) return "鏈煡";
+ switch (status) {
+ case 1: return "鏈彂璐�";
+ case 2: return "瀹℃壒涓�";
+ case 3: return "瀹℃壒涓嶉�氳繃";
+ case 4: return "瀹℃壒閫氳繃";
+ case 5: return "宸插彂璐�";
+ case 6: return "閮ㄥ垎鍙戣揣";
+ default: return "鏈煡";
+ }
+ }
+
+ private String getStockStatusText(Integer status) {
+ if (status == null) return "鏈煡";
+ switch (status) {
+ case 0: return "鏈叆搴�";
+ case 1: return "閮ㄥ垎鍏ュ簱";
+ case 2: return "宸插叆搴�";
+ case 3: return "瀹℃壒涓�";
+ default: return "鏈煡";
+ }
+ }
+
+ private String getReviewStatusText(Integer status) {
+ if (status == null) return "寰呭鏍�";
+ switch (status) {
+ case 0: return "寰呭鏍�";
+ case 1: return "宸插鏍�";
+ case 2: return "宸插弽瀹�";
+ default: return "寰呭鏍�";
+ }
+ }
+
+ private String getOrderStatusText(Integer status) {
+ if (status == null || status == 0) return "杩涜涓�";
+ switch (status) {
+ case 0: return "杩涜涓�";
+ case 1: return "宸插畬鎴�";
+ default: return "杩涜涓�";
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 0f977c8..c8b0226 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -24,7 +24,7 @@
AND T1.type = #{salesLedgerProduct.type}
</if>
</where>
- ORDER BY T1.register_date DESC
+ ORDER BY T1.register_date ASC,T1.id ASC
</select>
<select id="selectSalesLedgerProductByMainId" resultType="com.ruoyi.sales.pojo.SalesLedgerProduct">
diff --git a/src/main/resources/mapper/sales/ShippingInfoMapper.xml b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
index e1ca875..7afb226 100644
--- a/src/main/resources/mapper/sales/ShippingInfoMapper.xml
+++ b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.sales.mapper.ShippingInfoMapper">
@@ -57,7 +58,8 @@
sl.sales_contract_no,
sl.customer_name
FROM shipping_info s
- LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
+ LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
+ ORDER BY s.create_time ASC
</select>
<select id="getReturnManagementDtoById" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto">
--
Gitblit v1.9.3