Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for exporting data in English #349

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* Copyright 2024-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.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShipmentsDataExportEnBO {

@ExcelExport(value = "Member")
private String memberName;

@ExcelExport(value = "Receipt Number")
private String receiptNumber;

@ExcelExport(value = "Warehouse")
private String warehouseName;

@ExcelExport(value = "BarCode")
private String barCode;

@ExcelExport(value = "Product Name")
private String productName;

@ExcelExport(value = "Standard")
private String productStandard;

@ExcelExport(value = "Model")
private String productModel;

@ExcelExport(value = "Color")
private String productColor;

@ExcelExport(value = "Stock")
private Integer stock;

@ExcelExport(value = "Unit")
private String productUnit;

@ExcelExport(value = "Quantity")
private Integer productNumber;

@ExcelExport(value = "Unit Price")
private BigDecimal unitPrice;

@ExcelExport(value = "Amount")
private BigDecimal amount;

@ExcelExport(value = "Remark")
private String remark;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
* 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;
package com.wansenai.bo.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* 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;
package com.wansenai.bo.purchase;

import com.wansenai.utils.excel.ExcelExport;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright 2024-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.purchase;

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

import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseDataExportEnBO {

@ExcelExport(value = "Supplier")
private String supplierName;

@ExcelExport(value = "Receipt Number")
private String receiptNumber;

@ExcelExport(value = "Warehouse")
private String warehouseName;

@ExcelExport(value = "BarCode")
private String barCode;

@ExcelExport(value = "Product Name")
private String productName;

@ExcelExport(value = "Standard")
private String productStandard;

@ExcelExport(value = "Model")
private String productModel;

@ExcelExport(value = "Color")
private String productColor;

@ExcelExport(value = "Stock")
private Integer stock;

@ExcelExport(value = "Unit")
private String productUnit;

@ExcelExport(value = "Quantity")
private Integer productNumber;

@ExcelExport(value = "Unit Price")
private BigDecimal unitPrice;

@ExcelExport(value = "Amount")
private BigDecimal amount;

@ExcelExport(value = "Tax Rate(%)")
private BigDecimal taxRate;

@ExcelExport(value = "Tax Amount")
private BigDecimal taxAmount;

@ExcelExport(value = "Tax Total Price")
private BigDecimal taxTotalPrice;

@ExcelExport(value = "Remark")
private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright 2024-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.purchase;

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

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseOrderExportBO {

private Long id;

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

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

@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

@ExcelExport(value = "商品信息")
private String productInfo;

@ExcelExport(value = "操作员")
private String operator;

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

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

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

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "收取定金")
private BigDecimal deposit;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核;2-审核中;3-部分采购;4-完成采购;")
private Integer status;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright 2024-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.purchase;

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

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseOrderExportEnBO {

private Long id;

@ExcelExport(value = "Supplier")
private String supplierName;

@ExcelExport(value = "Receipt Number")
private String receiptNumber;

@ExcelExport(value = "Receipt Date")
private LocalDateTime receiptDate;

@ExcelExport(value = "Product Info")
private String productInfo;

@ExcelExport(value = "Operator")
private String operator;

@ExcelExport(value = "Quantity")
private Integer productNumber;

@ExcelExport(value = "Total Amount")
private BigDecimal totalAmount;

@ExcelExport(value = "Tax Rate Total Amount")
private BigDecimal taxRateTotalAmount;

@ExcelExport(value = "Deposit")
private BigDecimal deposit;

@ExcelExport(value = "Status", kv = "0-Unaudited;1-Audited;2-In Review;3-Partial Purchase;4-Complete Purchase;")
private Integer status;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright 2024-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.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wansenai.utils.excel.ExcelExport;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseReturnExportBO {

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

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

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

@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

@ExcelExport(value = "商品信息")
private String productInfo;

@ExcelExport(value = "操作员")
private String operator;

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

@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "含税合计")
private BigDecimal taxIncludedAmount;

@ExcelExport(value = "待退金额")
private BigDecimal refundTotalAmount;

@ExcelExport(value = "本次退款")
private BigDecimal thisRefundAmount;

@ExcelExport(value = "本次欠款")
private BigDecimal thisArrearsAmount;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核;2-审核中;3-部分采购;4-完成采购;")
private Integer status;
}
Loading
Loading