|
|
@@ -49,16 +49,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="nickName" column="nick_name" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
<result property="pdfUrl" column="pdf_url" />
|
|
|
+ <result property="totalAmount" column="total_amount" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBizWaybillOrderVo">
|
|
|
select bwo.waybill_id, bwo.waybill_no, bwo.external_waybill_no, bwo.order_type, bwo.sender_name, bwo.sender_phone, bwo.sender_province, bwo.sender_city, bwo.sender_county, bwo.sender_address, bwo.receiver_name,
|
|
|
bwo.receiver_phone, bwo.receiver_province, bwo.receiver_city, bwo.receiver_county, bwo.receiver_address, bwo.goods_name, bwo.goods_weight, bwo.goods_volume, bwo.goods_qty, bwo.order_status, bwo.pickup_type,
|
|
|
bwo.send_start_time, bwo.send_end_time, bwo.pickup_time, bwo.delivery_time, bwo.sign_time, bwo.cancel_reason, bwo.parent_waybill_id, bwo.invoice_flag, bwo.adjust_flag, bwo.remark, bwo.create_time, bwo.update_time,
|
|
|
- bwo.del_flag, bwo.create_by, bwo.update_by, bwo.dept_id, bwo.user_id, bwo.product_code, bwo.added_service, u.nick_name, d.dept_name, bwo.pdf_url
|
|
|
+ bwo.del_flag, bwo.create_by, bwo.update_by, bwo.dept_id, bwo.user_id, bwo.product_code, bwo.added_service, u.nick_name, d.dept_name, bwo.pdf_url,
|
|
|
+ sum(bwcd.amount) as total_amount
|
|
|
from biz_waybill_order bwo
|
|
|
left join sys_user u on bwo.user_id = u.user_id
|
|
|
left join sys_dept d on bwo.dept_id = d.dept_id
|
|
|
+ left join biz_waybill_cost_details bwcd on bwo.waybill_id = bwcd.waybill_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBizWaybillOrderList" parameterType="com.ruoyi.logistics.domain.BizWaybillOrder" resultMap="BizWaybillOrderResult">
|
|
|
@@ -99,10 +102,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sender_phone like concat('%', #{searchKeyword}, '%') or
|
|
|
receiver_name like concat('%', #{searchKeyword}, '%') or
|
|
|
receiver_phone like concat('%', #{searchKeyword}, '%'))</if>
|
|
|
-
|
|
|
+ <if test="nickName != null and nickName != ''"> and u.nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
+ <if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
+ and date_format(bwo.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
+ and date_format(bwo.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
|
|
|
+ </if>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
+ group by bwo.waybill_id
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
|