盘点管理 基础点位管理 绑定物料 解除物料

This commit is contained in:
liuhanqing
2025-05-30 16:32:24 +08:00
parent a393347bab
commit 37d45aa395
63 changed files with 6368 additions and 190 deletions

View File

@@ -0,0 +1,104 @@
package com.ruoyi.check.stockcheck.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.check.stockcheck.domain.CheckStockin;
import com.ruoyi.check.stockcheck.service.ICheckStockinService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 盘库单据主信息Controller
*
* @author ruoyi
* @date 2025-05-29
*/
@RestController
@RequestMapping("/check/stockCheck")
public class CheckStockinController extends BaseController
{
@Autowired
private ICheckStockinService checkStockinService;
/**
* 查询盘库单据主信息列表
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:list')")
@GetMapping("/list")
public TableDataInfo list(CheckStockin checkStockin)
{
startPage();
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
return getDataTable(list);
}
/**
* 导出盘库单据主信息列表
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:export')")
@Log(title = "盘库单据主信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CheckStockin checkStockin)
{
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
ExcelUtil<CheckStockin> util = new ExcelUtil<CheckStockin>(CheckStockin.class);
util.exportExcel(response, list, "盘库单据主信息数据");
}
/**
* 获取盘库单据主信息详细信息
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:query')")
@GetMapping(value = "/{stockGuid}")
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid)
{
return success(checkStockinService.selectCheckStockinByStockGuid(stockGuid));
}
/**
* 新增盘库单据主信息
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:add')")
@Log(title = "盘库单据主信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CheckStockin checkStockin)
{
return toAjax(checkStockinService.insertCheckStockin(checkStockin));
}
/**
* 修改盘库单据主信息
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:edit')")
@Log(title = "盘库单据主信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CheckStockin checkStockin)
{
return toAjax(checkStockinService.updateCheckStockin(checkStockin));
}
/**
* 删除盘库单据主信息
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:remove')")
@Log(title = "盘库单据主信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockGuids}")
public AjaxResult remove(@PathVariable String[] stockGuids)
{
return toAjax(checkStockinService.deleteCheckStockinByStockGuids(stockGuids));
}
}