-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 #217 from Jzow/master
Add income data object and all financial controller
- Loading branch information
Showing
11 changed files
with
304 additions
and
24 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
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
21 changes: 21 additions & 0 deletions
21
core/api/src/main/java/com/wansenai/api/financial/IncomeReceiptController.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,21 @@ | ||
/* | ||
* 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.api.financial; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping("/financial/income") | ||
public class IncomeReceiptController { | ||
} |
21 changes: 21 additions & 0 deletions
21
core/api/src/main/java/com/wansenai/api/financial/PaymentReceiptController.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,21 @@ | ||
/* | ||
* 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.api.financial; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping("/financial/payment") | ||
public class PaymentReceiptController { | ||
} |
21 changes: 21 additions & 0 deletions
21
core/api/src/main/java/com/wansenai/api/financial/TransferReceiptController.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,21 @@ | ||
/* | ||
* 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.api.financial; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping("/financial/transfer") | ||
public class TransferReceiptController { | ||
} |
37 changes: 37 additions & 0 deletions
37
core/domain/src/main/java/com/wansenai/bo/IncomeExpenseBO.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,37 @@ | ||
/* | ||
* 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 IncomeExpenseBO { | ||
|
||
@JsonFormat(shape = JsonFormat.Shape.STRING) | ||
private Long id; | ||
|
||
@JsonSerialize(using = BigDecimalSerializerBO.class) | ||
private BigDecimal incomeExpenseAmount; | ||
|
||
private String remark; | ||
} |
44 changes: 44 additions & 0 deletions
44
core/domain/src/main/java/com/wansenai/dto/financial/AddOrUpdateIncomeDTO.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,44 @@ | ||
/* | ||
* 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 AddOrUpdateIncomeDTO { | ||
|
||
private Long id; | ||
|
||
private Long relatedPersonId; | ||
|
||
private String receiptDate; | ||
|
||
private String receiptNumber; | ||
|
||
private Long financialPersonId; | ||
|
||
private Long incomeAccountId; | ||
|
||
private BigDecimal incomeAmount; | ||
|
||
private String remark; | ||
|
||
private List<IncomeExpenseBO> tableData; | ||
|
||
private List<FileDataBO> files; | ||
} |
41 changes: 41 additions & 0 deletions
41
core/domain/src/main/java/com/wansenai/dto/financial/QueryIncomeDTO.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,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 QueryIncomeDTO { | ||
|
||
private String receiptNumber; | ||
|
||
private Long relatedPersonId; | ||
|
||
private Long operatorId; | ||
|
||
private Long financialPersonId; | ||
|
||
private Long accountId; | ||
|
||
private Integer status; | ||
|
||
private String remark; | ||
|
||
private String startDate; | ||
|
||
private String endDate; | ||
|
||
private Integer page; | ||
|
||
private Integer pageSize; | ||
} |
12 changes: 12 additions & 0 deletions
12
core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.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
48 changes: 48 additions & 0 deletions
48
core/domain/src/main/java/com/wansenai/vo/financial/IncomeDetailVO.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,48 @@ | ||
/* | ||
* 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.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.util.List; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class IncomeDetailVO { | ||
|
||
private Long relatedPersonId; | ||
|
||
private String receiptDate; | ||
|
||
private String receiptNumber; | ||
|
||
private Long financialPersonId; | ||
|
||
private Long incomeAccountId; | ||
|
||
private BigDecimal incomeAmount; | ||
|
||
private String remark; | ||
|
||
private List<IncomeExpenseBO> tableData; | ||
|
||
private List<FileDataBO> files; | ||
} |
55 changes: 55 additions & 0 deletions
55
core/domain/src/main/java/com/wansenai/vo/financial/IncomeVO.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,55 @@ | ||
/* | ||
* 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 IncomeVO { | ||
|
||
@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 operator; | ||
|
||
private String financialPerson; | ||
|
||
private String incomeAccountName; | ||
|
||
@JsonSerialize(using = BigDecimalSerializerBO.class) | ||
private BigDecimal incomeAmount; | ||
|
||
private String remark; | ||
|
||
private Integer status; | ||
} |