|
|
@@ -1232,6 +1232,85 @@
|
|
|
case when a.ent_id = e.top_ent_id then 1 ELSE 2 end as createType
|
|
|
</sql>
|
|
|
|
|
|
+ <sql id="Query_Column_List_Accept_Carriage_v42">
|
|
|
+ a.id AS lOrderId,
|
|
|
+ a.l_order_no AS lOrderNo,
|
|
|
+ a.t_order_id AS tOrderId,
|
|
|
+ a.t_order_no AS tOrderNo,
|
|
|
+ a.loss AS loss,
|
|
|
+ a.loss_unit AS lossUnit,
|
|
|
+ a.settlement_cycle AS accountsCycle,
|
|
|
+ a.billing_mode AS billingMode,
|
|
|
+ a.amount AS carryingCapacity,
|
|
|
+ a.goods_price AS goodsPrice,
|
|
|
+ a.goods_price_unit AS goodsPriceUnit,
|
|
|
+ a.`status` AS status,
|
|
|
+ a.settlement_cycle AS settlementCycle,
|
|
|
+ a.price AS price,
|
|
|
+ a.price_type AS priceType,
|
|
|
+ a.type AS orderSource,
|
|
|
+ a.unit AS unit,
|
|
|
+ a.subcontract_amount AS subcontractAmount,
|
|
|
+ a.entrust_amount AS entrustAmount,
|
|
|
+ a.unload_amount AS unloadAmount,
|
|
|
+ a.load_amount AS loadAmount,
|
|
|
+ a.ignore_amount AS ignoreAmount,
|
|
|
+ a.deficit_amount AS deficitAmount,
|
|
|
+ a.deficit_price AS deficitPrice,
|
|
|
+ a.total_load_amount AS totalLoadAmount,
|
|
|
+ a.total_unload_amount AS totalUnloadAmount,
|
|
|
+ a.payment AS payment,
|
|
|
+ a.tax_rate AS taxRate,
|
|
|
+ a.ent_id AS entId,
|
|
|
+ a.create_by AS createBy,
|
|
|
+ a.create_time AS createTime,
|
|
|
+ a.update_by AS updateBy,
|
|
|
+ a.update_time AS updateTime,
|
|
|
+ a.start_time AS shipmentsDateTime,
|
|
|
+ a.end_time AS receiveGoodsDateTime,
|
|
|
+ a.remark AS remark,
|
|
|
+ g.goods_id AS goodsId,
|
|
|
+ g.goods_name AS goodsName,
|
|
|
+ g.goods_type AS goodsType,
|
|
|
+ f.contract_id AS contractId,
|
|
|
+ f.contract_no AS contractNo,
|
|
|
+ f.signing_way AS signing,
|
|
|
+ d.ent_id AS consignCompanyId,
|
|
|
+ d.top_ent_id AS consignTopEntId,
|
|
|
+ d.firm_name AS consignCompany,
|
|
|
+ d.contacts AS consignContacts,
|
|
|
+ d.contacts_id AS consignContactsId,
|
|
|
+ e.contacts_id AS carrierContactsId,
|
|
|
+ d.phone AS consignPhone,
|
|
|
+ e.ent_id AS carrierCompanyId,
|
|
|
+ e.firm_name AS carrierCompany,
|
|
|
+ e.top_ent_id AS carrierTopEntId,
|
|
|
+ e.contacts AS carrierContacts,
|
|
|
+ e.phone AS carrierPhone,
|
|
|
+<!-- b.`name` AS loadName,-->
|
|
|
+<!-- b.address_type AS loadType,-->
|
|
|
+<!-- b.city_name AS loadCityName,-->
|
|
|
+<!-- b.city_code AS loadCityCode,-->
|
|
|
+<!-- b.detail_address AS loadAddress,-->
|
|
|
+<!-- b.contacts AS shipmentsContacts,-->
|
|
|
+<!-- b.phone AS shipmentsPhone,-->
|
|
|
+<!-- b.lat AS loadLat,-->
|
|
|
+<!-- b.lng AS loadLng,-->
|
|
|
+<!-- c.`name` AS unloadName,-->
|
|
|
+<!-- c.address_type AS unloadType,-->
|
|
|
+<!-- c.contacts AS receiveGoodsContacts,-->
|
|
|
+<!-- c.phone AS receiveGoodsPhone,-->
|
|
|
+<!-- c.city_name AS unloadCityName,-->
|
|
|
+<!-- c.city_code AS unloadCityCode,-->
|
|
|
+<!-- c.detail_address AS unloadAddress,-->
|
|
|
+<!-- c.lat AS unloadLat,-->
|
|
|
+<!-- c.lng AS unloadLng,-->
|
|
|
+ f.contract_name as contract
|
|
|
+ ,
|
|
|
+ a.del_flag as delFlag,
|
|
|
+ case when a.ent_id = e.top_ent_id then 1 ELSE 2 end as createType
|
|
|
+ </sql>
|
|
|
+
|
|
|
<sql id="Query_Column_List_Cogsign">
|
|
|
a.id AS lOrderId,
|
|
|
a.l_order_no AS lOrderNo,
|
|
|
@@ -1385,6 +1464,62 @@
|
|
|
contract,
|
|
|
createType
|
|
|
</sql>
|
|
|
+ <sql id="New_Query_Column_List_v42">
|
|
|
+ lOrderId,
|
|
|
+ lOrderNo,
|
|
|
+ tOrderId,
|
|
|
+ tOrderNo,
|
|
|
+ loss,
|
|
|
+ lossUnit,
|
|
|
+ accountsCycle,
|
|
|
+ billingMode,
|
|
|
+ carryingCapacity,
|
|
|
+ goodsPrice,
|
|
|
+ goodsPriceUnit,
|
|
|
+ STATUS,
|
|
|
+ settlementCycle,
|
|
|
+ price,
|
|
|
+ priceType,
|
|
|
+ orderSource,
|
|
|
+ unit,
|
|
|
+ subcontractAmount,
|
|
|
+ entrustAmount,
|
|
|
+ unloadAmount,
|
|
|
+ loadAmount,
|
|
|
+ ignoreAmount,
|
|
|
+ deficitAmount,
|
|
|
+ deficitPrice,
|
|
|
+ totalLoadAmount,
|
|
|
+ totalUnloadAmount,
|
|
|
+ payment,
|
|
|
+ taxRate,
|
|
|
+ entId,
|
|
|
+ createBy,
|
|
|
+ createTime,
|
|
|
+ updateBy,
|
|
|
+ updateTime,
|
|
|
+ shipmentsDateTime,
|
|
|
+ receiveGoodsDateTime,
|
|
|
+ remark,
|
|
|
+ goodsId,
|
|
|
+ goodsName,
|
|
|
+ goodsType,
|
|
|
+ contractId,
|
|
|
+ contractNo,
|
|
|
+ signing,
|
|
|
+ consignCompanyId,
|
|
|
+ consignTopEntId,
|
|
|
+ consignCompany,
|
|
|
+ consignContacts,
|
|
|
+ consignPhone,
|
|
|
+ carrierCompanyId,
|
|
|
+ carrierCompany,
|
|
|
+ carrierTopEntId,
|
|
|
+ carrierContacts,
|
|
|
+ carrierPhone shipmentsContacts,
|
|
|
+ contract,
|
|
|
+ createType
|
|
|
+ </sql>
|
|
|
|
|
|
<select id="selectLogisticsOrderList" resultType="com.sckw.transport.model.vo.AcceptCarriageOrderVO">
|
|
|
SELECT
|
|
|
@@ -2273,11 +2408,15 @@
|
|
|
<select id="selectLogisticsOrderListByAcceptCarriage"
|
|
|
resultType="com.sckw.transport.model.vo.AcceptCarriageOrderVO">
|
|
|
SELECT
|
|
|
- <include refid="New_Query_Column_List">
|
|
|
+<!-- <include refid="New_Query_Column_List">-->
|
|
|
+<!-- </include>-->
|
|
|
+ <include refid="New_Query_Column_List_v42">
|
|
|
</include>
|
|
|
FROM (
|
|
|
SELECT
|
|
|
- <include refid="Query_Column_List_Accept_Carriage">
|
|
|
+<!-- <include refid="Query_Column_List_Accept_Carriage">-->
|
|
|
+<!-- </include>-->
|
|
|
+ <include refid="Query_Column_List_Accept_Carriage_v42">
|
|
|
</include>
|
|
|
FROM kwt_logistics_order a
|
|
|
LEFT JOIN kwt_logistics_order_address b ON a.id = b.l_order_id
|
|
|
@@ -2291,7 +2430,7 @@
|
|
|
LEFT JOIN kwt_logistics_order_goods g ON a.id = g.l_order_id AND g.del_flag = 0
|
|
|
LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
|
|
|
<where>
|
|
|
- a.del_flag = 0
|
|
|
+ a.del_flag = 0 and f.del_flag = 0
|
|
|
<if test="query.keywords != null and query.keywords != ''">
|
|
|
and (
|
|
|
a.t_order_no like concat('%', #{query.keywords}, '%')
|