初始化

This commit is contained in:
张怡蓉
2025-12-23 13:36:18 +08:00
commit d427ebf6d0
1232 changed files with 239447 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
package com.ruoyi.stock.maintain.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 库存操作记录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));
}
}

View File

@@ -0,0 +1,314 @@
package com.ruoyi.stock.maintain.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 库存操作记录对象 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 = "${stock.Maintain.stockId}")
private String stockId;
/** 货位编码 */
@Excel(name = "${stock.Maintain.cargoSpaceId}")
private String cargoSpaceId;
/** 货位名称 */
@Excel(name = "${stock.Maintain.cargoSpaceName}")
private String cargoSpaceName;
/** 托盘条码 */
@Excel(name = "${stock.Maintain.trayCode}")
private String trayCode;
/** 物品编码 */
@Excel(name = "${stock.Maintain.productId}")
private String productId;
/** 物品名称 */
@Excel(name = "${stock.Maintain.productName}")
private String productName;
/** 生产日期 */
// @Excel(name = "${stock.Maintain.printDate}")
private String printDate;
/** 批号 */
// @Excel(name = "${stock.Maintain.lotNo}")
private String lotNo;
/** 初始数量 */
@Excel(name = "${stock.Maintain.oldQuantity}")
private String oldQuantity;
/** 操作后数量 */
@Excel(name = "${stock.Maintain.quantity}")
private String quantity;
/** 操作 */
@Excel(name = "${stock.Maintain.method}", dictType="stock_maintain_method")
private String method;
/** 仓库 */
@Excel(name = "${stock.Maintain.warehouseId}")
private String warehouseName;
private String warehouseId;
@Excel(name = "${stock.Maintain.createTime}", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
private Date createTime;
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/** 库存字表id */
// @Excel(name = "${stock.Maintain.stockDetailId}")
private String stockDetailId;
/** 操作目标 */
// @Excel(name = "${stock.Maintain.operatingTarget}")
private String operatingTarget;
/** 条码数量(旧) */
// @Excel(name = "${stock.Maintain.barCodeOldQuantity}")
private String barCodeOldQuantity;
/** 条码数量(新) */
// @Excel(name = "${stock.Maintain.barCodeQuantity}")
private String barCodeQuantity;
/** 物料guid */
// @Excel(name = "${stock.Maintain.productGuid}")
private String productGuid;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getCargoSpaceName() {
return cargoSpaceName;
}
public void setCargoSpaceName(String cargoSpaceName) {
this.cargoSpaceName = cargoSpaceName;
}
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();
}
}

View File

@@ -0,0 +1,62 @@
package com.ruoyi.stock.maintain.mapper;
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
import java.util.List;
/**
* 库存操作记录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);
}

View File

@@ -0,0 +1,62 @@
package com.ruoyi.stock.maintain.service;
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
import java.util.List;
/**
* 库存操作记录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);
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.stock.maintain.service.impl;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.stock.maintain.domain.BasStockMaintainRecord;
import com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper;
import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 库存操作记录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
@DataScope(warehouseAlias = "bw")
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);
}
}