智慧农业后台管理
guoshilong
2022-11-08 72b971c98c46531064d74b68fc8fe8864ed0b544
src/main/java/org/springblade/modules/soldrecord/mapper/SoldrecordMapper.xml
@@ -70,6 +70,7 @@
        st.specs1,
        st.amount1,
        st.create_time,
        str.time1,
        f.real_name as username,
        stf.factory_name AS factoryName,
        stf.type as stype,
@@ -95,16 +96,21 @@
        AND blade_dict_biz.tenant_id = #{soldrecord.codes}
    </if>) b ON b.dict_key = st.type
        LEFT JOIN ( SELECT id, real_name FROM blade_user ) f ON f.id=st.create_user
        LEFT JOIN sys_stockrecord str ON str.sr_id = st.id
        WHERE st.is_deleted = 0
        <if test="soldrecord.stockId1!=null and soldrecord.stockId1 != ''">
            and st.sid= #{soldrecord.stockId1}
        </if>
        <if test="soldrecord.deptId != null and soldrecord.deptId !=''">
            and str.dept_id = #{soldrecord.deptId}
        </if>
        ORDER BY st.create_time DESC
    </select>
    <update id="updateSold">
        update sys_soldr
        set amount1=#{amount}, census=#{census}
        where id = #{id}
        where sid = #{sid}
    </update>
    <delete id="delc">