Skip to content

Commit 925fed3

Browse files
authored
Merge pull request #156 from Jzow/master
Add retail returns and sales procurement related pages
2 parents ad50426 + 782cea9 commit 925fed3

File tree

27 files changed

+1710
-20
lines changed

27 files changed

+1710
-20
lines changed

core/api/src/main/java/com/wansenai/api/RetailController.java

+14
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
package com.wansenai.api;
1414

1515
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16+
import com.wansenai.dto.receipt.QueryRetailRefundDTO;
1617
import com.wansenai.dto.receipt.QueryShipmentsDTO;
18+
import com.wansenai.dto.receipt.RetailRefundDTO;
1719
import com.wansenai.dto.receipt.RetailShipmentsDTO;
1820
import com.wansenai.service.receipt.ReceiptService;
1921
import com.wansenai.utils.response.Response;
22+
import com.wansenai.vo.receipt.RetailRefundVO;
2023
import com.wansenai.vo.receipt.RetailShipmentsDetailVO;
2124
import com.wansenai.vo.receipt.RetailShipmentsVO;
2225
import org.springframework.web.bind.annotation.*;
@@ -57,4 +60,15 @@ public Response<String> updateStatus(@RequestParam("ids") List<Long> ids, @Reque
5760
public Response<RetailShipmentsDetailVO> detail(@PathVariable("id") Long id) {
5861
return receiptService.getRetailShipmentsDetail(id);
5962
}
63+
64+
@PostMapping("/refund/pageList")
65+
public Response<Page<RetailRefundVO>> refundPageList(@RequestBody QueryRetailRefundDTO refundDTO) {
66+
return receiptService.getRetailRefund(refundDTO);
67+
}
68+
69+
@PostMapping("/refund/addOrUpdate")
70+
public Response<String> refundAddOrUpdate(@RequestBody RetailRefundDTO refundDTO) {
71+
return receiptService.addOrUpdateRetailRefund(refundDTO);
72+
}
73+
6074
}

core/domain/src/main/java/com/wansenai/bo/ShipmentsDataBO.java

