From c83b580b0f51a2cdf16f2b1537aa3cb113ef112f Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期五, 20 十二月 2024 17:56:10 +0800 Subject: [PATCH] add: 花材销售统计商品分类 --- src/main/resources/mapper/payment/DeliveryOrderMapper.xml | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/resources/mapper/payment/DeliveryOrderMapper.xml b/src/main/resources/mapper/payment/DeliveryOrderMapper.xml index e679dc7..91e1e49 100644 --- a/src/main/resources/mapper/payment/DeliveryOrderMapper.xml +++ b/src/main/resources/mapper/payment/DeliveryOrderMapper.xml @@ -6,7 +6,10 @@ SELECT q.*, o.warehouse_name, o.warehouse_location_code, o.payment_time FROM t_delivery_order q join t_order o on q.order_id = o.id + left join t_warehouse w on o.warehouse_id=w.id + left join t_warehouse_location wl on o.warehouse_location_id=wl.id WHERE q.deleted = 0 and o.deleted = 0 +-- and w.deleted=0 and wl.deleted=0 and q.supplier_id = #{supplierId} <if test="condition.orderNo != null and condition.orderNo != ''"> AND q.order_no LIKE concat('%', #{condition.orderNo},'%') @@ -24,12 +27,13 @@ <!-- AND q.create_time <= #{condition.endDate}--> <!-- </if>--> <if test="condition.startDate != null"> - AND o.payment_time > #{condition.startDate} + AND o.payment_time >= #{condition.startDate} </if> <if test="condition.endDate != null"> - AND o.payment_time <= #{condition.endDate} + AND o.payment_time < #{condition.endDate} </if> - ORDER BY o.payment_time +-- ORDER BY o.payment_time + order by w.seq,wl.seq asc </select> <select id="selectDoStationList" resultType="com.mzl.flower.dto.response.payment.DeliveryOrderStationListDTO"> @@ -143,10 +147,10 @@ <!-- AND q.create_time <= #{condition.endDate}--> <!-- </if>--> <if test="condition.startDate != null"> - AND o.payment_time > #{condition.startDate} + AND o.payment_time >= #{condition.startDate} </if> <if test="condition.endDate != null"> - AND o.payment_time <= #{condition.endDate} + AND o.payment_time < #{condition.endDate} </if> ) tt GROUP BY tt.id, tt.supplierName, tt.supplierTel, tt.stationName @@ -196,10 +200,10 @@ <!-- AND q.create_time <= #{condition.endDate}--> <!-- </if>--> <if test="condition.startDate != null"> - AND o.payment_time > #{condition.startDate} + AND o.payment_time >= #{condition.startDate} </if> <if test="condition.endDate != null"> - AND o.payment_time <= #{condition.endDate} + AND o.payment_time < #{condition.endDate} </if> ORDER BY q.arrive_time @@ -238,10 +242,10 @@ <!-- AND o.create_time <= #{endDate}--> <!-- </if>--> <if test="startDate != null"> - AND t.payment_time > #{startDate} + AND t.payment_time >= #{startDate} </if> <if test="endDate != null"> - AND t.payment_time <= #{endDate} + AND t.payment_time < #{endDate} </if> <if test="statusList != null and statusList.size > 0"> -- Gitblit v1.9.3