|
@@ -24,6 +24,7 @@
|
|
|
<result column="scrap_reason" property="scrapReason"/>
|
|
<result column="scrap_reason" property="scrapReason"/>
|
|
|
<result column="scrap_date" property="scrapDate"/>
|
|
<result column="scrap_date" property="scrapDate"/>
|
|
|
<result column="scrap_user" property="scrapUser"/>
|
|
<result column="scrap_user" property="scrapUser"/>
|
|
|
|
|
+ <result column="replace_tool_id" property="replaceToolId"/>
|
|
|
<result column="produce_factory" property="produceFactory"/>
|
|
<result column="produce_factory" property="produceFactory"/>
|
|
|
<result column="produce_date" property="produceDate"/>
|
|
<result column="produce_date" property="produceDate"/>
|
|
|
<result column="remark" property="remark"/>
|
|
<result column="remark" property="remark"/>
|
|
@@ -55,6 +56,7 @@
|
|
|
t.scrap_reason,
|
|
t.scrap_reason,
|
|
|
t.scrap_date,
|
|
t.scrap_date,
|
|
|
t.scrap_user,
|
|
t.scrap_user,
|
|
|
|
|
+ t.replace_tool_id,
|
|
|
t.produce_factory,
|
|
t.produce_factory,
|
|
|
t.produce_date,
|
|
t.produce_date,
|
|
|
t.remark,
|
|
t.remark,
|
|
@@ -65,10 +67,7 @@
|
|
|
t.update_time
|
|
t.update_time
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
- <insert id="insert" parameterType="com.railway.business.safetool.domain.BaseSafetyTool">
|
|
|
|
|
- <selectKey keyProperty="toolId" order="BEFORE" resultType="String">
|
|
|
|
|
- select replace(uuid(), '-', '') from dual
|
|
|
|
|
- </selectKey>
|
|
|
|
|
|
|
+ <insert id="insert" parameterType="com.railway.business.safetool.domain.BaseSafetyTool" useGeneratedKeys="true" keyProperty="toolId">
|
|
|
INSERT INTO base_safety_tool
|
|
INSERT INTO base_safety_tool
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test ='null != deptId'>
|
|
<if test ='null != deptId'>
|
|
@@ -122,6 +121,9 @@
|
|
|
<if test ='null != scrapUser'>
|
|
<if test ='null != scrapUser'>
|
|
|
scrap_user,
|
|
scrap_user,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test ='null != replaceToolId'>
|
|
|
|
|
+ replace_tool_id,
|
|
|
|
|
+ </if>
|
|
|
<if test ='null != produceFactory'>
|
|
<if test ='null != produceFactory'>
|
|
|
produce_factory,
|
|
produce_factory,
|
|
|
</if>
|
|
</if>
|
|
@@ -188,7 +190,7 @@
|
|
|
#{testResultDesc},
|
|
#{testResultDesc},
|
|
|
</if>
|
|
</if>
|
|
|
<if test ='null != state'>
|
|
<if test ='null != state'>
|
|
|
- #{state},
|
|
|
|
|
|
|
+ #{state},
|
|
|
</if>
|
|
</if>
|
|
|
<if test ='null != scrapReason'>
|
|
<if test ='null != scrapReason'>
|
|
|
#{scrapReason},
|
|
#{scrapReason},
|
|
@@ -199,6 +201,9 @@
|
|
|
<if test ='null != scrapUser'>
|
|
<if test ='null != scrapUser'>
|
|
|
#{scrapUser},
|
|
#{scrapUser},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test ='null != replaceToolId'>
|
|
|
|
|
+ #{replaceToolId},
|
|
|
|
|
+ </if>
|
|
|
<if test ='null != produceFactory'>
|
|
<if test ='null != produceFactory'>
|
|
|
#{produceFactory},
|
|
#{produceFactory},
|
|
|
</if>
|
|
</if>
|
|
@@ -252,6 +257,7 @@
|
|
|
<if test ='null != scrapReason'>scrap_reason = #{scrapReason},</if>
|
|
<if test ='null != scrapReason'>scrap_reason = #{scrapReason},</if>
|
|
|
<if test ='null != scrapDate'>scrap_date = #{scrapDate},</if>
|
|
<if test ='null != scrapDate'>scrap_date = #{scrapDate},</if>
|
|
|
<if test ='null != scrapUser'>scrap_user = #{scrapUser},</if>
|
|
<if test ='null != scrapUser'>scrap_user = #{scrapUser},</if>
|
|
|
|
|
+ <if test ='null != replaceToolId'>replace_tool_id = #{replaceToolId},</if>
|
|
|
<if test ='null != produceFactory'>produce_factory = #{produceFactory},</if>
|
|
<if test ='null != produceFactory'>produce_factory = #{produceFactory},</if>
|
|
|
<if test ='null != produceDate'>produce_date = #{produceDate},</if>
|
|
<if test ='null != produceDate'>produce_date = #{produceDate},</if>
|
|
|
<if test ='null != remark'>remark = #{remark},</if>
|
|
<if test ='null != remark'>remark = #{remark},</if>
|
|
@@ -309,16 +315,16 @@
|
|
|
<if test="testCycle!=null and testCycle!=''">
|
|
<if test="testCycle!=null and testCycle!=''">
|
|
|
and t.test_cycle=#{testCycle}
|
|
and t.test_cycle=#{testCycle}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="lastTestDate!=null and lastTestDate!=''">
|
|
|
|
|
|
|
+ <if test="lastTestDate!=null">
|
|
|
and t.last_test_date=#{lastTestDate}
|
|
and t.last_test_date=#{lastTestDate}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="nextTestDate!=null and nextTestDate!=''">
|
|
|
|
|
|
|
+ <if test="nextTestDate!=null">
|
|
|
and t.next_test_date=#{nextTestDate}
|
|
and t.next_test_date=#{nextTestDate}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="testResult!=null and testResult!=''">
|
|
<if test="testResult!=null and testResult!=''">
|
|
|
and t.test_result=#{testResult}
|
|
and t.test_result=#{testResult}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="testDate!=null and testDate!=''">
|
|
|
|
|
|
|
+ <if test="testDate!=null">
|
|
|
and t.test_date=#{testDate}
|
|
and t.test_date=#{testDate}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="testResultDesc!=null and testResultDesc!=''">
|
|
<if test="testResultDesc!=null and testResultDesc!=''">
|
|
@@ -336,10 +342,13 @@
|
|
|
<if test="scrapUser!=null and scrapUser!=''">
|
|
<if test="scrapUser!=null and scrapUser!=''">
|
|
|
and t.scrap_user=#{scrapUser}
|
|
and t.scrap_user=#{scrapUser}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="replaceToolId!=null and replaceToolId!=''">
|
|
|
|
|
+ and t.replace_tool_id=#{replaceToolId}
|
|
|
|
|
+ </if>
|
|
|
<if test="produceFactory!=null and produceFactory!=''">
|
|
<if test="produceFactory!=null and produceFactory!=''">
|
|
|
and t.produce_factory=#{produceFactory}
|
|
and t.produce_factory=#{produceFactory}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="produceDate!=null and produceDate!=''">
|
|
|
|
|
|
|
+ <if test="produceDate!=null">
|
|
|
and t.produce_date=#{produceDate}
|
|
and t.produce_date=#{produceDate}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="remark!=null and remark!=''">
|
|
<if test="remark!=null and remark!=''">
|