diff --git a/core/api/src/main/java/com/wansenai/api/financial/FinancialSubController.java b/core/api/src/main/java/com/wansenai/api/financial/CollectionReceiptController.java similarity index 81% rename from core/api/src/main/java/com/wansenai/api/financial/FinancialSubController.java rename to core/api/src/main/java/com/wansenai/api/financial/CollectionReceiptController.java index 7d92d911..9c5c46fe 100644 --- a/core/api/src/main/java/com/wansenai/api/financial/FinancialSubController.java +++ b/core/api/src/main/java/com/wansenai/api/financial/CollectionReceiptController.java @@ -12,20 +12,10 @@ */ package com.wansenai.api.financial; - import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -/** - *

- * 财务子表 前端控制器 - *

- * - * @author James Zow - * @since 2023-09-05 - */ @RestController -@RequestMapping("/financialSub") -public class FinancialSubController { - +@RequestMapping("/financial/collection") +public class CollectionReceiptController { } diff --git a/core/api/src/main/java/com/wansenai/api/financial/FinancialMainController.java b/core/api/src/main/java/com/wansenai/api/financial/ExpenseReceiptController.java similarity index 81% rename from core/api/src/main/java/com/wansenai/api/financial/FinancialMainController.java rename to core/api/src/main/java/com/wansenai/api/financial/ExpenseReceiptController.java index 444c458b..b6bb4192 100644 --- a/core/api/src/main/java/com/wansenai/api/financial/FinancialMainController.java +++ b/core/api/src/main/java/com/wansenai/api/financial/ExpenseReceiptController.java @@ -12,20 +12,10 @@ */ package com.wansenai.api.financial; - import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -/** - *

- * 财务主表 前端控制器 - *

- * - * @author James Zow - * @since 2023-09-05 - */ @RestController -@RequestMapping("/financialMain") -public class FinancialMainController { - +@RequestMapping("/financial/expense") +public class ExpenseReceiptController { } diff --git a/core/api/src/main/java/com/wansenai/api/financial/IncomeReceiptController.java b/core/api/src/main/java/com/wansenai/api/financial/IncomeReceiptController.java new file mode 100644 index 00000000..784165a2 --- /dev/null +++ b/core/api/src/main/java/com/wansenai/api/financial/IncomeReceiptController.java @@ -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 { +} diff --git a/core/api/src/main/java/com/wansenai/api/financial/PaymentReceiptController.java b/core/api/src/main/java/com/wansenai/api/financial/PaymentReceiptController.java new file mode 100644 index 00000000..f29bfcd3 --- /dev/null +++ b/core/api/src/main/java/com/wansenai/api/financial/PaymentReceiptController.java @@ -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 { +} diff --git a/core/api/src/main/java/com/wansenai/api/financial/TransferReceiptController.java b/core/api/src/main/java/com/wansenai/api/financial/TransferReceiptController.java new file mode 100644 index 00000000..e68a183b --- /dev/null +++ b/core/api/src/main/java/com/wansenai/api/financial/TransferReceiptController.java @@ -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 { +} diff --git a/core/domain/src/main/java/com/wansenai/bo/IncomeExpenseBO.java b/core/domain/src/main/java/com/wansenai/bo/IncomeExpenseBO.java new file mode 100644 index 00000000..3b0431f5 --- /dev/null +++ b/core/domain/src/main/java/com/wansenai/bo/IncomeExpenseBO.java @@ -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; +} diff --git a/core/domain/src/main/java/com/wansenai/dto/financial/AddOrUpdateIncomeDTO.java b/core/domain/src/main/java/com/wansenai/dto/financial/AddOrUpdateIncomeDTO.java new file mode 100644 index 00000000..be18026e --- /dev/null +++ b/core/domain/src/main/java/com/wansenai/dto/financial/AddOrUpdateIncomeDTO.java @@ -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 tableData; + + private List files; +} diff --git a/core/domain/src/main/java/com/wansenai/dto/financial/QueryIncomeDTO.java b/core/domain/src/main/java/com/wansenai/dto/financial/QueryIncomeDTO.java new file mode 100644 index 00000000..4c204e23 --- /dev/null +++ b/core/domain/src/main/java/com/wansenai/dto/financial/QueryIncomeDTO.java @@ -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; +} diff --git a/core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.java b/core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.java index 1155d0af..3a1e6f70 100644 --- a/core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.java +++ b/core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.java @@ -1,3 +1,15 @@ +/* + * 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; diff --git a/core/domain/src/main/java/com/wansenai/vo/financial/IncomeDetailVO.java b/core/domain/src/main/java/com/wansenai/vo/financial/IncomeDetailVO.java new file mode 100644 index 00000000..29d2cd5c --- /dev/null +++ b/core/domain/src/main/java/com/wansenai/vo/financial/IncomeDetailVO.java @@ -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 tableData; + + private List files; +} diff --git a/core/domain/src/main/java/com/wansenai/vo/financial/IncomeVO.java b/core/domain/src/main/java/com/wansenai/vo/financial/IncomeVO.java new file mode 100644 index 00000000..81ba6bef --- /dev/null +++ b/core/domain/src/main/java/com/wansenai/vo/financial/IncomeVO.java @@ -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; +}