|
@@ -19,14 +19,17 @@
|
|
|
<result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
|
|
|
<result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
|
|
|
<result column="READTIME" jdbcType="VARCHAR" property="readtime" />
|
|
|
+ <result column="DJLX" jdbcType="VARCHAR" property="djlx" />
|
|
|
+ <result column="PZDL" jdbcType="VARCHAR" property="pzdl" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
GBSJ, CINVCCODE, CINVCODE, CWHCODE, CINVCNAME, CINVNAME, CINVSTD, CWHNAME, MZ, PZ,
|
|
|
- JZ, TAB, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, READTIME
|
|
|
+ JZ, TAB, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, READTIME, DJLX, PZDL
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.GBSJ, t.CINVCCODE, t.CINVCODE, t.CWHCODE, t.CINVCNAME, t.CINVNAME, t.CINVSTD, t.CWHNAME,
|
|
|
- t.MZ, t.PZ, t.JZ, t.TAB, t.CREATEMAN, t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.READTIME
|
|
|
+ t.MZ, t.PZ, t.JZ, t.TAB, t.CREATEMAN, t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.READTIME,
|
|
|
+ t.DJLX, t.PZDL
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns"/> FROM DZ_MATERIAL_SF
|
|
@@ -87,6 +90,12 @@
|
|
|
<if test="readtime != null and readtime != ''">
|
|
|
and READTIME = #{readtime}
|
|
|
</if>
|
|
|
+ <if test="djlx != null and djlx != ''">
|
|
|
+ and DJLX = #{djlx}
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null and pzdl != ''">
|
|
|
+ and PZDL = #{pzdl}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -142,6 +151,12 @@
|
|
|
<if test="readtime != null and readtime != ''">
|
|
|
and READTIME LIKE '%${readtime}%'
|
|
|
</if>
|
|
|
+ <if test="djlx != null and djlx != ''">
|
|
|
+ and READTIME LIKE '%${djlx}%'
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null and pzdl != ''">
|
|
|
+ and PZDL LIKE '%${pzdl}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="map">
|
|
@@ -150,6 +165,8 @@
|
|
|
and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
|
|
|
and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
|
|
|
and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
|
|
|
+ and TAB = #{tab,jdbcType=VARCHAR}
|
|
|
+ and DJLX = #{djlx,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from DZ_MATERIAL_SF
|
|
@@ -202,6 +219,12 @@
|
|
|
<if test="readtime != null and readtime != ''">
|
|
|
or READTIME = #{readtime}
|
|
|
</if>
|
|
|
+ <if test="djlx != null and djlx != ''">
|
|
|
+ or DJLX = #{djlx}
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null and pzdl != ''">
|
|
|
+ or PZDL = #{pzdl}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
|
|
|
insert into DZ_MATERIAL_SF (GBSJ, CINVCCODE, CINVCODE,
|
|
@@ -209,13 +232,13 @@
|
|
|
CINVSTD, CWHNAME, MZ,
|
|
|
PZ, JZ, TAB, CREATEMAN,
|
|
|
CREATETIME, UPDATEMAN, UPDATETIME,
|
|
|
- READTIME)
|
|
|
+ READTIME,DJLX,PZDL)
|
|
|
values (#{gbsj,jdbcType=VARCHAR}, #{cinvccode,jdbcType=VARCHAR}, #{cinvcode,jdbcType=VARCHAR},
|
|
|
#{cwhcode,jdbcType=VARCHAR}, #{cinvcname,jdbcType=VARCHAR}, #{cinvname,jdbcType=VARCHAR},
|
|
|
#{cinvstd,jdbcType=VARCHAR}, #{cwhname,jdbcType=VARCHAR}, #{mz,jdbcType=DECIMAL},
|
|
|
#{pz,jdbcType=DECIMAL}, #{jz,jdbcType=DECIMAL}, #{tab,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR},
|
|
|
#{createtime,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=VARCHAR},
|
|
|
- #{readtime,jdbcType=VARCHAR})
|
|
|
+ #{readtime,jdbcType=VARCHAR},#{djlx,jdbcType=VARCHAR},#{pzdl,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
|
|
|
insert into DZ_MATERIAL_SF
|
|
@@ -271,6 +294,12 @@
|
|
|
<if test="readtime != null">
|
|
|
READTIME,
|
|
|
</if>
|
|
|
+ <if test="djlx != null">
|
|
|
+ DJLX,
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null">
|
|
|
+ PZDL,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="gbsj != null">
|
|
@@ -324,6 +353,12 @@
|
|
|
<if test="readtime != null">
|
|
|
#{readtime,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="djlx != null">
|
|
|
+ #{djlx,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null">
|
|
|
+ #{pzdl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
|
|
@@ -340,11 +375,14 @@
|
|
|
CREATETIME = #{createtime,jdbcType=VARCHAR},
|
|
|
UPDATEMAN = #{updateman,jdbcType=VARCHAR},
|
|
|
UPDATETIME = #{updatetime,jdbcType=VARCHAR},
|
|
|
- READTIME = #{readtime,jdbcType=VARCHAR}
|
|
|
+ READTIME = #{readtime,jdbcType=VARCHAR},
|
|
|
+ DJLX = #{djlx,jdbcType=VARCHAR}
|
|
|
where GBSJ = #{gbsj,jdbcType=VARCHAR}
|
|
|
and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
|
|
|
and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
|
|
|
and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
|
|
|
+ and TAB = #{tab,jdbcType=VARCHAR}
|
|
|
+ and djlx = #{djlx,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
|
|
|
update DZ_MATERIAL_SF
|
|
@@ -388,11 +426,19 @@
|
|
|
<if test="readtime != null">
|
|
|
READTIME = #{readtime,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="djlx != null">
|
|
|
+ DJLX = #{djlx,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pzdl != null">
|
|
|
+ PZDL = #{pzdl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where GBSJ = #{gbsj,jdbcType=VARCHAR}
|
|
|
and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
|
|
|
and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
|
|
|
and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
|
|
|
+ and TAB = #{tab,jdbcType=VARCHAR}
|
|
|
+ and DJLX = #{djlx,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
|
|
|
<include refid="select"/>
|
|
@@ -401,6 +447,7 @@
|
|
|
and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
|
|
|
and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
|
|
|
and TAB = #{tab,jdbcType=VARCHAR}
|
|
|
+ and DJLX = #{djlx,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
<include refid="select"/>
|
|
@@ -418,7 +465,7 @@
|
|
|
CWHNAME, MZ, PZ,
|
|
|
JZ, TAB, CREATEMAN,
|
|
|
CREATETIME, UPDATEMAN, UPDATETIME,
|
|
|
- READTIME)
|
|
|
+ READTIME,DJLX,PZDL)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.gbsj,jdbcType=VARCHAR},
|
|
@@ -427,7 +474,7 @@
|
|
|
#{item.cwhname,jdbcType=VARCHAR}, #{item.mz,jdbcType=DECIMAL}, #{item.pz,jdbcType=DECIMAL},
|
|
|
#{item.jz,jdbcType=DECIMAL}, #{item.tab,jdbcType=VARCHAR}, #{item.createman,jdbcType=VARCHAR},
|
|
|
#{item.createtime,jdbcType=VARCHAR}, #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR},
|
|
|
- #{item.readtime,jdbcType=VARCHAR} from dual
|
|
|
+ #{item.readtime,jdbcType=VARCHAR},#{item.djlx,jdbcType=VARCHAR},#{item.pzdl,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -501,16 +548,22 @@
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
|
|
|
when #{item.gbsj,jdbcType=VARCHAR} then #{item.readtime,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- where (GBSJ,CINVCCODE,CINVCODE,CWHCODE) in
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
|
|
|
+ when #{item.gbsj,jdbcType=VARCHAR} then #{item.djlx,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
|
|
|
+ when #{item.gbsj,jdbcType=VARCHAR} then #{item.pzdl,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where (GBSJ,CINVCCODE,CINVCODE,CWHCODE,TAB,DJLX) in
|
|
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
- (#{item.gbsj, jdbcType=VARCHAR},#{item.cinvccode, jdbcType=VARCHAR},#{item.cinvcode, jdbcType=VARCHAR},#{item.cwhcode, jdbcType=VARCHAR})
|
|
|
+ (#{item.gbsj, jdbcType=VARCHAR},#{item.cinvccode, jdbcType=VARCHAR},#{item.cinvcode, jdbcType=VARCHAR},#{item.cwhcode, jdbcType=VARCHAR},#{item.tab, jdbcType=VARCHAR},#{item.djlx, jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from DZ_MATERIAL_SF
|
|
|
- where (GBSJ,CINVCCODE,CINVCODE,CWHCODE) in
|
|
|
+ where (GBSJ,CINVCCODE,CINVCODE,CWHCODE,TAB,DJLX) in
|
|
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
- ( #{item.gbsj, jdbcType=VARCHAR}, #{item.cinvccode, jdbcType=VARCHAR}, #{item.cinvcode, jdbcType=VARCHAR}, #{item.cwhcode, jdbcType=VARCHAR})
|
|
|
+ ( #{item.gbsj, jdbcType=VARCHAR}, #{item.cinvccode, jdbcType=VARCHAR}, #{item.cinvcode, jdbcType=VARCHAR}, #{item.cwhcode, jdbcType=VARCHAR},#{item.tab, jdbcType=VARCHAR},#{item.djlx, jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
@@ -518,15 +571,15 @@
|
|
|
<select id="getDzMaterialSf" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select * from (
|
|
|
SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
|
|
|
- cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, 'sh' as tab
|
|
|
- FROM v_nyjk_sh where gbsj >= #{gbsj,jdbcType=VARCHAR} and
|
|
|
- cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
|
|
|
- group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), gbsj, 23)
|
|
|
+ cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, djlx, pzdl, 'sh' as tab
|
|
|
+ FROM v_nyjk_sh where gbsj >= #{gbsj,jdbcType=VARCHAR} and pzdl IS NOT NULL
|
|
|
+ --cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
|
|
|
+ group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), gbsj, 23),djlx, pzdl
|
|
|
) as sh union all (
|
|
|
SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
|
|
|
- cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, 'fh' as tab
|
|
|
- FROM v_nyjk_fh where gbsj >= #{gbsj,jdbcType=VARCHAR} and
|
|
|
- cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
|
|
|
- group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), [gbsj], 23))
|
|
|
+ cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, djlx, pzdl, 'fh' as tab
|
|
|
+ FROM v_nyjk_fh where gbsj >= #{gbsj,jdbcType=VARCHAR} and pzdl IS NOT NULL
|
|
|
+ --cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
|
|
|
+ group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), [gbsj], 23),djlx, pzdl)
|
|
|
</select>
|
|
|
</mapper>
|