Browse Source

更改

master
ligaode 2 months ago
parent
commit
9567aa4419
  1. 78
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/OneExcelVo.java
  2. 93
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateExcelVo.java
  3. 83
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/TwoExcelVo.java
  4. 92
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/OneExcelVo.java
  5. 110
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelVo.java
  6. 96
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/TwoExcelVo.java
  7. 6
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java
  8. 85
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml
  9. 521
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java
  10. 39
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  11. 66
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
  12. 563
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java
  13. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java

78
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;
}

93
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;
}

83
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;
}

92
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;
}

110
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;
}

96
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;
}

6
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<ScmSpecialRebate> {
IPage<ScmSpecialRebateVo> selectPageVo(IPage<ScmSpecialRebate> page, @Param(Constants.WRAPPER) Wrapper<ScmSpecialRebate> qw);
IPage<ScmSpecialRebateVo> selectPageVoUpload(IPage<ScmSpecialRebate> page,@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
IPage<ScmSpecialRebateVo> selectPageVoUpload(IPage<ScmSpecialRebate> page, @Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> 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<ScmSpecialRebate> {
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<OneExcelVo> excelListOne(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);

85
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}
</select>
<select id="selectExcel" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateVo">
SELECT *
FROM scm_special_rebate
WHERE createOrgSid = #{createOrgSid}
AND rebateName = #{rebateName}
AND rebateTypeValue = #{rebateTypeValue}
AND estimateRebate = #{estimateRebate}
AND palceGenDate = #{palceGenDate}
AND purchaseSystemName = #{purchaseSystemName}
AND brandName = #{brandName}
AND remarks = #{remarks}
</select>
<update id="updateOneExcelInfo">
UPDATE
scm_special_rebate
scm_special_rebate
SET uploadDate = #{uploadDate},
uploadMoney = #{uploadMoney},
onceItureCost = #{onceItureCost},
@ -96,7 +110,7 @@
<update id="updateTwoExcelInfo">
UPDATE
scm_special_rebate
scm_special_rebate
SET secondaryUploadDate = #{secondaryUploadDate},
secondaryUploadMoney = #{secondaryUploadMoney},
secondItureCost = #{secondItureCost},
@ -110,44 +124,69 @@
WHERE sid = #{sid}
</update>
<select id="excelListOne" resultType="com.yxt.anrui.scm.api.scmspecialrebate.OneExcelVo">
<select id="excelList" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelVo">
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
<where>
${ew.sqlSegment}
</where>
</select>
<select id="excelListTwo" resultType="com.yxt.anrui.scm.api.scmspecialrebate.TwoExcelVo">
SELECT
*,
expectItureCost + expectTreatCost + expectSuppCost AS expectCost,
onceItureCost + onceTreatCost + onceSuppCost AS money
<select id="excelListOne" resultType="com.yxt.anrui.scm.api.scmspecialrebate.OneExcelVo">
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
<where>
${ew.sqlSegment}
</where>
</select>
<select id="checkSave" resultType="int">
select count(*) from scm_special_rebate
<select id="excelListTwo" resultType="com.yxt.anrui.scm.api.scmspecialrebate.TwoExcelVo">
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
<where>
${ew.sqlSegment}
</where>
</select>
<select id="excelList" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelVo">
SELECT
*,
@row_number := @row_number + 1 AS rankNo
FROM scm_special_rebate,(
SELECT
@row_number := 0
) AS t
<select id="checkSave" resultType="int">
select count(*) from scm_special_rebate
<where>
${ew.sqlSegment}
</where>

521
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<ScmSpecialRebateExcelVo> exportVoList = scmSpecialRebateService.excelList(query);
//定义导出的excel名字
String excelName = "专项返利管理";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
List<ScmSpecialRebateExcelVo> 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<OneExcelVo> exportVoList = scmSpecialRebateService.excelListOne(scmSpecialRebateQuery);
//定义导出的excel名字
String excelName = "一次导出";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
List<OneExcelVo> 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<TwoExcelVo> exportVoList = scmSpecialRebateService.excelListTwo(scmSpecialRebateQuery);
//定义导出的excel名字
String excelName = "二次导出";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
List<TwoExcelVo> 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;
}
}

39
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<ScmSpecialRebate
IPage<ScmSpecialRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmSpecialRebateVo> 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<ScmSpecialRebate
qw.eq("palceGenDate", dto.getPalceGenDate());
qw.eq("purchaseSystemSid", dto.getPurchaseSystemSid());
qw.eq("brandSid", dto.getBrandSid());
qw.eq("remarks",dto.getRemarks());
qw.eq("remarks", dto.getRemarks());
if (StringUtils.isBlank(dtoSid)) {
int i = baseMapper.checkSave(qw);
if (i > 0) {
@ -489,13 +489,13 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
} else {//上传状态:已上传
record.setUploadState("1");
}
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("否");
}
}
@ -687,12 +687,12 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
} else {
List<ExcelInfo> 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<ScmSpecialRebate
scmSpecialRebate.setUseOrgSid(useOrgSid);
scmSpecialRebate.setUseOrgName(sysOrganizationVo.getName());
scmSpecialRebate.setOrgPath(orgPath);
saveOrUpdateDto(scmSpecialRebate);
save(scmSpecialRebate);
}
return rb.success().setMsg("成功导入数据,请点击确定按钮");
}
@ -826,9 +826,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (!importVoList.isEmpty()) {
for (ExcelInfo excelInfo : importVoList) {
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcelInfo(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName());
if (scmSpecialRebateVo == null || StringUtils.isBlank(scmSpecialRebateVo.getSid())) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利信息存在");
ScmSpecialRebateVo scmSpecialRebateVo = baseMapper.selectExcel(createOrgSid, excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getEstimateRebate(), excelInfo.getPalceGenDate(), excelInfo.getPurchaseSystemName(), excelInfo.getBrandName(), excelInfo.getRemarks());
if (scmSpecialRebateVo != null) {
checkWord.add("返利名称" + excelInfo.getRebateName() + "导入的返利信息存在");
break;
}
if (scmSpecialRebateVo.getOnceCheckState() == 1) {
@ -2113,15 +2113,6 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
scmSpecialRebateExcelVo.setOnceCheckState("一次核对中");
}
scmSpecialRebateExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parse(scmSpecialRebateExcelVo.getCreateTime())));
if ("是".equals(scmSpecialRebateExcelVo.getIsAdjustment())) {
scmSpecialRebateExcelVo.setItureAdjustmentMoney(scmSpecialRebateExcelVo.getOnceItureCost().add(scmSpecialRebateExcelVo.getSecondItureCost()).subtract(scmSpecialRebateExcelVo.getExpectItureCost()));
scmSpecialRebateExcelVo.setTreatAdjustmentMoney(scmSpecialRebateExcelVo.getOnceTreatCost().add(scmSpecialRebateExcelVo.getSecondTreatCost()).subtract(scmSpecialRebateExcelVo.getExpectTreatCost()));
scmSpecialRebateExcelVo.setSuppAdjustmentMoney(scmSpecialRebateExcelVo.getOnceSuppCost().add(scmSpecialRebateExcelVo.getSecondSuppCost()).subtract(scmSpecialRebateExcelVo.getExpectSuppCost()));
} else {
scmSpecialRebateExcelVo.setItureAdjustmentMoney(BigDecimal.ZERO);
scmSpecialRebateExcelVo.setTreatAdjustmentMoney(BigDecimal.ZERO);
scmSpecialRebateExcelVo.setSuppAdjustmentMoney(BigDecimal.ZERO);
}
}
return scmSpecialRebateExcelVos;
}

