Skip to content

Commit

Permalink
Merge pull request #223 from Jzow/master
Browse files Browse the repository at this point in the history
fetch: add collection and payment receipt data object
  • Loading branch information
Jzow authored Nov 22, 2023
2 parents b5cb3d0 + e7b9e66 commit 1240df2
Show file tree
Hide file tree
Showing 14 changed files with 676 additions and 0 deletions.
45 changes: 45 additions & 0 deletions core/domain/src/main/java/com/wansenai/bo/CollectionBO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

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

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

private String saleReceiptNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal receivableArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal receivedArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thisCollectionAmount;

private String remark;
}
45 changes: 45 additions & 0 deletions core/domain/src/main/java/com/wansenai/bo/PaymentBO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

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

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

private String purchaseReceiptNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal paymentArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal prepaidArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thisPaymentAmount;

private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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.dto.financial;

import com.wansenai.bo.CollectionBO;
import com.wansenai.bo.FileDataBO;
import lombok.Data;

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

@Data
public class AddOrUpdateCollectionDTO {

private Long customerId;

private String receiptNumber;

private LocalDateTime receiptDate;

private Long financialPersonId;

private Long collectionAccountId;

private BigDecimal totalCollectionAmount;

private BigDecimal discountAmount;

private BigDecimal actualCollectionAmount;

private String remark;

private Integer status;

private List<CollectionBO> tableData;

private List<FileDataBO> files;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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.dto.financial;

import com.wansenai.bo.FileDataBO;
import com.wansenai.bo.PaymentBO;
import lombok.Data;

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

@Data
public class AddOrUpdatePaymentDTO {

private Long supplierId;

private String receiptNumber;

private LocalDateTime receiptDate;

private Long financialPersonId;

private Long paymentAccountId;

private BigDecimal totalPaymentAmount;

private BigDecimal discountAmount;

private BigDecimal actualPaymentAmount;

private String remark;

private Integer status;

private List<PaymentBO> tableData;

private List<FileDataBO> files;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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.dto.financial;

import lombok.Data;

@Data
public class QueryCollectionDTO {

private String receiptNumber;

private String saleReceiptNumber;

private Long customerId;

private Long financialPersonId;

private Long accountId;

private Integer status;

private String remark;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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.dto.financial;

import lombok.Data;

@Data
public class QueryPaymentDTO {

private String receiptNumber;

private String purchaseReceiptNumber;

private Long supplierId;

private Long financialPersonId;

private Long accountId;

private Integer status;

private String remark;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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.vo.financial;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.bo.CollectionBO;
import com.wansenai.bo.FileDataBO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

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

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

private String customerName;

private String receiptNumber;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime receiptDate;

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

private String financialPersonName;

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

private String collectionAccountName;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal totalCollectionAmount;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal discountAmount;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal actualCollectionAmount;

private String remark;

private Integer status;

private List<CollectionBO> tableData;

private List<FileDataBO> files;
}
Loading

0 comments on commit 1240df2

Please sign in to comment.