Skip to content

Commit

Permalink
Merge pull request #217 from Jzow/master
Browse files Browse the repository at this point in the history
Add income data object and all financial controller
  • Loading branch information
Jzow authored Nov 21, 2023
2 parents ca77eea + d3c8208 commit 89b797f
Show file tree
Hide file tree
Showing 11 changed files with 304 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,10 @@
*/
package com.wansenai.api.financial;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* 财务子表 前端控制器
* </p>
*
* @author James Zow
* @since 2023-09-05
*/
@RestController
@RequestMapping("/financialSub")
public class FinancialSubController {

@RequestMapping("/financial/collection")
public class CollectionReceiptController {
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,10 @@
*/
package com.wansenai.api.financial;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* 财务主表 前端控制器
* </p>
*
* @author James Zow
* @since 2023-09-05
*/
@RestController
@RequestMapping("/financialMain")
public class FinancialMainController {

@RequestMapping("/financial/expense")
public class ExpenseReceiptController {
}
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 {
}
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 {
}
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 core/domain/src/main/java/com/wansenai/bo/IncomeExpenseBO.java
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;
}
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;
}
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 core/domain/src/main/java/com/wansenai/vo/financial/AccountVO.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
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 core/domain/src/main/java/com/wansenai/vo/financial/IncomeVO.java
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;
}

0 comments on commit 89b797f

Please sign in to comment.