66
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml

@ -63,12 +63,43 @@
AND createOrgSid = #{useOrgSid}
</select>
<select id="excelList" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateExcelVo">
SELECT
*,
expectTreatCost + expectSuppCost AS withholdCost,
onceTreatCost + onceSuppCost + 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_veh_rebate,(
SELECT
@row_number := 0
) AS t
<where>
${ew.sqlSegment}
</where>
</select>
<select id="excelListOne" resultType="com.yxt.anrui.scm.api.scmvehrebate.OneExcelVo">
SELECT
*,
expectTreatCost + expectSuppCost AS withholdCost
expectTreatCost + expectSuppCost AS withholdCost,
onceTreatCost + onceSuppCost + secondTreatCost + secondSuppCost 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_veh_rebate
scm_veh_rebate,(
SELECT
@row_number := 0
) AS t
<where>
${ew.sqlSegment}
</where>
@ -78,9 +109,21 @@
SELECT
*,
expectTreatCost + expectSuppCost AS withholdCost,
onceTreatCost + onceSuppCost AS qzMoney
onceTreatCost + onceSuppCost + secondTreatCost + secondSuppCost 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_veh_rebate
scm_veh_rebate,(
SELECT
@row_number := 0
) AS t
<where>
${ew.sqlSegment}
</where>
@ -118,21 +161,6 @@
WHERE sid = #{sid}
</update>
<select id="excelList" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateExcelVo">
SELECT
*,
@row_number := @row_number + 1 AS rankNo,
sid AS vehRebateSid
FROM
scm_veh_rebate,(
SELECT
@row_number := 0
) AS t
<where>
${ew.sqlSegment}
</where>
</select>
<select id="checkApplyGetVehRebateAll" resultType="com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVo">
SELECT
*,

563
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateRest.java

