| | |
| | | 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.*; |
| | |
| | | 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) { |
| | |
| | | @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(); |
| | | } |
| | | |
| | |
| | | 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(); |
| | | } |
| | | } |