|
@@ -63,16 +63,27 @@ public class PayInvoiceController {
|
|
|
@GetMapping("/getPrintData")
|
|
|
@ApiOperation("获取打印数据")
|
|
|
public AjaxMessage< PrintInvoiceData> getPrintData(
|
|
|
- @ApiParam(value = "缴费批次号", required = true) @RequestParam(required = true) String payseriesno,
|
|
|
- @ApiParam(value = "交易类型,实收打印时为空", required = false) @RequestParam(required = false) Integer transType,
|
|
|
- @ApiParam(value = "支付方式,查询返回信息的payway", required = true) @RequestParam(required = true) Integer payway ) {
|
|
|
- if(transType !=null && transType==1 && payway == 4){ //单纯充值
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,payinvoiceService.getPrintDataOfTrans(payseriesno));
|
|
|
+ @ApiParam(value = "缴费批次号", required = true) @RequestParam(required = true) String payseriesno) {
|
|
|
+
|
|
|
+ PrintInvoiceData printInvoiceData = null ;
|
|
|
+ PrintInvoiceData type = payinvoiceService.getPayInvoiceType(payseriesno);
|
|
|
+ if(type != null && type.getPayInvoiceType() == 0){ //默认
|
|
|
+ if(type.getPrintType() != null && type.getPrintType() == 1){ //单纯充值
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTrans(payseriesno);
|
|
|
|
|
|
+ }else{ //缴费
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfReceived(payseriesno);
|
|
|
+ }
|
|
|
+ }else if(type != null && type.getPayInvoiceType() == 1){ //开鲁
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTransKailu(payseriesno);
|
|
|
+ }else if(type != null && type.getPayInvoiceType() == 2){ //盖州
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTransGaizhou(payseriesno);
|
|
|
|
|
|
- }else{ //缴费
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,payinvoiceService.getPrintDataOfReceived(payseriesno));
|
|
|
}
|
|
|
+ if(printInvoiceData != null){
|
|
|
+ printInvoiceData.setPayInvoiceType(type.getPayInvoiceType());
|
|
|
+ }
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,printInvoiceData);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getPrintDataAgain")
|
|
@@ -81,23 +92,33 @@ public class PayInvoiceController {
|
|
|
@ApiParam(value = "票据id", required = true) @RequestParam(required = true) BigInteger id
|
|
|
){
|
|
|
|
|
|
+ PrintInvoiceData printInvoiceData = null ;
|
|
|
PayInvoiceDto payInvoiceDto = payinvoiceService.get(id);
|
|
|
- String payseriesno = payinvoiceService.findPayseriesnoByPrint(id, 1);
|
|
|
- if (StringUtils.isNotBlank(payseriesno)) {
|
|
|
- PrintInvoiceData printInvoiceData= payinvoiceService.getPrintDataOfReceived(payseriesno);
|
|
|
- printInvoiceData.setInvoiceNo(payInvoiceDto.getInvoiceno());
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,printInvoiceData);
|
|
|
|
|
|
- } else {
|
|
|
+ String payseriesno = payinvoiceService.findPayseriesnoByPrint(id, 1);
|
|
|
+ if (StringUtils.isBlank(payseriesno)) {
|
|
|
payseriesno = payinvoiceService.findPayseriesnoByPrint(id, 2);
|
|
|
- if (StringUtils.isNotBlank(payseriesno)) {
|
|
|
- PrintInvoiceData printInvoiceData= payinvoiceService.getPrintDataOfTrans(payseriesno);
|
|
|
- printInvoiceData.setInvoiceNo(payInvoiceDto.getInvoiceno());
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,printInvoiceData);
|
|
|
- } else {
|
|
|
- return new AjaxMessage<>(ResultStatus.OPERATE_RECORD_NOT_EXIT);
|
|
|
+ }
|
|
|
+ PrintInvoiceData type = payinvoiceService.getPayInvoiceType(payseriesno);
|
|
|
+ if(type != null && type.getPayInvoiceType() == 0){ //默认
|
|
|
+ if(type.getPrintType() != null && type.getPrintType() == 1){ //单纯充值
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTrans(payseriesno);
|
|
|
+
|
|
|
+ }else{ //缴费
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfReceived(payseriesno);
|
|
|
}
|
|
|
+ }else if(type != null && type.getPayInvoiceType() == 1){ //开鲁
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTransKailu(payseriesno);
|
|
|
+ }else if(type != null && type.getPayInvoiceType() == 2){ //盖州
|
|
|
+ printInvoiceData = payinvoiceService.getPrintDataOfTransGaizhou(payseriesno);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(printInvoiceData != null){
|
|
|
+ printInvoiceData.setInvoiceNo(payInvoiceDto.getInvoiceno());
|
|
|
+ printInvoiceData.setPayInvoiceType(type.getPayInvoiceType());
|
|
|
}
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,printInvoiceData);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/cancelPrintinfo")
|