maven
8 天以前 b67dbc6737b5a8751bbc6932724c34ae4b19c34e
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -21,10 +21,14 @@
import com.ruoyi.sales.pojo.SalesLedger;
import com.ruoyi.sales.service.ICommonFileService;
import com.ruoyi.sales.service.ISalesLedgerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
@@ -43,6 +47,7 @@
@RestController
@RequestMapping("/sales/ledger")
@AllArgsConstructor
@Api(tags = "销售台账")
public class SalesLedgerController extends BaseController {
    private ISalesLedgerService salesLedgerService;
@@ -59,6 +64,18 @@
    private ReceiptPaymentMapper receiptPaymentMapper;
    /**
     * 导入销售台账
     */
    @Log(title = "导入销售台账", businessType = BusinessType.INSERT)
    @PostMapping("/import")
    @ApiOperation("导入销售台账")
    public AjaxResult importData(@RequestParam("file")
                                 @ApiParam(value = "Excel文件", required = true)
                                 MultipartFile file) {
        return salesLedgerService.importData(file);
    }
    /**
     * 查询销售台账列表
     */
    @GetMapping("/list")