@ -29,18 +29,23 @@ import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelVo;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateQuery;
import com.yxt.anrui.scm.api.scmvehrebate.*;
import com.yxt.common.base.utils.ExportExcelUtils;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery;
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.commons.lang3.StringUtils;
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;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
@ -90,16 +95,184 @@ public class ScmVehRebateRest implements ScmVehRebateFeign {
@PostMapping("/excelList")
public void excelList(@RequestBody ScmVehRebateQuery query) {
//得到所有要导出的数据
List<ScmVehRebateExcelVo> exportVoList = scmVehRebateService.excelList(query);
//定义导出的excel名字
String excelName = "单车返利管理";
String fileNameURL = "";
List<ScmVehRebateExcelVo> dataList = scmVehRebateService.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);
}
// 合并单元格,参数依次为起始列,结束列,起始行,结束行 (索引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, 0, 23, 24));
sheet.addMergedRegion(new CellRangeAddress(0, 0, 25, 26));
sheet.addMergedRegion(new CellRangeAddress(0, 1, 27, 27));
sheet.addMergedRegion(new CellRangeAddress(0, 1, 28, 28));
sheet.addMergedRegion(new CellRangeAddress(0, 1, 29, 29));
//第二行
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 (ScmVehRebateExcelVo value : dataList) {
XSSFRow tempRow = sheet.createRow(rowNum++);
tempRow.setHeight((short) 500);
// 循环单元格填入数据
for (int j = 0; j < 30; 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.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.getState();
break;
case 20:
tempValue = value.getOnceCheckState();
break;
case 21:
tempValue = value.getSecondCheckState();
break;
case 22:
tempValue = value.getManufactorSettlementPrice();
break;
case 23:
tempValue = value.getFreight();
break;
case 24:
tempValue = value.getTopAmount();
break;
case 25:
tempValue = value.getCalculationModeValue();
break;
case 26:
tempValue = value.getCalculationStandard();
break;
case 27:
tempValue = value.getRemarks();
break;
case 28:
tempValue = value.getBrandName();
break;
case 29:
tempValue = value.getCreateOrgName();
break;
}
tempCell.setCellValue(tempValue);
}
}
//导出到浏览器下载
buildExcelDocument("单车返利管理", wb, response);
}
/**
* @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 {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
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);
}
ExportExcelUtils.export(fileNameURL, exportVoList, ScmVehRebateExcelVo.class, response);
}
@Override
@ -126,16 +299,147 @@ public class ScmVehRebateRest implements ScmVehRebateFeign {
@Override
public void excelListOne(ScmVehRebateQuery scmVehRebateQuery) {
//得到所有要导出的数据
List<OneExcelVo> exportVoList = scmVehRebateService.excelListOne(scmVehRebateQuery);
//定义导出的excel名字
String excelName = "一次导出";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
List<OneExcelVo> 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++) {
//列宽自适应,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.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);
}
}
ExportExcelUtils.export(fileNameURL, exportVoList, OneExcelVo.class, response);
//导出到浏览器下载
buildExcelDocument("一次导出", wb, response);
}
@Override
@ -147,16 +451,147 @@ public class ScmVehRebateRest implements ScmVehRebateFeign {
@Override
public void excelListTwo(ScmVehRebateQuery scmVehRebateQuery) {
//得到所有要导出的数据
List<TwoExcelVo> exportVoList = scmVehRebateService.excelListTwo(scmVehRebateQuery);
//定义导出的excel名字
String excelName = "二次导出";
String fileNameURL = "";
try {
fileNameURL = URLEncoder.encode(excelName, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
List<TwoExcelVo> 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);
}
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 < 26; 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.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);
}
}
//导出到浏览器下载
buildExcelDocument("二次导出", wb, response);
}
@Override
@ -231,6 +666,80 @@ public class ScmVehRebateRest implements ScmVehRebateFeign {
@Override
public ResultBean delByVehSid2(String vehSid, String useOrgSid, String key) {
return scmVehRebateService.delByVehSid2(vehSid,useOrgSid,key);
return scmVehRebateService.delByVehSid2(vehSid, useOrgSid, key);
}
/**
* 创建标题样式
*
* @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;
}
}

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java

@ -2254,13 +2254,6 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
scmVehRebateExcelVo.setOnceCheckState("一次核对中");
}
scmVehRebateExcelVo.setCreateTime(DateUtil.formatDate(DateUtil.parse(scmVehRebateExcelVo.getCreateTime())));
if ("是".equals(scmVehRebateExcelVo.getIsAdjustment())) {
scmVehRebateExcelVo.setTreatAdjustmentMoney(scmVehRebateExcelVo.getOnceTreatCost().add(scmVehRebateExcelVo.getSecondTreatCost()).subtract(scmVehRebateExcelVo.getExpectTreatCost()));
scmVehRebateExcelVo.setSuppAdjustmentMoney(scmVehRebateExcelVo.getOnceSuppCost().add(scmVehRebateExcelVo.getSecondSuppCost()).subtract(scmVehRebateExcelVo.getExpectSuppCost()));
} else {
scmVehRebateExcelVo.setTreatAdjustmentMoney(BigDecimal.ZERO);
scmVehRebateExcelVo.setSuppAdjustmentMoney(BigDecimal.ZERO);
}
}
return scmVehRebateExcelVos;
}

Loading…
Cancel
Save