给商品表增加品牌、助记码字段

This commit is contained in:
jishenghua 2024-09-27 00:44:18 +08:00
parent b2e231938f
commit 12230ad91f
5 changed files with 712 additions and 492 deletions

View File

@ -1602,4 +1602,12 @@ alter table jsh_material_current_stock add current_unit_price decimal(24,6) DEFA
-- by jishenghua -- by jishenghua
-- 给系统参数表增加先审核后打印启用标记,启用后,零售、采购、销售等单据,都需要先审核之后才能进行打印 -- 给系统参数表增加先审核后打印启用标记,启用后,零售、采购、销售等单据,都需要先审核之后才能进行打印
-- -------------------------------------------------------- -- --------------------------------------------------------
alter table jsh_system_config add audit_print_flag varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记0未启用1启用' after move_avg_price_flag; alter table jsh_system_config add audit_print_flag varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记0未启用1启用' after move_avg_price_flag;
-- --------------------------------------------------------
-- 时间 2024年9月27日
-- by jishenghua
-- 给商品表增加品牌、助记码字段
-- --------------------------------------------------------
alter table jsh_material add brand varchar(100) DEFAULT NULL COMMENT '品牌' after standard;
alter table jsh_material add mnemonic varchar(100) DEFAULT NULL COMMENT '助记码' after brand;

View File

@ -15,6 +15,10 @@ public class Material {
private String standard; private String standard;
private String brand;
private String mnemonic;
private String color; private String color;
private String unit; private String unit;
@ -95,6 +99,22 @@ public class Material {
this.standard = standard == null ? null : standard.trim(); this.standard = standard == null ? null : standard.trim();
} }
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand == null ? null : brand.trim();
}
public String getMnemonic() {
return mnemonic;
}
public void setMnemonic(String mnemonic) {
this.mnemonic = mnemonic == null ? null : mnemonic.trim();
}
public String getColor() { public String getColor() {
return color; return color;
} }

View File

