-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from Jzow/master
Add expense receipt api and data object, views
- Loading branch information
Showing
19 changed files
with
1,919 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
core/domain/src/main/java/com/wansenai/dto/financial/AddOrUpdateExpenseDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* 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.IncomeExpenseBO; | ||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
@Data | ||
public class AddOrUpdateExpenseDTO { | ||
|
||
private Long id; | ||
|
||
private Long relatedPersonId; | ||
|
||
private String receiptDate; | ||
|
||
private String receiptNumber; | ||
|
||
private Long financialPersonId; | ||
|
||
private Long expenseAccountId; | ||
|
||
private BigDecimal expenseAmount; | ||
|
||
private String remark; | ||
|
||
private List<IncomeExpenseBO> tableData; | ||
|
||
private List<FileDataBO> files; | ||
|
||
private Integer status; | ||
} |
39 changes: 39 additions & 0 deletions
39
core/domain/src/main/java/com/wansenai/dto/financial/QueryExpenseDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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 QueryExpenseDTO { | ||
|
||
private String receiptNumber; | ||
|
||
private Long relatedPersonId; | ||
|
||
private Long financialPersonId; | ||
|
||
private Long accountId; | ||
|
||
private Integer status; | ||
|
||
private String remark; | ||
|
||
private String startDate; | ||
|
||
private String endDate; | ||
|
||
private Integer page; | ||
|
||
private Integer pageSize; | ||
} |
67 changes: 67 additions & 0 deletions
67
core/domain/src/main/java/com/wansenai/vo/financial/ExpenseDetailVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* 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.annotation.JsonInclude; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import com.wansenai.bo.BigDecimalSerializerBO; | ||
import com.wansenai.bo.FileDataBO; | ||
import com.wansenai.bo.IncomeExpenseBO; | ||
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 | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ExpenseDetailVO { | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING) | ||
private Long relatedPersonId; | ||
|
||
private String relatedPersonName; | ||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
private LocalDateTime receiptDate; | ||
|
||
private String receiptNumber; | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING) | ||
private Long financialPersonId; | ||
|
||
private String financialPersonName; | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING) | ||
private Long expenseAccountId; | ||
|
||
private String expenseAccountName; | ||
|
||
@JsonSerialize(using = BigDecimalSerializerBO.class) | ||
private BigDecimal expenseAmount; | ||
|
||
private String remark; | ||
|
||
private List<IncomeExpenseBO> tableData; | ||
|
||
private List<FileDataBO> files; | ||
|
||
private Integer status; | ||
} |
53 changes: 53 additions & 0 deletions
53
core/domain/src/main/java/com/wansenai/vo/financial/ExpenseVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* 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 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 ExpenseVO { | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING) | ||
private Long id; | ||
|
||
// supplier or customer or member | ||
private String name; | ||
|
||
private String receiptNumber; | ||
|
||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | ||
private LocalDateTime receiptDate; | ||
|
||
private String financialPerson; | ||
|
||
private String expenseAccountName; | ||
|
||
@JsonSerialize(using = BigDecimalSerializerBO.class) | ||
private BigDecimal expenseAmount; | ||
|
||
private String remark; | ||
|
||
private Integer status; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.