|
@@ -14,7 +14,6 @@
|
|
|
<result column="detect_results" property="detectResults" jdbcType="VARCHAR" />
|
|
|
<result column="detect_point" property="detectPoint" jdbcType="VARCHAR" />
|
|
|
<result column="detect_analysis" property="detectAnalysis" jdbcType="VARCHAR" />
|
|
|
- <result column="detect_customer_id" property="detectCustomerId" jdbcType="INTEGER" />
|
|
|
<result column="detect_revolution_produced" property="detectRevolutionProduced" jdbcType="BIT" />
|
|
|
<result column="detect_desc" property="detectDesc" jdbcType="VARCHAR" />
|
|
|
<result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
|
|
@@ -27,7 +26,7 @@
|
|
|
<sql id="Base_Column_List" >
|
|
|
detect_id, customer_id,signclosed_id,product_id,detect_product_number, detect_state,
|
|
|
detect_phenomenon, detect_failure_classification, detect_failure_cause, detect_results,
|
|
|
- detect_point, detect_analysis, detect_customer_id, detect_revolution_produced, detect_desc,
|
|
|
+ detect_point, detect_analysis, detect_revolution_produced, detect_desc,
|
|
|
signclosed_create_time, signclosed_update_time,detect_is_maintenance,detect_date,maintenance_results
|
|
|
</sql>
|
|
|
<select id="getComplaintDetectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
@@ -51,7 +50,6 @@
|
|
|
cd.detect_results detectResults,
|
|
|
cd.detect_point detectPoint,
|
|
|
cd.detect_analysis detectAnalysis,
|
|
|
- cd.detect_customer_id detectCustomerId,
|
|
|
cd.detect_revolution_produced detectRevolutionProduced,
|
|
|
cd.detect_desc detectDesc,
|
|
|
cd.signclosed_create_time signclosedCreateTime,
|
|
@@ -89,9 +87,6 @@
|
|
|
<if test="detectAnalysis != null and detectAnalysis != ''" >
|
|
|
AND cd.detect_analysis like CONCAT('%',#{detectAnalysis,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
- <if test="detectCustomerId != null and detectCustomerId != ''" >
|
|
|
- AND cd.detect_customer_id = #{detectCustomerId,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
<if test="detectRevolutionProduced != null and detectRevolutionProduced != ''" >
|
|
|
AND cd.detect_revolution_produced = #{detectRevolutionProduced,jdbcType=BIT}
|
|
|
</if>
|
|
@@ -107,8 +102,8 @@
|
|
|
insert into tb_rst_complaint_detect (detect_id, customer_id,signclosed_id,product_id,
|
|
|
detect_product_number, detect_state, detect_phenomenon,
|
|
|
detect_failure_classification, detect_failure_cause,
|
|
|
- detect_results, detect_point, detect_analysis,
|
|
|
- detect_customer_id, detect_revolution_produced,
|
|
|
+ detect_results, detect_point, detect_analysis,
|
|
|
+ detect_revolution_produced,
|
|
|
detect_desc, signclosed_create_time, signclosed_update_time,
|
|
|
machine_no,detect_is_maintenance,detect_date,maintenance_results
|
|
|
)
|
|
@@ -117,7 +112,7 @@
|
|
|
#{detectProductNumber,jdbcType=VARCHAR}, #{detectState,jdbcType=BIT}, #{detectPhenomenon,jdbcType=VARCHAR},
|
|
|
#{detectFailureClassification,jdbcType=VARCHAR}, #{detectFailureCause,jdbcType=VARCHAR},
|
|
|
#{detectResults,jdbcType=VARCHAR}, #{detectPoint,jdbcType=VARCHAR}, #{detectAnalysis,jdbcType=VARCHAR},
|
|
|
- #{detectCustomerId,jdbcType=INTEGER}, #{detectRevolutionProduced,jdbcType=BIT},
|
|
|
+ #{detectRevolutionProduced,jdbcType=BIT},
|
|
|
#{detectDesc,jdbcType=VARCHAR}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
|
|
|
,#{machineNo,jdbcType=VARCHAR},#{detectIsMaintenance,jdbcType=BIT},#{detectDate,jdbcType=DATE},#{maintenanceResults,jdbcType=BIT}
|
|
|
)
|
|
@@ -153,9 +148,6 @@
|
|
|
<if test="detectAnalysis != null" >
|
|
|
detect_analysis = #{detectAnalysis,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="detectCustomerId != null" >
|
|
|
- detect_customer_id = #{detectCustomerId,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="detectRevolutionProduced != null" >
|
|
|
detect_revolution_produced = #{detectRevolutionProduced,jdbcType=BIT},
|
|
|
</if>
|
|
@@ -172,6 +164,13 @@
|
|
|
maintenance_results = #{maintenanceResults,jdbcType=BIT}
|
|
|
</if>
|
|
|
</set>
|
|
|
- where detect_id = #{detectId,jdbcType=INTEGER}
|
|
|
+ <where>
|
|
|
+ <if test="detectId != null and detectId != ''" >
|
|
|
+ AND detect_id = #{detectId,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="signclosedId != null and signclosedId != ''" >
|
|
|
+ AND signclosed_id = #{signclosedId,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</update>
|
|
|
</mapper>
|