箱型修改

master
shaoyong 10 months ago
parent 3e6c73321e
commit a250b4d519

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel; import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity; import com.op.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
/** /**
* mes_box_detail * mes_box_detail
* *
@ -41,7 +43,7 @@ public class MesBoxDetail extends BaseEntity {
* *
*/ */
@Excel(name = "箱型值") @Excel(name = "箱型值")
private String boxValue; private BigDecimal boxValue;
/** /**
* *
@ -73,6 +75,10 @@ public class MesBoxDetail extends BaseEntity {
@Excel(name = "状态", readConverterExp = "状态0正常") @Excel(name = "状态", readConverterExp = "状态0正常")
private String status; private String status;
private BigDecimal length;
private BigDecimal width;
private BigDecimal height;
public void setBoxCode(Long boxCode) { public void setBoxCode(Long boxCode) {
this.boxCode = boxCode; this.boxCode = boxCode;
} }
@ -106,11 +112,11 @@ public class MesBoxDetail extends BaseEntity {
this.boxKey = boxKey; this.boxKey = boxKey;
} }
public void setBoxValue(String boxValue) { public void setBoxValue(BigDecimal boxValue) {
this.boxValue = boxValue; this.boxValue = boxValue;
} }
public String getBoxValue() { public BigDecimal getBoxValue() {
return boxValue; return boxValue;
} }
@ -154,6 +160,30 @@ public class MesBoxDetail extends BaseEntity {
return status; return status;
} }
public BigDecimal getLength() {
return length;
}
public void setLength(BigDecimal length) {
this.length = length;
}
public BigDecimal getWidth() {
return width;
}
public void setWidth(BigDecimal width) {
this.width = width;
}
public BigDecimal getHeight() {
return height;
}
public void setHeight(BigDecimal height) {
this.height = height;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -119,6 +119,7 @@ public class MesBoxServiceImpl implements IMesBoxService {
} }
@Override @Override
@DS("#header.poolName")
public boolean checkBoxTypeUnique(MesBox mesBox) { public boolean checkBoxTypeUnique(MesBox mesBox) {
Long boxId = StringUtils.isNull(mesBox.getBoxId()) ? -1L : mesBox.getBoxId(); Long boxId = StringUtils.isNull(mesBox.getBoxId()) ? -1L : mesBox.getBoxId();
MesBox boxType = mesBoxMapper.checkBoxTypeUnique(mesBox.getBoxType()); MesBox boxType = mesBoxMapper.checkBoxTypeUnique(mesBox.getBoxType());

@ -20,15 +20,23 @@
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="length" column="length"/>
<result property="width" column="width"/>
<result property="height" column="height"/>
</resultMap> </resultMap>
<sql id="selectMesBoxDetailVo"> <sql id="selectMesBoxDetailVo">
select box_code, box_sort, box_label, box_key, box_value, box_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark from mes_box_detail select box_code, box_sort, box_label, box_key,
box_value, box_type, css_class, list_class,
is_default, status, create_by, create_time,
update_by, update_time, remark,
length, width, height from mes_box_detail
</sql> </sql>
<select id="selectMesBoxDetailList" parameterType="MesBoxDetail" resultMap="MesBoxDetailResult"> <select id="selectMesBoxDetailList" parameterType="MesBoxDetail" resultMap="MesBoxDetailResult">
<include refid="selectMesBoxDetailVo"/> <include refid="selectMesBoxDetailVo"/>
<where> <where>
del_flag = '0'
<if test="boxSort != null "> <if test="boxSort != null ">
and box_sort = #{boxSort} and box_sort = #{boxSort}
</if> </if>
@ -99,6 +107,12 @@
</if> </if>
<if test="remark != null">remark, <if test="remark != null">remark,
</if> </if>
<if test="length != null">length,
</if>
<if test="width != null">width,
</if>
<if test="height != null">height,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="boxCode != null">#{boxCode}, <if test="boxCode != null">#{boxCode},
@ -131,6 +145,12 @@
</if> </if>
<if test="remark != null">#{remark}, <if test="remark != null">#{remark},
</if> </if>
<if test="length != null">#{length},
</if>
<if test="width != null">#{width},
</if>
<if test="height != null">#{height},
</if>
</trim> </trim>
</insert> </insert>
@ -179,16 +199,25 @@
<if test="remark != null">remark = <if test="remark != null">remark =
#{remark}, #{remark},
</if> </if>
<if test="length != null">length =
#{length},
</if>
<if test="width != null">width =
#{width},
</if>
<if test="height != null">height =
#{height},
</if>
</trim> </trim>
where box_code = #{boxCode} where box_code = #{boxCode}
</update> </update>
<delete id="deleteMesBoxDetailByBoxCode" parameterType="Long"> <delete id="deleteMesBoxDetailByBoxCode" parameterType="Long">
delete from mes_box_detail where box_code = #{boxCode} update mes_box_detail set del_flag = '1' where box_code = #{boxCode}
</delete> </delete>
<delete id="deleteMesBoxDetailByBoxCodes" parameterType="String"> <delete id="deleteMesBoxDetailByBoxCodes" parameterType="String">
delete from mes_box_detail where box_code in update mes_box_detail set del_flag = '1' where box_code in
<foreach item="boxCode" collection="array" open="(" separator="," close=")"> <foreach item="boxCode" collection="array" open="(" separator="," close=")">
#{boxCode} #{boxCode}
</foreach> </foreach>

@ -23,6 +23,7 @@
<select id="selectMesBoxList" parameterType="MesBox" resultMap="MesBoxResult"> <select id="selectMesBoxList" parameterType="MesBox" resultMap="MesBoxResult">
<include refid="selectMesBoxVo"/> <include refid="selectMesBoxVo"/>
<where> <where>
del_flag = '0'
<if test="boxName != null and boxName != ''"> <if test="boxName != null and boxName != ''">
and box_name like concat('%', #{boxName}, '%') and box_name like concat('%', #{boxName}, '%')
</if> </if>
@ -33,7 +34,6 @@
and status = #{status} and status = #{status}
</if> </if>
</where> </where>
where del_flag = '0'
</select> </select>
<select id="selectMesBoxByBoxId" parameterType="Long" <select id="selectMesBoxByBoxId" parameterType="Long"

Loading…
Cancel
Save