库存维护记录
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.stock.maintain.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.stock.maintain.domain.BasStockMaintainRecord;
|
||||
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 库存操作记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/stock/record")
|
||||
public class BasStockMaintainRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasStockMaintainRecordService basStockMaintainRecordService;
|
||||
|
||||
/**
|
||||
* 查询库存操作记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
startPage();
|
||||
List<BasStockMaintainRecord> list = basStockMaintainRecordService.selectBasStockMaintainRecordList(basStockMaintainRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存操作记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:export')")
|
||||
@Log(title = "库存操作记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
List<BasStockMaintainRecord> list = basStockMaintainRecordService.selectBasStockMaintainRecordList(basStockMaintainRecord);
|
||||
ExcelUtil<BasStockMaintainRecord> util = new ExcelUtil<BasStockMaintainRecord>(BasStockMaintainRecord.class);
|
||||
util.exportExcel(response, list, "库存操作记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存操作记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:query')")
|
||||
@GetMapping(value = "/{whGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("whGuid") String whGuid)
|
||||
{
|
||||
return success(basStockMaintainRecordService.selectBasStockMaintainRecordByWhGuid(whGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存操作记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:add')")
|
||||
@Log(title = "库存操作记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
return toAjax(basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存操作记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:edit')")
|
||||
@Log(title = "库存操作记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
return toAjax(basStockMaintainRecordService.updateBasStockMaintainRecord(basStockMaintainRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存操作记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('stock:record:remove')")
|
||||
@Log(title = "库存操作记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{whGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] whGuids)
|
||||
{
|
||||
return toAjax(basStockMaintainRecordService.deleteBasStockMaintainRecordByWhGuids(whGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
package com.ruoyi.stock.maintain.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 库存操作记录对象 bas_stock_maintain_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public class BasStockMaintainRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** guid */
|
||||
private String whGuid;
|
||||
|
||||
/** 库存编码 */
|
||||
@Excel(name = "库存编码")
|
||||
private String stockId;
|
||||
|
||||
/** 货位编码 */
|
||||
@Excel(name = "货位编码")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 物品编码 */
|
||||
@Excel(name = "物品编码")
|
||||
private String productId;
|
||||
|
||||
/** 物品名称 */
|
||||
@Excel(name = "物品名称")
|
||||
private String productName;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期")
|
||||
private String printDate;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
private String lotNo;
|
||||
|
||||
/** 初始数量 */
|
||||
@Excel(name = "初始数量")
|
||||
private String oldQuantity;
|
||||
|
||||
/** 操作后数量 */
|
||||
@Excel(name = "操作后数量")
|
||||
private String quantity;
|
||||
|
||||
/** 操作 */
|
||||
@Excel(name = "操作")
|
||||
private String method;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouseId;
|
||||
|
||||
/** 库存字表id */
|
||||
@Excel(name = "库存字表id")
|
||||
private String stockDetailId;
|
||||
|
||||
/** 操作目标 */
|
||||
@Excel(name = "操作目标")
|
||||
private String operatingTarget;
|
||||
|
||||
/** 条码数量(旧) */
|
||||
@Excel(name = "条码数量", readConverterExp = "旧=")
|
||||
private String barCodeOldQuantity;
|
||||
|
||||
/** 条码数量(新) */
|
||||
@Excel(name = "条码数量", readConverterExp = "新=")
|
||||
private String barCodeQuantity;
|
||||
|
||||
/** 物料guid */
|
||||
@Excel(name = "物料guid")
|
||||
private String productGuid;
|
||||
|
||||
public void setWhGuid(String whGuid)
|
||||
{
|
||||
this.whGuid = whGuid;
|
||||
}
|
||||
|
||||
public String getWhGuid()
|
||||
{
|
||||
return whGuid;
|
||||
}
|
||||
|
||||
public void setStockId(String stockId)
|
||||
{
|
||||
this.stockId = stockId;
|
||||
}
|
||||
|
||||
public String getStockId()
|
||||
{
|
||||
return stockId;
|
||||
}
|
||||
|
||||
public void setCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
this.cargoSpaceId = cargoSpaceId;
|
||||
}
|
||||
|
||||
public String getCargoSpaceId()
|
||||
{
|
||||
return cargoSpaceId;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setPrintDate(String printDate)
|
||||
{
|
||||
this.printDate = printDate;
|
||||
}
|
||||
|
||||
public String getPrintDate()
|
||||
{
|
||||
return printDate;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setOldQuantity(String oldQuantity)
|
||||
{
|
||||
this.oldQuantity = oldQuantity;
|
||||
}
|
||||
|
||||
public String getOldQuantity()
|
||||
{
|
||||
return oldQuantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setMethod(String method)
|
||||
{
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getMethod()
|
||||
{
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setStockDetailId(String stockDetailId)
|
||||
{
|
||||
this.stockDetailId = stockDetailId;
|
||||
}
|
||||
|
||||
public String getStockDetailId()
|
||||
{
|
||||
return stockDetailId;
|
||||
}
|
||||
|
||||
public void setOperatingTarget(String operatingTarget)
|
||||
{
|
||||
this.operatingTarget = operatingTarget;
|
||||
}
|
||||
|
||||
public String getOperatingTarget()
|
||||
{
|
||||
return operatingTarget;
|
||||
}
|
||||
|
||||
public void setBarCodeOldQuantity(String barCodeOldQuantity)
|
||||
{
|
||||
this.barCodeOldQuantity = barCodeOldQuantity;
|
||||
}
|
||||
|
||||
public String getBarCodeOldQuantity()
|
||||
{
|
||||
return barCodeOldQuantity;
|
||||
}
|
||||
|
||||
public void setBarCodeQuantity(String barCodeQuantity)
|
||||
{
|
||||
this.barCodeQuantity = barCodeQuantity;
|
||||
}
|
||||
|
||||
public String getBarCodeQuantity()
|
||||
{
|
||||
return barCodeQuantity;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("whGuid", getWhGuid())
|
||||
.append("stockId", getStockId())
|
||||
.append("cargoSpaceId", getCargoSpaceId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("printDate", getPrintDate())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("oldQuantity", getOldQuantity())
|
||||
.append("quantity", getQuantity())
|
||||
.append("method", getMethod())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("stockDetailId", getStockDetailId())
|
||||
.append("operatingTarget", getOperatingTarget())
|
||||
.append("barCodeOldQuantity", getBarCodeOldQuantity())
|
||||
.append("barCodeQuantity", getBarCodeQuantity())
|
||||
.append("productGuid", getProductGuid())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.stock.maintain.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
|
||||
/**
|
||||
* 库存操作记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public interface BasStockMaintainRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询库存操作记录
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 库存操作记录
|
||||
*/
|
||||
public BasStockMaintainRecord selectBasStockMaintainRecordByWhGuid(String whGuid);
|
||||
|
||||
/**
|
||||
* 查询库存操作记录列表
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 库存操作记录集合
|
||||
*/
|
||||
public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 新增库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 修改库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 删除库存操作记录
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockMaintainRecordByWhGuid(String whGuid);
|
||||
|
||||
/**
|
||||
* 批量删除库存操作记录
|
||||
*
|
||||
* @param whGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockMaintainRecordByWhGuids(String[] whGuids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.stock.maintain.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
|
||||
/**
|
||||
* 库存操作记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
public interface IBasStockMaintainRecordService
|
||||
{
|
||||
/**
|
||||
* 查询库存操作记录
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 库存操作记录
|
||||
*/
|
||||
public BasStockMaintainRecord selectBasStockMaintainRecordByWhGuid(String whGuid);
|
||||
|
||||
/**
|
||||
* 查询库存操作记录列表
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 库存操作记录集合
|
||||
*/
|
||||
public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 新增库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 修改库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord);
|
||||
|
||||
/**
|
||||
* 批量删除库存操作记录
|
||||
*
|
||||
* @param whGuids 需要删除的库存操作记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockMaintainRecordByWhGuids(String[] whGuids);
|
||||
|
||||
/**
|
||||
* 删除库存操作记录信息
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasStockMaintainRecordByWhGuid(String whGuid);
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.stock.maintain.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper;
|
||||
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
|
||||
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
|
||||
|
||||
/**
|
||||
* 库存操作记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-26
|
||||
*/
|
||||
@Service
|
||||
public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecordService
|
||||
{
|
||||
@Autowired
|
||||
private BasStockMaintainRecordMapper basStockMaintainRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询库存操作记录
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 库存操作记录
|
||||
*/
|
||||
@Override
|
||||
public BasStockMaintainRecord selectBasStockMaintainRecordByWhGuid(String whGuid)
|
||||
{
|
||||
return basStockMaintainRecordMapper.selectBasStockMaintainRecordByWhGuid(whGuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存操作记录列表
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 库存操作记录
|
||||
*/
|
||||
@Override
|
||||
public List<BasStockMaintainRecord> selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
return basStockMaintainRecordMapper.selectBasStockMaintainRecordList(basStockMaintainRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
basStockMaintainRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return basStockMaintainRecordMapper.insertBasStockMaintainRecord(basStockMaintainRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存操作记录
|
||||
*
|
||||
* @param basStockMaintainRecord 库存操作记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasStockMaintainRecord(BasStockMaintainRecord basStockMaintainRecord)
|
||||
{
|
||||
return basStockMaintainRecordMapper.updateBasStockMaintainRecord(basStockMaintainRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存操作记录
|
||||
*
|
||||
* @param whGuids 需要删除的库存操作记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasStockMaintainRecordByWhGuids(String[] whGuids)
|
||||
{
|
||||
return basStockMaintainRecordMapper.deleteBasStockMaintainRecordByWhGuids(whGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存操作记录信息
|
||||
*
|
||||
* @param whGuid 库存操作记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasStockMaintainRecordByWhGuid(String whGuid)
|
||||
{
|
||||
return basStockMaintainRecordMapper.deleteBasStockMaintainRecordByWhGuid(whGuid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user