|
@@ -6,6 +6,7 @@
|
|
|
<resultMap id="StockMap" type="com.jpsoft.printing.modules.base.entity.Stock">
|
|
|
<id property="id" column="id_" />
|
|
|
<result property="workId" column="work_id" />
|
|
|
+ <result property="machineName" column="machine_name" />
|
|
|
<result property="stockNumber" column="stock_number" />
|
|
|
<result property="length" column="length_" />
|
|
|
<result property="flaw" column="flaw_" />
|
|
@@ -24,11 +25,12 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into base_stock
|
|
|
- (id_,work_id,stock_number,length_,flaw_,status_,del_flag,create_by,create_time,update_by,update_time)
|
|
|
+ (id_,work_id,machine_name,stock_number,length_,flaw_,status_,del_flag,create_by,create_time,update_by,update_time)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
,#{workId,jdbcType=VARCHAR}
|
|
|
+,#{machineName,jdbcType=VARCHAR}
|
|
|
,#{stockNumber,jdbcType=VARCHAR}
|
|
|
,#{length,jdbcType= NUMERIC }
|
|
|
,#{flaw,jdbcType=VARCHAR}
|
|
@@ -49,6 +51,9 @@
|
|
|
<set>
|
|
|
<if test="workId!=null">
|
|
|
work_id=#{workId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="machineName!=null">
|
|
|
+ machine_name=#{machineName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="stockNumber!=null">
|
|
|
stock_number=#{stockNumber,jdbcType=VARCHAR},
|
|
@@ -82,7 +87,7 @@
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="StockMap">
|
|
|
select
|
|
|
-id_,work_id,stock_number,length_,flaw_,status_,del_flag,create_by,create_time,update_by,update_time from base_stock where id_=#{0}
|
|
|
+id_,work_id,machine_name,stock_number,length_,flaw_,status_,del_flag,create_by,create_time,update_by,update_time from base_stock where id_=#{0}
|
|
|
</select>
|
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
|
select count(*) from base_stock where id_=#{0}
|