|
@@ -14,18 +14,20 @@
|
|
|
<result column="XGSJ" jdbcType="TIMESTAMP" property="xgsj" />
|
|
|
<result column="MEMO" jdbcType="VARCHAR" property="memo" />
|
|
|
<result column="CP" jdbcType="VARCHAR" property="cp" />
|
|
|
- <result column="SYSL" jdbcType="DECIMAL" property="sysl" />
|
|
|
- <result column="WXSY" jdbcType="DECIMAL" property="wxsy" />
|
|
|
+ <result column="WEIGHT1" jdbcType="DECIMAL" property="weight1" />
|
|
|
+ <result column="WEIGHT2" jdbcType="DECIMAL" property="weight2" />
|
|
|
+ <result column="WEIGHT3" jdbcType="DECIMAL" property="weight3" />
|
|
|
+ <result column="WEIGHT4" jdbcType="DECIMAL" property="weight4" />
|
|
|
<result column="ZT" jdbcType="VARCHAR" property="zt" />
|
|
|
<result column="PARENTID" jdbcType="VARCHAR" property="parentid"/>
|
|
|
<result column="PRODUCTID" jdbcType="VARCHAR" property="productid"/>
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- NO, LINE, YEARMONTH, UNIT, WEIGHT, CJR, CJSJ, XGR, XGSJ, MEMO, CP, SYSL, WXSY,JZSJ,PARENTID,PRODUCTID
|
|
|
+ NO, LINE, YEARMONTH, UNIT, WEIGHT, CJR, CJSJ, XGR, XGSJ, MEMO, CP, WEIGHT1, WEIGHT2,JZSJ,PARENTID,PRODUCTID
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.NO, t.LINE, t.YEARMONTH, t.UNIT, t.WEIGHT, t.CJR, t.CJSJ, t.XGR, t.XGSJ, t.MEMO,
|
|
|
- t.CP, t.SYSL, t.WXSY,t.JZSJ,t.ZT,t.PARENTID
|
|
|
+ t.CP, t.WEIGHT1, t.WEIGHT2,t.JZSJ,t.ZT,t.PARENTID
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns"/> FROM EMS_PRODPLAN_YEAR
|
|
@@ -62,11 +64,11 @@
|
|
|
<if test="cp != null and cp != ''">
|
|
|
and CP = #{cp}
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- and SYSL = #{sysl}
|
|
|
+ <if test="weight1 != null">
|
|
|
+ and WEIGHT1 = #{weight1}
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- and WXSY = #{wxsy}
|
|
|
+ <if test="weight2 != null">
|
|
|
+ and WEIGHT2 = #{weight2}
|
|
|
</if>
|
|
|
<if test="zt != null">
|
|
|
and ZT = #{zt}
|
|
@@ -111,11 +113,11 @@
|
|
|
<if test="cp != null and cp != ''">
|
|
|
and CP LIKE '%${cp}%'
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- and SYSL = #{sysl}
|
|
|
+ <if test="weight1 != null">
|
|
|
+ and WEIGHT1 = #{weight1}
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- and WXSY = #{wxsy}
|
|
|
+ <if test="weight2 != null">
|
|
|
+ and WEIGHT2 = #{weight2}
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
@@ -156,23 +158,23 @@
|
|
|
<if test="cp != null and cp != ''">
|
|
|
or CP = #{cp}
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- or SYSL = #{sysl}
|
|
|
+ <if test="weight1 != null">
|
|
|
+ or WEIGHT1 = #{weight1}
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- or WXSY = #{wxsy}
|
|
|
+ <if test="weight2 != null">
|
|
|
+ or WEIGHT2 = #{weight2}
|
|
|
</if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.ems.emsprodplanyear.model.EmsProdplanYear">
|
|
|
insert into EMS_PRODPLAN_YEAR (NO, LINE, YEARMONTH,
|
|
|
UNIT, WEIGHT, CJR,
|
|
|
CJSJ, XGR, XGSJ,
|
|
|
- MEMO, CP, SYSL, WXSY,JZSJ,ZT,PARENTID,PRODUCTID
|
|
|
+ MEMO, CP, WEIGHT1, WEIGHT2,JZSJ,ZT,PARENTID,PRODUCTID
|
|
|
)
|
|
|
values (#{no,jdbcType=VARCHAR}, #{line,jdbcType=VARCHAR}, #{yearmonth,jdbcType=VARCHAR},
|
|
|
#{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{cjr,jdbcType=VARCHAR},
|
|
|
#{cjsj,jdbcType=TIMESTAMP}, #{xgr,jdbcType=VARCHAR}, #{xgsj,jdbcType=TIMESTAMP},
|
|
|
- #{memo,jdbcType=VARCHAR}, #{cp,jdbcType=VARCHAR}, #{sysl,jdbcType=DECIMAL}, #{wxsy,jdbcType=DECIMAL},
|
|
|
+ #{memo,jdbcType=VARCHAR}, #{cp,jdbcType=VARCHAR}, #{weight1,jdbcType=DECIMAL}, #{weight2,jdbcType=DECIMAL},
|
|
|
#{jzsj,jdbcType=TIMESTAMP},#{zt,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR},#{productid,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
@@ -212,11 +214,11 @@
|
|
|
<if test="cp != null">
|
|
|
CP,
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- SYSL,
|
|
|
+ <if test="weight1 != null">
|
|
|
+ WEIGHT1,
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- WXSY,
|
|
|
+ <if test="weight2 != null">
|
|
|
+ WEIGHT2,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
@@ -253,11 +255,11 @@
|
|
|
<if test="cp != null">
|
|
|
#{cp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- #{sysl,jdbcType=DECIMAL},
|
|
|
+ <if test="weight1 != null">
|
|
|
+ #{weight1,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- #{wxsy,jdbcType=DECIMAL},
|
|
|
+ <if test="weight2 != null">
|
|
|
+ #{weight2,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
@@ -273,8 +275,8 @@
|
|
|
XGSJ = #{xgsj,jdbcType=TIMESTAMP},
|
|
|
MEMO = #{memo,jdbcType=VARCHAR},
|
|
|
CP = #{cp,jdbcType=VARCHAR},
|
|
|
- SYSL = #{sysl,jdbcType=DECIMAL},
|
|
|
- WXSY = #{wxsy,jdbcType=DECIMAL}
|
|
|
+ WEIGHT1 = #{weight1,jdbcType=DECIMAL},
|
|
|
+ WEIGHT2 = #{weight2,jdbcType=DECIMAL}
|
|
|
where NO = #{no,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsprodplanyear.model.EmsProdplanYear">
|
|
@@ -310,11 +312,11 @@
|
|
|
<if test="cp != null">
|
|
|
CP = #{cp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="sysl != null">
|
|
|
- SYSL = #{sysl,jdbcType=DECIMAL},
|
|
|
+ <if test="weight1 != null">
|
|
|
+ WEIGHT1 = #{weight1,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="wxsy != null">
|
|
|
- WXSY = #{wxsy,jdbcType=DECIMAL},
|
|
|
+ <if test="weight2 != null">
|
|
|
+ WEIGHT2 = #{weight2,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
</set>
|
|
|
where NO = #{no,jdbcType=VARCHAR}
|
|
@@ -326,6 +328,7 @@
|
|
|
<select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
<include refid="select"/>
|
|
|
<include refid="where"/>
|
|
|
+ order by YEARMONTH
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
<include refid="select"/>
|
|
@@ -337,7 +340,7 @@
|
|
|
LINE, YEARMONTH, UNIT,
|
|
|
WEIGHT, CJR, CJSJ,
|
|
|
XGR, XGSJ, MEMO,
|
|
|
- CP, SYSL, WXSY
|
|
|
+ CP, WEIGHT1, WEIGHT2
|
|
|
)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
@@ -345,7 +348,7 @@
|
|
|
#{item.line,jdbcType=VARCHAR}, #{item.yearmonth,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR},
|
|
|
#{item.weight,jdbcType=DECIMAL}, #{item.cjr,jdbcType=VARCHAR}, #{item.cjsj,jdbcType=TIMESTAMP},
|
|
|
#{item.xgr,jdbcType=VARCHAR}, #{item.xgsj,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR},
|
|
|
- #{item.cp,jdbcType=VARCHAR}, #{item.sysl,jdbcType=DECIMAL}, #{item.wxsy,jdbcType=DECIMAL}
|
|
|
+ #{item.cp,jdbcType=VARCHAR}, #{item.weight2,jdbcType=DECIMAL}, #{item.weight2,jdbcType=DECIMAL}
|
|
|
from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
@@ -396,13 +399,13 @@
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case NO" close="end">
|
|
|
when #{item.no,jdbcType=VARCHAR} then #{item.cp,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- ,SYSL=
|
|
|
+ ,WEIGHT1=
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case NO" close="end">
|
|
|
- when #{item.no,jdbcType=VARCHAR} then #{item.sysl,jdbcType=DECIMAL}
|
|
|
+ when #{item.no,jdbcType=VARCHAR} then #{item.weight1,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- ,WXSY=
|
|
|
+ ,WEIGHT2=
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case NO" close="end">
|
|
|
- when #{item.no,jdbcType=VARCHAR} then #{item.wxsy,jdbcType=DECIMAL}
|
|
|
+ when #{item.no,jdbcType=VARCHAR} then #{item.weight2,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
where NO in
|
|
|
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|