chenlu
2024-12-02 e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
@@ -58,7 +58,7 @@
        ms.json
        from mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id
        <where>
                date(mi.create_time)>=#{startDate} and date(mi.create_time) &lt;= #{endDate} and mi.available_quantity>0
                 and mi.available_quantity>0
        </where>
        order by mi.id desc
@@ -72,7 +72,7 @@
        from
        mm.material_inventory mi
        <where>
                date(mi.create_time)>=#{startDate} and date(mi.create_time) &lt;= #{endDate} and mi.available_quantity>0
                 and mi.available_quantity>0
        </where>
        limit #{offset},#{pageSize};
@@ -562,11 +562,23 @@
    </delete>
    <select id="getMaximum" >
        select count(*) from mm.material_outbound where  date(create_time)=CURDATE()
        select
            ifnull(SUBSTR(max(right(material_outbound_id,8)) from 7),0)
        from
            mm.material_outbound as a
        where
            date(a.create_time) = curdate()
    </select>
    <select id="getMaximums" >
        select count(*) from mm.returning_warehouse where  date(create_time)=CURDATE()
        select
            ifnull(SUBSTR(max(right(returning_id,8)) from 7),0)
        from
            mm.returning_warehouse as a
        where
            date(a.create_time) = curdate()
    </select>
    <select id="getMaterialOutboundCount" >
@@ -1051,5 +1063,19 @@
    </select>
    <select id="deleteMaterialInventory">
        delete from
        mm.material_inventory mi
        <where>
            <if test="ids != null and ids != ''">
                and mi.id in
                <foreach item="id" collection="ids" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </if>
        </where>
    </select>
</mapper>