| 
															
																@@ -59,7 +59,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       cd.scrap_completion_time scrapCompletionTime,
 
															 | 
															
															 | 
															
																       cd.scrap_completion_time scrapCompletionTime,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       qd.describe_content describeContent,
 
															 | 
															
															 | 
															
																       qd.describe_content describeContent,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       qd.describe_handle_desc describeHandleDesc,
 
															 | 
															
															 | 
															
																       qd.describe_handle_desc describeHandleDesc,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      sa.admin_name adminName
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      sa.admin_name adminName,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      cd.detect_is_whetherLess detectIsWhetherLess
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     from tb_rst_complaint_detect cd
 
															 | 
															
															 | 
															
																     from tb_rst_complaint_detect cd
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
 
															 | 
															
															 | 
															
																     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
 
															 | 
															
															 | 
															
																     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -168,7 +169,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     cd.scrap_completion_time scrapCompletionTime,
 
															 | 
															
															 | 
															
																     cd.scrap_completion_time scrapCompletionTime,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     qd.describe_content describeContent,
 
															 | 
															
															 | 
															
																     qd.describe_content describeContent,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     qd.describe_handle_desc describeHandleDesc,
 
															 | 
															
															 | 
															
																     qd.describe_handle_desc describeHandleDesc,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    sa.admin_name adminName
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    sa.admin_name adminName,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    cd.detect_is_whetherLess detectIsWhetherLess
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     from tb_rst_complaint_detect cd
 
															 | 
															
															 | 
															
																     from tb_rst_complaint_detect cd
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
 
															 | 
															
															 | 
															
																     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
 
															 | 
															
															 | 
															
																     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -301,7 +303,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         and cd.detect_state = 22
 
															 | 
															
															 | 
															
																         and cd.detect_state = 22
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="state != null and state == 4">
 
															 | 
															
															 | 
															
																       <if test="state != null and state == 4">
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        and cd.detect_state in(33,37)
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        and cd.detect_state in(33,37)  and detect_placeorder = 1
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="state != null and state == 5">
 
															 | 
															
															 | 
															
																       <if test="state != null and state == 5">
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         and cd.detect_state = 20
 
															 | 
															
															 | 
															
																         and cd.detect_state = 20
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -312,6 +314,9 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="maintenanceResults != null and maintenanceResults != ''">
 
															 | 
															
															 | 
															
																       <if test="maintenanceResults != null and maintenanceResults != ''">
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         and cd.maintenance_results = #{maintenanceResults}
 
															 | 
															
															 | 
															
																         and cd.maintenance_results = #{maintenanceResults}
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      <if test="detectIsWhetherLess != null and detectIsWhetherLess != ''">
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        and cd.detect_is_whetherLess  = #{detectIsWhetherLess}
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </where>
 
															 | 
															
															 | 
															
																     </where>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       GROUP BY cd.detect_id
 
															 | 
															
															 | 
															
																       GROUP BY cd.detect_id
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       ORDER BY cd.detect_create_time DESC
 
															 | 
															
															 | 
															
																       ORDER BY cd.detect_create_time DESC
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -407,7 +412,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="detectPlaceorder != null and detectPlaceorder != ''" >
 
															 | 
															
															 | 
															
																       <if test="detectPlaceorder != null and detectPlaceorder != ''" >
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         detect_placeorder = #{detectPlaceorder,jdbcType=INTEGER},
 
															 | 
															
															 | 
															
																         detect_placeorder = #{detectPlaceorder,jdbcType=INTEGER},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      <if test="salesOrderId != null and salesOrderId != ''" >
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      <if test="salesOrderId != null" >
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         sales_orderId = #{salesOrderId,jdbcType=INTEGER},
 
															 | 
															
															 | 
															
																         sales_orderId = #{salesOrderId,jdbcType=INTEGER},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="detectCompletionTime != null and detectCompletionTime != ''" >
 
															 | 
															
															 | 
															
																       <if test="detectCompletionTime != null and detectCompletionTime != ''" >
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -420,7 +425,10 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         renovation_completion_time = #{renovationCompletionTime},
 
															 | 
															
															 | 
															
																         renovation_completion_time = #{renovationCompletionTime},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       <if test="scrapCompletionTime != null and scrapCompletionTime != ''" >
 
															 | 
															
															 | 
															
																       <if test="scrapCompletionTime != null and scrapCompletionTime != ''" >
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        scrap_completion_time = #{scrapCompletionTime}
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        scrap_completion_time = #{scrapCompletionTime},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      <if test="detectIsWhetherLess != null and detectIsWhetherLess != ''">
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        detect_is_whetherLess  = #{detectIsWhetherLess}
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       </if>
 
															 | 
															
															 | 
															
																       </if>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     </set>
 
															 | 
															
															 | 
															
																     </set>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     where
 
															 | 
															
															 | 
															
																     where
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -459,7 +467,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     detect_is_refurbishing,
 
															 | 
															
															 | 
															
																     detect_is_refurbishing,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     maintenance_results,
 
															 | 
															
															 | 
															
																     maintenance_results,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     detect_number,
 
															 | 
															
															 | 
															
																     detect_number,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-    maintenance_cut_time
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    maintenance_cut_time,
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    detect_is_whetherLess
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     )
 
															 | 
															
															 | 
															
																     )
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     values
 
															 | 
															
															 | 
															
																     values
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       (
 
															 | 
															
															 | 
															
																       (
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -492,7 +501,8 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       #{detectIsRefurbishing},
 
															 | 
															
															 | 
															
																       #{detectIsRefurbishing},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       #{maintenanceResults},
 
															 | 
															
															 | 
															
																       #{maintenanceResults},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       #{detectNumber},
 
															 | 
															
															 | 
															
																       #{detectNumber},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-      #{maintenanceCutTime}
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      #{maintenanceCutTime},
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+      #{detectIsWhetherLess}
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																       )
 
															 | 
															
															 | 
															
																       )
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   </insert>
 
															 | 
															
															 | 
															
																   </insert>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -737,7 +747,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
 
															 | 
															
															 | 
															
																         LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         WHERE
 
															 | 
															
															 | 
															
																         WHERE
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             cd.customer_id = #{customerId}
 
															 | 
															
															 | 
															
																             cd.customer_id = #{customerId}
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        AND detect_state in (32,36,37) AND maintenance_results = 1 AND detect_placeorder = 1
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        AND detect_state in (32,33,36,37)  AND detect_placeorder = 1
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																   </select>
 
															 | 
															
															 | 
															
																   </select>
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 |