Skip to content

Commit

Permalink
Merge pull request #241 from Jzow/master
Browse files Browse the repository at this point in the history
Add Supplier and Customer modula bill report apis and views
  • Loading branch information
wansenai-bot authored Nov 27, 2023
2 parents 56690ea + 0c8822a commit 62fe9de
Show file tree
Hide file tree
Showing 18 changed files with 1,580 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,24 @@ public Response<Page<ShipmentsSummaryVO>> getShipmentsSummary(@RequestBody Query
public Response<Page<StorageSummaryVO>> getStorageSummary(@RequestBody QueryStorageSummaryDTO queryStorageSummaryDTO) {
return receiptService.getStorageSummary(queryStorageSummaryDTO);
}

@PostMapping("customerBill")
public Response<Page<CustomerBillVO>> getCustomerBill(@RequestBody QueryCustomerBillDTO queryCustomerBillDTO) {
return receiptService.getCustomerBill(queryCustomerBillDTO);
}

@PostMapping("customerBillDetail")
public Response<Page<CustomerBillDetailVO>> getCustomerBillDetail(@RequestBody QueryCustomerBillDetailDTO queryCustomerBillDetailDTO) {
return receiptService.getCustomerBillDetail(queryCustomerBillDetailDTO);
}

@PostMapping("supplierBill")
public Response<Page<SupplierBillVO>> getSupplierBill(@RequestBody QuerySupplierBillDTO querySupplierBillDTO) {
return receiptService.getSupplierBill(querySupplierBillDTO);
}

@PostMapping("supplierBillDetail")
public Response<Page<SupplierBillDetailVO>> getSupplierBillDetail(@RequestBody QuerySupplierBillDetailDTO querySupplierBillDetailDTO) {
return receiptService.getSupplierBillDetail(querySupplierBillDetailDTO);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.report;

import lombok.Data;

@Data
public class QueryCustomerBillDTO {

private Long customerId;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.report;

import lombok.Data;

@Data
public class QueryCustomerBillDetailDTO {

private Long customerId;

private String receiptNumber;

private String productInfo;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.report;

import lombok.Data;

@Data
public class QuerySupplierBillDTO {

private Long supplierId;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.report;

import lombok.Data;

@Data
public class QuerySupplierBillDetailDTO {

private Long supplierId;

private String receiptNumber;

private String productInfo;

private String startDate;

private String endDate;

private Integer page;

private Integer pageSize;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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.report;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
public class CustomerBillDetailVO {

private String receiptNumber;

private String customerName;

private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime receiptDate;

private String operator;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thisReceiptArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal receivedArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal receivableArrears;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* 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.report;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class CustomerBillVO {

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long customerId;

private String customerName;

private String contactName;

private String contactPhone;

private String email;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal firstQuarterReceivable;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal secondQuarterReceivable;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thirdQuarterReceivable;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal fourthQuarterReceivable;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal totalQuarterReceivable;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal totalQuarterArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal remainingReceivableArrears;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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.report;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
public class SupplierBillDetailVO {

private String receiptNumber;

private String supplierName;

private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime receiptDate;

private String operator;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thisReceiptArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal prepaidArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal paymentArrears;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* 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.report;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class SupplierBillVO {

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long supplierId;

private String supplierName;

private String contactName;

private String contactPhone;

private String email;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal firstQuarterPayment;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal secondQuarterPayment;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal thirdQuarterPayment;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal fourthQuarterPayment;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal totalPayment;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal totalArrears;

@JsonSerialize(using = BigDecimalSerializerBO.class)
private BigDecimal remainingPaymentArrears;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,12 @@ public interface ReceiptService {
Response<Page<StorageSummaryVO>> getStorageSummary(QueryStorageSummaryDTO queryStorageSummaryDTO);

Response<List<RelatedPersonVO>> getRelatedPerson();

Response<Page<CustomerBillVO>> getCustomerBill(QueryCustomerBillDTO queryCustomerBillDTO);

Response<Page<CustomerBillDetailVO>> getCustomerBillDetail(QueryCustomerBillDetailDTO queryCustomerBillDetailDTO);

Response<Page<SupplierBillVO>> getSupplierBill(QuerySupplierBillDTO querySupplierBillDTO);

Response<Page<SupplierBillDetailVO>> getSupplierBillDetail(QuerySupplierBillDetailDTO querySupplierBillDetailDTO);
}
Loading

0 comments on commit 62fe9de

Please sign in to comment.