|
@@ -5,12 +5,13 @@
|
|
<id column="PRICE_MATERIAL_ID" jdbcType="DECIMAL" property="priceMaterialId" />
|
|
<id column="PRICE_MATERIAL_ID" jdbcType="DECIMAL" property="priceMaterialId" />
|
|
<result column="PRICE_ID" jdbcType="DECIMAL" property="priceId" />
|
|
<result column="PRICE_ID" jdbcType="DECIMAL" property="priceId" />
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
|
|
+ <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<sql id="columns">
|
|
- PRICE_MATERIAL_ID, PRICE_ID, MATERIAL_ID
|
|
|
|
|
|
+ PRICE_MATERIAL_ID, PRICE_ID, MATERIAL_ID, DELETED
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<sql id="columns_alias">
|
|
- t.PRICE_MATERIAL_ID, t.PRICE_ID, t.MATERIAL_ID
|
|
|
|
|
|
+ t.PRICE_MATERIAL_ID, t.PRICE_ID, t.MATERIAL_ID, t.DELETED
|
|
</sql>
|
|
</sql>
|
|
<sql id="select">
|
|
<sql id="select">
|
|
SELECT <include refid="columns" /> FROM AMS_CONTAACT_PRICE_MATERIAL
|
|
SELECT <include refid="columns" /> FROM AMS_CONTAACT_PRICE_MATERIAL
|
|
@@ -29,6 +30,9 @@
|
|
<if test="materialId != null">
|
|
<if test="materialId != null">
|
|
and MATERIAL_ID = #{materialId}
|
|
and MATERIAL_ID = #{materialId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ and DELETED = #{deleted}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
@@ -42,6 +46,9 @@
|
|
<if test="materialId != null">
|
|
<if test="materialId != null">
|
|
and MATERIAL_ID = #{materialId}
|
|
and MATERIAL_ID = #{materialId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ and DELETED = #{deleted}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -51,18 +58,21 @@
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
delete from AMS_CONTAACT_PRICE_MATERIAL
|
|
delete from AMS_CONTAACT_PRICE_MATERIAL
|
|
where 1!=1
|
|
where 1!=1
|
|
- <if test="priceId != null">
|
|
|
|
- or PRICE_ID = #{priceId}
|
|
|
|
- </if>
|
|
|
|
- <if test="materialId != null">
|
|
|
|
- or MATERIAL_ID = #{materialId}
|
|
|
|
- </if>
|
|
|
|
|
|
+ <if test="priceId != null">
|
|
|
|
+ or PRICE_ID = #{priceId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ or DELETED = #{deleted}
|
|
|
|
+ </if>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
- insert into AMS_CONTAACT_PRICE_MATERIAL (PRICE_MATERIAL_ID, PRICE_ID, MATERIAL_ID
|
|
|
|
- )
|
|
|
|
- values (#{priceMaterialId,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}
|
|
|
|
- )
|
|
|
|
|
|
+ insert into AMS_CONTAACT_PRICE_MATERIAL (PRICE_MATERIAL_ID, PRICE_ID, MATERIAL_ID,
|
|
|
|
+ DELETED)
|
|
|
|
+ values (#{priceMaterialId,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ #{deleted,jdbcType=DECIMAL})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
insert into AMS_CONTAACT_PRICE_MATERIAL
|
|
insert into AMS_CONTAACT_PRICE_MATERIAL
|
|
@@ -76,6 +86,9 @@
|
|
<if test="materialId != null">
|
|
<if test="materialId != null">
|
|
MATERIAL_ID,
|
|
MATERIAL_ID,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ DELETED,
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="priceMaterialId != null">
|
|
<if test="priceMaterialId != null">
|
|
@@ -87,12 +100,16 @@
|
|
<if test="materialId != null">
|
|
<if test="materialId != null">
|
|
#{materialId,jdbcType=DECIMAL},
|
|
#{materialId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ #{deleted,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
update AMS_CONTAACT_PRICE_MATERIAL
|
|
update AMS_CONTAACT_PRICE_MATERIAL
|
|
set PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
set PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL}
|
|
|
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL}
|
|
where PRICE_MATERIAL_ID = #{priceMaterialId,jdbcType=DECIMAL}
|
|
where PRICE_MATERIAL_ID = #{priceMaterialId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsContaactPriceMaterial">
|
|
@@ -104,6 +121,9 @@
|
|
<if test="materialId != null">
|
|
<if test="materialId != null">
|
|
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="deleted != null">
|
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where PRICE_MATERIAL_ID = #{priceMaterialId,jdbcType=DECIMAL}
|
|
where PRICE_MATERIAL_ID = #{priceMaterialId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
@@ -119,36 +139,41 @@
|
|
<include refid="select" />
|
|
<include refid="select" />
|
|
<include refid="whereLike" />
|
|
<include refid="whereLike" />
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
insert into AMS_CONTAACT_PRICE_MATERIAL
|
|
insert into AMS_CONTAACT_PRICE_MATERIAL
|
|
- (PRICE_MATERIAL_ID,
|
|
|
|
- PRICE_ID, MATERIAL_ID)
|
|
|
|
|
|
+ (PRICE_MATERIAL_ID,
|
|
|
|
+ PRICE_ID, MATERIAL_ID, DELETED
|
|
|
|
+ )
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
- select
|
|
|
|
- #{item.priceMaterialId,jdbcType=DECIMAL},
|
|
|
|
- #{item.priceId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL} from dual
|
|
|
|
- </foreach> )
|
|
|
|
|
|
+ select
|
|
|
|
+ #{item.priceMaterialId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.priceId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.deleted,jdbcType=DECIMAL}
|
|
|
|
+ from dual
|
|
|
|
+ </foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
- update AMS_CONTAACT_PRICE_MATERIAL
|
|
|
|
- set
|
|
|
|
- PRICE_MATERIAL_ID=
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
- when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.priceMaterialId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,PRICE_ID=
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
- when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,MATERIAL_ID=
|
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
- when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- where PRICE_MATERIAL_ID in
|
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
- #{item.priceMaterialId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+ update AMS_CONTAACT_PRICE_MATERIAL
|
|
|
|
+ set
|
|
|
|
+ PRICE_MATERIAL_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
+ when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.priceMaterialId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,PRICE_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
+ when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,MATERIAL_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
+ when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,DELETED=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_MATERIAL_ID" separator=" ">
|
|
|
|
+ when #{item.priceMaterialId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ where PRICE_MATERIAL_ID in
|
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
+ #{item.priceMaterialId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
</update>
|
|
</update>
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
delete from AMS_CONTAACT_PRICE_MATERIAL
|
|
delete from AMS_CONTAACT_PRICE_MATERIAL
|
|
@@ -172,5 +197,6 @@
|
|
RMT.MATERIAL_ISINWARD = 1
|
|
RMT.MATERIAL_ISINWARD = 1
|
|
AND
|
|
AND
|
|
PRICE_ID = #{priceId}
|
|
PRICE_ID = #{priceId}
|
|
|
|
+ AND ACPR.DELETED = 0
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|