基础信息 产品管理

highway
A0010407 1 year ago
parent fef00ba5e9
commit 3353eb7afa

@ -165,6 +165,10 @@ public class BaseProduct extends BaseEntity {
@Excel(name = "补料比例") @Excel(name = "补料比例")
private String appendPercent; private String appendPercent;
/** 物料类型 */
@Excel(name = "物料类型")
private String mtart;
public void setProductId(String productId) { public void setProductId(String productId) {
this.productId = productId; this.productId = productId;
} }
@ -432,6 +436,13 @@ public class BaseProduct extends BaseEntity {
return appendPercent; return appendPercent;
} }
public void setMtart(String mtart) {
this.mtart = mtart;
}
public String getMtart() {
return mtart;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -476,6 +487,7 @@ public class BaseProduct extends BaseEntity {
.append("convIssue", getConvIssue()) .append("convIssue", getConvIssue())
.append("appendFlag", getAppendFlag()) .append("appendFlag", getAppendFlag())
.append("appendPercent", getAppendPercent()) .append("appendPercent", getAppendPercent())
.append("mtart", getMtart())
.toString(); .toString();
} }
} }

@ -47,10 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="convIssue" column="conv_issue" /> <result property="convIssue" column="conv_issue" />
<result property="appendFlag" column="append_flag" /> <result property="appendFlag" column="append_flag" />
<result property="appendPercent" column="append_percent" /> <result property="appendPercent" column="append_percent" />
<result property="mtart" column="mtart" />
</resultMap> </resultMap>
<sql id="selectBaseProductVo"> <sql id="selectBaseProductVo">
select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent from base_product select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent,mtart from base_product
</sql> </sql>
<select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult"> <select id="selectBaseProductList" parameterType="BaseProduct" resultMap="BaseProductResult">
@ -92,12 +93,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="convIssue != null "> and conv_issue = #{convIssue}</if> <if test="convIssue != null "> and conv_issue = #{convIssue}</if>
<if test="appendFlag != null and appendFlag != ''"> and append_flag = #{appendFlag}</if> <if test="appendFlag != null and appendFlag != ''"> and append_flag = #{appendFlag}</if>
<if test="appendPercent != null and appendPercent != ''"> and append_percent = #{appendPercent}</if> <if test="appendPercent != null and appendPercent != ''"> and append_percent = #{appendPercent}</if>
<if test="mtart != null and mtart != ''"> and mtart = #{mtart}</if>
and del_flag = '0'
</where> </where>
</select> </select>
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult"> <select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
<include refid="selectBaseProductVo"/> <include refid="selectBaseProductVo"/>
where product_id = #{productId} where product_id = #{productId}
and del_flag = '0'
</select> </select>
<insert id="insertBaseProduct" parameterType="BaseProduct"> <insert id="insertBaseProduct" parameterType="BaseProduct">
@ -145,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="convIssue != null">conv_issue,</if> <if test="convIssue != null">conv_issue,</if>
<if test="appendFlag != null">append_flag,</if> <if test="appendFlag != null">append_flag,</if>
<if test="appendPercent != null">append_percent,</if> <if test="appendPercent != null">append_percent,</if>
<if test="mtart != null">mtart,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">#{productId},</if> <if test="productId != null">#{productId},</if>
@ -189,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="convIssue != null">#{convIssue},</if> <if test="convIssue != null">#{convIssue},</if>
<if test="appendFlag != null">#{appendFlag},</if> <if test="appendFlag != null">#{appendFlag},</if>
<if test="appendPercent != null">#{appendPercent},</if> <if test="appendPercent != null">#{appendPercent},</if>
<if test="mtart != null">#{mtart},</if>
</trim> </trim>
</insert> </insert>
@ -227,7 +233,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="activeFlag != null">active_flag = #{activeFlag},</if> <if test="activeFlag != null">active_flag = #{activeFlag},</if>
<if test="syncFlag != null">sync_flag = #{syncFlag},</if> <if test="syncFlag != null">sync_flag = #{syncFlag},</if>
<if test="primaryUom != null">primary_uom = #{primaryUom},</if> <if test="primaryUom != null">primary_uom = #{primaryUom},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="bstme != null">bstme = #{bstme},</if> <if test="bstme != null">bstme = #{bstme},</if>
<if test="basicOrder != null">basic_order = #{basicOrder},</if> <if test="basicOrder != null">basic_order = #{basicOrder},</if>
<if test="convOrder != null">conv_order = #{convOrder},</if> <if test="convOrder != null">conv_order = #{convOrder},</if>
@ -236,16 +241,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="convIssue != null">conv_issue = #{convIssue},</if> <if test="convIssue != null">conv_issue = #{convIssue},</if>
<if test="appendFlag != null">append_flag = #{appendFlag},</if> <if test="appendFlag != null">append_flag = #{appendFlag},</if>
<if test="appendPercent != null">append_percent = #{appendPercent},</if> <if test="appendPercent != null">append_percent = #{appendPercent},</if>
<if test="mtart != null and mtart != ''">mtart = #{mtart},</if>
</trim> </trim>
where product_id = #{productId} where product_id = #{productId}
</update> </update>
<delete id="deleteBaseProductByProductId" parameterType="String"> <update id="deleteBaseProductByProductId" parameterType="String">
delete from base_product where product_id = #{productId} update base_product
</delete> set del_flag = '1'
where product_id = #{productId}
</update>
<delete id="deleteBaseProductByProductIds" parameterType="String"> <delete id="deleteBaseProductByProductIds" parameterType="String">
delete from base_product where product_id in update base_product
set del_flag = '1'
where product_id in
<foreach item="productId" collection="array" open="(" separator="," close=")"> <foreach item="productId" collection="array" open="(" separator="," close=")">
#{productId} #{productId}
</foreach> </foreach>
@ -255,12 +265,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select product_desc_zh select product_desc_zh
from base_product from base_product
where product_desc_zh = #{productDescZh} where product_desc_zh = #{productDescZh}
and del_flag ='0'
</select> </select>
<select id="checkCodeUnique" parameterType="BaseProduct" resultType ="java.lang.String"> <select id="checkCodeUnique" parameterType="BaseProduct" resultType ="java.lang.String">
select product_code select product_code
from base_product from base_product
where product_code = #{productCode} where product_code = #{productCode}
and del_flag ='0'
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save