123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- package com.emato.biz.controller.warehouse;
- import java.util.List;
- import org.springframework.security.access.prepost.PreAuthorize;
- 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.PutMapping;
- import org.springframework.web.bind.annotation.DeleteMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import com.emato.common.annotation.Log;
- import com.emato.common.core.controller.BaseController;
- import com.emato.common.core.domain.AjaxResult;
- import com.emato.common.enums.BusinessType;
- import com.emato.biz.domain.warehouse.OWbInveReceipt;
- import com.emato.biz.service.warehouse.IOWbInveReceiptService;
- import com.emato.common.utils.poi.ExcelUtil;
- import com.emato.common.core.page.TableDataInfo;
- /**
- * 库存入库记录,记录货物入库Controller
- *
- * @author yangbo
- * @date 2021-02-01
- */
- @RestController
- @RequestMapping("/biz/invereceipt")
- public class OWbInveReceiptController extends BaseController
- {
- @Autowired
- private IOWbInveReceiptService oWbInveReceiptService;
- /**
- * 查询库存入库记录,记录货物入库列表
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:list')")
- @GetMapping("/list")
- public TableDataInfo list(OWbInveReceipt oWbInveReceipt)
- {
- startPage();
- List<OWbInveReceipt> list = oWbInveReceiptService.selectOWbInveReceiptList(oWbInveReceipt);
- return getDataTable(list);
- }
- /**
- * 导出库存入库记录,记录货物入库列表
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:export')")
- @Log(title = "库存入库记录,记录货物入库", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(OWbInveReceipt oWbInveReceipt)
- {
- List<OWbInveReceipt> list = oWbInveReceiptService.selectOWbInveReceiptList(oWbInveReceipt);
- ExcelUtil<OWbInveReceipt> util = new ExcelUtil<OWbInveReceipt>(OWbInveReceipt.class);
- return util.exportExcel(list, "invereceipt");
- }
- /**
- * 获取库存入库记录,记录货物入库详细信息
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:query')")
- @GetMapping(value = "/{receiptSn}")
- public AjaxResult getInfo(@PathVariable("receiptSn") String receiptSn)
- {
- return AjaxResult.success(oWbInveReceiptService.selectOWbInveReceiptById(receiptSn));
- }
- /**
- * 新增库存入库记录,记录货物入库
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:add')")
- @Log(title = "库存入库记录,记录货物入库", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody OWbInveReceipt oWbInveReceipt)
- {
- return toAjax(oWbInveReceiptService.insertOWbInveReceipt(oWbInveReceipt));
- }
- /**
- * 修改库存入库记录,记录货物入库
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:edit')")
- @Log(title = "库存入库记录,记录货物入库", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody OWbInveReceipt oWbInveReceipt)
- {
- return toAjax(oWbInveReceiptService.updateOWbInveReceipt(oWbInveReceipt));
- }
- /**
- * 删除库存入库记录,记录货物入库
- */
- @PreAuthorize("@ss.hasPermi('biz:invereceipt:remove')")
- @Log(title = "库存入库记录,记录货物入库", businessType = BusinessType.DELETE)
- @DeleteMapping("/{receiptSns}")
- public AjaxResult remove(@PathVariable String[] receiptSns)
- {
- return toAjax(oWbInveReceiptService.deleteOWbInveReceiptByIds(receiptSns));
- }
- }
|