开票获取链表下的发票

master
pangyang 2 years ago
parent 71a79cd606
commit a4b5f36b41

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.djy.core.http.HttpResult;
import com.djy.invoice.dto.SendEmail;
import com.djy.invoice.dto.SendEmailParams;
import com.djy.invoice.model.InvInvoiceInfo;
import com.djy.invoice.model.InvLinkInfo;
import com.djy.invoice.service.InvLinkInfoService;
import io.swagger.v3.oas.annotations.Operation;
@ -57,6 +58,13 @@ public class InvLinkInfoController {
}
@Operation(description = "获取链接下的发票")
@PostMapping("getLinkInvoice")
public HttpResult getLinkInvoice(InvLinkInfo info) {
List<InvInvoiceInfo> list = invLinkInfoService.getLinkInvoice(info);
return HttpResult.ok(list);
}
// @Operation(description = "查询发票")
// @PostMapping("getInvoice")
// public HttpResult getInvoice(InvLinkInfo info) {

@ -3,8 +3,11 @@ package com.djy.invoice.service;
import com.djy.core.http.HttpResult;
import com.djy.invoice.model.InvInvoiceInfo;
import com.djy.invoice.model.InvLinkInfo;
import java.util.List;
public interface InvLinkInfoService {
@ -17,4 +20,6 @@ public interface InvLinkInfoService {
HttpResult uploadInvoice(InvLinkInfo info);
HttpResult getInvoice(InvLinkInfo info);
List<InvInvoiceInfo> getLinkInvoice(InvLinkInfo info);
}

@ -1259,6 +1259,20 @@ public class InvLinkInfoServiceImpl implements InvLinkInfoService {
}
@Transactional
public List<InvInvoiceInfo> getLinkInvoice(InvLinkInfo info){
List<InvInvoiceInfo> invoices = new ArrayList<>();
List<String> list = invInvoiceSplitMapper.getIdsBylinkdId(info.getGID());
for(String str : list){
InvInvoiceInfo invoice = invInvoiceInfoMapper.getByGid(str);
invoices.add(invoice);
}
return invoices;
}
public static String getCmdName() {
return cmdName;
}

Loading…
Cancel
Save