给商品和单据增加序列号和批次字段

This commit is contained in:
季圣华
2021-09-28 00:28:23 +08:00
parent 06d91f8655
commit 09b603c80e
12 changed files with 519 additions and 11 deletions

View File

@@ -14,11 +14,13 @@
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="img_name" jdbcType="VARCHAR" property="imgName" />
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
<result column="expiry_num" jdbcType="INTEGER" property="expiryNum" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
<result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
<result column="other_field3" jdbcType="VARCHAR" property="otherField3" />
<result column="enable_serial_number" jdbcType="VARCHAR" property="enableSerialNumber" />
<result column="enable_batch_number" jdbcType="VARCHAR" property="enableBatchNumber" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
@@ -82,8 +84,8 @@
</sql>
<sql id="Base_Column_List">
id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark,
img_name, unit_id, enabled, other_field1, other_field2, other_field3, enable_serial_number,
tenant_id, delete_flag
img_name, unit_id, expiry_num, enabled, other_field1, other_field2, other_field3,
enable_serial_number, enable_batch_number, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
select
@@ -120,16 +122,18 @@
mfrs, safety_stock, model,
standard, color, unit,
remark, img_name, unit_id,
enabled, other_field1, other_field2,
other_field3, enable_serial_number, tenant_id,
delete_flag)
expiry_num, enabled, other_field1,
other_field2, other_field3, enable_serial_number,
enable_batch_number, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{mfrs,jdbcType=VARCHAR}, #{safetyStock,jdbcType=DECIMAL}, #{model,jdbcType=VARCHAR},
#{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{imgName,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT},
#{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR},
#{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
#{expiryNum,jdbcType=INTEGER}, #{enabled,jdbcType=BIT}, #{otherField1,jdbcType=VARCHAR},
#{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR},
#{enableBatchNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
insert into jsh_material
@@ -170,6 +174,9 @@
<if test="unitId != null">
unit_id,
</if>
<if test="expiryNum != null">
expiry_num,
</if>
<if test="enabled != null">
enabled,
</if>
@@ -185,6 +192,9 @@
<if test="enableSerialNumber != null">
enable_serial_number,
</if>
<if test="enableBatchNumber != null">
enable_batch_number,
</if>
<if test="tenantId != null">
tenant_id,
</if>
@@ -229,6 +239,9 @@
<if test="unitId != null">
#{unitId,jdbcType=BIGINT},
</if>
<if test="expiryNum != null">
#{expiryNum,jdbcType=INTEGER},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
@@ -244,6 +257,9 @@
<if test="enableSerialNumber != null">
#{enableSerialNumber,jdbcType=VARCHAR},
</if>
<if test="enableBatchNumber != null">
#{enableBatchNumber,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
@@ -297,6 +313,9 @@
<if test="record.unitId != null">
unit_id = #{record.unitId,jdbcType=BIGINT},
</if>
<if test="record.expiryNum != null">
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
@@ -312,6 +331,9 @@
<if test="record.enableSerialNumber != null">
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
</if>
<if test="record.enableBatchNumber != null">
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
@@ -337,11 +359,13 @@
remark = #{record.remark,jdbcType=VARCHAR},
img_name = #{record.imgName,jdbcType=VARCHAR},
unit_id = #{record.unitId,jdbcType=BIGINT},
expiry_num = #{record.expiryNum,jdbcType=INTEGER},
enabled = #{record.enabled,jdbcType=BIT},
other_field1 = #{record.otherField1,jdbcType=VARCHAR},
other_field2 = #{record.otherField2,jdbcType=VARCHAR},
other_field3 = #{record.otherField3,jdbcType=VARCHAR},
enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
enable_batch_number = #{record.enableBatchNumber,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
@@ -384,6 +408,9 @@
<if test="unitId != null">
unit_id = #{unitId,jdbcType=BIGINT},
</if>
<if test="expiryNum != null">
expiry_num = #{expiryNum,jdbcType=INTEGER},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
@@ -399,6 +426,9 @@
<if test="enableSerialNumber != null">
enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
</if>
<if test="enableBatchNumber != null">
enable_batch_number = #{enableBatchNumber,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
@@ -421,11 +451,13 @@
remark = #{remark,jdbcType=VARCHAR},
img_name = #{imgName,jdbcType=VARCHAR},
unit_id = #{unitId,jdbcType=BIGINT},
expiry_num = #{expiryNum,jdbcType=INTEGER},
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},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}