@ -96,9 +96,6 @@
GROUP_CONCAT(DISTINCT lapr.compensation_method) AS compensationMethods
FROM
logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0'
LEFT JOIN (SELECT
@ -147,7 +144,6 @@
<if test= "param.customerServiceName != null and param.customerServiceName != '' " > and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') </if>
<if test= "param.waybillMallId != null and param.waybillMallId != '' " > and lawo.waybill_mall_id = #{param.waybillMallId } </if>
<if test= "param.problemDescription != null and param.problemDescription != '' " > and lawo.problem_description = #{param.problemDescription} </if>
<if test= "param.warehouseId != null and param.warehouseId != '' and param.handleStatus != null " > and (lap.warehouse_id = #{param.warehouseId} OR lap.business_id = #{param.warehouseId}) </if>
<if test= "param.personResponsible != null and param.personResponsible != '' " > and lawo.person_responsible = #{param.personResponsible } </if>
<if test= "param.processNumber != null and param.processNumber != '' " > and lawo.process_number = #{param.processNumber } </if>
<if test= "param.reviewedBy != null and param.reviewedBy != '' " > and lawo.reviewed_by = #{param.reviewedBy } </if>
@ -160,10 +156,9 @@
<if test= "param.customerIdentification != null and param.customerIdentification == 1 " >
and lawo.work_order_status IN ( '10', '20', '21', '30', '40', '50', '60', '70', '80', '90' ,'100','110')
</if>
<if test= "param.handleStatus != null and param.handleStatus == 40 " > and lawo.work_order_status in ('10') and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test= "param.handleStatus != null and param.handleStatus == 50 " > and lawo.work_order_status in ('20') and lap.types_of = '2' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 30" > and lawo.work_order_status in (21,30) and lap.processing_status = '4' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 10 " > and lap.types_of = '2' </if>
<if test= "param.handleStatus != null and param.handleStatus == 40 " > and lawo.work_order_status in ('10') </if>
<if test= "param.handleStatus != null and param.handleStatus == 50 " > and lawo.work_order_status in ('20') </if>
<if test= "param.handleStatus!= null and param.handleStatus == 30" > and lawo.work_order_status in (21,30) </if>
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100,70) </if>
<if test= "param.workOrderType != null and param.workOrderType != '' " > and lawo.work_order_type = #{param.workOrderType } </if>
<if test= "param.discoveryNode != null and param.discoveryNode != '' " > and lawo.discovery_node = #{param.discoveryNode } </if>