添加库区管理和货位管理
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
package com.ruoyi.bas.cargoSpace.controller;
|
||||
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存信息Controller
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/cargoSpace")
|
||||
public class BasCargoSpaceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasCargoSpaceService basCargoSpaceService;
|
||||
|
||||
|
||||
@GetMapping("/test")
|
||||
public String test(){
|
||||
System.out.println(basCargoSpaceService.list(null));
|
||||
return "test777";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasCargoSpace basCargoSpace)
|
||||
{
|
||||
startPage();
|
||||
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
|
||||
// List<BasCargoSpace> list1 = basCargoSpaceService.list();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出库存信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:export')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasCargoSpace basCargoSpace)
|
||||
{
|
||||
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
|
||||
ExcelUtil<BasCargoSpace> util = new ExcelUtil<BasCargoSpace>(BasCargoSpace.class);
|
||||
util.exportExcel(response, list, "库存信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库存信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:query')")
|
||||
@GetMapping(value = "/{cargoSpaceId}")
|
||||
public AjaxResult getInfo(@PathVariable("cargoSpaceId") String cargoSpaceId)
|
||||
{
|
||||
return success(basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:add')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasCargoSpace basCargoSpace)
|
||||
{
|
||||
return toAjax(basCargoSpaceService.insertBasCargoSpace(basCargoSpace));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:Cargospace:edit')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasCargoSpace basCargoSpace)
|
||||
{
|
||||
return toAjax(basCargoSpaceService.updateBasCargoSpace(basCargoSpace));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:Cargospace:remove')")
|
||||
@Log(title = "库存信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{cargoSpaceIds}")
|
||||
public AjaxResult remove(@PathVariable String[] cargoSpaceIds)
|
||||
{
|
||||
return toAjax(basCargoSpaceService.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.ruoyi.bas.cargoSpace.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 库存信息对象 bas_cargo_space
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("bas_cargo_space")
|
||||
public class BasCargoSpace {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 货位id 主键 */
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 仓库id(不允许为空) */
|
||||
@Excel(name = "仓库id", readConverterExp = "不=允许为空")
|
||||
private String warehouseId;
|
||||
|
||||
/** 巷道id(允许为空) */
|
||||
@Excel(name = "巷道id", readConverterExp = "允=许为空")
|
||||
private String roadwayId;
|
||||
|
||||
/** 货区id(允许为空) */
|
||||
@Excel(name = "货区id", readConverterExp = "允=许为空")
|
||||
private String cargoAreaId;
|
||||
|
||||
/** 货位类型(允许为空) */
|
||||
@Excel(name = "货位类型", readConverterExp = "允=许为空")
|
||||
private String theType;
|
||||
|
||||
/** 货位类型名称 */
|
||||
@Excel(name = "货位类型名称")
|
||||
private String theTypeName;
|
||||
|
||||
/** 货位名称(不允许为空) */
|
||||
@Excel(name = "货位名称", readConverterExp = "不=允许为空")
|
||||
private String cargoSpaceName;
|
||||
|
||||
/** 排(不允许为空) */
|
||||
@Excel(name = "排", readConverterExp = "不=允许为空")
|
||||
private Long thePlatoon;
|
||||
|
||||
/** 列(不允许为空) */
|
||||
@Excel(name = "列", readConverterExp = "不=允许为空")
|
||||
private Long theColumn;
|
||||
|
||||
/** 层(不允许为空) */
|
||||
@Excel(name = "层", readConverterExp = "不=允许为空")
|
||||
private Long theFloor;
|
||||
|
||||
/** 货位状态1空2满 */
|
||||
@Excel(name = "货位状态1空2满")
|
||||
private String status;
|
||||
|
||||
/** 是否锁定(不允许为空)
|
||||
Y锁、N开 */
|
||||
@Excel(name = "是否锁定", readConverterExp = "不=允许为空")
|
||||
private String locked;
|
||||
|
||||
/** 托盘条码(允许为空) */
|
||||
@Excel(name = "托盘条码", readConverterExp = "允=许为空")
|
||||
private String trayCode;
|
||||
|
||||
/** 货位高度 */
|
||||
@Excel(name = "货位高度")
|
||||
private String cargoHight;
|
||||
|
||||
/** 是否双伸 Y N */
|
||||
@Excel(name = "是否双伸 Y N ")
|
||||
private String issDouble;
|
||||
|
||||
/** 双货位分组编码(标识区分) */
|
||||
@Excel(name = "双货位分组编码", readConverterExp = "标=识区分")
|
||||
private String groupCodingNo;
|
||||
|
||||
/** 双货位分组编码1、2… */
|
||||
@Excel(name = "双货位分组编码1、2… ")
|
||||
private String groupCoding;
|
||||
|
||||
/** 双货位标识 0 外1内 */
|
||||
@Excel(name = "双货位标识 0 外1内")
|
||||
private String cargoSpaceLogo;
|
||||
|
||||
/** 本仓库区域 1--8 A9--15 B */
|
||||
@Excel(name = "本仓库区域 1--8 A9--15 B")
|
||||
private String thisCargoArea;
|
||||
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("cargoSpaceId", getCargoSpaceId())
|
||||
// .append("warehouseId", getWarehouseId())
|
||||
// .append("roadwayId", getRoadwayId())
|
||||
// .append("cargoAreaId", getCargoAreaId())
|
||||
// .append("theType", getTheType())
|
||||
// .append("theTypeName", getTheTypeName())
|
||||
// .append("cargoSpaceName", getCargoSpaceName())
|
||||
// .append("thePlatoon", getThePlatoon())
|
||||
// .append("theColumn", getTheColumn())
|
||||
// .append("theFloor", getTheFloor())
|
||||
// .append("status", getStatus())
|
||||
// .append("locked", getLocked())
|
||||
// .append("trayCode", getTrayCode())
|
||||
// .append("cargoHight", getCargoHight())
|
||||
// .append("issDouble", getIssDouble())
|
||||
// .append("groupCodingNo", getGroupCodingNo())
|
||||
// .append("groupCoding", getGroupCoding())
|
||||
// .append("cargoSpaceLogo", getCargoSpaceLogo())
|
||||
// .append("thisCargoArea", getThisCargoArea())
|
||||
// .toString();
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.bas.cargoSpace.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存信息Mapper接口
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface BasCargoSpaceMapper extends BaseMapper<BasCargoSpace>
|
||||
{
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 库存信息集合
|
||||
*/
|
||||
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param cargoSpaceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.bas.cargoSpace.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存信息Service接口
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IBasCargoSpaceService extends IService<BasCargoSpace>
|
||||
{
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 库存信息集合
|
||||
*/
|
||||
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param cargoSpaceIds 需要删除的库存信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
|
||||
|
||||
/**
|
||||
* 删除库存信息信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.bas.cargoSpace.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
|
||||
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
|
||||
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.sql.Wrapper;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存信息Service业务层处理
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class BasCargoSpaceServiceImpl extends ServiceImpl<BasCargoSpaceMapper,BasCargoSpace> implements IBasCargoSpaceService
|
||||
{
|
||||
@Resource
|
||||
private BasCargoSpaceMapper basCargoSpaceMapper;
|
||||
|
||||
/**
|
||||
* 查询库存信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 库存信息
|
||||
*/
|
||||
@Override
|
||||
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
return basCargoSpaceMapper.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库存信息列表
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 库存信息
|
||||
*/
|
||||
@Override
|
||||
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace)
|
||||
{
|
||||
return basCargoSpaceMapper.selectBasCargoSpaceList(basCargoSpace);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasCargoSpace(BasCargoSpace basCargoSpace)
|
||||
{
|
||||
return basCargoSpaceMapper.insertBasCargoSpace(basCargoSpace);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库存信息
|
||||
*
|
||||
* @param basCargoSpace 库存信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasCargoSpace(BasCargoSpace basCargoSpace)
|
||||
{
|
||||
return basCargoSpaceMapper.updateBasCargoSpace(basCargoSpace);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param cargoSpaceIds 需要删除的库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds)
|
||||
{
|
||||
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库存信息信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
|
||||
{
|
||||
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.bas.warehouse.controller;
|
||||
|
||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库管理Controller
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/warehouse")
|
||||
public class BasWarehouseController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasWarehouseService basWarehouseService;
|
||||
|
||||
/**
|
||||
* 查询仓库管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasWarehouse basWarehouse)
|
||||
{
|
||||
startPage();
|
||||
List<BasWarehouse> list = basWarehouseService.selectBasWarehouseList(basWarehouse);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出仓库管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:export')")
|
||||
@Log(title = "仓库管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasWarehouse basWarehouse)
|
||||
{
|
||||
List<BasWarehouse> list = basWarehouseService.selectBasWarehouseList(basWarehouse);
|
||||
ExcelUtil<BasWarehouse> util = new ExcelUtil<BasWarehouse>(BasWarehouse.class);
|
||||
util.exportExcel(response, list, "仓库管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取仓库管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:query')")
|
||||
@GetMapping(value = "/{warehouseId}")
|
||||
public AjaxResult getInfo(@PathVariable("warehouseId") String warehouseId)
|
||||
{
|
||||
return success(basWarehouseService.selectBasWarehouseByWarehouseId(warehouseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仓库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:add')")
|
||||
@Log(title = "仓库管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasWarehouse basWarehouse)
|
||||
{
|
||||
// basWarehouse.setWarehouseId("A01");
|
||||
return toAjax(basWarehouseService.insertBasWarehouse(basWarehouse));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:edit')")
|
||||
@Log(title = "仓库管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasWarehouse basWarehouse)
|
||||
{
|
||||
return toAjax(basWarehouseService.updateBasWarehouse(basWarehouse));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仓库管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:warehouse:remove')")
|
||||
@Log(title = "仓库管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{warehouseIds}")
|
||||
public AjaxResult remove(@PathVariable String[] warehouseIds)
|
||||
{
|
||||
return toAjax(basWarehouseService.deleteBasWarehouseByWarehouseIds(warehouseIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.bas.warehouse.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 仓库管理对象 bas_warehouse
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BasWarehouse extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id(主键不允许为空)主键 */
|
||||
@Excel(name = "id", readConverterExp = "主=键不允许为空")
|
||||
private String warehouseId;
|
||||
|
||||
/** 仓库id(不允许为空) */
|
||||
@Excel(name = "仓库id", readConverterExp = "不=允许为空")
|
||||
private String warehouseNo;
|
||||
|
||||
/** 项目编号 */
|
||||
@Excel(name = "项目编号")
|
||||
private String projectNo;
|
||||
|
||||
/** 仓库名称(不允许为空) */
|
||||
@Excel(name = "仓库名称", readConverterExp = "不=允许为空")
|
||||
private String warehouseName;
|
||||
|
||||
/** 仓库地址(允许为空) */
|
||||
@Excel(name = "仓库地址", readConverterExp = "允=许为空")
|
||||
private String address;
|
||||
|
||||
/** 仓库描述(允许为空) */
|
||||
@Excel(name = "仓库描述", readConverterExp = "允=许为空")
|
||||
private String cDesc;
|
||||
|
||||
/** 仓库级别(允许为空)1、2 */
|
||||
@Excel(name = "仓库级别", readConverterExp = "允=许为空")
|
||||
private String warehouseKind;
|
||||
|
||||
/** 仓库类型 */
|
||||
@Excel(name = "仓库类型")
|
||||
private String warehouseType;
|
||||
|
||||
/** 是否可用(不允许为空)Y、N */
|
||||
@Excel(name = "是否可用", readConverterExp = "不=允许为空")
|
||||
private String isCurrent;
|
||||
|
||||
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("warehouseId", getWarehouseId())
|
||||
// .append("warehouseNo", getWarehouseNo())
|
||||
// .append("projectNo", getProjectNo())
|
||||
// .append("warehouseName", getWarehouseName())
|
||||
// .append("address", getAddress())
|
||||
// .append("cDesc", getcDesc())
|
||||
// .append("warehouseKind", getWarehouseKind())
|
||||
// .append("warehouseType", getWarehouseType())
|
||||
// .append("isCurrent", getIsCurrent())
|
||||
// .toString();
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.bas.warehouse.mapper;
|
||||
|
||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库管理Mapper接口
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface BasWarehouseMapper
|
||||
{
|
||||
/**
|
||||
* 查询仓库管理
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 仓库管理
|
||||
*/
|
||||
public BasWarehouse selectBasWarehouseByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 查询仓库管理列表
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 仓库管理集合
|
||||
*/
|
||||
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 新增仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasWarehouse(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 修改仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasWarehouse(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 删除仓库管理
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasWarehouseByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 批量删除仓库管理
|
||||
*
|
||||
* @param warehouseIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasWarehouseByWarehouseIds(String[] warehouseIds);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.bas.warehouse.service;
|
||||
|
||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库管理Service接口
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
public interface IBasWarehouseService
|
||||
{
|
||||
/**
|
||||
* 查询仓库管理
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 仓库管理
|
||||
*/
|
||||
public BasWarehouse selectBasWarehouseByWarehouseId(String warehouseId);
|
||||
|
||||
/**
|
||||
* 查询仓库管理列表
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 仓库管理集合
|
||||
*/
|
||||
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 新增仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasWarehouse(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 修改仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasWarehouse(BasWarehouse basWarehouse);
|
||||
|
||||
/**
|
||||
* 批量删除仓库管理
|
||||
*
|
||||
* @param warehouseIds 需要删除的仓库管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasWarehouseByWarehouseIds(String[] warehouseIds);
|
||||
|
||||
/**
|
||||
* 删除仓库管理信息
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasWarehouseByWarehouseId(String warehouseId);
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.bas.warehouse.service.impl;
|
||||
|
||||
import com.ruoyi.bas.warehouse.domain.BasWarehouse;
|
||||
import com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper;
|
||||
import com.ruoyi.bas.warehouse.service.IBasWarehouseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 仓库管理Service业务层处理
|
||||
*
|
||||
* @author lsy
|
||||
* @date 2025-05-20
|
||||
*/
|
||||
@Service
|
||||
public class BasWarehouseServiceImpl implements IBasWarehouseService
|
||||
{
|
||||
@Autowired
|
||||
private BasWarehouseMapper basWarehouseMapper;
|
||||
|
||||
/**
|
||||
* 查询仓库管理
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 仓库管理
|
||||
*/
|
||||
@Override
|
||||
public BasWarehouse selectBasWarehouseByWarehouseId(String warehouseId)
|
||||
{
|
||||
return basWarehouseMapper.selectBasWarehouseByWarehouseId(warehouseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仓库管理列表
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 仓库管理
|
||||
*/
|
||||
@Override
|
||||
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse)
|
||||
{
|
||||
return basWarehouseMapper.selectBasWarehouseList(basWarehouse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasWarehouse(BasWarehouse basWarehouse)
|
||||
{
|
||||
return basWarehouseMapper.insertBasWarehouse(basWarehouse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改仓库管理
|
||||
*
|
||||
* @param basWarehouse 仓库管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasWarehouse(BasWarehouse basWarehouse)
|
||||
{
|
||||
return basWarehouseMapper.updateBasWarehouse(basWarehouse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除仓库管理
|
||||
*
|
||||
* @param warehouseIds 需要删除的仓库管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasWarehouseByWarehouseIds(String[] warehouseIds)
|
||||
{
|
||||
return basWarehouseMapper.deleteBasWarehouseByWarehouseIds(warehouseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仓库管理信息
|
||||
*
|
||||
* @param warehouseId 仓库管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasWarehouseByWarehouseId(String warehouseId)
|
||||
{
|
||||
return basWarehouseMapper.deleteBasWarehouseByWarehouseId(warehouseId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper">
|
||||
|
||||
<resultMap type="BasWarehouse" id="BasWarehouseResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseNo" column="warehouse_no" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="cDesc" column="c_desc" />
|
||||
<result property="warehouseKind" column="warehouse_kind" />
|
||||
<result property="warehouseType" column="warehouse_type" />
|
||||
<result property="isCurrent" column="is_current" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasWarehouseVo">
|
||||
select warehouse_id, warehouse_no, project_no, warehouse_name, address, c_desc, warehouse_kind, warehouse_type, is_current from bas_warehouse
|
||||
</sql>
|
||||
|
||||
<select id="selectBasWarehouseList" parameterType="BasWarehouse" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''"> and warehouse_no = #{warehouseNo}</if>
|
||||
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="cDesc != null and cDesc != ''"> and c_desc = #{cDesc}</if>
|
||||
<if test="warehouseKind != null and warehouseKind != ''"> and warehouse_kind = #{warehouseKind}</if>
|
||||
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type = #{warehouseType}</if>
|
||||
<if test="isCurrent != null and isCurrent != ''"> and is_current = #{isCurrent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasWarehouseByWarehouseId" parameterType="String" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasWarehouse" parameterType="BasWarehouse">
|
||||
insert into bas_warehouse
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no,</if>
|
||||
<if test="projectNo != null">project_no,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="cDesc != null">c_desc,</if>
|
||||
<if test="warehouseKind != null">warehouse_kind,</if>
|
||||
<if test="warehouseType != null">warehouse_type,</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">#{warehouseNo},</if>
|
||||
<if test="projectNo != null">#{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="cDesc != null">#{cDesc},</if>
|
||||
<if test="warehouseKind != null">#{warehouseKind},</if>
|
||||
<if test="warehouseType != null">#{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">#{isCurrent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasWarehouse" parameterType="BasWarehouse">
|
||||
update bas_warehouse
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no = #{warehouseNo},</if>
|
||||
<if test="projectNo != null">project_no = #{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="cDesc != null">c_desc = #{cDesc},</if>
|
||||
<if test="warehouseKind != null">warehouse_kind = #{warehouseKind},</if>
|
||||
<if test="warehouseType != null">warehouse_type = #{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current = #{isCurrent},</if>
|
||||
</trim>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseId" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id = #{warehouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseIds" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id in
|
||||
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
|
||||
#{warehouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user