智慧农业后台管理
tangzy
2022-06-29 1d98074869643dcf23b40d99e0f24b6048fc6ff0
src/main/java/org/springblade/modules/farm/mapper/FarmingRecordMapper.xml
@@ -28,6 +28,39 @@
        <if test="farmingRecord.tenantId!=null and farmingRecord.tenantId!=''">
            and sfr.tenant_id = #{farmingRecord.tenantId}
        </if>
        <if test="farmingRecord.strainId!=null and farmingRecord.strainId!=''">
            and sfr.strain_id = #{farmingRecord.strainId}
        </if>
    </select>
    <select id="selectFarmingRecordPages" resultType="org.springblade.modules.farm.vo.FarmingRecordVO">
        select sfr.*,sl.land_name landName from sys_farming_record sfr
        left join sys_land sl on sl.id = sfr.land_id
        where 1=1
        <if test="farmingRecord.landId!=null and farmingRecord.landId!=''">
            and sfr.land_id = #{farmingRecord.landId}
        </if>
        <if test="farmingRecord.type!=null and farmingRecord.type!=''">
            and sfr.type = #{farmingRecord.type}
        </if>
        <if test="farmingRecord.stockId!=null and farmingRecord.stockId!=''">
            and sfr.stock_id = #{farmingRecord.stockId}
        </if>
        <if test="farmingRecord.jobWay!=null and farmingRecord.jobWay!=''">
            and sfr.job_way = #{farmingRecord.jobWay}
        </if>
        <if test="farmingRecord.operator!=null and farmingRecord.operator!=''">
            and sfr.operator = #{farmingRecord.operator}
        </if>
        <if test="farmingRecord.deptId!=null and farmingRecord.deptId!=''">
            and sfr.dept_id = #{farmingRecord.deptId}
        </if>
        <if test="farmingRecord.tenantId!=null and farmingRecord.tenantId!=''">
            and sfr.tenant_id = #{farmingRecord.tenantId}
        </if>
        <if test="farmingRecord.strainId!=null and farmingRecord.strainId!=''">
            and sfr.strain_id = #{farmingRecord.strainId}
        </if>
    </select>
    <!--查询统计本年农事记录操作总数-->