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 561d7e786d..f1b8226075 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,51 +11,57 @@ import lombok.Data; @Data public class OneExcelVo { - @ExportEntityMap(CnName = "采购系统*", EnName = "purchaseSystemName") + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") private String purchaseSystemName; - - @ExportEntityMap(CnName = "品牌名称*", EnName = "brandName") - private String brandName; - - @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") - private String createTime; - - @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; + @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 = "expectCost") - private String expectCost; - - @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") - private String palceGenDate; - - @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") - private String uploadDate; - - @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") private String uploadMoney; - - @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + @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 = "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 = "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 = "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/ScmSpecialRebateExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelVo.java index 05891e42f3..37324c03eb 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelVo.java @@ -36,68 +36,53 @@ public class ScmSpecialRebateExcelVo { @ExportEntityMap(CnName = "序号", EnName = "rankNo") private Integer rankNo; - @ExportEntityMap(CnName = "状态", EnName = "state") - private String state; - @ExportEntityMap(CnName = "一次核对状态", EnName = "onceCheckState") - private String onceCheckState; - @ExportEntityMap(CnName = "分公司", EnName = "createOrgName") - private String createOrgName; @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") private String purchaseSystemName; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "创建日期", EnName = "createTime") - private String createTime; + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") private String rebateTypeValue; @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") private String rebateName; - @ExportEntityMap(CnName = "预提金额", EnName = "estimateRebate") - private BigDecimal estimateRebate; - @ExportEntityMap(CnName = "其中支出费用", EnName = "expectItureCost") - private BigDecimal expectItureCost; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "expectTreatCost") - private BigDecimal expectTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "expectSuppCost") - private BigDecimal expectSuppCost; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "上传日期", EnName = "uploadDate") + + @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") + 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 = "uploadMoney") - private BigDecimal uploadMoney; - @ExportEntityMap(CnName = "其中待确定金额", EnName = "stayDetermineMoney") - private BigDecimal stayDetermineMoney; - @ExportEntityMap(CnName = "其中支出费用", EnName = "onceItureCost") - private BigDecimal onceItureCost; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "onceTreatCost") - private BigDecimal onceTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "onceSuppCost") - private BigDecimal onceSuppCost; - @ExportEntityMap(CnName = "二次上传日期", EnName = "secondaryUploadDate") + @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") private String secondaryUploadDate; - @ExportEntityMap(CnName = "二次上传金额", EnName = "secondaryUploadMoney") - private BigDecimal secondaryUploadMoney; - @ExportEntityMap(CnName = "其中支出费用", EnName = "secondItureCost") - private BigDecimal secondItureCost; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "secondTreatCost") - private BigDecimal secondTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "secondSuppCost") - private BigDecimal secondSuppCost; - @ExportEntityMap(CnName = "差异金额", EnName = "diffAmount") - private BigDecimal diffAmount; - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; - @ExportEntityMap(CnName = "返利调整金额", EnName = "adjustmentMoney") - private BigDecimal adjustmentMoney; - @ExportEntityMap(CnName = "支出费用调整金额", EnName = "itureAdjustmentMoney") - private BigDecimal itureAdjustmentMoney; - @ExportEntityMap(CnName = "待支付费用调整金额", EnName = "treatAdjustmentMoney") - private BigDecimal treatAdjustmentMoney; - @ExportEntityMap(CnName = "抵顶费用调整金额", EnName = "suppAdjustmentMoney") - private BigDecimal suppAdjustmentMoney; - @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") - private String adjustmentRemarks; + + @ExportEntityMap(CnName = "流程", EnName = "state") + private String state; + @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") + private String onceCheckState; + @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") + private String secondCheckState; + @ExportEntityMap(CnName = "备注", EnName = "remarks") private String remarks; + @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 57c96860fa..22d41d5d7f 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,60 +11,57 @@ import lombok.Data; @Data public class TwoExcelVo { - @ExportEntityMap(CnName = "采购系统*", EnName = "purchaseSystemName") + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") private String purchaseSystemName; - - @ExportEntityMap(CnName = "品牌名称*", EnName = "brandName") - private String brandName; - - @ExportEntityMap(CnName = "创建日期*", EnName = "createTime") - private String createTime; - - @ExportEntityMap(CnName = "返利类型*", EnName = "rebateTypeValue") + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; + @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 = "expectCost") - private String expectCost; - - @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") - private String palceGenDate; - - @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") - private String uploadDate; - - @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") private String uploadMoney; - - @ExportEntityMap(CnName = "其中费用*", EnName = "money") - private String money; - - @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + @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") + private String money; - @ExportEntityMap(CnName = "二次上传日期*", EnName = "secondaryUploadDate") + @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 = "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 = "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 = "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 b2a84473f8..02dd90c0ed 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,61 @@ import java.util.Date; @Data public class OneExcelVo { - //车架号 - @ExportEntityMap(CnName = "车架号*", EnName = "vinNo") + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") + private String purchaseSystemName; + @ExportEntityMap(CnName = "车架号", EnName = "vinNo") private String vinNo; - - //厂家结算价 - @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") + @ExportEntityMap(CnName = "车型", EnName = "vehModelName") + private String vehModelName; + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; + @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 = "withholdCost") - private String withholdCost; - - //所属年月 - @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") - private String palceGenDate; - - //上传日期 - @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") - private String uploadDate; - - //上传金额 - @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") private String uploadMoney; - - //待确定金额 - @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + @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 = "onceTreatCost") - private String onceTreatCost; - - @ExportEntityMap(CnName = "抵顶费用*", EnName = "onceSuppCost") - private String onceSuppCost; - - @ExportEntityMap(CnName = "抵顶费用说明", EnName = "onceSuppRemark") - private String onceSuppRemark; + @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 = "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/ScmVehRebateExcelVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelVo.java index e36ae083e5..7e1c55135f 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelVo.java @@ -28,73 +28,75 @@ package com.yxt.anrui.scm.api.scmvehrebate; import com.yxt.common.core.utils.ExportEntityMap; import lombok.Data; -import java.math.BigDecimal; - @Data public class ScmVehRebateExcelVo { @ExportEntityMap(CnName = "序号", EnName = "rankNo") private Integer rankNo; - @ExportEntityMap(CnName = "状态", EnName = "state") - private String state; - @ExportEntityMap(CnName = "一次核对状态", EnName = "onceCheckState") - private String onceCheckState; @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") private String purchaseSystemName; - @ExportEntityMap(CnName = "品牌", EnName = "brandName") - private String brandName; - @ExportEntityMap(CnName = "车型", EnName = "vehModelName") - private String vehModelName; @ExportEntityMap(CnName = "车架号", EnName = "vinNo") private String vinNo; - @ExportEntityMap(CnName = "车辆入库价", EnName = "manufactorSettlementPrice") - private BigDecimal manufactorSettlementPrice; - @ExportEntityMap(CnName = "其中运费", EnName = "freight") - private BigDecimal freight; - @ExportEntityMap(CnName = "其中上装金额", EnName = "topAmount") - private BigDecimal topAmount; - @ExportEntityMap(CnName = "创建日期", EnName = "createTime") - private String createTime; + @ExportEntityMap(CnName = "车型", EnName = "vehModelName") + private String vehModelName; + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; @ExportEntityMap(CnName = "返利类型", EnName = "rebateTypeValue") private String rebateTypeValue; @ExportEntityMap(CnName = "返利名称", EnName = "rebateName") private String rebateName; - @ExportEntityMap(CnName = "预提金额", EnName = "estimateRebate") - private BigDecimal estimateRebate; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "expectTreatCost") - private BigDecimal expectTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "expectSuppCost") - private BigDecimal expectSuppCost; - @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") - private String palceGenDate; - @ExportEntityMap(CnName = "上传日期", EnName = "uploadDate") + + @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") + 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 = "uploadMoney") - private BigDecimal uploadMoney; - @ExportEntityMap(CnName = "其中待确定金额", EnName = "stayDetermineMoney") - private BigDecimal stayDetermineMoney; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "onceTreatCost") - private BigDecimal onceTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "onceSuppCost") - private BigDecimal onceSuppCost; - @ExportEntityMap(CnName = "二次上传日期", EnName = "secondaryUploadDate") + @ExportEntityMap(CnName = "二次上传", EnName = "secondaryUploadDate") private String secondaryUploadDate; - @ExportEntityMap(CnName = "二次上传金额", EnName = "secondaryUploadMoney") - private BigDecimal secondaryUploadMoney; - @ExportEntityMap(CnName = "其中待支付费用", EnName = "secondTreatCost") - private BigDecimal secondTreatCost; - @ExportEntityMap(CnName = "其中抵顶费用", EnName = "secondSuppCost") - private BigDecimal secondSuppCost; - @ExportEntityMap(CnName = "差异金额", EnName = "diffAmount") - private BigDecimal diffAmount; - @ExportEntityMap(CnName = "是否调整", EnName = "isAdjustment") - private String isAdjustment; - @ExportEntityMap(CnName = "返利调整金额", EnName = "adjustmentMoney") - private BigDecimal adjustmentMoney; - @ExportEntityMap(CnName = "待支付费用调整金额", EnName = "treatAdjustmentMoney") - private BigDecimal treatAdjustmentMoney; - @ExportEntityMap(CnName = "抵顶费用调整金额", EnName = "suppAdjustmentMoney") - private BigDecimal suppAdjustmentMoney; - @ExportEntityMap(CnName = "调整说明", EnName = "adjustmentRemarks") - private String adjustmentRemarks; + + @ExportEntityMap(CnName = "流程", EnName = "state") + private String state; + @ExportEntityMap(CnName = "一次核对", EnName = "onceCheckState") + private String onceCheckState; + @ExportEntityMap(CnName = "二次核对", EnName = "secondCheckState") + private String secondCheckState; + + @ExportEntityMap(CnName = "车辆入库价", EnName = "manufactorSettlementPrice") + private String manufactorSettlementPrice; + + @ExportEntityMap(CnName = "运费", EnName = "freight") + private String freight; + @ExportEntityMap(CnName = "上装", EnName = "topAmount") + private String topAmount; + + @ExportEntityMap(CnName = "方式", EnName = "calculationModeValue") + private String calculationModeValue; + @ExportEntityMap(CnName = "标准", EnName = "calculationStandard") + private String calculationStandard; + + @ExportEntityMap(CnName = "备注", EnName = "remarks") + private String remarks; + @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 797b9ca24c..74f71f707e 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,71 +14,61 @@ import java.util.Date; @Data public class TwoExcelVo { - //车架号 - @ExportEntityMap(CnName = "车架号*", EnName = "vinNo") + @ExportEntityMap(CnName = "序号", EnName = "rankNo") + private Integer rankNo; + @ExportEntityMap(CnName = "采购系统", EnName = "purchaseSystemName") + private String purchaseSystemName; + @ExportEntityMap(CnName = "车架号", EnName = "vinNo") private String vinNo; - - //厂家结算价 - @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") + @ExportEntityMap(CnName = "车型", EnName = "vehModelName") + private String vehModelName; + @ExportEntityMap(CnName = "所属年月", EnName = "palceGenDate") + private String palceGenDate; + @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 = "withholdCost") - private String withholdCost; - - //所属年月 - @ExportEntityMap(CnName = "所属年月*", EnName = "palceGenDate") - private String palceGenDate; - - //上传日期 - @ExportEntityMap(CnName = "上传日期*", EnName = "uploadDate") - private String uploadDate; - - //上传金额 - @ExportEntityMap(CnName = "上传金额*", EnName = "uploadMoney") + @ExportEntityMap(CnName = "上传", EnName = "uploadMoney") private String uploadMoney; - - //待确定金额 - @ExportEntityMap(CnName = "待确定金额*", EnName = "stayDetermineMoney") + @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 = "qzMoney") - private String qzMoney; + @ExportEntityMap(CnName = "预提", EnName = "withholdCost") + private String withholdCost; + @ExportEntityMap(CnName = "上传", EnName = "money") + private String money; - //二次上传日期 - @ExportEntityMap(CnName = "二次上传日期*", EnName = "secondaryUploadDate") + @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 = "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 = "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 = "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.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java index 3f5733da46..39a5a7bff0 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java @@ -56,7 +56,7 @@ public interface ScmSpecialRebateMapper extends BaseMapper { IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); - IPage selectPageVoUpload(IPage page,@Param(Constants.WRAPPER) QueryWrapper qw); + IPage selectPageVoUpload(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); @Update("update scm_special_rebate set state = #{state} where sid = #{specialRebateSid}") void updateState(@Param("specialRebateSid") String specialRebateSid, @Param("state") Integer state); @@ -68,9 +68,11 @@ public interface ScmSpecialRebateMapper extends BaseMapper { ScmSpecialRebateVo selectExcelInfo(@Param("createOrgSid") String createOrgSid, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("estimateRebate") String estimateRebate, @Param("palceGenDate") String palceGenDate, @Param("purchaseSystemName") String purchaseSystemName, @Param("brandName") String brandName); + ScmSpecialRebateVo selectExcel(@Param("createOrgSid") String createOrgSid, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("estimateRebate") String estimateRebate, @Param("palceGenDate") String palceGenDate, @Param("purchaseSystemName") String purchaseSystemName, @Param("brandName") String brandName, @Param("remarks") String remarks); + void updateOneExcelInfo(@Param("uploadDate") String uploadDate, @Param("uploadMoney") String uploadMoney, @Param("stayDetermineMoney") String stayDetermineMoney, @Param("onceItureCost") String onceItureCost, @Param("onceTreatCost") String onceTreatCost, @Param("onceSuppCost") String onceSuppCost, @Param("onceSuppRemark") String onceSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid); - void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate, @Param("secondaryUploadMoney") String secondaryUploadMoney,@Param("secondItureCost") String secondItureCost, @Param("secondTreatCost") String secondTreatCost, @Param("secondSuppCost") String secondSuppCost, @Param("secondSuppRemark") String secondSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid); + void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate, @Param("secondaryUploadMoney") String secondaryUploadMoney, @Param("secondItureCost") String secondItureCost, @Param("secondTreatCost") String secondTreatCost, @Param("secondSuppCost") String secondSuppCost, @Param("secondSuppRemark") String secondSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid); List excelListOne(@Param(Constants.WRAPPER) QueryWrapper qw); 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 c3099044a7..e53101c5ad 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 @@ -52,7 +52,8 @@ ssr.purchaseSystemName, ssr.palceGenDate, ssr.withholdingDate, - ssr.uploadMoney + ssr.secondaryUploadMoney - ssr.onceItureCost - ssr.onceTreatCost - ssr.onceSuppCost - ssr.secondItureCost - ssr.secondTreatCost - ssr.secondSuppCost as uploadMoney, + ssr.uploadMoney + ssr.secondaryUploadMoney - ssr.onceItureCost - ssr.onceTreatCost - ssr.onceSuppCost - + ssr.secondItureCost - ssr.secondTreatCost - ssr.secondSuppCost as uploadMoney, sscad.mainSid as checkApplySid FROM scm_specialrebate_checkapplydetail sscad LEFT JOIN scm_special_rebate ssr @@ -76,9 +77,22 @@ AND brandName = #{brandName} + + UPDATE - scm_special_rebate + scm_special_rebate SET uploadDate = #{uploadDate}, uploadMoney = #{uploadMoney}, onceItureCost = #{onceItureCost}, @@ -96,7 +110,7 @@ UPDATE - scm_special_rebate + scm_special_rebate SET secondaryUploadDate = #{secondaryUploadDate}, secondaryUploadMoney = #{secondaryUploadMoney}, secondItureCost = #{secondItureCost}, @@ -110,44 +124,69 @@ WHERE sid = #{sid} - SELECT *, - expectItureCost + expectTreatCost + expectSuppCost AS expectCost - FROM - scm_special_rebate + expectItureCost + expectTreatCost + expectSuppCost AS withholdCost, + onceItureCost + onceTreatCost + onceSuppCost + secondItureCost + secondTreatCost + secondSuppCost AS money, + estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney AS notUploadMoney, + IF(secondaryUploadMoney > 0 AND isAdjustment = '是','是','否') AS secondCheckState, + @row_number := @row_number + 1 AS rankNo + FROM scm_special_rebate,( + SELECT + @row_number := 0 + ) AS t ${ew.sqlSegment} - + SELECT *, + expectItureCost + expectTreatCost + expectSuppCost AS withholdCost, + onceItureCost + onceTreatCost + onceSuppCost AS money, + estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney 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 FROM - scm_special_rebate + scm_special_rebate, + (SELECT + @row_number := 0) AS t ${ew.sqlSegment} - + SELECT *, + expectItureCost + expectTreatCost + expectSuppCost AS withholdCost, + onceItureCost + onceTreatCost + onceSuppCost AS money, + estimateRebate - uploadMoney - secondaryUploadMoney + adjustmentMoney 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 + FROM + scm_special_rebate, + (SELECT + @row_number := 0) AS t ${ew.sqlSegment} - + select count(*) from scm_special_rebate ${ew.sqlSegment} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java index 76b2194658..94857ed0e0 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java @@ -30,6 +30,7 @@ import cn.hutool.core.date.DateUtil; import com.yxt.anrui.scm.api.scmspecialrebate.*; import com.yxt.anrui.scm.api.scmspecialrebatecheckapply.SpecialRebateCheckExcelVo; import com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApply; +import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateExcelVo; import com.yxt.anrui.scm.biz.scmspecialrebatewith.ScmSpecialRebateWithService; import com.yxt.anrui.scm.biz.scmspecialrebatewithapply.ScmSpecialRebateWithApplyService; import com.yxt.common.base.utils.ExportExcelUtils; @@ -38,6 +39,10 @@ import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.compress.utils.IOUtils; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -85,16 +90,135 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign { @PostMapping("/excelList") public void excelList(@RequestBody ScmSpecialRebateQuery query) { //得到所有要导出的数据 - List exportVoList = scmSpecialRebateService.excelList(query); - //定义导出的excel名字 - String excelName = "专项返利管理"; - String fileNameURL = ""; - try { - fileNameURL = URLEncoder.encode(excelName, "UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + List dataList = scmSpecialRebateService.excelList(query); + // 创建一个新的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); } - ExportExcelUtils.export(fileNameURL, exportVoList, ScmSpecialRebateExcelVo.class, response); + // 合并单元格,参数依次为起始列,结束列,起始行,结束行 (索引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, 0, 5, 10)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 11, 12)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 16)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 17, 19)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 20, 20)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 21, 21)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 22, 22)); + //第二行 + 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 (ScmSpecialRebateExcelVo value : dataList) { + XSSFRow tempRow = sheet.createRow(rowNum++); + tempRow.setHeight((short) 500); + // 循环单元格填入数据 + for (int j = 0; j < 23; j++) { + //列宽自适应,j为自适应的列,true就是自适应,false就是不自适应,默认不自适应 + sheet.autoSizeColumn(j, true); + 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.getPalceGenDate(); + break; + case 3: + tempValue = value.getRebateTypeValue(); + break; + case 4: + tempValue = value.getRebateName(); + break; + case 5: + tempValue = value.getEstimateRebate(); + break; + case 6: + tempValue = value.getUploadMoney(); + break; + case 7: + tempValue = value.getSecondaryUploadMoney(); + break; + case 8: + tempValue = value.getStayDetermineMoney(); + break; + case 9: + tempValue = value.getAdjustmentMoney(); + break; + case 10: + tempValue = value.getNotUploadMoney(); + break; + case 11: + tempValue = value.getWithholdCost(); + break; + case 12: + tempValue = value.getMoney(); + break; + case 13: + tempValue = value.getCreateTime(); + break; + case 14: + tempValue = value.getWithholdingDate(); + break; + case 15: + tempValue = value.getUploadDate(); + break; + case 16: + tempValue = value.getSecondaryUploadDate(); + break; + case 17: + tempValue = value.getState(); + break; + case 18: + tempValue = value.getOnceCheckState(); + break; + case 19: + tempValue = value.getSecondCheckState(); + break; + case 20: + tempValue = value.getRemarks(); + break; + case 21: + tempValue = value.getBrandName(); + break; + case 22: + tempValue = value.getCreateOrgName(); + break; + } + tempCell.setCellValue(tempValue); + } + } + //导出到浏览器下载 + buildExcelDocument("专项返利管理", wb, response); } @Override @@ -191,16 +315,139 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign { @Override public void excelListOne(ScmSpecialRebateQuery scmSpecialRebateQuery) { //得到所有要导出的数据 - List exportVoList = scmSpecialRebateService.excelListOne(scmSpecialRebateQuery); - //定义导出的excel名字 - String excelName = "一次导出"; - String fileNameURL = ""; - try { - fileNameURL = URLEncoder.encode(excelName, "UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + List dataList = scmSpecialRebateService.excelListOne(scmSpecialRebateQuery); + // 创建一个新的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, 0, 5, 10)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 11, 12)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 16)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 17, 19)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 20, 20)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 21, 21)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 22, 22)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 23, 23)); + //第二行 + 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); } - ExportExcelUtils.export(fileNameURL, exportVoList, OneExcelVo.class, response); + for (OneExcelVo value : dataList) { + XSSFRow tempRow = sheet.createRow(rowNum++); + tempRow.setHeight((short) 500); + // 循环单元格填入数据 + for (int j = 0; j < 24; j++) { + //列宽自适应,j为自适应的列,true就是自适应,false就是不自适应,默认不自适应 + sheet.autoSizeColumn(j, true); + 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.getPalceGenDate(); + break; + case 3: + tempValue = value.getRebateTypeValue(); + break; + case 4: + tempValue = value.getRebateName(); + break; + case 5: + tempValue = value.getEstimateRebate(); + break; + case 6: + tempValue = value.getUploadMoney(); + break; + case 7: + tempValue = value.getSecondaryUploadMoney(); + break; + case 8: + tempValue = value.getStayDetermineMoney(); + break; + case 9: + tempValue = value.getAdjustmentMoney(); + break; + case 10: + tempValue = value.getNotUploadMoney(); + break; + case 11: + tempValue = value.getWithholdCost(); + break; + case 12: + tempValue = value.getMoney(); + break; + case 13: + tempValue = value.getCreateTime(); + break; + case 14: + tempValue = value.getWithholdingDate(); + break; + case 15: + tempValue = value.getUploadDate(); + break; + case 16: + tempValue = value.getSecondaryUploadDate(); + break; + case 17: + tempValue = value.getUploadState(); + break; + case 18: + tempValue = value.getOnceCheckState(); + break; + case 19: + tempValue = value.getSecondCheckState(); + break; + case 20: + tempValue = value.getIsAdjustment(); + break; + case 21: + tempValue = value.getAdjustmentRemarks(); + break; + case 22: + tempValue = value.getBrandName(); + break; + case 23: + tempValue = value.getCreateOrgName(); + break; + } + tempCell.setCellValue(tempValue); + } + } + //导出到浏览器下载 + buildExcelDocument("一次导出", wb, response); } @Override @@ -211,20 +458,240 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign { @Override public void excelListTwo(ScmSpecialRebateQuery scmSpecialRebateQuery) { //得到所有要导出的数据 - List exportVoList = scmSpecialRebateService.excelListTwo(scmSpecialRebateQuery); - //定义导出的excel名字 - String excelName = "二次导出"; - String fileNameURL = ""; - try { - fileNameURL = URLEncoder.encode(excelName, "UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + List dataList = scmSpecialRebateService.excelListTwo(scmSpecialRebateQuery); + // 创建一个新的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, 0, 5, 10)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 11, 12)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 13, 16)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 17, 19)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 20, 20)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 21, 21)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 22, 22)); + sheet.addMergedRegion(new CellRangeAddress(0, 1, 23, 23)); + //第二行 + 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); } - ExportExcelUtils.export(fileNameURL, exportVoList, TwoExcelVo.class, response); + for (TwoExcelVo value : dataList) { + XSSFRow tempRow = sheet.createRow(rowNum++); + tempRow.setHeight((short) 500); + // 循环单元格填入数据 + for (int j = 0; j < 24; j++) { + //列宽自适应,j为自适应的列,true就是自适应,false就是不自适应,默认不自适应 + sheet.autoSizeColumn(j, true); + 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.getPalceGenDate(); + break; + case 3: + tempValue = value.getRebateTypeValue(); + break; + case 4: + tempValue = value.getRebateName(); + break; + case 5: + tempValue = value.getEstimateRebate(); + break; + case 6: + tempValue = value.getUploadMoney(); + break; + case 7: + tempValue = value.getSecondaryUploadMoney(); + break; + case 8: + tempValue = value.getStayDetermineMoney(); + break; + case 9: + tempValue = value.getAdjustmentMoney(); + break; + case 10: + tempValue = value.getNotUploadMoney(); + break; + case 11: + tempValue = value.getWithholdCost(); + break; + case 12: + tempValue = value.getMoney(); + break; + case 13: + tempValue = value.getCreateTime(); + break; + case 14: + tempValue = value.getWithholdingDate(); + break; + case 15: + tempValue = value.getUploadDate(); + break; + case 16: + tempValue = value.getSecondaryUploadDate(); + break; + case 17: + tempValue = value.getUploadState(); + break; + case 18: + tempValue = value.getOnceCheckState(); + break; + case 19: + tempValue = value.getSecondCheckState(); + break; + case 20: + tempValue = value.getIsAdjustment(); + break; + case 21: + tempValue = value.getAdjustmentRemarks(); + break; + case 22: + tempValue = value.getBrandName(); + break; + case 23: + tempValue = value.getCreateOrgName(); + break; + } + tempCell.setCellValue(tempValue); + } + } + //导出到浏览器下载 + buildExcelDocument("二次导出", wb, response); } @Override public ResultBean getExcelTwoInfo(MultipartFile file, HttpServletRequest request, String userSid, String orgPath) throws IOException, ParseException { return scmSpecialRebateService.getExcelTwoInfo(file, request, userSid, orgPath); } + + /** + * @Description: [导出到浏览器] + * @Param: [fileName, wb, response] + * @return: void + * @Author: yangyongzhuo + * @Date: 2021/7/25 9:40 + */ + private static void buildExcelDocument(String fileName, Workbook wb, HttpServletResponse response) { + try { + response.setContentType("application/octet-stream"); + // 可自行定义编码格式 + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "utf-8")); + //清除jsp编译html文件的空白,防止excel出现空行 + response.flushBuffer(); + //写出 + wb.write(response.getOutputStream()); + } catch (IOException e) { + e.printStackTrace(); + } finally { + IOUtils.closeQuietly(wb); + } + } + + /** + * 创建标题样式 + * + * @param wb + * @return + */ + private static XSSFCellStyle createTitleCellStyle(XSSFWorkbook wb) { + XSSFCellStyle cellStyle = wb.createCellStyle(); + cellStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直对齐 + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); +// cellStyle.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());//背景颜色 + + XSSFFont headerFont1 = (XSSFFont) wb.createFont(); // 创建字体样式 + headerFont1.setBold(true); //字体加粗 + headerFont1.setFontName("黑体"); // 设置字体类型 + headerFont1.setFontHeightInPoints((short) 15); // 设置字体大小 + cellStyle.setFont(headerFont1); // 为标题样式设置字体样式 + return cellStyle; + } + + /** + * 创建表头样式 + * + * @param wb + * @return + */ + private static XSSFCellStyle createHeadCellStyle(XSSFWorkbook wb) { + XSSFCellStyle cellStyle = wb.createCellStyle(); + cellStyle.setWrapText(true);// 设置自动换行 + cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景颜色 + cellStyle.setAlignment(HorizontalAlignment.CENTER); //水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //垂直对齐 + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); +// cellStyle.setBottomBorderColor(IndexedColors.BLACK.index); + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN); //左边框 + cellStyle.setBorderRight(BorderStyle.THIN); //右边框 + cellStyle.setBorderTop(BorderStyle.THIN); //上边框 + + XSSFFont headerFont = (XSSFFont) wb.createFont(); // 创建字体样式 + headerFont.setBold(true); //字体加粗 + headerFont.setFontName("黑体"); // 设置字体类型 + headerFont.setFontHeightInPoints((short) 12); // 设置字体大小 + cellStyle.setFont(headerFont); // 为标题样式设置字体样式 + + return cellStyle; + } + + /** + * 创建内容样式 + * + * @param wb + * @return + */ + private static XSSFCellStyle createContentCellStyle(XSSFWorkbook wb) { + XSSFCellStyle cellStyle = wb.createCellStyle(); + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平居中 + cellStyle.setWrapText(false);// 设置自动换行 + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN); //左边框 + cellStyle.setBorderRight(BorderStyle.THIN); //右边框 + cellStyle.setBorderTop(BorderStyle.THIN); //上边框 + + // 生成12号字体 + XSSFFont font = wb.createFont(); + font.setColor((short) 8); + font.setFontHeightInPoints((short) 12); + cellStyle.setFont(font); + + return cellStyle; + } } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java index 746376cc3c..8f70009095 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java @@ -160,13 +160,13 @@ public class ScmSpecialRebateService extends MybatisBaseService page = PagerUtil.queryToPage(pq); IPage pagging = baseMapper.selectPageVo(page, qw); for (ScmSpecialRebateVo record : pagging.getRecords()) { - if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())){ - if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())){ + if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) { + if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) { record.setSecondCheckState("是"); - }else { + } else { record.setSecondCheckState("否"); } - }else { + } else { record.setSecondCheckState("否"); } } @@ -255,7 +255,7 @@ public class ScmSpecialRebateService extends MybatisBaseService 0) { @@ -489,13 +489,13 @@ public class ScmSpecialRebateService extends MybatisBaseService 0 && "是".equals(record.getIsAdjustment())){ + if (StringUtils.isNotBlank(record.getSecondaryUploadMoney())) { + if (Integer.parseInt(record.getSecondaryUploadMoney()) > 0 && "是".equals(record.getIsAdjustment())) { record.setSecondCheckState("是"); - }else { + } else { record.setSecondCheckState("否"); } - }else { + } else { record.setSecondCheckState("否"); } } @@ -687,12 +687,12 @@ public class ScmSpecialRebateService extends MybatisBaseService infos = importReturn.getInfos(); for (ExcelInfo info : infos) { - ScmSpecialRebateDto scmSpecialRebate = new ScmSpecialRebateDto(); + ScmSpecialRebate scmSpecialRebate = new ScmSpecialRebate(); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); String purchaseSystemSid = basePurchaseSystemFeign.selByPurchaseSystemName(info.getPurchaseSystemName(), useOrgSid).getData(); scmSpecialRebate.setPurchaseSystemSid(purchaseSystemSid); scmSpecialRebate.setPurchaseSystemName(info.getPurchaseSystemName()); - scmSpecialRebate.setState("0"); + scmSpecialRebate.setState(0); scmSpecialRebate.setCreateBySid(userSid); String brandSid = baseVehicleBrandFeign.selByBrandName(info.getBrandName()).getData(); scmSpecialRebate.setBrandSid(brandSid); @@ -713,7 +713,7 @@ public class ScmSpecialRebateService extends MybatisBaseService + + - SELECT - *, - @row_number := @row_number + 1 AS rankNo, - sid AS vehRebateSid - FROM - scm_veh_rebate,( - SELECT - @row_number := 0 - ) AS t - - ${ew.sqlSegment} - - -