|
|
|
@ -17,6 +17,7 @@ |
|
|
|
|
<result column="species_id" property="speciesId"/> |
|
|
|
|
<result column="authentication_pic" property="authenticationPic"/> |
|
|
|
|
<result column="position_str" property="positionStr"/> |
|
|
|
|
<result column="product_name" property="productName"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<select id="selectBlockCropPage" resultMap="BlockCropResult"> |
|
|
|
@ -24,9 +25,16 @@ |
|
|
|
|
(select GROUP_CONCAT(ifnull(t1.species_id,'')) from traceability_cropper t1 where t1.block_id = t2.id |
|
|
|
|
<if test="reqVO.speciesId !=null"> and t1.species_id =#{reqVO.speciesId}</if> |
|
|
|
|
and t1.deleted is false and t1.plant_end = 1 ) as species_id, |
|
|
|
|
(select GROUP_CONCAT(ifnull(t1.authentication_pic,'')) from traceability_cropper t1 where t1.block_id = t2.id |
|
|
|
|
(select GROUP_CONCAT(ifnull(t4.product_pic,'')) from traceability_cropper t1 |
|
|
|
|
left join traceability_agricultural_product t4 on t1.product_id = t4.id |
|
|
|
|
where t1.block_id = t2.id |
|
|
|
|
<if test="reqVO.speciesId !=null"> and t1.species_id =#{reqVO.speciesId}</if> |
|
|
|
|
and t1.deleted is false and t1.plant_end = 1) as authentication_pic |
|
|
|
|
and t1.deleted is false and t1.plant_end = 1) as authentication_pic, |
|
|
|
|
(select GROUP_CONCAT(ifnull(t4.product_name,'')) from traceability_cropper t1 |
|
|
|
|
left join traceability_agricultural_product t4 on t1.product_id = t4.id |
|
|
|
|
where t1.block_id = t2.id |
|
|
|
|
<if test="reqVO.speciesId !=null"> and t1.species_id =#{reqVO.speciesId}</if> |
|
|
|
|
and t1.deleted is false and t1.plant_end = 1) as product_name |
|
|
|
|
from traceability_block t2 |
|
|
|
|
<where> |
|
|
|
|
<if test="reqVO.blockName !=null and reqVO.blockName !=''"> and t2.block_name like concat('%',#{reqVO.blockName},'%')</if> |
|
|
|
|