|
|
|
@ -12,26 +12,28 @@ |
|
|
|
|
<select id="selectAllData" |
|
|
|
|
resultType="com.cjy.traceability.module.traceability.controller.admin.growrecord.vo.GrowRecordRespVO"> |
|
|
|
|
SELECT |
|
|
|
|
t1.cropper_id as cropperId, |
|
|
|
|
t5.block_name as blockName, |
|
|
|
|
t1.product_name AS productName, |
|
|
|
|
t1.cropper_id AS cropperId, |
|
|
|
|
t5.block_name AS blockName, |
|
|
|
|
t2.product_name AS productName, |
|
|
|
|
t3.species_name AS speciesName, |
|
|
|
|
t4.variety_name AS varietyName, |
|
|
|
|
t1.plant_time as plantTime, |
|
|
|
|
t1.end_time as endTime, |
|
|
|
|
t1.harvest_num as harvestNum, |
|
|
|
|
t2.create_time as create_time, |
|
|
|
|
t3.species_name as speciesName, |
|
|
|
|
t1.plant_time AS plantTime, |
|
|
|
|
t1.end_time AS endTime, |
|
|
|
|
t1.harvest_num AS harvestNum, |
|
|
|
|
t2.create_time AS create_time, |
|
|
|
|
t3.species_name AS speciesName, |
|
|
|
|
t1.production, |
|
|
|
|
t3.id as speciesId |
|
|
|
|
t3.id AS speciesId |
|
|
|
|
FROM |
|
|
|
|
traceability_grow_record t1 |
|
|
|
|
LEFT JOIN traceability_cropper t6 on t1.cropper_id=t6.product_id |
|
|
|
|
LEFT JOIN traceability_agricultural_product t2 ON t1.cropper_id = t2.id |
|
|
|
|
LEFT JOIN traceability_cropper t6 ON t1.cropper_id = t6.product_id |
|
|
|
|
LEFT JOIN traceability_cropper t7 ON t1.cropper_id = t7.id |
|
|
|
|
LEFT JOIN traceability_agricultural_product t2 ON t7.product_id = t2.id |
|
|
|
|
LEFT JOIN traceability_species t3 ON t6.species_id = t3.id |
|
|
|
|
LEFT JOIN traceability_variety t4 ON t2.product_variety = t4.id |
|
|
|
|
LEFT JOIN traceability_block t5 ON t1.block_id = t5.id |
|
|
|
|
where t1.deleted = 0 |
|
|
|
|
WHERE |
|
|
|
|
t1.deleted = 0 |
|
|
|
|
<if test="reqVO.productName !=null and reqVO.productName!=''"> |
|
|
|
|
and t2.product_name like concat('%',#{reqVO.productName},'%') |
|
|
|
|
</if> |
|
|
|
|