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.OWbInveWithdraw;
- import com.emato.biz.service.warehouse.IOWbInveWithdrawService;
- import com.emato.common.utils.poi.ExcelUtil;
- import com.emato.common.core.page.TableDataInfo;
- /**
- * 库存退港Controller
- *
- * @author yangbo
- * @date 2021-02-01
- */
- @RestController
- @RequestMapping("/biz/invewithdraw")
- public class OWbInveWithdrawController extends BaseController
- {
- @Autowired
- private IOWbInveWithdrawService oWbInveWithdrawService;
- /**
- * 查询库存退港列表
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:list')")
- @GetMapping("/list")
- public TableDataInfo list(OWbInveWithdraw oWbInveWithdraw)
- {
- startPage();
- List<OWbInveWithdraw> list = oWbInveWithdrawService.selectOWbInveWithdrawList(oWbInveWithdraw);
- return getDataTable(list);
- }
- /**
- * 导出库存退港列表
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:export')")
- @Log(title = "库存退港", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(OWbInveWithdraw oWbInveWithdraw)
- {
- List<OWbInveWithdraw> list = oWbInveWithdrawService.selectOWbInveWithdrawList(oWbInveWithdraw);
- ExcelUtil<OWbInveWithdraw> util = new ExcelUtil<OWbInveWithdraw>(OWbInveWithdraw.class);
- return util.exportExcel(list, "invewithdraw");
- }
- /**
- * 获取库存退港详细信息
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:query')")
- @GetMapping(value = "/{inveWithdrawSn}")
- public AjaxResult getInfo(@PathVariable("inveWithdrawSn") String inveWithdrawSn)
- {
- return AjaxResult.success(oWbInveWithdrawService.selectOWbInveWithdrawById(inveWithdrawSn));
- }
- /**
- * 新增库存退港
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:add')")
- @Log(title = "库存退港", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody OWbInveWithdraw oWbInveWithdraw)
- {
- return toAjax(oWbInveWithdrawService.insertOWbInveWithdraw(oWbInveWithdraw));
- }
- /**
- * 修改库存退港
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:edit')")
- @Log(title = "库存退港", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody OWbInveWithdraw oWbInveWithdraw)
- {
- return toAjax(oWbInveWithdrawService.updateOWbInveWithdraw(oWbInveWithdraw));
- }
- /**
- * 删除库存退港
- */
- @PreAuthorize("@ss.hasPermi('biz:invewithdraw:remove')")
- @Log(title = "库存退港", businessType = BusinessType.DELETE)
- @DeleteMapping("/{inveWithdrawSns}")
- public AjaxResult remove(@PathVariable String[] inveWithdrawSns)
- {
- return toAjax(oWbInveWithdrawService.deleteOWbInveWithdrawByIds(inveWithdrawSns));
- }
- }
|