| | |
| | | *, |
| | | ifnull(sum(fgi.quantity_available),0) as goodsQuantity |
| | | from |
| | | `order` as o |
| | | sd.`order` as o |
| | | left join mm.finished_goods_inventory as fgi |
| | | on o.order_id = fgi.order_id |
| | | where date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | <if test="order.delivery != null "> |
| | | and o.delivery = #{order.delivery} |
| | | </if> |
| | | <if test="order.processReview != null "> |
| | | and o.process_review = #{order.processReview} |
| | | </if> |
| | | <if test="order.orderReview != null "> |
| | | and o.order_review = #{order.orderReview} |
| | | </if> |
| | | <if test="order.productionOrder != null "> |
| | | and o.production_order = #{order.productionOrder} |
| | | </if> |
| | | <if test="order.processingCard != null "> |
| | | and o.processing_card = #{order.processingCard} |
| | | </if> |
| | | <if test="order.warehousing != null "> |
| | | and o.warehousing = #{order.warehousing} |
| | | </if> |
| | | group by o.id |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | |
| | | from |
| | | `order` as o |
| | | where date (o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="orderType!= null and orderType != ''"> |
| | | <if test="orderType!= null and orderType != 0"> |
| | | and o.create_order = #{orderType} |
| | | </if> |
| | | |
| | |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | <if test="order.delivery != null "> |
| | | and o.delivery = #{order.delivery} |
| | | </if> |
| | | <if test="order.processReview != null "> |
| | | and o.process_review = #{order.processReview} |
| | | </if> |
| | | <if test="order.orderReview != null "> |
| | | and o.order_review = #{order.orderReview} |
| | | </if> |
| | | <if test="order.productionOrder != null "> |
| | | and o.production_order = #{order.productionOrder} |
| | | </if> |
| | | <if test="order.processingCard != null "> |
| | | and o.processing_card = #{order.processingCard} |
| | | </if> |
| | | <if test="order.warehousing != null "> |
| | | and o.warehousing = #{order.warehousing} |
| | | </if> |
| | | order by o.id desc |
| | | </select> |
| | | |