From 5c54d9f3b7874ab6f0b631c73946261eb327f0bd Mon Sep 17 00:00:00 2001 From: ligaode Date: Tue, 25 Feb 2025 09:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseShuntingInvoicingApplyFeign.java | 14 - .../scm/api/scmspecialrebate/OneExcelVo.java | 69 ++-- .../scm/api/scmspecialrebate/TwoExcelVo.java | 73 ++--- .../scm/api/scmvehrebate/OneExcelVo.java | 73 ++--- .../scm/api/scmvehrebate/TwoExcelVo.java | 77 ++--- .../ScmSpecialRebateMapper.xml | 40 +-- .../ScmSpecialRebateRest.java | 282 ++--------------- .../ScmSpecialRebateService.java | 10 - .../biz/scmvehrebate/ScmVehRebateMapper.xml | 33 +- .../biz/scmvehrebate/ScmVehRebateRest.java | 298 ++---------------- .../biz/scmvehrebate/ScmVehRebateService.java | 10 - 11 files changed, 156 insertions(+), 823 deletions(-) diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseshuntinginvoicingapply/BaseShuntingInvoicingApplyFeign.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseshuntinginvoicingapply/BaseShuntingInvoicingApplyFeign.java index a7bd152e73..1d289557cc 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseshuntinginvoicingapply/BaseShuntingInvoicingApplyFeign.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseshuntinginvoicingapply/BaseShuntingInvoicingApplyFeign.java @@ -43,23 +43,9 @@ import com.yxt.common.core.vo.PagerVo; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; - import javax.validation.Valid; import java.util.List; -/** - * Project: anrui-base(调车开票)
- * File: BaseShuntingInvoicingApplyFeign.java
- * Class: com.yxt.anrui.base.api.baseshuntinginvoicingapply.BaseShuntingInvoicingApplyFeign
- * Description: 调车开票申请表.
- * Copyright: Copyright (c) 2011
- * Company: https://gitee.com/liuzp315
- * Makedate: 2022-07-11 15:30:28
- * - * @author liupopo - * @version 1.0 - * @since 1.0 - */ @Api(tags = "调车开票申请表") @FeignClient( contextId = "anrui-base-BaseShuntingInvoicingApply", diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java index f1b8226075..5eb4cd832f 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java @@ -11,57 +11,36 @@ import lombok.Data; @Data public class OneExcelVo { - @ExportEntityMap(CnName = "序号", EnName = "rankNo") - private Integer rankNo; - @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") + @ExportEntityMap(CnName = "采购系统*", EnName = "purchaseSystemName") private String purchaseSystemName; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "品牌名称*", EnName = "brandName") + private String brandName; + @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") private String rebateTypeValue; - @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") + @ExportEntityMap(CnName = "返利名称*", EnName = "rebateName") private String rebateName; - - @ExportEntityMap(CnName = "预提", EnName = "estimateRebate") + @ExportEntityMap(CnName = "预提返利*", EnName = "estimateRebate") private String estimateRebate; - @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") + @ExportEntityMap(CnName = "其中预提费用*", EnName = "expectCost") + private String expectCost; + @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") + private String palceGenDate; + @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") + private String uploadDate; + @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") private String uploadMoney; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadMoney") - private String secondaryUploadMoney; - @ExportEntityMap(CnName = "待确定", EnName = "stayDetermineMoney") + @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") private String stayDetermineMoney; - @ExportEntityMap(CnName = "调整", EnName = "adjustmentMoney") - private String adjustmentMoney; - @ExportEntityMap(CnName = "未上传", EnName = "notUploadMoney") - private String notUploadMoney; - - @ExportEntityMap(CnName = "预提", EnName = "withholdCost") - private String withholdCost; - @ExportEntityMap(CnName = "上传", EnName = "money") - private String money; - - @ExportEntityMap(CnName = "创建", EnName = "createTime") - private String createTime; - @ExportEntityMap(CnName = "预提", EnName = "withholdingDate") - private String withholdingDate; - @ExportEntityMap(CnName = "上传", EnName = "uploadDate") - private String uploadDate; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") - private String secondaryUploadDate; - - @ExportEntityMap(CnName = "上传", EnName = "uploadState") - private String uploadState; - @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") - private String onceCheckState; - @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") - private String secondCheckState; - - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; + @ExportEntityMap(CnName = "其中支出费用*", EnName = "onceItureCost") + private String onceItureCost; + @ExportEntityMap(CnName = "其中待支付费用*", EnName = "onceTreatCost") + private String onceTreatCost; + @ExportEntityMap(CnName = "其中抵顶费用*", EnName = "onceSuppCost") + private String onceSuppCost; + @ExportEntityMap(CnName = "抵顶费用说明", EnName = "onceSuppRemark") + private String onceSuppRemark; @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") private String adjustmentRemarks; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "分公司", EnName = "createOrgName") - private String createOrgName; } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java index 22d41d5d7f..228fc62d0e 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java @@ -11,57 +11,42 @@ import lombok.Data; @Data public class TwoExcelVo { - @ExportEntityMap(CnName = "序号", EnName = "rankNo") - private Integer rankNo; - @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") + @ExportEntityMap(CnName = "采购系统*", EnName = "purchaseSystemName") private String purchaseSystemName; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "品牌名称*", EnName = "brandName") + private String brandName; + @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") private String rebateTypeValue; - @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") + @ExportEntityMap(CnName = "返利名称*", EnName = "rebateName") private String rebateName; - - @ExportEntityMap(CnName = "预提", EnName = "estimateRebate") + @ExportEntityMap(CnName = "预提返利*", EnName = "estimateRebate") private String estimateRebate; - @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") + @ExportEntityMap(CnName = "其中预提费用*", EnName = "expectCost") + private String expectCost; + @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") + private String palceGenDate; + @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") + private String uploadDate; + @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") private String uploadMoney; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadMoney") - private String secondaryUploadMoney; - @ExportEntityMap(CnName = "待确定", EnName = "stayDetermineMoney") - private String stayDetermineMoney; - @ExportEntityMap(CnName = "调整", EnName = "adjustmentMoney") - private String adjustmentMoney; - @ExportEntityMap(CnName = "未上传", EnName = "notUploadMoney") - private String notUploadMoney; - - @ExportEntityMap(CnName = "预提", EnName = "withholdCost") - private String withholdCost; - @ExportEntityMap(CnName = "上传", EnName = "money") + @ExportEntityMap(CnName = "其中费用*", EnName = "money") private String money; - - @ExportEntityMap(CnName = "创建", EnName = "createTime") - private String createTime; - @ExportEntityMap(CnName = "预提", EnName = "withholdingDate") - private String withholdingDate; - @ExportEntityMap(CnName = "上传", EnName = "uploadDate") - private String uploadDate; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") + @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + private String stayDetermineMoney; + @ExportEntityMap(CnName = "二次上传日期*", EnName = "secondaryUploadDate") private String secondaryUploadDate; - - @ExportEntityMap(CnName = "上传", EnName = "uploadState") - private String uploadState; - @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") - private String onceCheckState; - @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") - private String secondCheckState; - - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; + @ExportEntityMap(CnName = "二次上传金额*", EnName = "secondaryUploadMoney") + private String secondaryUploadMoney; + @ExportEntityMap(CnName = "其中支出费用*", EnName = "secondItureCost") + private String secondItureCost; + @ExportEntityMap(CnName = "其中待支付费用*", EnName = "secondTreatCost") + private String secondTreatCost; + @ExportEntityMap(CnName = "其中抵顶费用*", EnName = "secondSuppCost") + private String secondSuppCost; + @ExportEntityMap(CnName = "抵顶费用说明", EnName = "secondSuppRemark") + private String secondSuppRemark; @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") private String adjustmentRemarks; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "分公司", EnName = "createOrgName") - private String createOrgName; } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/OneExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/OneExcelVo.java index 02dd90c0ed..4dcbda163d 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/OneExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/OneExcelVo.java @@ -14,61 +14,36 @@ import java.util.Date; @Data public class OneExcelVo { - @ExportEntityMap(CnName = "序号", EnName = "rankNo") - private Integer rankNo; - @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") - private String purchaseSystemName; - @ExportEntityMap(CnName = "车架号", EnName = "vinNo") + @ExportEntityMap(CnName = "车架号*", EnName = "vinNo") private String vinNo; - @ExportEntityMap(CnName = "车型", EnName = "vehModelName") - private String vehModelName; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "厂家结算价*", EnName = "manufactorSettlementPrice") + private String manufactorSettlementPrice; + @ExportEntityMap(CnName = "其中运费金额*", EnName = "freight") + private String freight; + @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") private String rebateTypeValue; - @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") + @ExportEntityMap(CnName = "返利名称*", EnName = "rebateName") private String rebateName; - - @ExportEntityMap(CnName = "预提", EnName = "estimateRebate") + @ExportEntityMap(CnName = "预提返利*", EnName = "estimateRebate") private String estimateRebate; - @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") - private String uploadMoney; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadMoney") - private String secondaryUploadMoney; - @ExportEntityMap(CnName = "待确定", EnName = "stayDetermineMoney") - private String stayDetermineMoney; - @ExportEntityMap(CnName = "调整", EnName = "adjustmentMoney") - private String adjustmentMoney; - @ExportEntityMap(CnName = "未上传", EnName = "notUploadMoney") - private String notUploadMoney; - - @ExportEntityMap(CnName = "预提", EnName = "withholdCost") + @ExportEntityMap(CnName = "其中预提费用*", EnName = "withholdCost") private String withholdCost; - @ExportEntityMap(CnName = "上传", EnName = "money") - private String money; - - @ExportEntityMap(CnName = "创建", EnName = "createTime") - private String createTime; - @ExportEntityMap(CnName = "预提", EnName = "withholdingDate") - private String withholdingDate; - @ExportEntityMap(CnName = "上传", EnName = "uploadDate") + @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") + private String palceGenDate; + @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") private String uploadDate; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") - private String secondaryUploadDate; - - @ExportEntityMap(CnName = "上传", EnName = "uploadState") - private String uploadState; - @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") - private String onceCheckState; - @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") - private String secondCheckState; - - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; + @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + private String uploadMoney; + @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + private String stayDetermineMoney; + @ExportEntityMap(CnName = "待支付费用*", EnName = "onceTreatCost") + private String onceTreatCost; + @ExportEntityMap(CnName = "抵顶费用*", EnName = "onceSuppCost") + private String onceSuppCost; + @ExportEntityMap(CnName = "抵顶费用说明", EnName = "onceSuppRemark") + private String onceSuppRemark; @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") private String adjustmentRemarks; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "分公司", EnName = "createOrgName") - private String createOrgName; } diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/TwoExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/TwoExcelVo.java index 74f71f707e..d020be2b6a 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/TwoExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/TwoExcelVo.java @@ -14,61 +14,42 @@ import java.util.Date; @Data public class TwoExcelVo { - @ExportEntityMap(CnName = "序号", EnName = "rankNo") - private Integer rankNo; - @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") - private String purchaseSystemName; - @ExportEntityMap(CnName = "车架号", EnName = "vinNo") + @ExportEntityMap(CnName = "车架号*", EnName = "vinNo") private String vinNo; - @ExportEntityMap(CnName = "车型", EnName = "vehModelName") - private String vehModelName; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "厂家结算价*", EnName = "manufactorSettlementPrice") + private String manufactorSettlementPrice; + @ExportEntityMap(CnName = "其中运费金额*", EnName = "freight") + private String freight; + @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") + private String createTime; + @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") private String rebateTypeValue; - @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") + @ExportEntityMap(CnName = "返利名称*", EnName = "rebateName") private String rebateName; - - @ExportEntityMap(CnName = "预提", EnName = "estimateRebate") + @ExportEntityMap(CnName = "预提返利*", EnName = "estimateRebate") private String estimateRebate; - @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") - private String uploadMoney; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadMoney") - private String secondaryUploadMoney; - @ExportEntityMap(CnName = "待确定", EnName = "stayDetermineMoney") - private String stayDetermineMoney; - @ExportEntityMap(CnName = "调整", EnName = "adjustmentMoney") - private String adjustmentMoney; - @ExportEntityMap(CnName = "未上传", EnName = "notUploadMoney") - private String notUploadMoney; - - @ExportEntityMap(CnName = "预提", EnName = "withholdCost") + @ExportEntityMap(CnName = "其中预提费用*", EnName = "withholdCost") private String withholdCost; - @ExportEntityMap(CnName = "上传", EnName = "money") - private String money; - - @ExportEntityMap(CnName = "创建", EnName = "createTime") - private String createTime; - @ExportEntityMap(CnName = "预提", EnName = "withholdingDate") - private String withholdingDate; - @ExportEntityMap(CnName = "上传", EnName = "uploadDate") + @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") + private String palceGenDate; + @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") private String uploadDate; - @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") + @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + private String uploadMoney; + @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + private String stayDetermineMoney; + @ExportEntityMap(CnName = "其中费用*", EnName = "qzMoney") + private String qzMoney; + @ExportEntityMap(CnName = "二次上传日期*", EnName = "secondaryUploadDate") private String secondaryUploadDate; - - @ExportEntityMap(CnName = "上传", EnName = "uploadState") - private String uploadState; - @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") - private String onceCheckState; - @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") - private String secondCheckState; - - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; + @ExportEntityMap(CnName = "二次上传金额*", EnName = "secondaryUploadMoney") + private String secondaryUploadMoney; + @ExportEntityMap(CnName = "待支付费用*", EnName = "secondTreatCost") + private String secondTreatCost; + @ExportEntityMap(CnName = "抵顶费费用*", EnName = "secondSuppCost") + private String secondSuppCost; + @ExportEntityMap(CnName = "抵顶费用说明", EnName = "secondSuppRemark") + private String secondSuppRemark; @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") private String adjustmentRemarks; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "分公司", EnName = "createOrgName") - private String createOrgName; } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml index d4722b9c27..6a4084cedc 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml @@ -142,44 +142,24 @@ SELECT *, - expectTreatCost + expectSuppCost AS withholdCost, - onceTreatCost + onceSuppCost + secondTreatCost + secondSuppCost AS money, - estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0) AS notUploadMoney, - IF(secondaryUploadMoney > 0 AND isAdjustment = '是','是','否') AS secondCheckState, - IF( - uploadDate IS NOT NULL - AND uploadDate != '', - '已上传', - '未上传' - ) AS uploadState, - @row_number := @row_number + 1 AS rankNo + expectTreatCost + expectSuppCost AS withholdCost FROM - scm_veh_rebate,( - SELECT - @row_number := 0 - ) AS t + scm_veh_rebate ${ew.sqlSegment} @@ -110,21 +97,9 @@ SELECT *, expectTreatCost + expectSuppCost AS withholdCost, - onceTreatCost + onceSuppCost + secondTreatCost + secondSuppCost AS money, - estimateRebate - IFNULL(uploadMoney,0) - IFNULL(secondaryUploadMoney,0) + IFNULL(adjustmentMoney,0) AS notUploadMoney, - IF(secondaryUploadMoney > 0 AND isAdjustment = '是','是','否') AS secondCheckState, - IF( - uploadDate IS NOT NULL - AND uploadDate != '', - '已上传', - '未上传' - ) AS uploadState, - @row_number := @row_number + 1 AS rankNo + onceTreatCost + onceSuppCost AS qzMoney FROM - scm_veh_rebate,( - SELECT - @row_number := 0 - ) AS t + scm_veh_rebate ${ew.sqlSegment} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java index 3a49b4c8a4..929b4805ec 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java @@ -299,147 +299,16 @@ public class ScmVehRebateRest implements ScmVehRebateFeign { @Override public void excelListOne(ScmVehRebateQuery scmVehRebateQuery) { //得到所有要导出的数据 - List dataList = scmVehRebateService.excelListOne(scmVehRebateQuery); - // 创建一个新的Excel文档 - XSSFWorkbook wb = new XSSFWorkbook(); - // 创建一个名为Sheet1的工作表 - XSSFSheet sheet = wb.createSheet("一次导出"); - //样式 - XSSFCellStyle titleStyle = createTitleCellStyle(wb); - XSSFCellStyle headerStyle = createHeadCellStyle(wb); - XSSFCellStyle contentStyle = createContentCellStyle(wb); - // 行号 - int rowNum = 0; - // 创建第一页的第一行,索引从0开始 - XSSFRow row0 = sheet.createRow(rowNum++); - // 设置行高 - row0.setHeight((short) 600); - String[] row_Text = {"序号", "采购系统", "车架号", "车型", "所属年月", "返利类型", "返利名称", "返利金额", "", "", "", "", "", "其中费用", "", "日期", "", "", "", "状态", "", "", "是否调整", "调整说明", "品牌", "分公司"}; - for (int i = 0; i < row_Text.length; i++) { - XSSFCell c00 = row0.createCell(i); - c00.setCellValue(row_Text[i]); - c00.setCellStyle(headerStyle); - } - // 合并单元格,参数依次为起始列,结束列,起始行,结束行 (索引0开始) - sheet.addMergedRegion(new CellRangeAddress(0, 1, 0, 0)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 1, 1)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 2, 2)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 3, 3)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 4, 4)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 5, 5)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 6, 6)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 7, 12)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 14)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 15, 18)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 19, 21)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 22, 22)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 23, 23)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 24, 24)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 25, 25)); - //第二行 - XSSFRow row2 = sheet.createRow(rowNum++); - row2.setHeight((short) 700); - String[] row_third = {"", "", "", "", "", "", "", "预提", "上传", "二次上传", "待确定", "调整", "未上传", "预提", "上传", "创建", "预提", "上传", "二次上传", "上传", "一次核对", "二次核对", "", "", "", ""}; - for (int i = 0; i < row_third.length; i++) { - XSSFCell tempCell = row2.createCell(i); - tempCell.setCellValue(row_third[i]); - tempCell.setCellStyle(headerStyle); - } - for (OneExcelVo value : dataList) { - XSSFRow tempRow = sheet.createRow(rowNum++); - tempRow.setHeight((short) 500); - // 循环单元格填入数据 - for (int j = 0; j < 26; j++) { - XSSFCell tempCell = tempRow.createCell(j); - tempCell.setCellStyle(contentStyle); - String tempValue = ""; - switch (j) { - case 0: - tempValue = value.getRankNo().toString(); - break; - case 1: - tempValue = value.getPurchaseSystemName(); - break; - case 2: - tempValue = value.getVinNo(); - break; - case 3: - tempValue = value.getVehModelName(); - break; - case 4: - tempValue = value.getPalceGenDate(); - break; - case 5: - tempValue = value.getRebateTypeValue(); - break; - case 6: - tempValue = value.getRebateName(); - break; - case 7: - tempValue = value.getEstimateRebate(); - break; - case 8: - tempValue = value.getUploadMoney(); - break; - case 9: - tempValue = value.getSecondaryUploadMoney(); - break; - case 10: - tempValue = value.getStayDetermineMoney(); - break; - case 11: - tempValue = value.getAdjustmentMoney(); - break; - case 12: - tempValue = value.getNotUploadMoney(); - break; - case 13: - tempValue = value.getWithholdCost(); - break; - case 14: - tempValue = value.getMoney(); - break; - case 15: - tempValue = value.getCreateTime(); - break; - case 16: - tempValue = value.getWithholdingDate(); - break; - case 17: - tempValue = value.getUploadDate(); - break; - case 18: - tempValue = value.getSecondaryUploadDate(); - break; - case 19: - tempValue = value.getUploadState(); - break; - case 20: - tempValue = value.getOnceCheckState(); - break; - case 21: - tempValue = value.getSecondCheckState(); - break; - case 22: - tempValue = value.getIsAdjustment(); - break; - case 23: - tempValue = value.getAdjustmentRemarks(); - break; - case 24: - tempValue = value.getBrandName(); - break; - case 25: - tempValue = value.getCreateOrgName(); - break; - } - tempCell.setCellValue(tempValue); - //列宽自适应,j为自适应的列,true就是自适应,false就是不自适应,默认不自适应 - sheet.autoSizeColumn(j, true); - } + List exportVoList = scmVehRebateService.excelListOne(scmVehRebateQuery); + //定义导出的excel名字 + String excelName = "一次导出"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); } - //导出到浏览器下载 - buildExcelDocument("一次导出", wb, response); + ExportExcelUtils.export(fileNameURL, exportVoList, OneExcelVo.class, response); } @Override @@ -451,147 +320,16 @@ public class ScmVehRebateRest implements ScmVehRebateFeign { @Override public void excelListTwo(ScmVehRebateQuery scmVehRebateQuery) { //得到所有要导出的数据 - List dataList = scmVehRebateService.excelListTwo(scmVehRebateQuery); - // 创建一个新的Excel文档 - XSSFWorkbook wb = new XSSFWorkbook(); - // 创建一个名为Sheet1的工作表 - XSSFSheet sheet = wb.createSheet("二次导出"); - //样式 - XSSFCellStyle titleStyle = createTitleCellStyle(wb); - XSSFCellStyle headerStyle = createHeadCellStyle(wb); - XSSFCellStyle contentStyle = createContentCellStyle(wb); - // 行号 - int rowNum = 0; - // 创建第一页的第一行,索引从0开始 - XSSFRow row0 = sheet.createRow(rowNum++); - // 设置行高 - row0.setHeight((short) 600); - String[] row_Text = {"序号", "采购系统", "车架号", "车型", "所属年月", "返利类型", "返利名称", "返利金额", "", "", "", "", "", "其中费用", "", "日期", "", "", "", "状态", "", "", "是否调整", "调整说明", "品牌", "分公司"}; - for (int i = 0; i < row_Text.length; i++) { - XSSFCell c00 = row0.createCell(i); - c00.setCellValue(row_Text[i]); - c00.setCellStyle(headerStyle); - } - // 合并单元格,参数依次为起始列,结束列,起始行,结束行 (索引0开始) - sheet.addMergedRegion(new CellRangeAddress(0, 1, 0, 0)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 1, 1)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 2, 2)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 3, 3)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 4, 4)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 5, 5)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 6, 6)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 7, 12)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 14)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 15, 18)); - sheet.addMergedRegion(new CellRangeAddress(0, 0, 19, 21)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 22, 22)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 23, 23)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 24, 24)); - sheet.addMergedRegion(new CellRangeAddress(0, 1, 25, 25)); - //第二行 - XSSFRow row2 = sheet.createRow(rowNum++); - row2.setHeight((short) 700); - String[] row_third = {"", "", "", "", "", "", "", "预提", "上传", "二次上传", "待确定", "调整", "未上传", "预提", "上传", "创建", "预提", "上传", "二次上传", "上传", "一次核对", "二次核对", "", "", "", ""}; - for (int i = 0; i < row_third.length; i++) { - XSSFCell tempCell = row2.createCell(i); - tempCell.setCellValue(row_third[i]); - tempCell.setCellStyle(headerStyle); - } - for (TwoExcelVo value : dataList) { - XSSFRow tempRow = sheet.createRow(rowNum++); - tempRow.setHeight((short) 500); - // 循环单元格填入数据 - for (int j = 0; j < 26; j++) { - XSSFCell tempCell = tempRow.createCell(j); - tempCell.setCellStyle(contentStyle); - String tempValue = ""; - switch (j) { - case 0: - tempValue = value.getRankNo().toString(); - break; - case 1: - tempValue = value.getPurchaseSystemName(); - break; - case 2: - tempValue = value.getVinNo(); - break; - case 3: - tempValue = value.getVehModelName(); - break; - case 4: - tempValue = value.getPalceGenDate(); - break; - case 5: - tempValue = value.getRebateTypeValue(); - break; - case 6: - tempValue = value.getRebateName(); - break; - case 7: - tempValue = value.getEstimateRebate(); - break; - case 8: - tempValue = value.getUploadMoney(); - break; - case 9: - tempValue = value.getSecondaryUploadMoney(); - break; - case 10: - tempValue = value.getStayDetermineMoney(); - break; - case 11: - tempValue = value.getAdjustmentMoney(); - break; - case 12: - tempValue = value.getNotUploadMoney(); - break; - case 13: - tempValue = value.getWithholdCost(); - break; - case 14: - tempValue = value.getMoney(); - break; - case 15: - tempValue = value.getCreateTime(); - break; - case 16: - tempValue = value.getWithholdingDate(); - break; - case 17: - tempValue = value.getUploadDate(); - break; - case 18: - tempValue = value.getSecondaryUploadDate(); - break; - case 19: - tempValue = value.getUploadState(); - break; - case 20: - tempValue = value.getOnceCheckState(); - break; - case 21: - tempValue = value.getSecondCheckState(); - break; - case 22: - tempValue = value.getIsAdjustment(); - break; - case 23: - tempValue = value.getAdjustmentRemarks(); - break; - case 24: - tempValue = value.getBrandName(); - break; - case 25: - tempValue = value.getCreateOrgName(); - break; - } - tempCell.setCellValue(tempValue); - //列宽自适应,j为自适应的列,true就是自适应,false就是不自适应,默认不自适应 - sheet.autoSizeColumn(j, true); - } + List exportVoList = scmVehRebateService.excelListTwo(scmVehRebateQuery); + //定义导出的excel名字 + String excelName = "二次导出"; + String fileNameURL = ""; + try { + fileNameURL = URLEncoder.encode(excelName, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); } - //导出到浏览器下载 - buildExcelDocument("二次导出", wb, response); + ExportExcelUtils.export(fileNameURL, exportVoList, TwoExcelVo.class, response); } @Override diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java index 032f3ac981..fa2337e54f 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java @@ -591,11 +591,6 @@ public class ScmVehRebateService extends MybatisBaseService oneExcelVos = baseMapper.excelListOne(qw); for (OneExcelVo oneExcelVo : oneExcelVos) { oneExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parseDate(oneExcelVo.getCreateTime()))); - if ("1".equals(oneExcelVo.getOnceCheckState())){ - oneExcelVo.setOnceCheckState("是"); - }else { - oneExcelVo.setOnceCheckState("否"); - } } return oneExcelVos; } @@ -676,11 +671,6 @@ public class ScmVehRebateService extends MybatisBaseService twoExcelVos = baseMapper.excelListTwo(qw); for (TwoExcelVo twoExcelVo : twoExcelVos) { twoExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parseDate(twoExcelVo.getCreateTime()))); - if ("1".equals(twoExcelVo.getOnceCheckState())){ - twoExcelVo.setOnceCheckState("是"); - }else { - twoExcelVo.setOnceCheckState("否"); - } } return twoExcelVos; }