托盘条码下拉框选择

This commit is contained in:
liuhanqing
2025-08-14 15:18:57 +08:00
parent 196b774c64
commit b9c78e05de
3 changed files with 77 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* 条码信息对象 bas_traycode
*
*
* @author ruoyi
* @date 2025-07-28
*/
@@ -21,6 +21,7 @@ public class BasTraycode extends BaseEntity
/** 条码类型id */
@Excel(name = "条码类型id")
private Long formatId;
private String formatName;
/** 条码 */
@Excel(name = "条码")
@@ -38,62 +39,70 @@ public class BasTraycode extends BaseEntity
@Excel(name = "备用字段3")
private String spare3;
public void setId(Long id)
public String getFormatName() {
return formatName;
}
public void setFormatName(String formatName) {
this.formatName = formatName;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
public Long getId()
{
return id;
}
public void setFormatId(Long formatId)
public void setFormatId(Long formatId)
{
this.formatId = formatId;
}
public Long getFormatId()
public Long getFormatId()
{
return formatId;
}
public void setTrayCode(String trayCode)
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
public String getTrayCode()
{
return trayCode;
}
public void setSpare1(String spare1)
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
public String getSpare3()
{
return spare3;
}

View File

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BasTraycode" id="BasTraycodeResult">
<result property="id" column="id" />
<result property="formatId" column="format_id" />
<result property="formatName" column="format_name" />
<result property="trayCode" column="tray_code" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
@@ -16,17 +17,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBasTraycodeVo">
select id, format_id, tray_code, create_time, update_time, spare1, spare2, spare3 from bas_traycode
select bt.id, bt.format_id, bt.tray_code, bt.create_time, bt.update_time, bt.spare1, bt.spare2, bt.spare3,btf.remarks as format_name
from bas_traycode bt
left join bas_traycode_format btf on btf.id = bt.format_id
</sql>
<select id="selectBasTraycodeList" parameterType="BasTraycode" resultMap="BasTraycodeResult">
<include refid="selectBasTraycodeVo"/>
<where>
<if test="formatId != null "> and format_id = #{formatId}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</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>
<if test="formatId != null "> and bt.format_id = #{formatId}</if>
<if test="trayCode != null and trayCode != ''"> and bt.tray_code = #{trayCode}</if>
<if test="spare1 != null and spare1 != ''"> and bt.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and bt.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and bt.spare3 = #{spare3}</if>
</where>
</select>