智慧农业后台管理
guoshilong
2022-08-12 e7f5c0e502a89b2f91c4b57f42c56d7eb2484563
src/main/java/org/springblade/modules/InventoryLoss/mapper/InventoryMapper.xml
@@ -16,10 +16,14 @@
        from sys_inventory inventory
        LEFT JOIN sys_strain strain on inventory.strain_id = strain.id
        LEFT JOIN blade_dict_biz bdb ON inventory.reason = bdb.dict_key
        LEFT JOIN sys_land land ON land.id = inventory.land_id
        where
        <if test="inventory.strainId !=null and inventory.strainId != '' ">
            inventory.strain_id = #{inventory.strainId} AND
        </if>
        <if test="inventory.farmId != null and inventory.farmId !='' ">
            land.farm_id = #{inventory.farmId} AND
        </if>
              bdb.code = "lossReason" AND inventory.is_deleted = 0 ORDER BY inventory.create_time DESC
    </select>