Skip to content

Commit

Permalink
Merge pull request #252 from Jzow/master
Browse files Browse the repository at this point in the history
Change export data object
  • Loading branch information
wansenai-bot authored Dec 3, 2023
2 parents 4359666 + d13dd13 commit 3deb4e8
Show file tree
Hide file tree
Showing 22 changed files with 478 additions and 116 deletions.
13 changes: 0 additions & 13 deletions core/domain/src/main/java/com/wansenai/bo/AllotStockBO.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -30,47 +29,35 @@ public class AllotStockBO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long warehouseId;

@ExcelExport(value = "调出方仓库")
private String warehouseName;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long otherWarehouseId;

@ExcelExport(value = "调入方仓库")
private String otherWarehouseName;

@ExcelExport(value = "条码")
private String barCode;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long productId;

@ExcelExport(value = "商品名称")
private String productName;

@ExcelExport(value = "规格")
private String productStandard;

@ExcelExport(value = "型号")
private String productModel;

@ExcelExport(value = "单位")
private String productUnit;

@ExcelExport(value = "库存")
private Integer stock;

@ExcelExport(value = "数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "单价")
private BigDecimal unitPrice;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额")
private BigDecimal amount;

@ExcelExport(value = "备注")
private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://opensource.wansenai.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.wansenai.bo;

import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class AllotStockDataExportBO {

@ExcelExport(value = "调拨单号")
private String receiptNumber;

@ExcelExport(value = "调出方仓库")
private String warehouseName;

@ExcelExport(value = "调入方仓库")
private String otherWarehouseName;

@ExcelExport(value = "条码")
private String barCode;

@ExcelExport(value = "商品名称")
private String productName;

@ExcelExport(value = "规格")
private String productStandard;

@ExcelExport(value = "型号")
private String productModel;

@ExcelExport(value = "单位")
private String productUnit;

@ExcelExport(value = "库存")
private Integer stock;

@ExcelExport(value = "数量")
private Integer productNumber;

@ExcelExport(value = "单价")
private BigDecimal unitPrice;

@ExcelExport(value = "金额")
private BigDecimal amount;

@ExcelExport(value = "备注")
private String remark;
}
13 changes: 0 additions & 13 deletions core/domain/src/main/java/com/wansenai/bo/AssembleStockBO.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -27,47 +26,35 @@ public class AssembleStockBO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport("商品类型")
private String type;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long warehouseId;

@ExcelExport("仓库")
private String warehouseName;

@ExcelExport("条码")
private String barCode;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long productId;

@ExcelExport("商品名称")
private String productName;

@ExcelExport("规格")
private String productStandard;

@ExcelExport("型号")
private String productModel;

@ExcelExport("单位")
private String productUnit;

@ExcelExport("库存")
private Integer stock;

@ExcelExport("商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport("单价")
private BigDecimal unitPrice;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport("金额")
private BigDecimal amount;

@ExcelExport("备注")
private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://opensource.wansenai.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.wansenai.bo;

import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

/**
* 组装单和拆卸单导出数据BO (AssembleStockDataExportBO) 共存在这一个类中
*/
@Data
@Builder
public class AssembleStockDataExportBO {

@ExcelExport("单据编号")
private String receiptNumber;

@ExcelExport("商品类型")
private String type;

@ExcelExport("仓库")
private String warehouseName;

@ExcelExport("条码")
private String barCode;

@ExcelExport("商品名称")
private String productName;

@ExcelExport("规格")
private String productStandard;

@ExcelExport("型号")
private String productModel;

@ExcelExport("单位")
private String productUnit;

@ExcelExport("库存")
private Integer stock;

@ExcelExport("商品数量")
private Integer productNumber;

@ExcelExport("单价")
private BigDecimal unitPrice;

@ExcelExport("金额")
private BigDecimal amount;

@ExcelExport("备注")
private String remark;
}
17 changes: 0 additions & 17 deletions core/domain/src/main/java/com/wansenai/bo/PurchaseDataBO.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.utils.excel.ExcelExport;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -31,57 +30,41 @@ public class PurchaseDataBO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long warehouseId;

@ExcelExport(value = "仓库名称")
private String warehouseName;

@ExcelExport(value = "条码")
private String barCode;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long productId;

@ExcelExport(value = "商品名称")
private String productName;

@ExcelExport(value = "规格")
private String productStandard;

@ExcelExport(value = "型号")
private String productModel;

@ExcelExport(value = "颜色")
private String productColor;

@ExcelExport(value = "库存")
private Integer stock;

@ExcelExport(value = "单位")
private String productUnit;

@ExcelExport(value = "数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "单价")
private BigDecimal unitPrice;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额")
private BigDecimal amount;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "税率(%)")
private BigDecimal taxRate;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "税额")
private BigDecimal taxAmount;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "价税合计")
private BigDecimal taxTotalPrice;

@ExcelExport(value = "备注")
private String remark;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://opensource.wansenai.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.wansenai.bo;

import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class PurchaseDataExportBO {

@ExcelExport(value = "供应商")
private String supplierName;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "仓库名称")
private String warehouseName;

@ExcelExport(value = "条码")
private String barCode;

@ExcelExport(value = "商品名称")
private String productName;

@ExcelExport(value = "规格")
private String productStandard;

@ExcelExport(value = "型号")
private String productModel;

@ExcelExport(value = "颜色")
private String productColor;

@ExcelExport(value = "库存")
private Integer stock;

@ExcelExport(value = "单位")
private String productUnit;

@ExcelExport(value = "数量")
private Integer productNumber;

@ExcelExport(value = "单价")
private BigDecimal unitPrice;

@ExcelExport(value = "金额")
private BigDecimal amount;

@ExcelExport(value = "税率(%)")
private BigDecimal taxRate;

@ExcelExport(value = "税额")
private BigDecimal taxAmount;

@ExcelExport(value = "价税合计")
private BigDecimal taxTotalPrice;

@ExcelExport(value = "备注")
private String remark;
}
Loading

0 comments on commit 3deb4e8

Please sign in to comment.