|
@@ -107,77 +107,77 @@
|
|
|
<select id="getListByConditionApp" parameterType="Map"
|
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.PurchaseOrder">
|
|
|
SELECT * FROM (
|
|
|
- SELECT
|
|
|
- p.id,
|
|
|
- p.contract_no as contractNo,
|
|
|
- p.procurement_plan as procurementPlan,
|
|
|
- p.plan_id as planId,
|
|
|
- p.order_type as orderType,
|
|
|
- p.goods_name as goodsName,
|
|
|
- p.unit_price as unitPrice,
|
|
|
- p.basis,
|
|
|
- p.freezing_deposit as freezingDeposit,
|
|
|
- p.default_deposit as defaultDeposit,
|
|
|
- p.unloading_charge as unloadingCharge,
|
|
|
- p.invoice_fee as invoiceFee,
|
|
|
- p.open_position as openPosition,
|
|
|
- p.closed_position as closedPosition,
|
|
|
- p.cumulative_turnover as cumulativeTurnover,
|
|
|
- p.trading_target as tradingTarget,
|
|
|
- p.transactions_number as transactionsNumber,
|
|
|
- p.packing_type as packingType,
|
|
|
- p.packing_type_key as packingTypeKey,
|
|
|
- p.bagging_notes as baggingNotes,
|
|
|
- p.type,
|
|
|
- p.type_key as typeKey,
|
|
|
- p.status,
|
|
|
- p.update_date as updateDate,
|
|
|
- p.create_date as createDate,
|
|
|
- i.buyer as contracter,
|
|
|
- i.procurement_plan_type as procurementPlanType,
|
|
|
- c.address_url as addressUrl
|
|
|
- FROM purchase_order p
|
|
|
- left join procurement_plan_info i on p.procurement_plan=i.procurement_plan_no
|
|
|
- left join contract_management_info c on c.contract_no = p.contract_no
|
|
|
- WHERE
|
|
|
- p.delete_flag = '0'
|
|
|
- AND p.common_id = #{commonId}
|
|
|
- UNION ALL
|
|
|
- SELECT
|
|
|
- s.id,
|
|
|
- s.contract_no as contractNo,
|
|
|
- s.sale_plan as procurementPlan,
|
|
|
- s.plan_id as planId,
|
|
|
- s.order_type as orderType,
|
|
|
- s.goods_name as goodsName,
|
|
|
- s.unit_price as unitPrice,
|
|
|
- s.basis,
|
|
|
- s.freezing_deposit as freezingDeposit,
|
|
|
- s.default_deposit as defaultDeposit,
|
|
|
- s.unloading_charge as unloadingCharge,
|
|
|
- s.invoice_fee as invoiceFee,
|
|
|
- s.open_position as openPosition,
|
|
|
- s.closed_position as closedPosition,
|
|
|
- s.cumulative_turnover as cumulativeTurnover,
|
|
|
- s.trading_target as tradingTarget,
|
|
|
- s.transactions_number as transactionsNumber,
|
|
|
- s.packing_type as packingType,
|
|
|
- s.packing_type_key as packingTypeKey,
|
|
|
- s.bagging_notes as baggingNotes,
|
|
|
- s.type,
|
|
|
- s.type_key as typeKey,
|
|
|
- s.status,
|
|
|
- s.update_date as updateDate,
|
|
|
- s.create_date as createDate,
|
|
|
- i.seller as contracter,
|
|
|
- i.sale_plan_type as procurementPlanType,
|
|
|
- c.address_url as addressUrl
|
|
|
- FROM sale_order s
|
|
|
- left join sale_plan_info i on s.sale_plan=i.sale_plan_no
|
|
|
- left join contract_management_info c on c.contract_no = s.contract_no
|
|
|
- WHERE
|
|
|
- s.delete_flag = '0'
|
|
|
- AND s.common_id = #{commonId}
|
|
|
+ SELECT
|
|
|
+ p.id,
|
|
|
+ p.contract_no as contractNo,
|
|
|
+ p.procurement_plan as procurementPlan,
|
|
|
+ p.plan_id as planId,
|
|
|
+ p.order_type as orderType,
|
|
|
+ p.goods_name as goodsName,
|
|
|
+ IFNULL(c.point_price,p.unit_price) as unitPrice,
|
|
|
+ IFNULL(c.basis_price,p.basis) as basis,
|
|
|
+ p.freezing_deposit as freezingDeposit,
|
|
|
+ p.default_deposit as defaultDeposit,
|
|
|
+ p.unloading_charge as unloadingCharge,
|
|
|
+ p.invoice_fee as invoiceFee,
|
|
|
+ p.open_position as openPosition,
|
|
|
+ p.closed_position as closedPosition,
|
|
|
+ p.cumulative_turnover as cumulativeTurnover,
|
|
|
+ p.trading_target as tradingTarget,
|
|
|
+ p.transactions_number as transactionsNumber,
|
|
|
+ p.packing_type as packingType,
|
|
|
+ p.packing_type_key as packingTypeKey,
|
|
|
+ p.bagging_notes as baggingNotes,
|
|
|
+ p.type,
|
|
|
+ p.type_key as typeKey,
|
|
|
+ p.status,
|
|
|
+ p.update_date as updateDate,
|
|
|
+ p.create_date as createDate,
|
|
|
+ i.buyer as contracter,
|
|
|
+ i.procurement_plan_type as procurementPlanType,
|
|
|
+ c.address_url as addressUrl
|
|
|
+ FROM purchase_order p
|
|
|
+ left join procurement_plan_info i on p.procurement_plan=i.procurement_plan_no
|
|
|
+ left join contract_management_info c on c.contract_no = p.contract_no
|
|
|
+ WHERE
|
|
|
+ p.delete_flag = '0'
|
|
|
+ AND p.common_id = #{commonId}
|
|
|
+ UNION ALL
|
|
|
+ SELECT
|
|
|
+ s.id,
|
|
|
+ s.contract_no as contractNo,
|
|
|
+ s.sale_plan as procurementPlan,
|
|
|
+ s.plan_id as planId,
|
|
|
+ s.order_type as orderType,
|
|
|
+ s.goods_name as goodsName,
|
|
|
+ IFNULL(c.point_price,s.unit_price) as unitPrice,
|
|
|
+ IFNULL(c.basis_price,s.basis) as basis,
|
|
|
+ s.freezing_deposit as freezingDeposit,
|
|
|
+ s.default_deposit as defaultDeposit,
|
|
|
+ s.unloading_charge as unloadingCharge,
|
|
|
+ s.invoice_fee as invoiceFee,
|
|
|
+ s.open_position as openPosition,
|
|
|
+ s.closed_position as closedPosition,
|
|
|
+ s.cumulative_turnover as cumulativeTurnover,
|
|
|
+ s.trading_target as tradingTarget,
|
|
|
+ s.transactions_number as transactionsNumber,
|
|
|
+ s.packing_type as packingType,
|
|
|
+ s.packing_type_key as packingTypeKey,
|
|
|
+ s.bagging_notes as baggingNotes,
|
|
|
+ s.type,
|
|
|
+ s.type_key as typeKey,
|
|
|
+ s.status,
|
|
|
+ s.update_date as updateDate,
|
|
|
+ s.create_date as createDate,
|
|
|
+ i.seller as contracter,
|
|
|
+ i.sale_plan_type as procurementPlanType,
|
|
|
+ c.address_url as addressUrl
|
|
|
+ FROM sale_order s
|
|
|
+ left join sale_plan_info i on s.sale_plan=i.sale_plan_no
|
|
|
+ left join contract_management_info c on c.contract_no = s.contract_no
|
|
|
+ WHERE
|
|
|
+ s.delete_flag = '0'
|
|
|
+ AND s.common_id = #{commonId}
|
|
|
) a
|
|
|
ORDER BY updateDate DESC
|
|
|
<if test="currentPage != null and currentPage != ''">
|