智慧农业后台管理
guoshilong
2022-08-19 4d60a2ee6bbfe76e2740307c832c8f309090a41e
src/main/java/org/springblade/modules/processInv/mapper/ProcessInvMapper.xml
@@ -35,9 +35,16 @@
        </if>
    </select>
    <select id="selectBy2Id" resultType="org.springblade.modules.processInv.entity.ProcessInv">
    <select id="selectBySPId" resultType="org.springblade.modules.processInv.entity.ProcessInv">
        SELECT id,strain_id,product_id,product_inventory_num,create_time,update_user,update_time,status,is_deleted
        FROM sys_process_inv WHERE strain_id = #{strainId} AND product_id = #{productId}
        FROM sys_process_inv
        WHERE is_deleted = 0 AND strain_id = #{strainId} AND product_id = #{productId}
    </select>
    <select id="selectBySFId" resultType="org.springblade.modules.processInv.entity.ProcessInv">
        SELECT id,strain_id,product_id,product_inventory_num,create_time,update_user,update_time,status,is_deleted
        FROM sys_process_inv
        WHERE is_deleted = 0 AND strain_id = #{strainId} AND product_id = #{fpsId}
    </select>
    <insert id="add">
@@ -67,4 +74,14 @@
    <delete id="del">
        DELETE FROM sys_process_inv WHERE id = #{id}
    </delete>
    <select id="getLand" resultType="org.springblade.modules.processInv.vo.ProcessInvVO">
        SELECT inv.id,inv.fps_id,fps.land_id
        FROM sys_process_inv inv
        LEFT JOIN sys_farm_product_stock fps ON inv.fps_id = fps.id
        WHERE inv.is_deleted = 0
        <if test="processInv.id != null and processInv.id != ''">
            AND inv.id = #{processInv.id}
        </if>
    </select>
</mapper>