@ -505,6 +505,146 @@ public class MaterialExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBrandIsNull() {
addCriterion("brand is null");
return (Criteria) this;
}
public Criteria andBrandIsNotNull() {
addCriterion("brand is not null");
return (Criteria) this;
}
public Criteria andBrandEqualTo(String value) {
addCriterion("brand =", value, "brand");
return (Criteria) this;
}
public Criteria andBrandNotEqualTo(String value) {
addCriterion("brand <>", value, "brand");
return (Criteria) this;
}
public Criteria andBrandGreaterThan(String value) {
addCriterion("brand >", value, "brand");
return (Criteria) this;
}
public Criteria andBrandGreaterThanOrEqualTo(String value) {
addCriterion("brand >=", value, "brand");
return (Criteria) this;
}
public Criteria andBrandLessThan(String value) {
addCriterion("brand <", value, "brand");
return (Criteria) this;
}
public Criteria andBrandLessThanOrEqualTo(String value) {
addCriterion("brand <=", value, "brand");
return (Criteria) this;
}
public Criteria andBrandLike(String value) {
addCriterion("brand like", value, "brand");
return (Criteria) this;
}
public Criteria andBrandNotLike(String value) {
addCriterion("brand not like", value, "brand");
return (Criteria) this;
}
public Criteria andBrandIn(List<String> values) {
addCriterion("brand in", values, "brand");
return (Criteria) this;
}
public Criteria andBrandNotIn(List<String> values) {
addCriterion("brand not in", values, "brand");
return (Criteria) this;
}
public Criteria andBrandBetween(String value1, String value2) {
addCriterion("brand between", value1, value2, "brand");
return (Criteria) this;
}
public Criteria andBrandNotBetween(String value1, String value2) {
addCriterion("brand not between", value1, value2, "brand");
return (Criteria) this;
}
public Criteria andMnemonicIsNull() {
addCriterion("mnemonic is null");
return (Criteria) this;
}
public Criteria andMnemonicIsNotNull() {
addCriterion("mnemonic is not null");
return (Criteria) this;
}
public Criteria andMnemonicEqualTo(String value) {
addCriterion("mnemonic =", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicNotEqualTo(String value) {
addCriterion("mnemonic <>", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicGreaterThan(String value) {
addCriterion("mnemonic >", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicGreaterThanOrEqualTo(String value) {
addCriterion("mnemonic >=", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicLessThan(String value) {
addCriterion("mnemonic <", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicLessThanOrEqualTo(String value) {
addCriterion("mnemonic <=", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicLike(String value) {
addCriterion("mnemonic like", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicNotLike(String value) {
addCriterion("mnemonic not like", value, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicIn(List<String> values) {
addCriterion("mnemonic in", values, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicNotIn(List<String> values) {
addCriterion("mnemonic not in", values, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicBetween(String value1, String value2) {
addCriterion("mnemonic between", value1, value2, "mnemonic");
return (Criteria) this;
}
public Criteria andMnemonicNotBetween(String value1, String value2) {
addCriterion("mnemonic not between", value1, value2, "mnemonic");
return (Criteria) this;
}
public Criteria andColorIsNull() { public Criteria andColorIsNull() {
addCriterion("color is null"); addCriterion("color is null");
return (Criteria) this; return (Criteria) this;

View File

@ -1,480 +1,512 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="category_id" jdbcType="BIGINT" property="categoryId" /> <result column="category_id" jdbcType="BIGINT" property="categoryId" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="mfrs" jdbcType="VARCHAR" property="mfrs" /> <result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="model" jdbcType="VARCHAR" property="model" /> <result column="model" jdbcType="VARCHAR" property="model" />
<result column="standard" jdbcType="VARCHAR" property="standard" /> <result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="color" jdbcType="VARCHAR" property="color" /> <result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="unit" jdbcType="VARCHAR" property="unit" /> <result column="mnemonic" jdbcType="VARCHAR" property="mnemonic" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="color" jdbcType="VARCHAR" property="color" />
<result column="img_name" jdbcType="VARCHAR" property="imgName" /> <result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="unit_id" jdbcType="BIGINT" property="unitId" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="expiry_num" jdbcType="INTEGER" property="expiryNum" /> <result column="img_name" jdbcType="VARCHAR" property="imgName" />
<result column="weight" jdbcType="DECIMAL" property="weight" /> <result column="unit_id" jdbcType="BIGINT" property="unitId" />
<result column="enabled" jdbcType="BIT" property="enabled" /> <result column="expiry_num" jdbcType="INTEGER" property="expiryNum" />
<result column="other_field1" jdbcType="VARCHAR" property="otherField1" /> <result column="weight" jdbcType="DECIMAL" property="weight" />
<result column="other_field2" jdbcType="VARCHAR" property="otherField2" /> <result column="enabled" jdbcType="BIT" property="enabled" />
<result column="other_field3" jdbcType="VARCHAR" property="otherField3" /> <result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
<result column="enable_serial_number" jdbcType="VARCHAR" property="enableSerialNumber" /> <result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
<result column="enable_batch_number" jdbcType="VARCHAR" property="enableBatchNumber" /> <result column="other_field3" jdbcType="VARCHAR" property="otherField3" />
<result column="position" jdbcType="VARCHAR" property="position" /> <result column="enable_serial_number" jdbcType="VARCHAR" property="enableSerialNumber" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <result column="enable_batch_number" jdbcType="VARCHAR" property="enableBatchNumber" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" /> <result column="position" jdbcType="VARCHAR" property="position" />
</resultMap> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<sql id="Example_Where_Clause"> <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
<where> </resultMap>
<foreach collection="oredCriteria" item="criteria" separator="or"> <sql id="Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Update_By_Example_Where_Clause"> </where>
<where> </sql>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <sql id="Update_By_Example_Where_Clause">
<if test="criteria.valid"> <where>
<trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<foreach collection="criteria.criteria" item="criterion"> <if test="criteria.valid">
<choose> <trim prefix="(" prefixOverrides="and" suffix=")">
<when test="criterion.noValue"> <foreach collection="criteria.criteria" item="criterion">
and ${criterion.condition} <choose>
</when> <when test="criterion.noValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} </when>
</when> <when test="criterion.singleValue">
<when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value}
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> <when test="criterion.betweenValue">
<when test="criterion.listValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <when test="criterion.listValue">
#{listItem} and ${criterion.condition}
</foreach> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
</choose> </foreach>
</foreach> </when>
</trim> </choose>
</if> </foreach>
</foreach> </trim>
</where> </if>
</sql> </foreach>
<sql id="Base_Column_List"> </where>
id, category_id, name, mfrs, model, standard, color, unit, remark, img_name, unit_id, </sql>
expiry_num, weight, enabled, other_field1, other_field2, other_field3, enable_serial_number, <sql id="Base_Column_List">
enable_batch_number, position, tenant_id, delete_flag id, category_id, name, mfrs, model, standard, brand, mnemonic, color, unit, remark,
</sql> img_name, unit_id, expiry_num, weight, enabled, other_field1, other_field2, other_field3,
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap"> enable_serial_number, enable_batch_number, position, tenant_id, delete_flag
select </sql>
<if test="distinct"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
distinct select
</if> <if test="distinct">
<include refid="Base_Column_List" /> distinct
from jsh_material </if>
<if test="_parameter != null"> <include refid="Base_Column_List" />
<include refid="Example_Where_Clause" /> from jsh_material
</if> <if test="_parameter != null">
<if test="orderByClause != null"> <include refid="Example_Where_Clause" />
order by ${orderByClause} </if>
</if> <if test="orderByClause != null">
</select> order by ${orderByClause}
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> </if>
select </select>
<include refid="Base_Column_List" /> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
from jsh_material select
where id = #{id,jdbcType=BIGINT} <include refid="Base_Column_List" />
</select> from jsh_material
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> where id = #{id,jdbcType=BIGINT}
delete from jsh_material </select>
where id = #{id,jdbcType=BIGINT} <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
</delete> delete from jsh_material
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample"> where id = #{id,jdbcType=BIGINT}
delete from jsh_material </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample">
<include refid="Example_Where_Clause" /> delete from jsh_material
</if> <if test="_parameter != null">
</delete> <include refid="Example_Where_Clause" />
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material"> </if>
insert into jsh_material (id, category_id, name, </delete>
mfrs, model, standard, <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
color, unit, remark, insert into jsh_material (id, category_id, name,
img_name, unit_id, expiry_num, mfrs, model, standard,
weight, enabled, other_field1, brand, mnemonic, color,
other_field2, other_field3, enable_serial_number, unit, remark, img_name,
enable_batch_number, position, tenant_id, unit_id, expiry_num, weight,
delete_flag) enabled, other_field1, other_field2,
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, other_field3, enable_serial_number, enable_batch_number,
#{mfrs,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, position, tenant_id, delete_flag
#{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, )
#{imgName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT}, #{expiryNum,jdbcType=INTEGER}, values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{weight,jdbcType=DECIMAL}, #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR}, #{mfrs,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR},
#{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR}, #{mnemonic,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR},
#{enableBatchNumber,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{imgName,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=VARCHAR}) #{unitId,jdbcType=BIGINT}, #{expiryNum,jdbcType=INTEGER}, #{weight,jdbcType=DECIMAL},
</insert> #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR},
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material"> #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR}, #{enableBatchNumber,jdbcType=VARCHAR},
insert into jsh_material #{position,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
<trim prefix="(" suffix=")" suffixOverrides=","> )
<if test="id != null"> </insert>
id, <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
</if> insert into jsh_material
<if test="categoryId != null"> <trim prefix="(" suffix=")" suffixOverrides=",">
category_id, <if test="id != null">
</if> id,
<if test="name != null"> </if>
name, <if test="categoryId != null">
</if> category_id,
<if test="mfrs != null"> </if>
mfrs, <if test="name != null">
</if> name,
<if test="model != null"> </if>
model, <if test="mfrs != null">
</if> mfrs,
<if test="standard != null"> </if>
standard, <if test="model != null">
</if> model,
<if test="color != null"> </if>
color, <if test="standard != null">
</if> standard,
<if test="unit != null"> </if>
unit, <if test="brand != null">
</if> brand,
<if test="remark != null"> </if>
remark, <if test="mnemonic != null">
</if> mnemonic,
<if test="imgName != null"> </if>
img_name, <if test="color != null">
</if> color,
<if test="unitId != null"> </if>
unit_id, <if test="unit != null">
</if> unit,
<if test="expiryNum != null"> </if>
expiry_num, <if test="remark != null">
</if> remark,
<if test="weight != null"> </if>
weight, <if test="imgName != null">
</if> img_name,
<if test="enabled != null"> </if>
enabled, <if test="unitId != null">
</if> unit_id,
<if test="otherField1 != null"> </if>
other_field1, <if test="expiryNum != null">
</if> expiry_num,
<if test="otherField2 != null"> </if>
other_field2, <if test="weight != null">
</if> weight,
<if test="otherField3 != null"> </if>
other_field3, <if test="enabled != null">
</if> enabled,
<if test="enableSerialNumber != null"> </if>
enable_serial_number, <if test="otherField1 != null">
</if> other_field1,
<if test="enableBatchNumber != null"> </if>
enable_batch_number, <if test="otherField2 != null">
</if> other_field2,
<if test="position != null"> </if>
position, <if test="otherField3 != null">
</if> other_field3,
<if test="tenantId != null"> </if>
tenant_id, <if test="enableSerialNumber != null">
</if> enable_serial_number,
<if test="deleteFlag != null"> </if>
delete_flag, <if test="enableBatchNumber != null">
</if> enable_batch_number,
</trim> </if>
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="position != null">
<if test="id != null"> position,
#{id,jdbcType=BIGINT}, </if>
</if> <if test="tenantId != null">
<if test="categoryId != null"> tenant_id,
#{categoryId,jdbcType=BIGINT}, </if>
</if> <if test="deleteFlag != null">
<if test="name != null"> delete_flag,
#{name,jdbcType=VARCHAR}, </if>
</if> </trim>
<if test="mfrs != null"> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{mfrs,jdbcType=VARCHAR}, <if test="id != null">
</if> #{id,jdbcType=BIGINT},
<if test="model != null"> </if>
#{model,jdbcType=VARCHAR}, <if test="categoryId != null">
</if> #{categoryId,jdbcType=BIGINT},
<if test="standard != null"> </if>
#{standard,jdbcType=VARCHAR}, <if test="name != null">
</if> #{name,jdbcType=VARCHAR},
<if test="color != null"> </if>
#{color,jdbcType=VARCHAR}, <if test="mfrs != null">
</if> #{mfrs,jdbcType=VARCHAR},
<if test="unit != null"> </if>
#{unit,jdbcType=VARCHAR}, <if test="model != null">
</if> #{model,jdbcType=VARCHAR},
<if test="remark != null"> </if>
#{remark,jdbcType=VARCHAR}, <if test="standard != null">
</if> #{standard,jdbcType=VARCHAR},
<if test="imgName != null"> </if>
#{imgName,jdbcType=VARCHAR}, <if test="brand != null">
</if> #{brand,jdbcType=VARCHAR},
<if test="unitId != null"> </if>
#{unitId,jdbcType=BIGINT}, <if test="mnemonic != null">
</if> #{mnemonic,jdbcType=VARCHAR},
<if test="expiryNum != null"> </if>
#{expiryNum,jdbcType=INTEGER}, <if test="color != null">
</if> #{color,jdbcType=VARCHAR},
<if test="weight != null"> </if>
#{weight,jdbcType=DECIMAL}, <if test="unit != null">
</if> #{unit,jdbcType=VARCHAR},
<if test="enabled != null"> </if>
#{enabled,jdbcType=BIT}, <if test="remark != null">
</if> #{remark,jdbcType=VARCHAR},
<if test="otherField1 != null"> </if>
#{otherField1,jdbcType=VARCHAR}, <if test="imgName != null">
</if> #{imgName,jdbcType=VARCHAR},
<if test="otherField2 != null"> </if>
#{otherField2,jdbcType=VARCHAR}, <if test="unitId != null">
</if> #{unitId,jdbcType=BIGINT},
<if test="otherField3 != null"> </if>
#{otherField3,jdbcType=VARCHAR}, <if test="expiryNum != null">
</if> #{expiryNum,jdbcType=INTEGER},
<if test="enableSerialNumber != null"> </if>
#{enableSerialNumber,jdbcType=VARCHAR}, <if test="weight != null">
</if> #{weight,jdbcType=DECIMAL},
<if test="enableBatchNumber != null"> </if>
#{enableBatchNumber,jdbcType=VARCHAR}, <if test="enabled != null">
</if> #{enabled,jdbcType=BIT},
<if test="position != null"> </if>
#{position,jdbcType=VARCHAR}, <if test="otherField1 != null">
</if> #{otherField1,jdbcType=VARCHAR},
<if test="tenantId != null"> </if>
#{tenantId,jdbcType=BIGINT}, <if test="otherField2 != null">
</if> #{otherField2,jdbcType=VARCHAR},
<if test="deleteFlag != null"> </if>
#{deleteFlag,jdbcType=VARCHAR}, <if test="otherField3 != null">
</if> #{otherField3,jdbcType=VARCHAR},
</trim> </if>
</insert> <if test="enableSerialNumber != null">
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultType="java.lang.Long"> #{enableSerialNumber,jdbcType=VARCHAR},
select count(*) from jsh_material </if>
<if test="_parameter != null"> <if test="enableBatchNumber != null">
<include refid="Example_Where_Clause" /> #{enableBatchNumber,jdbcType=VARCHAR},
</if> </if>
</select> <if test="position != null">
<update id="updateByExampleSelective" parameterType="map"> #{position,jdbcType=VARCHAR},
update jsh_material </if>
<set> <if test="tenantId != null">
<if test="record.id != null"> #{tenantId,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT}, </if>
</if> <if test="deleteFlag != null">
<if test="record.categoryId != null"> #{deleteFlag,jdbcType=VARCHAR},
category_id = #{record.categoryId,jdbcType=BIGINT}, </if>
</if> </trim>
<if test="record.name != null"> </insert>
name = #{record.name,jdbcType=VARCHAR}, <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultType="java.lang.Long">
</if> select count(*) from jsh_material
<if test="record.mfrs != null"> <if test="_parameter != null">
mfrs = #{record.mfrs,jdbcType=VARCHAR}, <include refid="Example_Where_Clause" />
</if> </if>
<if test="record.model != null"> </select>
model = #{record.model,jdbcType=VARCHAR}, <update id="updateByExampleSelective" parameterType="map">
</if> update jsh_material
<if test="record.standard != null"> <set>
standard = #{record.standard,jdbcType=VARCHAR}, <if test="record.id != null">
</if> id = #{record.id,jdbcType=BIGINT},
<if test="record.color != null"> </if>
color = #{record.color,jdbcType=VARCHAR}, <if test="record.categoryId != null">
</if> category_id = #{record.categoryId,jdbcType=BIGINT},
<if test="record.unit != null"> </if>
unit = #{record.unit,jdbcType=VARCHAR}, <if test="record.name != null">
</if> name = #{record.name,jdbcType=VARCHAR},
<if test="record.remark != null"> </if>
remark = #{record.remark,jdbcType=VARCHAR}, <if test="record.mfrs != null">
</if> mfrs = #{record.mfrs,jdbcType=VARCHAR},
<if test="record.imgName != null"> </if>
img_name = #{record.imgName,jdbcType=VARCHAR}, <if test="record.model != null">
</if> model = #{record.model,jdbcType=VARCHAR},
<if test="record.unitId != null"> </if>
unit_id = #{record.unitId,jdbcType=BIGINT}, <if test="record.standard != null">
</if> standard = #{record.standard,jdbcType=VARCHAR},
<if test="record.expiryNum != null"> </if>
expiry_num = #{record.expiryNum,jdbcType=INTEGER}, <if test="record.brand != null">
</if> brand = #{record.brand,jdbcType=VARCHAR},
<if test="record.weight != null"> </if>
weight = #{record.weight,jdbcType=DECIMAL}, <if test="record.mnemonic != null">
</if> mnemonic = #{record.mnemonic,jdbcType=VARCHAR},
<if test="record.enabled != null"> </if>
enabled = #{record.enabled,jdbcType=BIT}, <if test="record.color != null">
</if> color = #{record.color,jdbcType=VARCHAR},
<if test="record.otherField1 != null"> </if>
other_field1 = #{record.otherField1,jdbcType=VARCHAR}, <if test="record.unit != null">
</if> unit = #{record.unit,jdbcType=VARCHAR},
<if test="record.otherField2 != null"> </if>
other_field2 = #{record.otherField2,jdbcType=VARCHAR}, <if test="record.remark != null">
</if> remark = #{record.remark,jdbcType=VARCHAR},
<if test="record.otherField3 != null"> </if>
other_field3 = #{record.otherField3,jdbcType=VARCHAR}, <if test="record.imgName != null">
</if> img_name = #{record.imgName,jdbcType=VARCHAR},
<if test="record.enableSerialNumber != null"> </if>
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR}, <if test="record.unitId != null">
</if> unit_id = #{record.unitId,jdbcType=BIGINT},
<if test="record.enableBatchNumber != null"> </if>
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR}, <if test="record.expiryNum != null">
</if> expiry_num = #{record.expiryNum,jdbcType=INTEGER},
<if test="record.position != null"> </if>
position = #{record.position,jdbcType=VARCHAR}, <if test="record.weight != null">
</if> weight = #{record.weight,jdbcType=DECIMAL},
<if test="record.tenantId != null"> </if>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, <if test="record.enabled != null">
</if> enabled = #{record.enabled,jdbcType=BIT},
<if test="record.deleteFlag != null"> </if>
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}, <if test="record.otherField1 != null">
</if> other_field1 = #{record.otherField1,jdbcType=VARCHAR},
</set> </if>
<if test="_parameter != null"> <if test="record.otherField2 != null">
<include refid="Update_By_Example_Where_Clause" /> other_field2 = #{record.otherField2,jdbcType=VARCHAR},
</if> </if>
</update> <if test="record.otherField3 != null">
<update id="updateByExample" parameterType="map"> other_field3 = #{record.otherField3,jdbcType=VARCHAR},
update jsh_material </if>
set id = #{record.id,jdbcType=BIGINT}, <if test="record.enableSerialNumber != null">
category_id = #{record.categoryId,jdbcType=BIGINT}, enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, </if>
mfrs = #{record.mfrs,jdbcType=VARCHAR}, <if test="record.enableBatchNumber != null">
model = #{record.model,jdbcType=VARCHAR}, enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
standard = #{record.standard,jdbcType=VARCHAR}, </if>
color = #{record.color,jdbcType=VARCHAR}, <if test="record.position != null">
unit = #{record.unit,jdbcType=VARCHAR}, position = #{record.position,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}, </if>
img_name = #{record.imgName,jdbcType=VARCHAR}, <if test="record.tenantId != null">
unit_id = #{record.unitId,jdbcType=BIGINT}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
expiry_num = #{record.expiryNum,jdbcType=INTEGER}, </if>
weight = #{record.weight,jdbcType=DECIMAL}, <if test="record.deleteFlag != null">
enabled = #{record.enabled,jdbcType=BIT}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
other_field1 = #{record.otherField1,jdbcType=VARCHAR}, </if>
other_field2 = #{record.otherField2,jdbcType=VARCHAR}, </set>
other_field3 = #{record.otherField3,jdbcType=VARCHAR}, <if test="_parameter != null">
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR}, <include refid="Update_By_Example_Where_Clause" />
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR}, </if>
position = #{record.position,jdbcType=VARCHAR}, </update>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, <update id="updateByExample" parameterType="map">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR} update jsh_material
<if test="_parameter != null"> set id = #{record.id,jdbcType=BIGINT},
<include refid="Update_By_Example_Where_Clause" /> category_id = #{record.categoryId,jdbcType=BIGINT},
</if> name = #{record.name,jdbcType=VARCHAR},
</update> mfrs = #{record.mfrs,jdbcType=VARCHAR},
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material"> model = #{record.model,jdbcType=VARCHAR},
update jsh_material standard = #{record.standard,jdbcType=VARCHAR},
<set> brand = #{record.brand,jdbcType=VARCHAR},
<if test="categoryId != null"> mnemonic = #{record.mnemonic,jdbcType=VARCHAR},
category_id = #{categoryId,jdbcType=BIGINT}, color = #{record.color,jdbcType=VARCHAR},
</if> unit = #{record.unit,jdbcType=VARCHAR},
<if test="name != null"> remark = #{record.remark,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR}, img_name = #{record.imgName,jdbcType=VARCHAR},
</if> unit_id = #{record.unitId,jdbcType=BIGINT},
<if test="mfrs != null"> expiry_num = #{record.expiryNum,jdbcType=INTEGER},
mfrs = #{mfrs,jdbcType=VARCHAR}, weight = #{record.weight,jdbcType=DECIMAL},
</if> enabled = #{record.enabled,jdbcType=BIT},
<if test="model != null"> other_field1 = #{record.otherField1,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR}, other_field2 = #{record.otherField2,jdbcType=VARCHAR},
</if> other_field3 = #{record.otherField3,jdbcType=VARCHAR},
<if test="standard != null"> enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
standard = #{standard,jdbcType=VARCHAR}, enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
</if> position = #{record.position,jdbcType=VARCHAR},
<if test="color != null"> tenant_id = #{record.tenantId,jdbcType=BIGINT},
color = #{color,jdbcType=VARCHAR}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
</if> <if test="_parameter != null">
<if test="unit != null"> <include refid="Update_By_Example_Where_Clause" />
unit = #{unit,jdbcType=VARCHAR}, </if>
</if> </update>
<if test="remark != null"> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material">
remark = #{remark,jdbcType=VARCHAR}, update jsh_material
</if> <set>
<if test="imgName != null"> <if test="categoryId != null">
img_name = #{imgName,jdbcType=VARCHAR}, category_id = #{categoryId,jdbcType=BIGINT},
</if> </if>
<if test="unitId != null"> <if test="name != null">
unit_id = #{unitId,jdbcType=BIGINT}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="expiryNum != null"> <if test="mfrs != null">
expiry_num = #{expiryNum,jdbcType=INTEGER}, mfrs = #{mfrs,jdbcType=VARCHAR},
</if> </if>
<if test="weight != null"> <if test="model != null">
weight = #{weight,jdbcType=DECIMAL}, model = #{model,jdbcType=VARCHAR},
</if> </if>
<if test="enabled != null"> <if test="standard != null">
enabled = #{enabled,jdbcType=BIT}, standard = #{standard,jdbcType=VARCHAR},
</if> </if>
<if test="otherField1 != null"> <if test="brand != null">
other_field1 = #{otherField1,jdbcType=VARCHAR}, brand = #{brand,jdbcType=VARCHAR},
</if> </if>
<if test="otherField2 != null"> <if test="mnemonic != null">
other_field2 = #{otherField2,jdbcType=VARCHAR}, mnemonic = #{mnemonic,jdbcType=VARCHAR},
</if> </if>
<if test="otherField3 != null"> <if test="color != null">
other_field3 = #{otherField3,jdbcType=VARCHAR}, color = #{color,jdbcType=VARCHAR},
</if> </if>
<if test="enableSerialNumber != null"> <if test="unit != null">
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR}, unit = #{unit,jdbcType=VARCHAR},
</if> </if>
<if test="enableBatchNumber != null"> <if test="remark != null">
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="position != null"> <if test="imgName != null">
position = #{position,jdbcType=VARCHAR}, img_name = #{imgName,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="unitId != null">
tenant_id = #{tenantId,jdbcType=BIGINT}, unit_id = #{unitId,jdbcType=BIGINT},
</if> </if>
<if test="deleteFlag != null"> <if test="expiryNum != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR}, expiry_num = #{expiryNum,jdbcType=INTEGER},
</if> </if>
</set> <if test="weight != null">
where id = #{id,jdbcType=BIGINT} weight = #{weight,jdbcType=DECIMAL},
</update> </if>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material"> <if test="enabled != null">
update jsh_material enabled = #{enabled,jdbcType=BIT},
set category_id = #{categoryId,jdbcType=BIGINT}, </if>
name = #{name,jdbcType=VARCHAR}, <if test="otherField1 != null">
mfrs = #{mfrs,jdbcType=VARCHAR}, other_field1 = #{otherField1,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR}, </if>
standard = #{standard,jdbcType=VARCHAR}, <if test="otherField2 != null">
color = #{color,jdbcType=VARCHAR}, other_field2 = #{otherField2,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR}, </if>
remark = #{remark,jdbcType=VARCHAR}, <if test="otherField3 != null">
img_name = #{imgName,jdbcType=VARCHAR}, other_field3 = #{otherField3,jdbcType=VARCHAR},
unit_id = #{unitId,jdbcType=BIGINT}, </if>
expiry_num = #{expiryNum,jdbcType=INTEGER}, <if test="enableSerialNumber != null">
weight = #{weight,jdbcType=DECIMAL}, enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT}, </if>
other_field1 = #{otherField1,jdbcType=VARCHAR}, <if test="enableBatchNumber != null">
other_field2 = #{otherField2,jdbcType=VARCHAR}, enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR},
other_field3 = #{otherField3,jdbcType=VARCHAR}, </if>
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR}, <if test="position != null">
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR}, position = #{position,jdbcType=VARCHAR},
position = #{position,jdbcType=VARCHAR}, </if>
tenant_id = #{tenantId,jdbcType=BIGINT}, <if test="tenantId != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR} tenant_id = #{tenantId,jdbcType=BIGINT},
where id = #{id,jdbcType=BIGINT} </if>
</update> <if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material">
update jsh_material
set category_id = #{categoryId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
mfrs = #{mfrs,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
standard = #{standard,jdbcType=VARCHAR},
brand = #{brand,jdbcType=VARCHAR},
mnemonic = #{mnemonic,jdbcType=VARCHAR},
color = #{color,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
img_name = #{imgName,jdbcType=VARCHAR},
unit_id = #{unitId,jdbcType=BIGINT},
expiry_num = #{expiryNum,jdbcType=INTEGER},
weight = #{weight,jdbcType=DECIMAL},
enabled = #{enabled,jdbcType=BIT},
other_field1 = #{otherField1,jdbcType=VARCHAR},
other_field2 = #{otherField2,jdbcType=VARCHAR},
other_field3 = #{otherField3,jdbcType=VARCHAR},
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR},
position = #{position,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>

View File

@ -69,6 +69,28 @@
<a-input placeholder="请输入颜色" v-decorator.trim="[ 'color' ]" /> <a-input placeholder="请输入颜色" v-decorator.trim="[ 'color' ]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="品牌" data-step="5" data-title="品牌"
data-intro="请填写商品的品牌">
<a-input placeholder="请输入品牌" v-decorator.trim="[ 'brand' ]" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="助记码" data-step="5" data-title="助记码"
data-intro="请填写商品的助记码">
<a-input placeholder="请输入助记码" v-decorator.trim="[ 'mnemonic' ]" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="类别"
data-step="8" data-title="类别" data-intro="类别需要在【商品类别】页面进行录入,录入之后在此处进行调用">
<a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" allow-clear
:treeData="categoryTree" v-decorator="[ 'categoryId' ]" placeholder="请选择类别">
</a-tree-select>
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基础重量" data-step="6" data-title="基础重量" <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基础重量" data-step="6" data-title="基础重量"
data-intro="请填写基本单位对应的重量,用于计算按重量分摊费用时单据中各行商品分摊的费用成本"> data-intro="请填写基本单位对应的重量,用于计算按重量分摊费用时单据中各行商品分摊的费用成本">
@ -82,11 +104,15 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="类别" <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓位货架" data-step="11" data-title="仓位货架"
data-step="8" data-title="类别" data-intro="类别需要在【商品类别】页面进行录入,录入之后在此处进行调用"> data-intro="仓位货架指的是仓库中的仓位和货架号,主要适用于仓库较大的场景,方便查找商品的准确位置">
<a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" allow-clear <a-input style="width: 100%" placeholder="请输入仓位货架" v-decorator.trim="[ 'position' ]" />
:treeData="categoryTree" v-decorator="[ 'categoryId' ]" placeholder="请选择类别"> </a-form-item>
</a-tree-select> </a-col>
<a-col :md="6" :sm="24">
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="制造商" data-step="5" data-title="制造商"
data-intro="请填写商品的制造商,一般适用于制造行业">
<a-input placeholder="请输入制造商" v-decorator.trim="[ 'mfrs' ]" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -113,14 +139,8 @@
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓位货架" data-step="11" data-title="仓位货架"
data-intro="仓位货架指的是仓库中的仓位和货架号,主要适用于仓库较大的场景,方便查找商品的准确位置">
<a-input style="width: 100%" placeholder="请输入仓位货架" v-decorator.trim="[ 'position' ]" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24" v-if="!model.id"> <a-col :md="6" :sm="24" v-if="!model.id">
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="多属性" data-step="12" data-title="多属性" <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="多属性" data-step="12" data-title="多属性"
data-intro="多属性是针对的sku商品比如服装、鞋帽行业此处开关如果启用就可以在下方进行多sku的配置配置具体的颜色、尺码之类的组合"> data-intro="多属性是针对的sku商品比如服装、鞋帽行业此处开关如果启用就可以在下方进行多sku的配置配置具体的颜色、尺码之类的组合">
<a-tooltip title="多属性针对服装、鞋帽等行业,需要先录入单位才能激活此处输入框"> <a-tooltip title="多属性针对服装、鞋帽等行业,需要先录入单位才能激活此处输入框">
<a-tag class="tag-info" v-if="!manySkuStatus">需要先录入单位才能激活</a-tag> <a-tag class="tag-info" v-if="!manySkuStatus">需要先录入单位才能激活</a-tag>