Skip to content

Commit c73a9da

Browse files
authored
Merge pull request #253 from Jzow/master
Significant updates (Added all export functions for basic business)
2 parents 3deb4e8 + 4855899 commit c73a9da

File tree

51 files changed

+1150
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1150
-119
lines changed

core/api/src/main/java/com/wansenai/api/financial/CollectionReceiptController.java

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.wansenai.utils.response.Response;
2020
import com.wansenai.vo.financial.CollectionDetailVO;
2121
import com.wansenai.vo.financial.CollectionVO;
22+
import jakarta.servlet.http.HttpServletResponse;
2223
import org.springframework.web.bind.annotation.RestController;
2324
import org.springframework.web.bind.annotation.RequestMapping;
2425
import org.springframework.web.bind.annotation.RequestBody;
@@ -27,6 +28,7 @@
2728
import org.springframework.web.bind.annotation.PutMapping;
2829
import org.springframework.web.bind.annotation.RequestParam;
2930
import org.springframework.web.bind.annotation.PostMapping;
31+
import org.springframework.web.bind.annotation.ModelAttribute;
3032

3133
import java.util.List;
3234

@@ -64,4 +66,9 @@ public Response<String> deleteCollectionReceiptByIds(@RequestParam("ids") List<L
6466
public Response<String> updateCollectionReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
6567
return collectionReceiptService.updateCollectionReceiptStatus(ids, status);
6668
}
69+
70+
@GetMapping("export")
71+
public void exportCollectionReceipt(@ModelAttribute QueryCollectionDTO queryCollectionDTO, HttpServletResponse response) {
72+
collectionReceiptService.exportCollectionReceipt(queryCollectionDTO, response);
73+
}
6774
}

core/api/src/main/java/com/wansenai/api/financial/ExpenseReceiptController.java

+11-4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@
1919
import com.wansenai.utils.response.Response;
2020
import com.wansenai.vo.financial.ExpenseDetailVO;
2121
import com.wansenai.vo.financial.ExpenseVO;
22-
import org.springframework.web.bind.annotation.PostMapping;
22+
import jakarta.servlet.http.HttpServletResponse;
2323
import org.springframework.web.bind.annotation.RestController;
2424
import org.springframework.web.bind.annotation.RequestMapping;
25-
import org.springframework.web.bind.annotation.PutMapping;
26-
import org.springframework.web.bind.annotation.GetMapping;
2725
import org.springframework.web.bind.annotation.RequestBody;
28-
import org.springframework.web.bind.annotation.RequestParam;
26+
import org.springframework.web.bind.annotation.GetMapping;
2927
import org.springframework.web.bind.annotation.PathVariable;
28+
import org.springframework.web.bind.annotation.PutMapping;
29+
import org.springframework.web.bind.annotation.RequestParam;
30+
import org.springframework.web.bind.annotation.PostMapping;
31+
import org.springframework.web.bind.annotation.ModelAttribute;
3032

3133
import java.util.List;
3234

@@ -64,4 +66,9 @@ public Response<String> deleteExpenseReceiptByIds(@RequestParam("ids") List<Long
6466
public Response<String> updateExpenseReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
6567
return expenseReceiptService.updateExpenseReceiptStatus(ids, status);
6668
}
69+
70+
@GetMapping("export")
71+
public void exportExpenseReceipt(@ModelAttribute QueryExpenseDTO queryExpenseDTO, HttpServletResponse response) {
72+
expenseReceiptService.exportExpenseReceipt(queryExpenseDTO, response);
73+
}
6774
}

core/api/src/main/java/com/wansenai/api/financial/IncomeReceiptController.java

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.wansenai.utils.response.Response;
2020
import com.wansenai.vo.financial.IncomeDetailVO;
2121
import com.wansenai.vo.financial.IncomeVO;
22+
import jakarta.servlet.http.HttpServletResponse;
2223
import org.springframework.web.bind.annotation.RestController;
2324
import org.springframework.web.bind.annotation.RequestMapping;
2425
import org.springframework.web.bind.annotation.RequestBody;
@@ -27,6 +28,7 @@
2728
import org.springframework.web.bind.annotation.PutMapping;
2829
import org.springframework.web.bind.annotation.RequestParam;
2930
import org.springframework.web.bind.annotation.PostMapping;
31+
import org.springframework.web.bind.annotation.ModelAttribute;
3032

