// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package com.flow.controller; import com.flow.pojo.Company; import com.flow.pojo.Invoices; import com.flow.service.CompanyService; import com.flow.service.InvoicesSevice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping({"/hxzk"}) public class InvoicesController { @Autowired InvoicesSevice invoicesSevice; @Autowired CompanyService companyService; public InvoicesController() { } @PostMapping({"Invoices"}) public Invoices findInvoices(Invoices invoices) throws Exception { return this.invoicesSevice.findInvoices(invoices); } @PostMapping({"Invoicess"}) public Company findInvoicess(Invoices invoices) throws Exception { return this.companyService.findC(invoices.getCompany()); } @PostMapping({"InvoicesAdd"}) public int findInvoicesAdd(Invoices invoices) { int exis = this.invoicesSevice.findInvoicesChong(invoices); int shu; if (exis == 0) { shu = this.invoicesSevice.findInvoicesAdd(invoices); } else { shu = this.invoicesSevice.updateInvoices(invoices); } return shu; } }