Partially filled limit order

When the pending order price is outside the price range of LP (buy limit order > LP price, sell limit order < LP price), first exchange the LP price to the order closest to the LP price in the opposite direction, eat the order, and then continue to swap to the next order that is closest to the LP price, eat the order until the LP price is equal to the pending order price, and then use the remaining number of tokens to generate a limit order at the pending order price in the order book