3133
import java.util.List;
3234

@@ -64,4 +66,9 @@ public Response<String> deleteIncomeReceiptByIds(@RequestParam("ids") List<Long>
6466
public Response<String> updateIncomeReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
6567
return incomeReceiptService.updateIncomeReceiptStatus(ids, status);
6668
}
69+
70+
@GetMapping("export")
71+
public void exportIncomeReceipt(@ModelAttribute QueryIncomeDTO queryIncomeDTO, HttpServletResponse response) {
72+
incomeReceiptService.exportIncomeReceipt(queryIncomeDTO, response);
73+
}
6774
}

core/api/src/main/java/com/wansenai/api/financial/PaymentReceiptController.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
import com.wansenai.utils.response.Response;
2020
import com.wansenai.vo.financial.PaymentDetailVO;
2121
import com.wansenai.vo.financial.PaymentVO;
22-
import org.springframework.web.bind.annotation.*;
22+
import jakarta.servlet.http.HttpServletResponse;
23+
import org.springframework.web.bind.annotation.RestController;
24+
import org.springframework.web.bind.annotation.RequestMapping;
25+
import org.springframework.web.bind.annotation.RequestBody;
26+
import org.springframework.web.bind.annotation.GetMapping;
27+
import org.springframework.web.bind.annotation.PathVariable;
28+
import org.springframework.web.bind.annotation.PutMapping;
29+
import org.springframework.web.bind.annotation.RequestParam;
30+
import org.springframework.web.bind.annotation.PostMapping;
31+
import org.springframework.web.bind.annotation.ModelAttribute;
2332

2433
import java.util.List;
2534

@@ -57,4 +66,9 @@ public Response<String> deletePaymentReceiptByIds(@RequestParam("ids") List<Long
5766
public Response<String> updatePaymentReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
5867
return paymentReceiptService.updatePaymentReceiptStatus(ids, status);
5968
}
69+
70+
@GetMapping("export")
71+
public void exportPaymentReceipt(@ModelAttribute QueryPaymentDTO queryPaymentDTO, HttpServletResponse response) {
72+
paymentReceiptService.exportPaymentReceipt(queryPaymentDTO, response);
73+
}
6074
}

core/api/src/main/java/com/wansenai/api/financial/TransferReceiptController.java

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.wansenai.utils.response.Response;
2020
import com.wansenai.vo.financial.TransferDetailVO;
2121
import com.wansenai.vo.financial.TransferVO;
22+
import jakarta.servlet.http.HttpServletResponse;
2223
import org.springframework.web.bind.annotation.RestController;
2324
import org.springframework.web.bind.annotation.RequestMapping;
2425
import org.springframework.web.bind.annotation.RequestBody;
@@ -27,6 +28,7 @@
2728
import org.springframework.web.bind.annotation.PutMapping;
2829
import org.springframework.web.bind.annotation.RequestParam;
2930
import org.springframework.web.bind.annotation.PostMapping;
31+
import org.springframework.web.bind.annotation.ModelAttribute;
3032

3133
import java.util.List;
3234

@@ -64,4 +66,9 @@ public Response<String> deleteTransferReceiptByIds(@RequestParam("ids") List<Lon
6466
public Response<String> updateTransferReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
6567
return transferReceiptService.updateTransferReceiptStatus(ids, status);
6668
}
69+
70+
@GetMapping("export")
71+
public void exportTransferReceipt(@ModelAttribute QueryTransferDTO queryTransferDTO, HttpServletResponse response) {
72+
transferReceiptService.exportTransferReceipt(queryTransferDTO, response);
73+
}
6774
}

core/api/src/main/kotlin/com/wansenai/api/financial/AdvanceChargeController.kt