+2
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ public class ShipmentsDataBO {
4040

4141
@JsonSerialize(using = BigDecimalSerializerBO.class)
4242
private BigDecimal amount;
43+
44+
private String remark;
4345
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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.dto.receipt;
14+
15+
import lombok.Data;
16+
17+
@Data
18+
public class QueryRetailRefundDTO {
19+
20+
private String receiptNumber;
21+
22+
private String productInfo;
23+
24+
private Long memberId;
25+
26+
private Long warehouseId;
27+
28+
private Long accountId;
29+
30+
private Long operatorId;
31+
32+
private Integer status;
33+
34+
private String remark;
35+
36+
private String startDate;
37+
38+
private String endDate;
39+
40+
private Long page;
41+
42+
private Long pageSize;
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.dto.receipt;
14+
15+
import com.wansenai.bo.FileDataBO;
16+
import com.wansenai.bo.ShipmentsDataBO;
17+
import lombok.Builder;
18+
import lombok.Data;
19+
20+
import java.math.BigDecimal;
21+
import java.util.List;
22+
23+
@Data
24+
@Builder
25+
public class RetailRefundDTO {
26+
27+
private Long id;
28+
29+
private Long memberId;
30+
31+
private Long accountId;
32+
33+
private String receiptDate;
34+
35+
private String receiptNumber;
36+
37+
private String otherReceipt;
38+
39+
private BigDecimal paymentAmount;
40+
41+
private BigDecimal receiptAmount;
42+
43+
private BigDecimal backAmount;
44+
45+
private String remark;
46+
47+
private Integer status;
48+
49+
private List<ShipmentsDataBO> tableData;
50+
51+
private List<FileDataBO> files;
52+
}

core/domain/src/main/java/com/wansenai/entities/receipt/ReceiptMain.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public class ReceiptMain implements Serializable {
8787

8888
private Integer source;
8989

90-
private String orderNumber;
90+
private String otherReceipt;
9191

9292
/**
9393
* 创建时间
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.vo.receipt;
14+
15+
import com.fasterxml.jackson.annotation.JsonFormat;
16+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
17+
import com.wansenai.bo.BigDecimalSerializerBO;
18+
import com.wansenai.bo.FileDataBO;
19+
import com.wansenai.bo.ShipmentsDataBO;
20+
import lombok.Builder;
21+
import lombok.Data;
22+
23+
import java.math.BigDecimal;
24+
import java.time.LocalDateTime;
25+
import java.util.List;
26+
27+
@Data
28+
@Builder
29+
public class RetailRefundDetailVO {
30+
31+
@JsonFormat(shape = JsonFormat.Shape.STRING)
32+
private Long memberId;
33+
34+
@JsonFormat(shape = JsonFormat.Shape.STRING)
35+
private Long accountId;
36+
37+
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
38+
private LocalDateTime receiptDate;
39+
40+
private String receiptNumber;
41+
42+
private String otherReceipt;
43+
44+
@JsonSerialize(using = BigDecimalSerializerBO.class)
45+
private BigDecimal paymentAmount;
46+
47+
@JsonSerialize(using = BigDecimalSerializerBO.class)
48+
private BigDecimal receiptAmount;
49+
50+
@JsonSerialize(using = BigDecimalSerializerBO.class)
51+
private BigDecimal backAmount;
52+
53+
private String remark;
54+
55+
private List<ShipmentsDataBO> tableData;
56+
57+
private List<FileDataBO> files;
58+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.vo.receipt;
14+
15+
import com.fasterxml.jackson.annotation.JsonFormat;
16+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
17+
import com.wansenai.bo.BigDecimalSerializerBO;
18+
import lombok.AllArgsConstructor;
19+
import lombok.Builder;
20+
import lombok.Data;
21+
import lombok.NoArgsConstructor;
22+
23+
import java.math.BigDecimal;
24+
import java.time.LocalDateTime;
25+
26+
@Data
27+
@Builder
28+
@NoArgsConstructor
29+
@AllArgsConstructor
30+
public class RetailRefundVO {
31+
32+
@JsonFormat(shape = JsonFormat.Shape.STRING)
33+
private Long id;
34+
35+
private String memberName;
36+
37+
private String receiptNumber;
38+
39+
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
40+
private LocalDateTime receiptDate;
41+
42+
private String productInfo;
43+
44+
private String operator;
45+
46+
private Integer productNumber;
47+
48+
@JsonSerialize(using = BigDecimalSerializerBO.class)
49+
private BigDecimal totalPrice;
50+
51+
@JsonSerialize(using = BigDecimalSerializerBO.class)
52+
private BigDecimal paymentAmount;
53+
54+
@JsonSerialize(using = BigDecimalSerializerBO.class)
55+
private BigDecimal backAmount;
56+
57+
private Integer status;
58+
}

core/service/src/main/java/com/wansenai/service/receipt/ReceiptService.java

+26
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
package com.wansenai.service.receipt;
1414

1515
import com.baomidou.mybatisplus.extension.service.IService;
16+
import com.wansenai.dto.receipt.QueryRetailRefundDTO;
1617
import com.wansenai.dto.receipt.QueryShipmentsDTO;
18+
import com.wansenai.dto.receipt.RetailRefundDTO;
1719
import com.wansenai.dto.receipt.RetailShipmentsDTO;
20+
import com.wansenai.vo.receipt.RetailRefundVO;
1821
import com.wansenai.vo.receipt.RetailShipmentsDetailVO;
1922
import com.wansenai.entities.receipt.ReceiptMain;
2023
import com.wansenai.utils.response.Response;
@@ -94,4 +97,27 @@ public interface ReceiptService extends IService<ReceiptMain> {
9497
* 返回首页数据汇总
9598
*/
9699
Response<RetailStatisticalDataVO> getRetailStatistics();
100+
101+
102+
/**
103+
* Query retail refund orders with pagination.
104+
* 分页查询零售退货单
105+
*
106+
* @param refundDTO Query common conditions
107+
* 查询公共条件
108+
* @return Returns paginated data
109+
* 返回分页数据
110+
*/
111+
Response<Page<RetailRefundVO>> getRetailRefund(QueryRetailRefundDTO refundDTO);
112+
113+
/**
114+
* Add/modify retail shipment orders.
115+
* 新增/修改 零售退货单
116+
*
117+
* @param refundDTO Retail shipment order data
118+
* 零售退货单数据
119+
* @return Returns the result of the addition
120+
* 返回新增结果
121+
*/
122+
Response<String> addOrUpdateRetailRefund(RetailRefundDTO refundDTO);
97123
}

0 commit comments

Comments
 (0)