|
@@ -6,7 +6,6 @@
|
|
|
<result column="customer_id" property="customerId" jdbcType="INTEGER" />
|
|
|
<result column="signclosed_id" property="signclosedId" jdbcType="INTEGER" />
|
|
|
<result column="product_id" property="productId" jdbcType="INTEGER" />
|
|
|
- <result column="detect_product_type" property="detectProductType" jdbcType="BIT" />
|
|
|
<result column="detect_product_number" property="detectProductNumber" jdbcType="VARCHAR" />
|
|
|
<result column="detect_state" property="detectState" jdbcType="BIT" />
|
|
|
<result column="detect_phenomenon" property="detectPhenomenon" jdbcType="VARCHAR" />
|
|
@@ -22,12 +21,14 @@
|
|
|
<result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="machine_no" property="machineNo" jdbcType="VARCHAR" />
|
|
|
<result column="detect_is_maintenance" property="detectIsMaintenance" jdbcType="VARCHAR" />
|
|
|
+ <result column="detect_date" property="detectDate" jdbcType="DATE" />
|
|
|
+
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
- detect_id, customer_id,signclosed_id,product_id, detect_product_type, detect_product_number, detect_state,
|
|
|
+ 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,
|
|
|
- signclosed_create_time, signclosed_update_time,detect_is_maintenance
|
|
|
+ signclosed_create_time, signclosed_update_time,detect_is_maintenance,detect_date
|
|
|
</sql>
|
|
|
<select id="getComplaintDetectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
@@ -42,7 +43,6 @@
|
|
|
cd.signclosed_id signclosedId,
|
|
|
cd.product_id productId,
|
|
|
cd.customer_id customerId,
|
|
|
- cd.detect_product_type detectProductType,
|
|
|
cd.detect_product_number detectProductNumber,
|
|
|
cd.detect_state detectState,
|
|
|
cd.detect_phenomenon detectPhenomenon,
|
|
@@ -57,12 +57,13 @@
|
|
|
cd.signclosed_create_time signclosedCreateTime,
|
|
|
cd.signclosed_update_time signclosedUpdateTime,
|
|
|
cd.machine_no machineNo,
|
|
|
- cd.detect_is_maintenance
|
|
|
+ cd.detect_is_maintenance detectIsMaintenance,
|
|
|
+ cd.detect_date detectDate,
|
|
|
+ ci.customer_question_title questionTitle,
|
|
|
+ pi.product_name productName
|
|
|
from tb_rst_complaint_detect cd LEFT JOIN tb_rst_customer_info ci ON cd.customer_id = ci.customer_id
|
|
|
+ LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
|
|
|
<where>
|
|
|
- <if test="detectProductType != null and detectProductType != ''">
|
|
|
- cd.detect_product_type = #{detectProductType,jdbcType=BIT}
|
|
|
- </if>
|
|
|
<if test="detectProductNumber != null and detectProductNumber != ''" >
|
|
|
AND cd.detect_product_number = #{detectProductNumber,jdbcType=VARCHAR}
|
|
|
</if>
|
|
@@ -102,20 +103,21 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<insert id="insert" parameterType="ComplaintDetectInfo" >
|
|
|
- insert into tb_rst_complaint_detect (detect_id, customer_id,signclosed_id,product_id, detect_product_type,
|
|
|
+ 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_desc, signclosed_create_time, signclosed_update_time,machine_no,detect_is_maintenance
|
|
|
+ detect_desc, signclosed_create_time, signclosed_update_time,machine_no,detect_is_maintenance,detect_date
|
|
|
)
|
|
|
- values (#{detectId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER}, #{detectProductType,jdbcType=BIT},
|
|
|
+ values (#{detectId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{signclosedId,jdbcType=INTEGER},
|
|
|
+ #{productId,jdbcType=INTEGER},
|
|
|
#{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},
|
|
|
#{detectDesc,jdbcType=VARCHAR}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
|
|
|
- ,#{machineNo,jdbcType=TIMESTAMP},#{detectIsMaintenance,jdbcType=BIT}
|
|
|
+ ,#{machineNo,jdbcType=VARCHAR},#{detectIsMaintenance,jdbcType=BIT},#{detectDate,jdbcType=DATE}
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
@@ -125,9 +127,6 @@
|
|
|
<if test="customerId != null" >
|
|
|
customer_id = #{customerId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="detectProductType != null" >
|
|
|
- detect_product_type = #{detectProductType,jdbcType=BIT},
|
|
|
- </if>
|
|
|
<if test="detectProductNumber != null" >
|
|
|
detect_product_number = #{detectProductNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -161,9 +160,6 @@
|
|
|
<if test="detectDesc != null" >
|
|
|
detect_desc = #{detectDesc,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="signclosedCreateTime != null" >
|
|
|
- signclosed_create_time = #{signclosedCreateTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
<if test="signclosedUpdateTime != null" >
|
|
|
signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|