+15-8
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@
1212
*/
1313
package com.wansenai.api.financial
1414

15+
import org.springframework.web.bind.annotation.RestController
16+
import org.springframework.web.bind.annotation.RequestMapping
17+
import org.springframework.web.bind.annotation.PostMapping
18+
import org.springframework.web.bind.annotation.RequestBody
19+
import org.springframework.web.bind.annotation.GetMapping
20+
import org.springframework.web.bind.annotation.PathVariable
21+
import org.springframework.web.bind.annotation.PutMapping
22+
import org.springframework.web.bind.annotation.RequestParam
23+
import org.springframework.web.bind.annotation.ModelAttribute
1524
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
1625
import com.wansenai.dto.financial.AddOrUpdateAdvanceChargeDTO
1726
import com.wansenai.dto.financial.QueryAdvanceChargeDTO
1827
import com.wansenai.service.financial.AdvanceChargeService
1928
import com.wansenai.utils.response.Response
2029
import com.wansenai.vo.financial.AdvanceChargeDetailVO
2130
import com.wansenai.vo.financial.AdvanceChargeVO
22-
import org.springframework.web.bind.annotation.GetMapping
23-
import org.springframework.web.bind.annotation.PathVariable
24-
import org.springframework.web.bind.annotation.PostMapping
25-
import org.springframework.web.bind.annotation.PutMapping
26-
import org.springframework.web.bind.annotation.RequestBody
27-
import org.springframework.web.bind.annotation.RequestMapping
28-
import org.springframework.web.bind.annotation.RequestParam
29-
import org.springframework.web.bind.annotation.RestController
31+
import jakarta.servlet.http.HttpServletResponse
3032

