|
@@ -176,6 +176,77 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
+ <sql id="whereLikeForeach">
|
|
|
+ <where>
|
|
|
+ <if test="priceId != null">
|
|
|
+ <foreach collection="priceId" item="item" open="(" separator="or" close=")">
|
|
|
+ "priceId" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="oilTypeName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="oilTypeName" item="item" open="(" separator="or" close=")">
|
|
|
+ "oilTypeName" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="capacityTypeName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
|
|
|
+ "capacityTypeName" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="priceValue != null">
|
|
|
+ and
|
|
|
+ <foreach collection="priceValue" item="item" open="(" separator="or" close=")">
|
|
|
+ "priceValue" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="priceDate != null">
|
|
|
+ and
|
|
|
+ <foreach collection="priceDate" item="item" open="(" separator="or" close=")">
|
|
|
+ TO_CHAR("priceDate",'yyyy-mm-dd hh24:mi:ss') = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="oilpriceBase != null">
|
|
|
+ and
|
|
|
+ <foreach collection="oilpriceBase" item="item" open="(" separator="or" close=")">
|
|
|
+ "oilpriceBase" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and
|
|
|
+ <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
|
|
|
+ TO_CHAR("insertTime",'yyyy-mm-dd hh24:mi:ss') = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="oilpriceChangeThreshold != null">
|
|
|
+ and
|
|
|
+ <foreach collection="oilpriceChangeThreshold" item="item" open="(" separator="or" close=")">
|
|
|
+ "oilpriceChangeThreshold" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="transRange != null">
|
|
|
+ and
|
|
|
+ <foreach collection="transRange" item="item" open="(" separator="or" close=")">
|
|
|
+ "transRange" = '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and
|
|
|
+ <foreach collection="type" item="item" open="(" separator="or" close=")">
|
|
|
+ <if test="item=='元/吨'">
|
|
|
+ "type" = '2'
|
|
|
+ </if>
|
|
|
+ <if test="item=='元/小时'">
|
|
|
+ "type" = '5'
|
|
|
+ </if>
|
|
|
+ <if test="item=='元/趟'">
|
|
|
+ "type" = '6'
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
delete from AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
@@ -662,6 +733,12 @@
|
|
|
<if test="deleted != null">
|
|
|
and a_t_price.DELETED = #{deleted}
|
|
|
</if>
|
|
|
+ <if test="con !=null and con != ''.toString()">
|
|
|
+ and
|
|
|
+ r_r_address.ADDRESS_PROVINCE || r_r_address.ADDRESS_DISTRICT || r_r_address.ADDRESS_TOWN
|
|
|
+ || rrp.ADDRESS_DELIVERY_ADDRESS || r_carrier.CARRIER_NAME || r_c_type.CAPACITY_TYPE_NAME
|
|
|
+ like CONCAT('%',CONCAT(#{con},'%'))
|
|
|
+ </if>
|
|
|
</where>
|
|
|
)
|
|
|
|
|
@@ -906,7 +983,12 @@
|
|
|
where TYPE in (2,5,6)
|
|
|
<if test="deleted != null">
|
|
|
and a_t_price.DELETED = #{deleted}
|
|
|
- </if> )
|
|
|
+ </if>
|
|
|
+ <if test="con != null" >
|
|
|
+ and RGR.TRANS_RANGE_VALUE LIKE #{con}
|
|
|
+ </if>)
|
|
|
+ <include refid="whereLikeForeach"/>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
</select>
|
|
|
<select id="selectInwardPrice" resultType="java.util.LinkedHashMap" parameterType="java.util.Map">
|
|
|
select * from (select
|
|
@@ -967,4 +1049,8 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <update id="updatePriceByPriceId" parameterType="java.util.Map">
|
|
|
+ update AMS_CONTRACT_TRANSPORT_PRICE set PRICE_VALUE=#{priceValue} where PRICE_ID=#{priceId}
|
|
|
+ </update>
|
|
|
</mapper>
|