智慧农业后台管理
guoshilong
2022-09-27 d1dfff01c9a4d0e502596f575a227ee78cfbb15b
src/main/java/org/springblade/modules/processInv/mapper/ProcessInvMapper.xml
@@ -96,14 +96,12 @@
    <select id="statisticsStock" resultType="java.lang.Double">
        SELECT SUM(inv.product_inventory_num) as sum
        FROM sys_process_inv inv
        LEFT JOIN sys_farm_product_stock sfps ON sfps.id = inv.fps_id
        LEFT JOIN sys_land land ON land.id = sfps.land_id
        WHERE 1=1 AND inv.is_deleted = 0
        <if test="year!=null and year!=''">
            and YEAR ( inv.create_time ) = #{year}
        </if>
        <if test="farmId!=null and farmId!=''">
            and land.farm_id = #{farmId}
            and inv.fps_id = #{farmId}
        </if>
    </select>
    <select id="selectByFarmIdProductId" resultType="org.springblade.modules.processInv.entity.ProcessInv">