| | |
| | | select ifnull(max(0+RIGHT(code,7)),0) from sys_traceability |
| | | where code like concat('%', #{pre},'%') |
| | | </select> |
| | | |
| | | <!--查询农产品采收记录信息--> |
| | | <select id="getRecoveryDetail" resultType="org.springblade.modules.recovery.vo.RecoveryVO"> |
| | | select sr.id,sr.strain_id strainId,sr.land_id landId,sr.time,ss.strain_name strainName,ss.url, |
| | | case |
| | | when sfp.plant = '0' then '有机' |
| | | when sfp.plant = 1 then '绿色' |
| | | when sfp.plant = 2 then '无公害' |
| | | else '普通' end as lx |
| | | from sys_recovery sr |
| | | left join sys_strain ss on sr.strain_id = ss.id |
| | | left join sys_farm_plant sfp on sfp.id = sr.farm_plant_id |
| | | where sr.id = #{recoveryId} |
| | | </select> |
| | | </mapper> |