智慧农业后台管理
guoshilong
2022-08-15 8e65eb751d8e3c18d9d2134df084d349e55f1985
src/main/java/org/springblade/modules/soldr/mapper/SoldrMapper.xml
@@ -37,7 +37,8 @@
        a.dict_value AS stype,
        d.dict_value AS dic1,
        c.dict_value AS dic2,
        stf.agricultural_name as agrname
        stf.agricultural_name as agrname,
        st.dept_id
        FROM sys_soldr st
        LEFT JOIN sys_stockfactory stf ON stf.id = st.stock_id1
        LEFT JOIN (SELECT dict_key, dict_value
@@ -61,6 +62,9 @@
        </if>
        <if test="soldr.stockId1!=null and soldr.stockId1 != ''">
            and st.stock_id1 = #{soldr.stockId1}
        </if>
        <if test="soldr.deptId != null and soldr.deptId !=''">
            AND st.dept_id = #{soldr.deptId}
        </if>
    </select>
@@ -103,6 +107,9 @@
                            WHERE CODE = 'stockType' AND is_deleted = 0) a ON
            a.dict_key = stf.type
        WHERE st.is_deleted = 0
        <if test="farmId != null and farmId !=''">
            AND st.dept_id = #{farmId}
        </if>
    </select>
    <!--查询是否存在已出库农资-->