|
@@ -23,7 +23,7 @@
|
|
SELECT <include refid="columns_alias"/> FROM EMS_PRODPLAN_ROUND_WEIGHT t
|
|
SELECT <include refid="columns_alias"/> FROM EMS_PRODPLAN_ROUND_WEIGHT t
|
|
</sql>
|
|
</sql>
|
|
<sql id="where">
|
|
<sql id="where">
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="fid != null and fid != ''">
|
|
<if test="fid != null and fid != ''">
|
|
and FID = #{fid}
|
|
and FID = #{fid}
|
|
</if>
|
|
</if>
|
|
@@ -48,7 +48,7 @@
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="fid != null and fid != ''">
|
|
<if test="fid != null and fid != ''">
|
|
and FID LIKE '%${fid}%'
|
|
and FID LIKE '%${fid}%'
|
|
</if>
|
|
</if>
|
|
@@ -78,7 +78,7 @@
|
|
</delete>
|
|
</delete>
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
delete from EMS_PRODPLAN_ROUND_WEIGHT
|
|
delete from EMS_PRODPLAN_ROUND_WEIGHT
|
|
- where 1!=1
|
|
|
|
|
|
+ where 1!=1
|
|
<if test="prodate != null and prodate != ''">
|
|
<if test="prodate != null and prodate != ''">
|
|
or PRODATE = #{prodate}
|
|
or PRODATE = #{prodate}
|
|
</if>
|
|
</if>
|
|
@@ -190,6 +190,9 @@
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
where FID = #{fid,jdbcType=VARCHAR}
|
|
where FID = #{fid,jdbcType=VARCHAR}
|
|
|
|
+ <if test="lcId != null">
|
|
|
|
+ and LC_ID = #{lcId,jdbcType=VARCHAR}
|
|
|
|
+ </if>
|
|
</update>
|
|
</update>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
<include refid="select"/>
|
|
<include refid="select"/>
|
|
@@ -204,17 +207,17 @@
|
|
<include refid="whereLike"/>
|
|
<include refid="whereLike"/>
|
|
</select>
|
|
</select>
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
- insert into EMS_PRODPLAN_ROUND_WEIGHT
|
|
|
|
- (FID,
|
|
|
|
- PRODATE, MATERIALCODE, MATERIALNAME,
|
|
|
|
|
|
+ insert into EMS_PRODPLAN_ROUND_WEIGHT
|
|
|
|
+ (FID,
|
|
|
|
+ PRODATE, MATERIALCODE, MATERIALNAME,
|
|
QTY, UNIT, LC_ID
|
|
QTY, UNIT, LC_ID
|
|
)
|
|
)
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
- select
|
|
|
|
- #{item.fid,jdbcType=VARCHAR},
|
|
|
|
- #{item.prodate,jdbcType=VARCHAR}, #{item.materialcode,jdbcType=VARCHAR}, #{item.materialname,jdbcType=VARCHAR},
|
|
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.fid,jdbcType=VARCHAR},
|
|
|
|
+ #{item.prodate,jdbcType=VARCHAR}, #{item.materialcode,jdbcType=VARCHAR}, #{item.materialname,jdbcType=VARCHAR},
|
|
#{item.qty,jdbcType=DECIMAL}, #{item.unit,jdbcType=VARCHAR}, #{item.lcId,jdbcType=VARCHAR}
|
|
#{item.qty,jdbcType=DECIMAL}, #{item.unit,jdbcType=VARCHAR}, #{item.lcId,jdbcType=VARCHAR}
|
|
- from dual
|
|
|
|
|
|
+ from dual
|
|
</foreach> )
|
|
</foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -248,7 +251,7 @@
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case FID" close="end">
|
|
when #{item.fid,jdbcType=VARCHAR} then #{item.lcId,jdbcType=VARCHAR}
|
|
when #{item.fid,jdbcType=VARCHAR} then #{item.lcId,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</foreach>
|
|
- where FID in
|
|
|
|
|
|
+ where FID in
|
|
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
#{item.fid,jdbcType=VARCHAR}
|
|
#{item.fid,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</foreach>
|