智慧农业后台管理
guoshilong
2022-08-12 be9da335cb28e12e1439c24e4596f069e342d83f
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>
@@ -111,5 +115,14 @@
        FROM `sys_soldr`
        WHERE sid = #{sid}
    </select>
<!--    根据stockId、specs1、specs_val1、specs_val2、sid-->
    <select id="getByServalParam" resultType="org.springblade.modules.soldr.entity.Soldr">
        SELECT * FROM sys_soldr WHERE
        stock_id1 = #{stockId1} and specs1=#{specs1} and specs_val1=#{specsVal1} and specs_val2=#{specsVal2} and sid=#{sid} and type=#{type} and is_deleted=0
    </select>
    <update id="cancelDel">
        UPDATE sys_soldr SET is_deleted = 0 WHERE id = #{id}
    </update>
</mapper>