容器管理
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.bas.container.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_container
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public class BasContainer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 容器编号 */
|
||||
@Excel(name = "容器编号")
|
||||
private String containerId;
|
||||
|
||||
/** 点位名称 */
|
||||
@Excel(name = "点位名称")
|
||||
private String portName;
|
||||
|
||||
/** 容器状态 */
|
||||
@Excel(name = "容器状态")
|
||||
private Long status;
|
||||
|
||||
/** 物料种类数量 */
|
||||
@Excel(name = "物料种类数量")
|
||||
private Long productTypeQuantity;
|
||||
|
||||
/** 容量(可存放料箱数量) */
|
||||
@Excel(name = "容量", readConverterExp = "可=存放料箱数量")
|
||||
private Long capacity;
|
||||
|
||||
/** 操作人 */
|
||||
@Excel(name = "操作人")
|
||||
private String operationMan;
|
||||
|
||||
/** 备用 */
|
||||
private String spare1;
|
||||
|
||||
/** 备用 */
|
||||
private String spare2;
|
||||
|
||||
/** 备用 */
|
||||
private String spare3;
|
||||
|
||||
public void setContainerId(String containerId)
|
||||
{
|
||||
this.containerId = containerId;
|
||||
}
|
||||
|
||||
public String getContainerId()
|
||||
{
|
||||
return containerId;
|
||||
}
|
||||
|
||||
public void setPortName(String portName)
|
||||
{
|
||||
this.portName = portName;
|
||||
}
|
||||
|
||||
public String getPortName()
|
||||
{
|
||||
return portName;
|
||||
}
|
||||
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setProductTypeQuantity(Long productTypeQuantity)
|
||||
{
|
||||
this.productTypeQuantity = productTypeQuantity;
|
||||
}
|
||||
|
||||
public Long getProductTypeQuantity()
|
||||
{
|
||||
return productTypeQuantity;
|
||||
}
|
||||
|
||||
public void setCapacity(Long capacity)
|
||||
{
|
||||
this.capacity = capacity;
|
||||
}
|
||||
|
||||
public Long getCapacity()
|
||||
{
|
||||
return capacity;
|
||||
}
|
||||
|
||||
public void setOperationMan(String operationMan)
|
||||
{
|
||||
this.operationMan = operationMan;
|
||||
}
|
||||
|
||||
public String getOperationMan()
|
||||
{
|
||||
return operationMan;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("containerId", getContainerId())
|
||||
.append("portName", getPortName())
|
||||
.append("status", getStatus())
|
||||
.append("productTypeQuantity", getProductTypeQuantity())
|
||||
.append("capacity", getCapacity())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("operationMan", getOperationMan())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.container.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.container.domain.BasContainer;
|
||||
|
||||
/**
|
||||
* 容器管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface BasContainerMapper
|
||||
{
|
||||
/**
|
||||
* 查询容器管理
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 容器管理
|
||||
*/
|
||||
public BasContainer selectBasContainerByContainerId(String containerId);
|
||||
|
||||
/**
|
||||
* 查询容器管理列表
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 容器管理集合
|
||||
*/
|
||||
public List<BasContainer> selectBasContainerList(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 新增容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasContainer(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 修改容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasContainer(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 删除容器管理
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerByContainerId(String containerId);
|
||||
|
||||
/**
|
||||
* 批量删除容器管理
|
||||
*
|
||||
* @param containerIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerByContainerIds(String[] containerIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.container.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.container.domain.BasContainer;
|
||||
|
||||
/**
|
||||
* 容器管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface IBasContainerService
|
||||
{
|
||||
/**
|
||||
* 查询容器管理
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 容器管理
|
||||
*/
|
||||
public BasContainer selectBasContainerByContainerId(String containerId);
|
||||
|
||||
/**
|
||||
* 查询容器管理列表
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 容器管理集合
|
||||
*/
|
||||
public List<BasContainer> selectBasContainerList(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 新增容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasContainer(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 修改容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasContainer(BasContainer basContainer);
|
||||
|
||||
/**
|
||||
* 批量删除容器管理
|
||||
*
|
||||
* @param containerIds 需要删除的容器管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerByContainerIds(String[] containerIds);
|
||||
|
||||
/**
|
||||
* 删除容器管理信息
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerByContainerId(String containerId);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.bas.container.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.bas.container.mapper.BasContainerMapper;
|
||||
import com.ruoyi.bas.container.domain.BasContainer;
|
||||
import com.ruoyi.bas.container.service.IBasContainerService;
|
||||
|
||||
/**
|
||||
* 容器管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
@Service
|
||||
public class BasContainerServiceImpl implements IBasContainerService
|
||||
{
|
||||
@Autowired
|
||||
private BasContainerMapper basContainerMapper;
|
||||
|
||||
/**
|
||||
* 查询容器管理
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 容器管理
|
||||
*/
|
||||
@Override
|
||||
public BasContainer selectBasContainerByContainerId(String containerId)
|
||||
{
|
||||
return basContainerMapper.selectBasContainerByContainerId(containerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询容器管理列表
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 容器管理
|
||||
*/
|
||||
@Override
|
||||
public List<BasContainer> selectBasContainerList(BasContainer basContainer)
|
||||
{
|
||||
return basContainerMapper.selectBasContainerList(basContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasContainer(BasContainer basContainer)
|
||||
{
|
||||
basContainer.setCreateTime(DateUtils.getNowDate());
|
||||
return basContainerMapper.insertBasContainer(basContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器管理
|
||||
*
|
||||
* @param basContainer 容器管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasContainer(BasContainer basContainer)
|
||||
{
|
||||
basContainer.setUpdateTime(DateUtils.getNowDate());
|
||||
return basContainerMapper.updateBasContainer(basContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器管理
|
||||
*
|
||||
* @param containerIds 需要删除的容器管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasContainerByContainerIds(String[] containerIds)
|
||||
{
|
||||
return basContainerMapper.deleteBasContainerByContainerIds(containerIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器管理信息
|
||||
*
|
||||
* @param containerId 容器管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasContainerByContainerId(String containerId)
|
||||
{
|
||||
return basContainerMapper.deleteBasContainerByContainerId(containerId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.bas.containerDetails.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_container_details
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public class BasContainerDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 容器编号 */
|
||||
@Excel(name = "容器编号")
|
||||
private String containerId;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String productId;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String productName;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare1;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare2;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare3;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setContainerId(String containerId)
|
||||
{
|
||||
this.containerId = containerId;
|
||||
}
|
||||
|
||||
public String getContainerId()
|
||||
{
|
||||
return containerId;
|
||||
}
|
||||
|
||||
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 setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("containerId", getContainerId())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unit", getUnit())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.containerDetails.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.containerDetails.domain.BasContainerDetails;
|
||||
|
||||
/**
|
||||
* 容器物料明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface BasContainerDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 查询容器物料明细
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 容器物料明细
|
||||
*/
|
||||
public BasContainerDetails selectBasContainerDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询容器物料明细列表
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 容器物料明细集合
|
||||
*/
|
||||
public List<BasContainerDetails> selectBasContainerDetailsList(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 新增容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasContainerDetails(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 修改容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasContainerDetails(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 删除容器物料明细
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除容器物料明细
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerDetailsByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.containerDetails.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.containerDetails.domain.BasContainerDetails;
|
||||
|
||||
/**
|
||||
* 容器物料明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface IBasContainerDetailsService
|
||||
{
|
||||
/**
|
||||
* 查询容器物料明细
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 容器物料明细
|
||||
*/
|
||||
public BasContainerDetails selectBasContainerDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询容器物料明细列表
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 容器物料明细集合
|
||||
*/
|
||||
public List<BasContainerDetails> selectBasContainerDetailsList(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 新增容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasContainerDetails(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 修改容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasContainerDetails(BasContainerDetails basContainerDetails);
|
||||
|
||||
/**
|
||||
* 批量删除容器物料明细
|
||||
*
|
||||
* @param ids 需要删除的容器物料明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除容器物料明细信息
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasContainerDetailsById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.bas.containerDetails.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.containerDetails.mapper.BasContainerDetailsMapper;
|
||||
import com.ruoyi.bas.containerDetails.domain.BasContainerDetails;
|
||||
import com.ruoyi.bas.containerDetails.service.IBasContainerDetailsService;
|
||||
|
||||
/**
|
||||
* 容器物料明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
@Service
|
||||
public class BasContainerDetailsServiceImpl implements IBasContainerDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private BasContainerDetailsMapper basContainerDetailsMapper;
|
||||
|
||||
/**
|
||||
* 查询容器物料明细
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 容器物料明细
|
||||
*/
|
||||
@Override
|
||||
public BasContainerDetails selectBasContainerDetailsById(Long id)
|
||||
{
|
||||
return basContainerDetailsMapper.selectBasContainerDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询容器物料明细列表
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 容器物料明细
|
||||
*/
|
||||
@Override
|
||||
public List<BasContainerDetails> selectBasContainerDetailsList(BasContainerDetails basContainerDetails)
|
||||
{
|
||||
return basContainerDetailsMapper.selectBasContainerDetailsList(basContainerDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasContainerDetails(BasContainerDetails basContainerDetails)
|
||||
{
|
||||
return basContainerDetailsMapper.insertBasContainerDetails(basContainerDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器物料明细
|
||||
*
|
||||
* @param basContainerDetails 容器物料明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasContainerDetails(BasContainerDetails basContainerDetails)
|
||||
{
|
||||
return basContainerDetailsMapper.updateBasContainerDetails(basContainerDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器物料明细
|
||||
*
|
||||
* @param ids 需要删除的容器物料明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasContainerDetailsByIds(Long[] ids)
|
||||
{
|
||||
return basContainerDetailsMapper.deleteBasContainerDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器物料明细信息
|
||||
*
|
||||
* @param id 容器物料明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasContainerDetailsById(Long id)
|
||||
{
|
||||
return basContainerDetailsMapper.deleteBasContainerDetailsById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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.containerDetails.mapper.BasContainerDetailsMapper">
|
||||
|
||||
<resultMap type="BasContainerDetails" id="BasContainerDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="containerId" column="container_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasContainerDetailsVo">
|
||||
select id, container_id, product_id, product_name, quantity, unit, spare1, spare2, spare3 from bas_container_details
|
||||
</sql>
|
||||
|
||||
<select id="selectBasContainerDetailsList" parameterType="BasContainerDetails" resultMap="BasContainerDetailsResult">
|
||||
<include refid="selectBasContainerDetailsVo"/>
|
||||
<where>
|
||||
<if test="containerId != null and containerId != ''"> and container_id = #{containerId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasContainerDetailsById" parameterType="Long" resultMap="BasContainerDetailsResult">
|
||||
<include refid="selectBasContainerDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasContainerDetails" parameterType="BasContainerDetails">
|
||||
insert into bas_container_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="containerId != null">container_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="containerId != null">#{containerId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasContainerDetails" parameterType="BasContainerDetails">
|
||||
update bas_container_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="containerId != null">container_id = #{containerId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasContainerDetailsById" parameterType="Long">
|
||||
delete from bas_container_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasContainerDetailsByIds" parameterType="String">
|
||||
delete from bas_container_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?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.container.mapper.BasContainerMapper">
|
||||
|
||||
<resultMap type="BasContainer" id="BasContainerResult">
|
||||
<result property="containerId" column="container_id" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="productTypeQuantity" column="product_type_quantity" />
|
||||
<result property="capacity" column="capacity" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="operationMan" column="operation_man" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasContainerVo">
|
||||
select container_id, port_name, status, product_type_quantity, capacity, create_time, update_time, operation_man, spare1, spare2, spare3 from bas_container
|
||||
</sql>
|
||||
|
||||
<select id="selectBasContainerList" parameterType="BasContainer" resultMap="BasContainerResult">
|
||||
<include refid="selectBasContainerVo"/>
|
||||
<where>
|
||||
<if test="containerId != null and containerId != ''"> and container_id = #{containerId}</if>
|
||||
<if test="portName != null and portName != ''"> and port_name = #{portName}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="productTypeQuantity != null "> and product_type_quantity = #{productTypeQuantity}</if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime}</if>
|
||||
<if test="operationMan != null and operationMan != ''"> and operation_man = #{operationMan}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasContainerByContainerId" parameterType="String" resultMap="BasContainerResult">
|
||||
<include refid="selectBasContainerVo"/>
|
||||
where container_id = #{containerId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasContainer" parameterType="BasContainer">
|
||||
insert into bas_container
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="containerId != null">container_id,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="productTypeQuantity != null">product_type_quantity,</if>
|
||||
<if test="capacity != null">capacity,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="operationMan != null">operation_man,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="containerId != null">#{containerId},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="productTypeQuantity != null">#{productTypeQuantity},</if>
|
||||
<if test="capacity != null">#{capacity},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="operationMan != null">#{operationMan},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasContainer" parameterType="BasContainer">
|
||||
update bas_container
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="productTypeQuantity != null">product_type_quantity = #{productTypeQuantity},</if>
|
||||
<if test="capacity != null">capacity = #{capacity},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="operationMan != null">operation_man = #{operationMan},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where container_id = #{containerId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasContainerByContainerId" parameterType="String">
|
||||
delete from bas_container where container_id = #{containerId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasContainerByContainerIds" parameterType="String">
|
||||
delete from bas_container where container_id in
|
||||
<foreach item="containerId" collection="array" open="(" separator="," close=")">
|
||||
#{containerId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user