智慧农业后台管理
guoshilong
2022-07-26 4f6f313d842301106ac9dc79bf39d5ba5f571899
src/main/java/org/springblade/modules/stock/mapper/StockMapper.xml
@@ -26,9 +26,7 @@
    <select id="selectStockPage" resultMap="stockResultMap">
        select *
        from sys_stock
        where is_deleted = 0
        select * from sys_stock where is_deleted = 0
    </select>
    <select id="selectLists" resultType="org.springblade.modules.stock.vo.StockVO">
@@ -62,6 +60,9 @@
        </if>
        <if test="stock.specsValue1!=null and stock.specsValue1 != ''">
            and st.specs_value1 = #{stock.specsValue1}
        </if>
        <if test="stock.year!=null and stock.year != ''">
            and st.create_time like concat('%',#{stock.year},'%')
        </if>
        <if test="stock.specsValue2!=null and stock.specsValue2 != ''">
            and st.specs_value2 = #{stock.specsValue2}
@@ -151,8 +152,11 @@
        stf.agricultural_name,
        stf.factory_name
        FROM sys_stockrecord st
        LEFT JOIN (SELECT id, agricultural_name, factory_name FROM sys_stockfactory) stf
        LEFT JOIN (SELECT id, agricultural_name, factory_name,type FROM sys_stockfactory) stf
        ON st.stock_id1 = stf.id
        <if test="stock.stockType !=null and stock.stockType != '' ">
            WHERE stf.type =#{stock.stockType}
        </if>
        GROUP BY stf.id,
        stf.agricultural_name,
        stf.factory_name