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.OWbInveMngAdjust;
- import com.emato.biz.service.warehouse.IOWbInveMngAdjustService;
- import com.emato.common.utils.poi.ExcelUtil;
- import com.emato.common.core.page.TableDataInfo;
- /**
- * 库存调整记录.Controller
- *
- * @author scott
- * @date 2021-02-01
- */
- @RestController
- @RequestMapping("/biz/inveadjust")
- public class OWbInveMngAdjustController extends BaseController
- {
- @Autowired
- private IOWbInveMngAdjustService oWbInveMngAdjustService;
- /**
- * 查询库存调整记录.列表
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:list')")
- @GetMapping("/list")
- public TableDataInfo list(OWbInveMngAdjust oWbInveMngAdjust)
- {
- startPage();
- List<OWbInveMngAdjust> list = oWbInveMngAdjustService.selectOWbInveMngAdjustList(oWbInveMngAdjust);
- return getDataTable(list);
- }
- /**
- * 导出库存调整记录.列表
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:export')")
- @Log(title = "库存调整记录.", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(OWbInveMngAdjust oWbInveMngAdjust)
- {
- List<OWbInveMngAdjust> list = oWbInveMngAdjustService.selectOWbInveMngAdjustList(oWbInveMngAdjust);
- ExcelUtil<OWbInveMngAdjust> util = new ExcelUtil<OWbInveMngAdjust>(OWbInveMngAdjust.class);
- return util.exportExcel(list, "inveadjust");
- }
- /**
- * 获取库存调整记录.详细信息
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:query')")
- @GetMapping(value = "/{adjustSn}")
- public AjaxResult getInfo(@PathVariable("adjustSn") String adjustSn)
- {
- return AjaxResult.success(oWbInveMngAdjustService.selectOWbInveMngAdjustById(adjustSn));
- }
- /**
- * 新增库存调整记录.
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:add')")
- @Log(title = "库存调整记录.", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody OWbInveMngAdjust oWbInveMngAdjust)
- {
- return toAjax(oWbInveMngAdjustService.insertOWbInveMngAdjust(oWbInveMngAdjust));
- }
- /**
- * 修改库存调整记录.
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:edit')")
- @Log(title = "库存调整记录.", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody OWbInveMngAdjust oWbInveMngAdjust)
- {
- return toAjax(oWbInveMngAdjustService.updateOWbInveMngAdjust(oWbInveMngAdjust));
- }
- /**
- * 删除库存调整记录.
- */
- @PreAuthorize("@ss.hasPermi('biz:inveadjust:remove')")
- @Log(title = "库存调整记录.", businessType = BusinessType.DELETE)
- @DeleteMapping("/{adjustSns}")
- public AjaxResult remove(@PathVariable String[] adjustSns)
- {
- return toAjax(oWbInveMngAdjustService.deleteOWbInveMngAdjustByIds(adjustSns));
- }
- }
|