|
@@ -1,6 +1,8 @@
|
|
package com.bosshand.virgo.api.controller;
|
|
package com.bosshand.virgo.api.controller;
|
|
|
|
|
|
import com.bosshand.virgo.api.model.Payment;
|
|
import com.bosshand.virgo.api.model.Payment;
|
|
|
|
+import com.bosshand.virgo.api.model.PaymentInvoice;
|
|
|
|
+import com.bosshand.virgo.api.model.PaymentRecord;
|
|
import com.bosshand.virgo.api.service.PaymentService;
|
|
import com.bosshand.virgo.api.service.PaymentService;
|
|
import com.bosshand.virgo.core.response.Response;
|
|
import com.bosshand.virgo.core.response.Response;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -15,7 +17,7 @@ import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping({"payment"})
|
|
@RequestMapping({"payment"})
|
|
-@Api(tags = {"账单缴费管理"})
|
|
|
|
|
|
+@Api(tags = {"账单缴费发票管理"})
|
|
public class PaymentController {
|
|
public class PaymentController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -57,4 +59,77 @@ public class PaymentController {
|
|
return Response.ok("账单已生成!");
|
|
return Response.ok("账单已生成!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 发票记录
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("发票记录详情")
|
|
|
|
+ @RequestMapping(value = "/invoice/{id}", method = RequestMethod.GET)
|
|
|
|
+ public Response getInvoice(@PathVariable long id) {
|
|
|
|
+ return Response.ok(paymentService.getInvoice(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("保存发票记录")
|
|
|
|
+ @RequestMapping(value = "/invoice", method = RequestMethod.POST)
|
|
|
|
+ public Response insertInvoice(@RequestBody PaymentInvoice paymentInvoice) {
|
|
|
|
+ paymentService.insertInvoice(paymentInvoice);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("获取发票记录")
|
|
|
|
+ @RequestMapping(value = "/invoice/query", method = RequestMethod.POST)
|
|
|
|
+ public Response getInvoiceList(@RequestBody PaymentInvoice paymentInvoice) {
|
|
|
|
+ return Response.ok(paymentService.getInvoiceList(paymentInvoice));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("更新发票记录")
|
|
|
|
+ @RequestMapping(value = "/invoice/update", method = RequestMethod.PUT)
|
|
|
|
+ public Response updateInvoice(@RequestBody PaymentInvoice paymentInvoice) {
|
|
|
|
+ paymentService.updateInvoice(paymentInvoice);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("删除发票记录")
|
|
|
|
+ @RequestMapping(value = "/invoice/delete/{id}", method = RequestMethod.DELETE)
|
|
|
|
+ public Response deleteInvoice(@PathVariable long id) {
|
|
|
|
+ paymentService.deleteInvoice(id);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 付款记录
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("付款记录详情")
|
|
|
|
+ @RequestMapping(value = "/record/{id}", method = RequestMethod.GET)
|
|
|
|
+ public Response getPaymentRecord(@PathVariable long id) {
|
|
|
|
+ return Response.ok(paymentService.getPaymentRecord(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("保存付款记录")
|
|
|
|
+ @RequestMapping(value = "/record", method = RequestMethod.POST)
|
|
|
|
+ public Response insertPaymentRecord(@RequestBody PaymentRecord paymentRecord) {
|
|
|
|
+ paymentService.insertPaymentRecord(paymentRecord);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("获取付款记录")
|
|
|
|
+ @RequestMapping(value = "/record/query", method = RequestMethod.POST)
|
|
|
|
+ public Response getPaymentRecordList(@RequestBody PaymentRecord paymentRecord) {
|
|
|
|
+ return Response.ok(paymentService.getPaymentRecordList(paymentRecord));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("更新付款记录")
|
|
|
|
+ @RequestMapping(value = "/record/update", method = RequestMethod.PUT)
|
|
|
|
+ public Response updatePaymentRecord(@RequestBody PaymentRecord paymentRecord) {
|
|
|
|
+ paymentService.updatePaymentRecord(paymentRecord);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("删除付款记录")
|
|
|
|
+ @RequestMapping(value = "/record/delete/{id}", method = RequestMethod.DELETE)
|
|
|
|
+ public Response deletePaymentRecord(@PathVariable long id) {
|
|
|
|
+ paymentService.deletePaymentRecord(id);
|
|
|
|
+ return Response.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|