|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
package com.order.erp.controller;
import com.order.erp.common.annotation.AnonymousAccess;
import com.order.erp.common.constant.ServerResult;
import com.order.erp.common.excel4j.exceptions.Excel4JException;
import com.order.erp.common.jsr303.OperateGroup;
import com.order.erp.domain.dto.order.InvoiceBillOrderDO;
import com.order.erp.domain.vo.order.*;
import com.order.erp.service.order.InvoiceBillOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* 应收款账单表(InvoiceBillOrder)表控制层
*
* @author makejava
* @since 2024-08-05 16:26:34
*/
@RestController
@RequestMapping("/order/erp/invoice_bill")
public class InvoiceBillOrderController {
/**
* 服务对象
*/
@Resource
private InvoiceBillOrderService invoiceBillOrderService;
/**
* 分页查询
*
* @param invoiceBillOrderQueryVO 查询条件
* @return 查询结果
*/
@PostMapping("/list_by_page")
public ServerResult listByPage(@RequestBody @Validated({OperateGroup.List.class}) InvoiceBillOrderQueryVO invoiceBillOrderQueryVO) {
return invoiceBillOrderService.listByPage(invoiceBillOrderQueryVO);
}
/**
|
|
48
|
* 基础订单查询 完成
|
|
49
50
51
52
53
54
55
56
57
58
|
*
* @param queryVO 查询条件
* @return 查询结果
*/
@PostMapping("/list_base_order_info_by")
public ServerResult listBaseOrderInfoBy(@RequestBody @Validated InvoiceBaseOrderQueryVO queryVO) {
return invoiceBillOrderService.listBaseOrderInfoBy(queryVO);
}
/**
|
|
59
|
* 分析列表 完成
|
|
60
61
62
63
64
|
*
* @param queryVO 查询条件
* @return 查询结果
*/
@PostMapping("/list_analysis_by")
|
|
65
|
public ServerResult listAnalysisBy(@RequestBody @Validated({OperateGroup.List.class}) InvoiceAndCheckAnalysisVO queryVO) {
|
|
66
67
68
69
|
return invoiceBillOrderService.listAnalysisBy(queryVO);
}
/**
|
|
70
|
* 导出分析列表 完成
|
|
71
72
73
74
75
76
77
|
*
* @param queryVO 查询条件
* @return 查询结果
*/
@PostMapping(value = "/export")
@ApiOperation("导出分析列表")
@AnonymousAccess
|
|
78
|
public void export(HttpServletResponse response, @RequestBody InvoiceAndCheckAnalysisVO queryVO) throws IOException, Excel4JException {
|
|
79
80
81
82
|
invoiceBillOrderService.export(response, queryVO);
}
/**
|
|
83
|
* 创建invoice单据 完成 1
|
|
84
85
86
87
88
89
90
91
92
93
|
*
* @param createVO 数据VO
* @return 新增结果
*/
@PostMapping("/create")
public ServerResult create(@RequestBody InvoiceBillCreateVO createVO) {
return invoiceBillOrderService.create(createVO);
}
/**
|
|
94
|
* 获取必须回款日期 完成 1
|
|
95
96
97
98
99
100
101
102
103
104
|
*
* @param createVO 数据VO
* @return 新增结果
*/
@PostMapping("/get_back_refund_date")
public ServerResult getBackRefundDate(@RequestBody InvoiceBillCreateVO createVO) {
return invoiceBillOrderService.getBackRefundDate(createVO);
}
/**
|
|
105
|
* 更新扣款信息 完成 1
|
|
106
107
108
109
110
111
112
113
114
115
|
*
* @param deductInfoVO 数据VO
* @return 编辑结果
*/
@PostMapping("/update_deduct_info")
public ServerResult updateDeductInfo(@RequestBody InvoiceBillDeductInfoVO deductInfoVO) {
return invoiceBillOrderService.updateDeductInfo(deductInfoVO);
}
/**
|
|
116
|
* 更新其他金额信息 完成 1
|
|
117
118
119
120
121
122
123
124
125
126
|
*
* @param amountInfoVO 数据VO
* @return 编辑结果
*/
@PostMapping("/update_amount_info")
public ServerResult updateAmountInfo(@RequestBody InvoiceBillAmountInfoVO amountInfoVO) {
return invoiceBillOrderService.updateAmountInfo(amountInfoVO);
}
/**
|
|
127
|
* 提交审核 完成 1
|
|
128
129
130
131
132
133
134
135
136
137
|
*
* @param commitApplyVO 数据VO
* @return 编辑结果
*/
@PostMapping("/commit_apply")
public ServerResult commitApply(@RequestBody InvoiceBillCommitApplyVO commitApplyVO) {
return invoiceBillOrderService.commitApply(commitApplyVO);
}
/**
|
|
138
|
* 删除数据 完成 1
|
|
139
140
141
142
143
144
145
146
147
|
*
* @param invoiceBillOrderQueryVO 查询条件
* @return 删除是否成功
*/
@PostMapping("/delete_by_id")
public ServerResult deleteById(@RequestBody InvoiceBillOrderQueryVO invoiceBillOrderQueryVO) {
return invoiceBillOrderService.deleteById(invoiceBillOrderQueryVO);
}
/**
|
|
148
|
* 获取扣款单 完成 1
|
|
149
150
151
152
153
154
155
156
157
|
*
* @param invoiceBillOrderQueryVO 查询条件
* @return 扣款单
*/
@PostMapping("/getDeductUrl_by_id")
public ServerResult getDeductUrl(@RequestBody InvoiceBillOrderQueryVO invoiceBillOrderQueryVO) {
return invoiceBillOrderService.getDeductUrlById(invoiceBillOrderQueryVO);
}
/**
|
|
158
|
* 重新上传报关单 完成 1
|
|
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
*
* @param bgUrl 报关单
* @return
*/
@PostMapping("/reUploadBgUrl")
public ServerResult getDeductUrl(@RequestBody InvoiceBillCreateVO bgUrl) {
return invoiceBillOrderService.reUploadBgurl(bgUrl);
}
/**
* 审核时导出的付款单
* @param queryVO 报关单
* @return
*/
@PostMapping("/exportReceipt")
@AnonymousAccess
|
|
175
|
public void exportReceipt(HttpServletResponse response, @RequestBody InvoiceExportReceiptVO queryVO) throws IOException {
|
|
176
177
|
invoiceBillOrderService.exportReceipt(response,queryVO);
}
|
|
178
|
/**
|
|
179
|
* 设置必须回款日期 完成 1
|
|
180
181
182
183
184
185
186
|
* @param createVO 必须回款日期
* @return
*/
@PostMapping("/setBackRefundDate")
public void setBackRefundDate(@RequestBody InvoiceBillCreateVO createVO) {
invoiceBillOrderService.setBackRefundDate(createVO);
}
|
|
187
188
189
190
191
192
193
194
195
196
|
/**
*设置备注信息 完成 1
* @param createVO 备注信息
* @return
*/
@PostMapping("/notes")
public void byIdAddNotes(@RequestBody InvoiceBillCreateVO createVO) {
invoiceBillOrderService.byIdAddNotes(createVO);
}
|
|
197
198
199
200
201
202
203
204
205
206
|
/**
*删除扣款单
* @param deleteVo id
* @return
*/
@PostMapping("/deleteDeductUrl_by_id")
public ServerResult deleteDeductUrlById(@RequestBody InvoiceBillDeductInfoVO deleteVo) {
return invoiceBillOrderService.deleteDeductUrlById(deleteVo);
}
|
|
207
|
|
|
208
|
/** 最终状态
|
|
209
|
*最后一步,确认是否已经完成最终收款,即使审核通过之后,invoice的状态从未收款转化为待收款,,这里的作用是在待收款状态的基础上,最后手动确认是否完成收款。人工校验,状态为已收款。
|
|
210
211
212
213
214
215
216
|
* @param invoiceBillDeductInfoVO id
* @return
*/
@PostMapping("/setFinishStatus")
public ServerResult isFinishStatus(@RequestBody InvoiceBillDeductInfoVO invoiceBillDeductInfoVO) {
return invoiceBillOrderService.isFinishStatus(invoiceBillDeductInfoVO);
}
|
|
217
218
|
}
|