From 68dd21706959d8fb369443961d2e3b5cf1af9e9b Mon Sep 17 00:00:00 2001 From: liujiang <569804566@qq.com> Date: Fri, 24 Oct 2025 17:04:38 +0800 Subject: [PATCH] =?UTF-8?q?master=EF=BC=9A=E7=B3=BB=E7=BB=9F=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=A0=BC=E5=BC=8F=E8=B0=83=E4=BC=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StoreStorageDetailDownloadDTO.java | 51 ++++++++++--------- .../StoreProdDemandDownloadDTO.java | 45 ++++++++-------- .../StoreProdStockDownloadDTO.java | 37 +++++++------- .../dto/storeSale/StoreSaleDownloadDTO.java | 26 +++++----- .../impl/StoreProductDemandServiceImpl.java | 1 + .../service/impl/StoreSaleServiceImpl.java | 14 +++-- .../StoreProductStorageDetailMapper.xml | 4 +- .../main/resources/mapper/StoreSaleMapper.xml | 8 +-- 8 files changed, 97 insertions(+), 89 deletions(-) diff --git a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProdStorage/StoreStorageDetailDownloadDTO.java b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProdStorage/StoreStorageDetailDownloadDTO.java index 78aca4217..5e2ba9e84 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProdStorage/StoreStorageDetailDownloadDTO.java +++ b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProdStorage/StoreStorageDetailDownloadDTO.java @@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.storeProdStorage; import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModel; import lombok.Data; +import org.apache.poi.ss.usermodel.IndexedColors; import java.math.BigDecimal; import java.util.Date; @@ -17,53 +18,53 @@ import java.util.Date; public class StoreStorageDetailDownloadDTO { - @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28) + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer orderNum; - @Excel(name = "单据编号", needMerge = true, height = 28) + @Excel(name = "单据编号", needMerge = true, width = 26, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String code; - @Excel(name = "工厂名称", needMerge = true, height = 28) + @Excel(name = "工厂名称", needMerge = true, width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String facName; - @Excel(name = "入库类型", readConverterExp = "1=生产入库,2=其它入库,3=维修入库", needMerge = true, height = 28) + @Excel(name = "入库类型", readConverterExp = "1=生产入库,2=其它入库,3=维修入库", needMerge = true, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer storageType; - @Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm", needMerge = true, height = 28) - private Date createTime; - @Excel(name = "总生产成本", height = 28) + @Excel(name = "入库日期", width = 20, needMerge = true, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) + private String createTime; + @Excel(name = "总生产成本", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private BigDecimal produceAmount; - @Excel(name = "货号", height = 28) + @Excel(name = "货号", width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String prodArtNum; - @Excel(name = "颜色", height = 28) + @Excel(name = "颜色", width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String colorName; - @Excel(name = "30", height = 28) + @Excel(name = "30", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size30Quantity; - @Excel(name = "31", height = 28) + @Excel(name = "31", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size31Quantity; - @Excel(name = "32", height = 28) + @Excel(name = "32", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size32Quantity; - @Excel(name = "33", height = 28) + @Excel(name = "33", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size33Quantity; - @Excel(name = "34", height = 28) + @Excel(name = "34", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size34Quantity; - @Excel(name = "35", height = 28) + @Excel(name = "35", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size35Quantity; - @Excel(name = "36", height = 28) + @Excel(name = "36", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size36Quantity; - @Excel(name = "37", height = 28) + @Excel(name = "37", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size37Quantity; - @Excel(name = "38", height = 28) + @Excel(name = "38", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size38Quantity; - @Excel(name = "39", height = 28) + @Excel(name = "39", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size39Quantity; - @Excel(name = "40", height = 28) + @Excel(name = "40", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size40Quantity; - @Excel(name = "41", height = 28) + @Excel(name = "41", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size41Quantity; - @Excel(name = "42", height = 28) + @Excel(name = "42", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size42Quantity; - @Excel(name = "43", height = 28) + @Excel(name = "43", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size43Quantity; - @Excel(name = "入库总量", height = 28) + @Excel(name = "入库总量", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer totalQuantity; - @Excel(name = "操作人名称", height = 28) + @Excel(name = "操作人名称", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String operatorName; } diff --git a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductDemand/StoreProdDemandDownloadDTO.java b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductDemand/StoreProdDemandDownloadDTO.java index 82e9eeab9..65459b0cf 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductDemand/StoreProdDemandDownloadDTO.java +++ b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductDemand/StoreProdDemandDownloadDTO.java @@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.storeProductDemand; import com.ruoyi.common.annotation.Excel; import lombok.Data; import lombok.experimental.Accessors; +import org.apache.poi.ss.usermodel.IndexedColors; /** * @author liujiang @@ -14,47 +15,49 @@ import lombok.experimental.Accessors; public class StoreProdDemandDownloadDTO { - @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28) + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer orderNum; - @Excel(name = "货号", needMerge = true, height = 28) + @Excel(name = "货号", needMerge = true, width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String prodArtNum; - @Excel(name = "需求单号", needMerge = true, height = 28) + @Excel(name = "需求单号", needMerge = true, width = 28, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String code; - @Excel(name = "工厂名称", needMerge = true, height = 28) + @Excel(name = "创建日期", width = 26, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) + private String createTime; + @Excel(name = "工厂名称", needMerge = true, width = 22, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String facName; - @Excel(name = "是否紧急单", height = 28) + @Excel(name = "是否紧急单", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String emergency; - @Excel(name = "颜色", height = 28) + @Excel(name = "颜色", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String colorName; - @Excel(name = "30", height = 28) + @Excel(name = "30", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size30Quantity; - @Excel(name = "31", height = 28) + @Excel(name = "31", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size31Quantity; - @Excel(name = "32", height = 28) + @Excel(name = "32", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size32Quantity; - @Excel(name = "33", height = 28) + @Excel(name = "33", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size33Quantity; - @Excel(name = "34", height = 28) + @Excel(name = "34", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size34Quantity; - @Excel(name = "35", height = 28) + @Excel(name = "35", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size35Quantity; - @Excel(name = "36", height = 28) + @Excel(name = "36", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size36Quantity; - @Excel(name = "37", height = 28) + @Excel(name = "37", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size37Quantity; - @Excel(name = "38", height = 28) + @Excel(name = "38", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size38Quantity; - @Excel(name = "39", height = 28) + @Excel(name = "39", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size39Quantity; - @Excel(name = "40", height = 28) + @Excel(name = "40", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size40Quantity; - @Excel(name = "41", height = 28) + @Excel(name = "41", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size41Quantity; - @Excel(name = "42", height = 28) + @Excel(name = "42", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size42Quantity; - @Excel(name = "43", height = 28) + @Excel(name = "43", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size43Quantity; - @Excel(name = "合计", height = 28) + @Excel(name = "合计", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer totalQuantity; } diff --git a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductStock/StoreProdStockDownloadDTO.java b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductStock/StoreProdStockDownloadDTO.java index dc4568d26..888e3d178 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductStock/StoreProdStockDownloadDTO.java +++ b/xkt/src/main/java/com/ruoyi/xkt/dto/storeProductStock/StoreProdStockDownloadDTO.java @@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.storeProductStock; import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModel; import lombok.Data; +import org.apache.poi.ss.usermodel.IndexedColors; /** * @author liujiang @@ -14,41 +15,41 @@ import lombok.Data; public class StoreProdStockDownloadDTO { - @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28) + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, needMerge = true, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer orderNum; - @Excel(name = "货号", needMerge = true, height = 28) + @Excel(name = "货号", needMerge = true, width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String prodArtNum; - @Excel(name = "颜色", height = 28) + @Excel(name = "颜色", width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String colorName; - @Excel(name = "30", height = 28) + @Excel(name = "30", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size30Quantity; - @Excel(name = "31", height = 28) + @Excel(name = "31", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size31Quantity; - @Excel(name = "32", height = 28) + @Excel(name = "32", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size32Quantity; - @Excel(name = "33", height = 28) + @Excel(name = "33", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size33Quantity; - @Excel(name = "34", height = 28) + @Excel(name = "34", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size34Quantity; - @Excel(name = "35", height = 28) + @Excel(name = "35", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size35Quantity; - @Excel(name = "36", height = 28) + @Excel(name = "36", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size36Quantity; - @Excel(name = "37", height = 28) + @Excel(name = "37", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size37Quantity; - @Excel(name = "38", height = 28) + @Excel(name = "38", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size38Quantity; - @Excel(name = "39", height = 28) + @Excel(name = "39", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size39Quantity; - @Excel(name = "40", height = 28) + @Excel(name = "40", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size40Quantity; - @Excel(name = "41", height = 28) + @Excel(name = "41", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size41Quantity; - @Excel(name = "42", height = 28) + @Excel(name = "42", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size42Quantity; - @Excel(name = "43", height = 28) + @Excel(name = "43", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer size43Quantity; - @Excel(name = "总库存", height = 28) + @Excel(name = "总库存", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer totalQuantity; } diff --git a/xkt/src/main/java/com/ruoyi/xkt/dto/storeSale/StoreSaleDownloadDTO.java b/xkt/src/main/java/com/ruoyi/xkt/dto/storeSale/StoreSaleDownloadDTO.java index c506e25a3..2e5071ddc 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/dto/storeSale/StoreSaleDownloadDTO.java +++ b/xkt/src/main/java/com/ruoyi/xkt/dto/storeSale/StoreSaleDownloadDTO.java @@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.storeSale; import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModel; import lombok.Data; +import org.apache.poi.ss.usermodel.IndexedColors; import java.math.BigDecimal; import java.util.Date; @@ -14,30 +15,27 @@ import java.util.Date; */ @ApiModel("档口销售导出数据") @Data - public class StoreSaleDownloadDTO { - @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, height = 28) + @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer orderNum; - @Excel(name = "单据编号", height = 28) + @Excel(name = "单据编号", width = 28, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String code; - @Excel(name = "客户", height = 28) + @Excel(name = "客户", width = 20, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String storeCusName; - @Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm", height = 28) - private Date createTime; - @Excel(name = "销售总额", height = 28) + @Excel(name = "出库日期", width = 26, height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) + private String createTime; + @Excel(name = "销售总额", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private BigDecimal amount; - @Excel(name = "销售数量", height = 28) + @Excel(name = "销售数量", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String quantity; - @Excel(name = "抹零金额", height = 28) - private BigDecimal roundOff; - @Excel(name = "结款状态", readConverterExp = "1=已结清,2=欠款", height = 28) + @Excel(name = "结款状态", readConverterExp = "1=已结清,2=欠款", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer paymentStatus; - @Excel(name = "支付方式", readConverterExp = "1=支付宝,2=微信支付,3=现金,4=欠款", height = 28) + @Excel(name = "支付方式", readConverterExp = "1=支付宝,2=微信支付,3=现金,4=欠款", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer payWay; - @Excel(name = "销售类型", readConverterExp = "1=销售,2=退货,3=销售/退货", height = 28) + @Excel(name = "销售类型", readConverterExp = "1=销售,2=退货,3=销售/退货", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private Integer saleType; - @Excel(name = "操作人名称", height = 28) + @Excel(name = "操作人名称", height = 28, headerBackgroundColor = IndexedColors.SKY_BLUE) private String operatorName; } diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java index 389e7d827..bce97963b 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreProductDemandServiceImpl.java @@ -426,6 +426,7 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService .map(x -> new StoreProdDemandDownloadDTO().setProdArtNum(x.getProdArtNum()).setColorName(x.getColorName()) .setFacName(storeFacMap.getOrDefault(x.getStoreFactoryId(), "")) .setCode(demandCodeMap.getOrDefault(x.getStoreProdDemandId(), "")) + .setCreateTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm", x.getCreateTime())) .setEmergency(Objects.equals(x.getEmergency(), 0) ? "正常单" : "紧急单") .setSize30Quantity(x.getSize30()).setSize31Quantity(x.getSize31()).setSize32Quantity(x.getSize32()) .setSize33Quantity(x.getSize33()).setSize34Quantity(x.getSize34()).setSize35Quantity(x.getSize35()) diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java index 6bb3c215b..eb5ed3149 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/StoreSaleServiceImpl.java @@ -213,14 +213,15 @@ public class StoreSaleServiceImpl implements IStoreSaleService { if (!SecurityUtils.isAdmin() && !SecurityUtils.isStoreManagerOrSub(exportDTO.getStoreId())) { throw new ServiceException("当前用户非档口管理者或子账号,无权限操作!", HttpStatus.ERROR); } + List downloadList = new ArrayList<>(); // 导出指定销售出库单 if (CollectionUtils.isNotEmpty(exportDTO.getStoreSaleIdList())) { - return this.storeSaleMapper.selectExportList(exportDTO.getStoreSaleIdList()); + downloadList = this.storeSaleMapper.selectExportList(exportDTO.getStoreSaleIdList()); } else { // 没有传时间,则设置当前时间往前推半年 if (ObjectUtils.isEmpty(exportDTO.getVoucherDateStart()) && ObjectUtils.isEmpty(exportDTO.getVoucherDateEnd())) { exportDTO.setVoucherDateEnd(java.sql.Date.valueOf(LocalDate.now())); - exportDTO.setVoucherDateEnd(java.sql.Date.valueOf(LocalDate.now().minusMonths(6))); + exportDTO.setVoucherDateStart(java.sql.Date.valueOf(LocalDate.now().minusMonths(6))); } else { LocalDate start = exportDTO.getVoucherDateStart().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); LocalDate end = exportDTO.getVoucherDateEnd().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); @@ -235,8 +236,15 @@ public class StoreSaleServiceImpl implements IStoreSaleService { throw new ServiceException("导出时间间隔不能超过6个月!", HttpStatus.ERROR); } } - return this.storeSaleMapper.selectExportListVoucherDateBetween(exportDTO); + downloadList = this.storeSaleMapper.selectExportListVoucherDateBetween(exportDTO); } + if (CollectionUtils.isEmpty(downloadList)) { + return downloadList; + } + for (int i = 0; i < downloadList.size(); i++) { + downloadList.get(i).setOrderNum(i + 1); + } + return downloadList; } /** diff --git a/xkt/src/main/resources/mapper/StoreProductStorageDetailMapper.xml b/xkt/src/main/resources/mapper/StoreProductStorageDetailMapper.xml index cddcf6ce0..0f1f1db12 100644 --- a/xkt/src/main/resources/mapper/StoreProductStorageDetailMapper.xml +++ b/xkt/src/main/resources/mapper/StoreProductStorageDetailMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT sps.`code`, sf.fac_name, - sps.create_time, + DATE_FORMAT(spsd.create_time, '%Y-%m-%d %H:%i') AS create_time, sps.quantity, sps.produce_amount, sps.storage_type, @@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT sps.`code`, sf.fac_name, - sps.create_time, + DATE_FORMAT(spsd.create_time, '%Y-%m-%d %H:%i') AS create_time, sps.quantity, sps.produce_amount, sps.storage_type, diff --git a/xkt/src/main/resources/mapper/StoreSaleMapper.xml b/xkt/src/main/resources/mapper/StoreSaleMapper.xml index d7616c31f..d272ea5fd 100644 --- a/xkt/src/main/resources/mapper/StoreSaleMapper.xml +++ b/xkt/src/main/resources/mapper/StoreSaleMapper.xml @@ -26,13 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT - ROW_NUMBER() OVER ( ORDER BY ss.voucher_date DESC ) AS orderNum, ss.`code`, sc.cus_name AS storeCusName, - ss.voucher_date, + DATE_FORMAT(ss.create_time, '%Y-%m-%d %H:%i') AS create_time, ss.amount, CONCAT(IFNULL( ss.sale_quantity, 0 ),'/', CASE WHEN IFNULL( ss.refund_quantity, 0 ) > 0 THEN '-' ELSE '' END, IFNULL( ss.refund_quantity, 0 )) AS quantity, - IFNULL( ss.round_off, 0 ) AS round_off, ss.payment_status, ss.pay_way, ss.sale_type,