3133
@RestController
3234
@RequestMapping("/financial/advance-charge")
@@ -56,4 +58,9 @@ class AdvanceChargeController(private val advanceChargeService: AdvanceChargeSer
5658
fun updateStatus(@RequestParam("ids") ids: List<Long>, @RequestParam("status") status: Int) : Response<String> {
5759
return advanceChargeService.updateAdvanceChargeStatusById(ids, status)
5860
}
61+
62+
@GetMapping("export")
63+
fun export(@ModelAttribute advanceChargeDTO: QueryAdvanceChargeDTO, response: HttpServletResponse) {
64+
advanceChargeService.exportAdvanceCharge(advanceChargeDTO, response)
65+
}
5966
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5+
* with the License. A copy of the License is located at
6+
*
7+
* http://opensource.wansenai.com/apache2.0/
8+
*
9+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
10+
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11+
* and limitations under the License.
12+
*/
13+
package com.wansenai.bo;
14+
15+
import com.wansenai.utils.excel.ExcelExport;
16+
import lombok.Builder;
17+
import lombok.Data;
18+
19+
import java.math.BigDecimal;
20+
21+
@Data
22+
@Builder
23+
public class CollectionDataExportBO {
24+
25+
@ExcelExport(value = "客户")
26+
private String customerName;
27+
28+
@ExcelExport(value = "收款单号")
29+
private String receiptNumber;
30+
31+
@ExcelExport(value = "销售单据编号")
32+
private String saleReceiptNumber;
33+
34+
@ExcelExport(value = "应收欠款")
35+
private BigDecimal receivableArrears;
36+
37+
@ExcelExport(value = "已收欠款")
38+
private BigDecimal receivedArrears;
39+
40+
@ExcelExport(value = "本次收款")
41+
private BigDecimal thisCollectionAmount;
42+
43+
@ExcelExport(value = "备注")
44+
private String remark;
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5+
* with the License. A copy of the License is located at
6+
*
7+
* http://opensource.wansenai.com/apache2.0/
8+
*
9+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
10+
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11+
* and limitations under the License.
12+
*/
13+
package com.wansenai.bo;
14+
15+
import com.wansenai.utils.excel.ExcelExport;
16+
import lombok.Builder;
17+
import lombok.Data;
18+
19+
import java.math.BigDecimal;
20+
21+
@Data
22+
@Builder
23+
public class IncomeExpenseDataExportBO {
24+
25+
@ExcelExport(value = "单据编号")
26+
private String receiptNumber;
27+
28+
@ExcelExport(value = "往来单位/人员")
29+
private String relatedPerson;
30+
31+
@ExcelExport(value = "收入/支出项目")
32+
private String incomeExpenseName;
33+
34+
@ExcelExport(value = "金额")
35+
private BigDecimal incomeExpenseAmount;
36+
37+
@ExcelExport(value = "备注")
38+
private String remark;
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5+
* with the License. A copy of the License is located at
6+
*
7+
* http://opensource.wansenai.com/apache2.0/
8+
*
9+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
10+
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11+
* and limitations under the License.
12+
*/
13+
package com.wansenai.bo;
14+
15+
import com.wansenai.utils.excel.ExcelExport;
16+
import lombok.Builder;
17+
import lombok.Data;
18+
19+
import java.math.BigDecimal;
20+
21+
@Data
22+
@Builder
23+
public class PaymentDataExportBO {
24+
25+
@ExcelExport(value = "供应商")
26+
private String supplierName;
27+
28+
@ExcelExport(value = "付款单号")
29+
private String receiptNumber;
30+
31+
@ExcelExport(value = "采购单据编号")
32+
private String purchaseReceiptNumber;
33+
34+
@ExcelExport(value = "应付欠款")
35+
private BigDecimal paymentArrears;
36+
37+
@ExcelExport(value = "已付欠款")
38+
private BigDecimal prepaidArrears;
39+
40+
@ExcelExport(value = "本次付款")
41+
private BigDecimal thisPaymentAmount;
42+
43+
@ExcelExport(value = "备注")
44+
private String remark;
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2023-2033 WanSen AI Team, Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5+
* with the License. A copy of the License is located at
6+
*
7+
* http://opensource.wansenai.com/apache2.0/
8+
*
9+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
10+
* OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11+
* and limitations under the License.
12+
*/
13+
package com.wansenai.bo;
14+
15+
import com.wansenai.utils.excel.ExcelExport;
16+
import lombok.Builder;
17+
import lombok.Data;
18+
19+
import java.math.BigDecimal;
20+
21+
@Data
22+
@Builder
23+
public class TransferAccountDataExportBO {
24+
25+
@ExcelExport(value = "单据编号")
26+
private String receiptNumber;
27+
28+
@ExcelExport(value = "账户名称")
29+
private String accountName;
30+
31+
@ExcelExport(value = "转账金额")
32+
private BigDecimal transferAmount;
33+
34+
@ExcelExport(value = "备注")
35+
private String remark;
36+
}

core/domain/src/main/java/com/wansenai/dto/financial/QueryCollectionDTO.java

+2
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ public class QueryCollectionDTO {
3838
private Integer page;
3939

4040
private Integer pageSize;
41+
42+
private Boolean isExportDetail;
4143
}

core/domain/src/main/java/com/wansenai/dto/financial/QueryExpenseDTO.java

+2
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ public class QueryExpenseDTO {
3636
private Integer page;
3737

3838
private Integer pageSize;
39+
40+
private Boolean isExportDetail;
3941
}

core/domain/src/main/java/com/wansenai/dto/financial/QueryIncomeDTO.java

+2
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ public class QueryIncomeDTO {
3636
private Integer page;
3737

3838
private Integer pageSize;
39+
40+
private Boolean isExportDetail;
3941
}

core/domain/src/main/java/com/wansenai/dto/financial/QueryPaymentDTO.java

+2
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ public class QueryPaymentDTO {
3838
private Integer page;
3939

4040
private Integer pageSize;
41+
42+
private Boolean isExportDetail;
4143
}

core/domain/src/main/java/com/wansenai/dto/financial/QueryTransferDTO.java

+2
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ public class QueryTransferDTO {
3434
private Integer page;
3535

3636
private Integer pageSize;
37+
38+
private Boolean isExportDetail;
3739
}

0 commit comments

Comments
 (0)