| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义查询溯源码分页数据--> |
| | | <select id="selectTraceabilityXcxPage" resultType="org.springblade.modules.traceability.vo.TraceabilityVO"> |
| | | select a.id,a.code,c.land_name as landName,c.id as landId,a.product_name productName, |
| | | a.create_time createTime,d.url,d.strain_name AS strainName,b.create_time AS recoveryTime from sys_traceability a |
| | | LEFT JOIN sys_recovery b ON a.recovery_id = b.id |
| | | LEFT JOIN sys_land c ON b.land_id = c.id |
| | | LEFT JOIN sys_strain d ON b.strain_id = d.id |
| | | where 1=1 |
| | | <if test="traceability.code!=null and traceability.code!=''"> |
| | | and a.code like concat('%',#{traceability.code},'%') |
| | | </if> |
| | | <if test="traceability.farmId!=null and traceability.farmId!=''"> |
| | | and c.farm_id = #{traceability.farmId} |
| | | </if> |
| | | <if test="traceability.tenantId!=null and traceability.tenantId!=''"> |
| | | and a.tenant_id = #{traceability.tenantId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义查询溯源码数据,不分页--> |
| | | <select id="getTraceabilityList" resultType="org.springblade.modules.traceability.vo.TraceabilityVO"> |
| | | select st.* from sys_traceability st |