@ -95,6 +95,7 @@
AND lacr.is_deleted = '0'
<where >
lawo.is_deleted = 0
<if test= "param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' " > and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
<if test= "param.id != null and param.id != '' " > and lawo.id = #{param.id } </if>
<if test= "param.workOrderType != null and param.workOrderType != '' " > and lawo.work_order_type = #{param.workOrderType } </if>
<if test= "param.initiationIdentification != null and param.initiationIdentification != '' " > and lawo.initiation_identification = #{param.initiationIdentification } </if>
@ -110,16 +111,18 @@
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
<if test= "param.brandName !=null and param.brandName !='' " > and lawo.brand_name like concat('%', #{param.brandName },'%') </if>
<if test= "param.deliverGoodsTime != null and param.deliverGoodsTime != '' " > and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null and param.discoveryTime != '' " > and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null and param.warehousingTime != '' " > and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null and param.deliveryTime != '' " > and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null and param.auditTime != '' " > and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null and param.entryTime != '' " > and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null and param.overTime != '' " > and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.deliverGoodsTime != null " > and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null " > and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null " > and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null " > and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null " > and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null " > and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null " > and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.waybillMall != null and param.waybillMall != '' " > and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test= "param.deliveryDriver != null and param.deliveryDriver != '' " > and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 30 " > and lawo.work_order_status in ('30','40') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 31 " > and lawo.work_order_status in ('30') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 20 " > and lawo.work_order_status in ('30') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 10 " > and lawo.work_order_status in ('80','100') </if>
<if test= "param.customerServiceId != null and param.customerServiceId != '' " > and lawo.customer_service_id = #{param.customerServiceId } </if>
@ -159,6 +162,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test= "param.handleStatus!= null and param.handleStatus == 10 " > and lap.types_of = '2' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 30" > and lawo.work_order_status in (21,30,40) and lap.processing_status = '4' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test= "param.customerServiceState!= null and param.customerServiceState == 80 " > and lawo.work_order_status in (20,30,10,40,60,100,21,70) </if>
ORDER BY lawo.create_time DESC
</where>
@ -236,71 +240,75 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
#{id}
</foreach>
</if>
<if test= "param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' " > and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
<if test= "param.id != null and param.id != '' " > and lawo.id = #{param.id } </if>
<if test= "param.workOrderType != null and param.workOrderType != '' " > and lawo.work_order_type = #{param.workOrderType } </if>
<if test= "param.initiationIdentification != null and param.initiationIdentification != '' " > and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test= "param.discoveryNode != null and param.discoveryNode != '' " > and lawo.discovery_node = #{param.discoveryNode } </if>
<if test= "param.workOrderNumber != null and param.workOrderNumber != '' " > and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test= "param.waybillNumber != null and param.waybillNumber != '' " > and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test= "param.orderCode != null and param.orderCode != '' " > and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test= "param.trainNumber != null and param.trainNumber != '' " > and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test= "param.first != null and param.first != '' " > and lawo.first like concat('%', #{param.first },'%') </if>
<if test= "param.secondary != null and param.secondary != '' " > and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test= "param.vehicleRoute != null and param.vehicleRoute != '' " > and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<!-- create_time >= unix_timestamp('2013 - 10 - 24 00:00:00') and create_time <= unix_timestamp('2013 - 10 - 24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
<if test= "param.brandName !=null and param.brandName !='' " > and lawo.brand_name like concat('%', #{param.brandName },'%') </if>
<if test= "param.deliverGoodsTime != null " > and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null " > and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null " > and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null " > and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null " > and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null " > and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null " > and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.waybillMall != null and param.waybillMall != '' " > and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test= "param.deliveryDriver != null and param.deliveryDriver != '' " > and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 30 " > and lawo.work_order_status in ('30','40') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 31 " > and lawo.work_order_status in ('30') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 20 " > and lawo.work_order_status in ('30') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 10 " > and lawo.work_order_status in ('80','100') </if>
<if test= "param.customerServiceId != null and param.customerServiceId != '' " > and lawo.customer_service_id = #{param.customerServiceId } </if>
<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 != 20" > and lawo.warehouse_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>
<if test= "param.operator != null and param.operator != '' " > and lawo.operator = #{param.operator } </if>
<if test= "param.responsiblePerson != null and param.responsiblePerson != '' " > and lawo.responsible_person = #{param.responsiblePerson } </if>
<if test= "param.processedBy != null and param.processedBy != '' " > and lawo.processed_by = #{param.processedBy} </if>
<if test= "param.investigationProcess != null and param.investigationProcess != '' " > and lawo.investigation_process = #{param.investigationProcess } </if>
<if test= "param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' " > and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test= "param.workOrderStatus != null and param.workOrderStatus != ''" > and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<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 == 30" > and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<!-- <if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if> -->
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test= "param.handleStatus != null " > or 1=1 </if>
<if test= "param.workOrderType != null and param.workOrderType != '' " > and lawo.work_order_type = #{param.workOrderType } </if>
<if test= "param.initiationIdentification != null and param.initiationIdentification != '' " > and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test= "param.discoveryNode != null and param.discoveryNode != '' " > and lawo.discovery_node = #{param.discoveryNode } </if>
<if test= "param.workOrderNumber != null and param.workOrderNumber != '' " > and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test= "param.waybillNumber != null and param.waybillNumber != '' " > and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test= "param.orderCode != null and param.orderCode != '' " > and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test= "param.trainNumber != null and param.trainNumber != '' " > and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test= "param.first != null and param.first != '' " > and lawo.first like concat('%', #{param.first },'%') </if>
<if test= "param.secondary != null and param.secondary != '' " > and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test= "param.vehicleRoute != null and param.vehicleRoute != '' " > and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<!-- create_time >= unix_timestamp('2013 - 10 - 24 00:00:00') and create_time <= unix_timestamp('2013 - 10 - 24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
<if test= "param.brandName !=null and param.brandName !='' " > and lawo.brand_name like concat('%', #{param.brandName },'%') </if>
<if test= "param.deliverGoodsTime != null and param.deliverGoodsTime != '' " > and date_format(from_unixtime( lawo.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null and param.discoveryTime != '' " > and date_format(from_unixtime(lawo.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null and param.warehousingTime != '' " > and date_format(from_unixtime(lawo.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null and param.deliveryTime != '' " > and date_format(from_unixtime( lawo.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null and param.auditTime != '' " > and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null and param.entryTime != '' " > and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null and param.overTime != '' " > and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.waybillMall != null and param.waybillMall != '' " > and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test= "param.deliveryDriver != null and param.deliveryDriver != '' " > and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 30 " > and lawo.work_order_status in ('30','40') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 20 " > and lawo.work_order_status in ('30') </if>
<if test= "param.customerServiceState != null and param.customerServiceState == 10 " > and lawo.work_order_status in ('80','100') </if>
<if test= "param.customerServiceId != null and param.customerServiceId != '' " > and lawo.customer_service_id = #{param.customerServiceId } </if>
<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 != 20" > and lawo.warehouse_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>
<if test= "param.operator != null and param.operator != '' " > and lawo.operator = #{param.operator } </if>
<if test= "param.responsiblePerson != null and param.responsiblePerson != '' " > and lawo.responsible_person = #{param.responsiblePerson } </if>
<if test= "param.processedBy != null and param.processedBy != '' " > and lawo.processed_by = #{param.processedBy} </if>
<if test= "param.investigationProcess != null and param.investigationProcess != '' " > and lawo.investigation_process = #{param.investigationProcess } </if>
<if test= "param.relatedWorkOrdersId != null and param.relatedWorkOrdersId != '' " > and lawo.related_work_orders_id = #{param.relatedWorkOrdersId } </if>
<if test= "param.workOrderStatus != null and param.workOrderStatus != ''" > and lawo.work_order_status in( #{param.workOrderStatus }) </if>
<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 == 30" > and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<!-- <if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if> -->
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test= "param.handleStatus != null " > or 1=1 </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>
<if test= "param.workOrderNumber != null and param.workOrderNumber != '' " > and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test= "param.waybillNumber != null and param.waybillNumber != '' " > and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test= "param.orderCode != null and param.orderCode != '' " > and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test= "param.trainNumber != null and param.trainNumber != '' " > and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test= "param.first != null and param.first != '' " > and lawo.first like concat('%', #{param.first },'%') </if>
<if test= "param.secondary != null and param.secondary != '' " > and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test= "param.vehicleRoute != null and param.vehicleRoute != '' " > and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test= "param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20 " > and lap.business_id = #{param.warehouseId} </if>
<if test= "param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 " > and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if> -->
<if test= "param.handleStatus != null and param.handleStatus == 40 " > and lawo.work_order_status in ('10','20' ) and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test= "param.handleStatus!= null and param.handleStatus == 10 " > and lap.types_of = '2' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 30" > and lawo.work_order_status in (21,30,40) and lap.processing_status = '4' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
ORDER BY lawo.create_time DESC
<if test= "param.discoveryNode != null and param.discoveryNode != '' " > and lawo.discovery_node = #{param.discoveryNode } </if>
<if test= "param.workOrderNumber != null and param.workOrderNumber != '' " > and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test= "param.waybillNumber != null and param.waybillNumber != '' " > and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test= "param.orderCode != null and param.orderCode != '' " > and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test= "param.trainNumber != null and param.trainNumber != '' " > and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test= "param.first != null and param.first != '' " > and lawo.first like concat('%', #{param.first },'%') </if>
<if test= "param.secondary != null and param.secondary != '' " > and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test= "param.vehicleRoute != null and param.vehicleRoute != '' " > and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test= "param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20 " > and lap.business_id = #{param.warehouseId} </if>
<if test= "param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 " > and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if> -->
<if test= "param.handleStatus != null and param.handleStatus == 40 " > and lawo.work_order_status in ('10','20' ) and lap.types_of = '2' and lap.processing_status in ('1') </if>
<if test= "param.handleStatus!= null and param.handleStatus == 10 " > and lap.types_of = '2' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 30" > and lawo.work_order_status in (21,30,40) and lap.processing_status = '4' </if>
<if test= "param.handleStatus!= null and param.handleStatus == 20 " > and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test= "param.customerServiceState!= null and param.customerServiceState == 80 " > and lawo.work_order_status in (20,30,10,40,60,100,21,70) </if>
ORDER BY lawo.create_time DESC
</where>
</select>
@ -343,6 +351,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
LEFT JOIN logpm_aftersales_work_order law ON lap.work_order_id = law.id
<where >
lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2' and law.work_order_status in ('10','20','30')
<if test= "param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' " > and law.work_order_status = #{param.workOrderStatusNameS } </if>
<if test= "param.workOrderStatus != null and param.workOrderStatus != ''" > and law.work_order_status = #{param.workOrderStatus}</if>
<if test= "param.warehouseId != null and param.warehouseId != ''" > and lap.business_id = #{param.warehouseId}</if>
<if test= "param.workOrderType != null and param.workOrderType != ''" > and law.work_order_type = #{param.workOrderType}</if>
@ -361,13 +370,13 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test= "param.problemDescription != null and param.problemDescription != '' " > and law.problem_description like concat('%',#{param.problemDescription},'%') </if>
<if test= "param.reviewedBy != null and param.reviewedBy != '' " > and law.reviewed_by like concat('%',#{param.reviewedBy},'%') </if>
<if test= "param.remarks != null and param.remarks != '' " > and law.remarks like concat('%',#{param.remarks},'%') </if>
<if test= "param.deliverGoodsTime != null and param.deliverGoodsTime != '' " > and date_format(from_unixtime( lawo .deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null and param.discoveryTime != '' " > and date_format(from_unixtime(lawo .discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null and param.warehousingTime != '' " > and date_format(from_unixtime(lawo .warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null and param.deliveryTime != '' " > and date_format(from_unixtime( lawo .delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null and param.auditTime != '' " > and date_format(from_unixtime(lawo .audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null and param.entryTime != '' " > and date_format(from_unixtime(lawo .entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null and param.overTime != '' " > and date_format(from_unixtime(lawo .over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.deliverGoodsTime != null " > and date_format(from_unixtime( law.deliver_goods_time),'%Y-%m-%d') = date_format(#{param.deliverGoodsTime },'%Y-%m-%d') </if>
<if test= "param.discoveryTime != null " > and date_format(from_unixtime(law.discovery_time),'%Y-%m-%d') = date_format( #{param.discoveryTime},'%Y-%m-%d') </if>
<if test= "param.warehousingTime != null " > and date_format(from_unixtime(law.warehousing_time),'%Y-%m-%d') = date_format( #{param.warehousingTime},'%Y-%m-%d') </if>
<if test= "param.deliveryTime != null " > and date_format(from_unixtime( law.delivery_time),'%Y-%m-%d') = date_format(#{param.deliveryTime} param.deliveryTime,'%Y-%m-%d') </if>
<if test= "param.auditTime != null " > and date_format(from_unixtime(law.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test= "param.entryTime != null " > and date_format(from_unixtime(law.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test= "param.overTime != null " > and date_format(from_unixtime(law.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test= "param.brandName != null and param.brandName != '' " > and law.brand_name like concat('%',#{param.brandName},'%') </if>
</where>
@ -404,12 +413,22 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test= "param.vehicleRoute != null and param.vehicleRoute != ''" > and las.vehicle_route LIKE CONCAT('%', #{param.vehicleRoute}, '%')</if>
<if test= "param.indemnitor != null and param.indemnitor != ''" > and las.indemnitor LIKE CONCAT('%', #{param.indemnitor}, '%')</if>
<if test= "param.reason != null and param.reason != ''" > and las.reason LIKE CONCAT('%', #{param.reason}, '%')</if>
<if test= "param.createTime != null and param.createTime != '' " > and date_format(from_unixtime(las.create_time),'%Y-%m-%d') LIKE date_format(CONCAT('%', #{param.createTime}, '%'),'%Y-%m-%d')</if>
<if test= "param.createTime != null " > and date_format(from_unixtime(las.create_time),'%Y-%m-%d') LIKE date_format(CONCAT('%', #{param.createTime}, '%'),'%Y-%m-%d')</if>
<if test= "param.processNumber != null and param.processNumber != ''" > and las.process_number LIKE CONCAT('%', #{param.processNumber}, '%')</if>
</where>
</select>
<select id= "getAbnormalPackage" resultType= "java.lang.String" >
SELECT GROUP_CONCAT(DISTINCT ldsa.mall_id) AS combinedMallIds
FROM logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_aftersales_abnormal_package laap ON laap.package_code = ldpl.order_package_code
LEFT JOIN logpm_aftersales_work_order lawo ON laap.work_order_id = lawo.id
LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_basicdata_client lbc ON lbc.id = ldsa.mall_id
WHERE ldpl.is_deleted = 0
AND ldpl.order_package_code = #{orderCode}
</select>
<update id= "updateFinanceTime" >