|
|
|
@ -70,13 +70,16 @@ |
|
|
|
|
t3.species_name, |
|
|
|
|
t2.block_name, |
|
|
|
|
t4.quality_result, |
|
|
|
|
t4.quality_inspection |
|
|
|
|
t4.quality_inspection, |
|
|
|
|
t4.authentication_type, |
|
|
|
|
t5.product_pic |
|
|
|
|
FROM |
|
|
|
|
traceability_recovery_record t |
|
|
|
|
LEFT JOIN traceability_cropper t1 ON t1.id = t.cropper_id |
|
|
|
|
LEFT JOIN traceability_block t2 ON t2.id = t1.block_id |
|
|
|
|
LEFT JOIN traceability_species t3 ON t3.id = t1.species_id |
|
|
|
|
LEFT JOIN traceability_product t4 ON t4.cropper_id = t.cropper_id AND t4.batch = t.batch |
|
|
|
|
LEFT JOIN traceability_agricultural_product t5 ON t5.id = t1.product_id |
|
|
|
|
<where> |
|
|
|
|
<if test="reqVO.productName != null and reqVO.productName != ''"> AND t.product_name LIKE CONCAT( '%', #{reqVO.productName}, '%' )</if> |
|
|
|
|
<if test="reqVO.batch != null and reqVO.batch != ''"> AND t.batch = #{reqVO.batch}</if> |
|
|
|
|