|
@@ -1666,10 +1666,12 @@
|
|
|
</select>
|
|
|
<select id="getPurInwardPrice" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
SELECT * FROM (
|
|
|
- select distinct actp.price_id "priceId", actp.price_value "priceValue" ,actp.PRICE_DATE "priceDate"
|
|
|
+ select distinct actp.price_id "priceId", actp.price_value "priceValue" ,rop.PRICE_DATE "priceDate"
|
|
|
from ams_contract_transport_price actp
|
|
|
left join ams_contaact_price_material acpm
|
|
|
on acpm.price_id = actp.price_id
|
|
|
+ left join RMS_OIL_PRICE ROP
|
|
|
+ on rop.PRICE_OIL_TYPE_ID = actp.OIL_TYPE_ID
|
|
|
left join rms_trans_range rtr
|
|
|
on rtr.trans_range_id = actp.line_id
|
|
|
where actp.DELETED = 0
|
|
@@ -1686,6 +1688,7 @@
|
|
|
<if test="materialTypeId == null">
|
|
|
and acpm.MATERIAL_ID = 0
|
|
|
</if>
|
|
|
+ ORDER BY rop.PRICE_DATE DESC
|
|
|
)
|
|
|
WHERE ROWNUM = 1
|
|
|
</select>
|