lishenao
16 小时以前 6bbac4845106ca8648900b1d9af758c84275ffee
src/main/java/com/ruoyi/inventory/controller/StockInController.java
@@ -12,7 +12,10 @@
import com.ruoyi.inventory.excel.StockInExcelDto;
import com.ruoyi.inventory.service.StockInService;
import com.ruoyi.inventory.pojo.StockIn;
import com.ruoyi.purchase.dto.ProductRecordDto;
import com.ruoyi.purchase.dto.PurchaseLedgerDto;
import com.ruoyi.purchase.pojo.ProductRecord;
import com.ruoyi.purchase.service.IProductRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
@@ -26,6 +29,12 @@
public class StockInController{
    @Autowired
    private StockInService stockInService;
    @Autowired
    private IProductRecordService productRecordService;
    @GetMapping("/productlist")
    public AjaxResult list(String purchaseContractNumber) {
        return AjaxResult.success(productRecordService.selectProductRecordListByPuechaserId(purchaseContractNumber));
    }
    @GetMapping("/listPage")
    public AjaxResult listPage(Page page, StockinDto stockinDto) {
@@ -35,6 +44,11 @@
    @PostMapping("/add")
    public AjaxResult add(@RequestBody StockIn stockIn) {
        stockInService.saveStockin(stockIn);
        return AjaxResult.success();
    }
    @PostMapping("/addstockinList")
    public AjaxResult addstockinList(@RequestBody List<StockIn> stockInList) {
        stockInService.addstockin(stockInList);
        return AjaxResult.success();
    }
@@ -63,4 +77,9 @@
    public void export(HttpServletResponse response, StockinDto stockinDto) {
        stockInService.stockinExport(response, stockinDto);
    }
    @PostMapping("/batchSave")
    public AjaxResult batchSaveStockin(@RequestBody List<StockIn> stockInList) {
        stockInService.batchSaveStockin(stockInList);
        return AjaxResult.success();
    }
}