|
|
@ -16,6 +16,8 @@
|
|
|
|
<result property="createdTime" column="created_time" />
|
|
|
|
<result property="createdTime" column="created_time" />
|
|
|
|
<result property="updatedBy" column="updated_by" />
|
|
|
|
<result property="updatedBy" column="updated_by" />
|
|
|
|
<result property="updatedTime" column="updated_time" />
|
|
|
|
<result property="updatedTime" column="updated_time" />
|
|
|
|
|
|
|
|
<result property="parentId" column="parent_id" />
|
|
|
|
|
|
|
|
<result property="parentName" column="parentName" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseProductLineVo">
|
|
|
|
<sql id="selectBaseProductLineVo">
|
|
|
@ -29,9 +31,12 @@
|
|
|
|
bpl.created_by,
|
|
|
|
bpl.created_by,
|
|
|
|
bpl.created_time,
|
|
|
|
bpl.created_time,
|
|
|
|
bpl.updated_by,
|
|
|
|
bpl.updated_by,
|
|
|
|
bpl.updated_time
|
|
|
|
bpl.updated_time,
|
|
|
|
|
|
|
|
bpl.PARENT_ID,
|
|
|
|
|
|
|
|
b2.PRODUCT_LINE_NAME parentName
|
|
|
|
from base_productline bpl
|
|
|
|
from base_productline bpl
|
|
|
|
left join base_factory bf on bf.factory_code = bpl.plant_code
|
|
|
|
left join base_factory bf on bf.factory_code = bpl.plant_code
|
|
|
|
|
|
|
|
left join base_productline b2 on b2.PRODUCT_LINE_CODE = bpl.PARENT_ID
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseProductLineList" parameterType="BaseProductLine" resultMap="BaseProductLineResult">
|
|
|
|
<select id="selectBaseProductLineList" parameterType="BaseProductLine" resultMap="BaseProductLineResult">
|
|
|
@ -46,6 +51,7 @@
|
|
|
|
<if test="createdTime != null "> and bpl.created_time = #{createdTime}</if>
|
|
|
|
<if test="createdTime != null "> and bpl.created_time = #{createdTime}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''"> and bpl.updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''"> and bpl.updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedTime != null "> and bpl.updated_time = #{updatedTime}</if>
|
|
|
|
<if test="updatedTime != null "> and bpl.updated_time = #{updatedTime}</if>
|
|
|
|
|
|
|
|
<if test="parentId != null "> and bpl.parent_id = #{parentId}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by bpl.PRODUCT_LINE_CODE
|
|
|
|
order by bpl.PRODUCT_LINE_CODE
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -71,6 +77,7 @@
|
|
|
|
<if test="createdTime != null">created_time,</if>
|
|
|
|
<if test="createdTime != null">created_time,</if>
|
|
|
|
<if test="updatedBy != null">updated_by,</if>
|
|
|
|
<if test="updatedBy != null">updated_by,</if>
|
|
|
|
<if test="updatedTime != null">updated_time,</if>
|
|
|
|
<if test="updatedTime != null">updated_time,</if>
|
|
|
|
|
|
|
|
<if test="parentId != null">parent_id,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="objId != null">#{objId},</if>
|
|
|
|
<if test="objId != null">#{objId},</if>
|
|
|
@ -83,6 +90,7 @@
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
|
|
|
|
|
|
<if test="parentId != null">#{parentId},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
@ -98,6 +106,7 @@
|
|
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
|
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
|
|
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
|
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
|
|
|
|
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where obj_id = #{objId}
|
|
|
|
where obj_id = #{objId}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|