view_order_businesstimeMapper.xml 1.62 KB
Newer Older
lanbaoming's avatar
lanbaoming committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.delivery.mapper.view_order_businesstimeMapper">
    <select id="getOrderBusinessData"
            resultType="cn.iocoder.yudao.module.delivery.entity.orderdata.view_order_businesstime">
        select o.order_id                                           AS orderid,
               o.order_no                                           AS orderno,
               o.tidan_no                                           AS tidanno,
               o.transport_id                                       AS transportid,
               o.customer_id                                        AS customerid,
               o.is_cargo_control                                   AS iscargocontrol,
               o.order_type                                         AS ordertype,
               if((o.transport_id = 1), o.load_time, o.rucang_time) AS businesstime,
               o.sum_num                                            AS chargequantity,
               (select sum(ecw_order_pickup.pick_num)
                from ecw_order_pickup
                where (ecw_order_pickup.order_id = o.order_no))     AS picknum,
               o.sum_volume                                         AS chargevolume,
               o.sum_weight                                         AS chargeweight,
               if((o.transport_id = 1),
                  o.sum_volume, (o.sum_weight * 100))               AS vz
        from ecw_order o
        where o.deleted = 0
    </select>


</mapper>