Skip to content

Commit

Permalink
Merge pull request #253 from Jzow/master
Browse files Browse the repository at this point in the history
Significant updates (Added all export functions for basic business)
  • Loading branch information
Jzow committed Dec 3, 2023
2 parents 3deb4e8 + 4855899 commit c73a9da
Show file tree
Hide file tree
Showing 51 changed files with 1,150 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.financial.CollectionDetailVO;
import com.wansenai.vo.financial.CollectionVO;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -27,6 +28,7 @@
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.List;

Expand Down Expand Up @@ -64,4 +66,9 @@ public Response<String> deleteCollectionReceiptByIds(@RequestParam("ids") List<L
public Response<String> updateCollectionReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return collectionReceiptService.updateCollectionReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportCollectionReceipt(@ModelAttribute QueryCollectionDTO queryCollectionDTO, HttpServletResponse response) {
collectionReceiptService.exportCollectionReceipt(queryCollectionDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.financial.ExpenseDetailVO;
import com.wansenai.vo.financial.ExpenseVO;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.List;

Expand Down Expand Up @@ -64,4 +66,9 @@ public Response<String> deleteExpenseReceiptByIds(@RequestParam("ids") List<Long
public Response<String> updateExpenseReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return expenseReceiptService.updateExpenseReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportExpenseReceipt(@ModelAttribute QueryExpenseDTO queryExpenseDTO, HttpServletResponse response) {
expenseReceiptService.exportExpenseReceipt(queryExpenseDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.financial.IncomeDetailVO;
import com.wansenai.vo.financial.IncomeVO;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -27,6 +28,7 @@
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.List;

Expand Down Expand Up @@ -64,4 +66,9 @@ public Response<String> deleteIncomeReceiptByIds(@RequestParam("ids") List<Long>
public Response<String> updateIncomeReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return incomeReceiptService.updateIncomeReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportIncomeReceipt(@ModelAttribute QueryIncomeDTO queryIncomeDTO, HttpServletResponse response) {
incomeReceiptService.exportIncomeReceipt(queryIncomeDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.financial.PaymentDetailVO;
import com.wansenai.vo.financial.PaymentVO;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.List;

Expand Down Expand Up @@ -57,4 +66,9 @@ public Response<String> deletePaymentReceiptByIds(@RequestParam("ids") List<Long
public Response<String> updatePaymentReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return paymentReceiptService.updatePaymentReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportPaymentReceipt(@ModelAttribute QueryPaymentDTO queryPaymentDTO, HttpServletResponse response) {
paymentReceiptService.exportPaymentReceipt(queryPaymentDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.financial.TransferDetailVO;
import com.wansenai.vo.financial.TransferVO;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -27,6 +28,7 @@
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.List;

Expand Down Expand Up @@ -64,4 +66,9 @@ public Response<String> deleteTransferReceiptByIds(@RequestParam("ids") List<Lon
public Response<String> updateTransferReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return transferReceiptService.updateTransferReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportTransferReceipt(@ModelAttribute QueryTransferDTO queryTransferDTO, HttpServletResponse response) {
transferReceiptService.exportTransferReceipt(queryTransferDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@
*/
package com.wansenai.api.financial

import org.springframework.web.bind.annotation.RestController
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PutMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.ModelAttribute
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.wansenai.dto.financial.AddOrUpdateAdvanceChargeDTO
import com.wansenai.dto.financial.QueryAdvanceChargeDTO
import com.wansenai.service.financial.AdvanceChargeService
import com.wansenai.utils.response.Response
import com.wansenai.vo.financial.AdvanceChargeDetailVO
import com.wansenai.vo.financial.AdvanceChargeVO
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.PutMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
import jakarta.servlet.http.HttpServletResponse

@RestController
@RequestMapping("/financial/advance-charge")
Expand Down Expand Up @@ -56,4 +58,9 @@ class AdvanceChargeController(private val advanceChargeService: AdvanceChargeSer
fun updateStatus(@RequestParam("ids") ids: List<Long>, @RequestParam("status") status: Int) : Response<String> {
return advanceChargeService.updateAdvanceChargeStatusById(ids, status)
}

@GetMapping("export")
fun export(@ModelAttribute advanceChargeDTO: QueryAdvanceChargeDTO, response: HttpServletResponse) {
advanceChargeService.exportAdvanceCharge(advanceChargeDTO, response)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class CollectionDataExportBO {

@ExcelExport(value = "客户")
private String customerName;

@ExcelExport(value = "收款单号")
private String receiptNumber;

@ExcelExport(value = "销售单据编号")
private String saleReceiptNumber;

@ExcelExport(value = "应收欠款")
private BigDecimal receivableArrears;

@ExcelExport(value = "已收欠款")
private BigDecimal receivedArrears;

@ExcelExport(value = "本次收款")
private BigDecimal thisCollectionAmount;

@ExcelExport(value = "备注")
private String remark;
}
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.bo;

import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class IncomeExpenseDataExportBO {

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "往来单位/人员")
private String relatedPerson;

@ExcelExport(value = "收入/支出项目")
private String incomeExpenseName;

@ExcelExport(value = "金额")
private BigDecimal incomeExpenseAmount;

@ExcelExport(value = "备注")
private String remark;
}
45 changes: 45 additions & 0 deletions core/domain/src/main/java/com/wansenai/bo/PaymentDataExportBO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class PaymentDataExportBO {

@ExcelExport(value = "供应商")
private String supplierName;

@ExcelExport(value = "付款单号")
private String receiptNumber;

@ExcelExport(value = "采购单据编号")
private String purchaseReceiptNumber;

@ExcelExport(value = "应付欠款")
private BigDecimal paymentArrears;

@ExcelExport(value = "已付欠款")
private BigDecimal prepaidArrears;

@ExcelExport(value = "本次付款")
private BigDecimal thisPaymentAmount;

@ExcelExport(value = "备注")
private String remark;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* 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.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class TransferAccountDataExportBO {

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "账户名称")
private String accountName;

@ExcelExport(value = "转账金额")
private BigDecimal transferAmount;

@ExcelExport(value = "备注")
private String remark;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ public class QueryCollectionDTO {
private Integer page;

private Integer pageSize;

private Boolean isExportDetail;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ public class QueryExpenseDTO {
private Integer page;

private Integer pageSize;

private Boolean isExportDetail;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ public class QueryIncomeDTO {
private Integer page;

private Integer pageSize;

private Boolean isExportDetail;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ public class QueryPaymentDTO {
private Integer page;

private Integer pageSize;

private Boolean isExportDetail;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ public class QueryTransferDTO {
private Integer page;

private Integer pageSize;

private Boolean isExportDetail;
}
Loading

0 comments on commit c73a9da

Please sign in to comment.