Files
foton-slrs-system-rest/adc-da-slrs/src/main/resources/mybatis/mapper/standardSplit/SarFileSplitItemsEOMapper.xml
T

573 lines
28 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.standardSplit.dao.SarFileSplitItemsEODao" >
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" >
<id column="id" property="id" />
<result column="info_id" property="infoId" />
<result column="items_num" property="itemsNum" />
<result column="items_name" property="itemsName" />
<result column="iterms_conditions" property="itermsConditions" />
<result column="newcar_put_time" property="newcarPutTime" />
<result column="product_put_time" property="productPutTime" />
<result column="menu_id" property="menuId" />
<result column="svpps" property="svpps" />
<result column="apply_arctic" property="applyArctic" />
<result column="reference_stand" property="referenceStand" />
<result column="special_request" property="specialRequest" />
<result column="relevance_file" property="relevanceFile" />
<result column="remarks" property="remarks" />
<result column="valid_flag" property="validFlag" />
<result column="creation_user" property="creationUser" />
<result column="creation_time" property="creationTime" />
<result column="modify_time" property="modifyTime" />
<result column="modify_user" property="modifyUser" />
<result column="fo" property="fo" />
<result column="duty_engineer" property="dutyEngineer" />
<result column="svpps" property="svpps" />
<result column="claim_type" property="claimType" />
<result column="bus_stand_cover" property="busStandCover" />
<result column="file_type" property="fileType" />
<result column="claimTypeShow" property="claimTypeShow" />
<result column="fileTypeShow" property="fileTypeShow" />
<result column="responsible_unit" property="responsibleUnit" />
<result column="responsibleUnitShow" property="responsibleUnitShow" />
<result column="dutyEngineerShow" property="dutyEngineerShow" />
</resultMap>
<resultMap id="BaseResultMapExport" type="com.adc.da.slrs.standardSplit.dto.FileSplitItemsExportDto" >
<result column="id" property="id" />
<result column="items_num" property="itemsNum" />
<result column="items_name" property="itemsName" />
<result column="iterms_conditions" property="itermsConditions" />
<result column="newcar_put_time" property="newcarPutTime" />
<result column="product_put_time" property="productPutTime" />
<result column="svpps" property="svpps" />
<result column="apply_arctic" property="applyArctic" />
<result column="reference_stand" property="referenceStand" />
<result column="remarks" property="remarks" />
<result column="relevance_file" property="relevanceFile" />
<result column="fo" property="fo" />
<result column="duty_engineer" property="dutyEngineer" />
<result column="svpps" property="svpps" />
<result column="claim_type" property="claimType" />
<result column="bus_stand_cover" property="busStandCover" />
<result column="file_type" property="fileType" />
<result column="claimTypeShow" property="claimTypeShow" />
<result column="responsible_unit" property="responsibleUnit" />
<result column="responsibleUnitShow" property="responsibleUnitShow" />
<result column="dutyEngineerShow" property="dutyEngineerShow" />
<result column="foShow" property="foShow"/>
</resultMap>
<!-- SAR_FILE_SPLIT_ITEMS table all fields -->
<sql id="Base_Column_List" >
SAR_FILE_SPLIT_ITEMS.id, SAR_FILE_SPLIT_ITEMS.info_id, SAR_FILE_SPLIT_ITEMS.items_num, items_name, iterms_conditions,
newcar_put_time, product_put_time, menu_id, svpps, apply_arctic, reference_stand, special_request, relevance_file,
SAR_FILE_SPLIT_ITEMS.remarks, SAR_FILE_SPLIT_ITEMS.valid_flag, SAR_FILE_SPLIT_ITEMS.creation_user,
SAR_FILE_SPLIT_ITEMS.creation_time, SAR_FILE_SPLIT_ITEMS.modify_time, SAR_FILE_SPLIT_ITEMS.modify_user,
SAR_FILE_SPLIT_ITEMS.fo,SAR_FILE_SPLIT_ITEMS.duty_engineer, SAR_FILE_SPLIT_ITEMS.claim_type,
SAR_FILE_SPLIT_ITEMS.bus_stand_cover,SAR_FILE_SPLIT_ITEMS.file_type,SAR_FILE_SPLIT_ITEMS.responsible_unit,
TS_ORG.org_name as responsibleUnitShow, dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.NAME as
dutyEngineerShow,tsFo.NAME as foShow
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="id != null" >
and SAR_FILE_SPLIT_ITEMS.id ${idOperator} #{id}
</if>
<if test="infoId != null" >
and SAR_FILE_SPLIT_ITEMS.info_id ${infoIdOperator} #{infoId}
</if>
<if test="itemsNum != null" >
and SAR_FILE_SPLIT_ITEMS.items_num ${itemsNumOperator} #{itemsNum}
</if>
<if test="itemsName != null" >
and SAR_FILE_SPLIT_ITEMS.items_name ${itemsNameOperator} #{itemsName}
</if>
<if test="itermsConditions != null" >
and SAR_FILE_SPLIT_ITEMS.iterms_conditions ${itermsConditionsOperator} #{itermsConditions}
</if>
<if test="newcarPutTime != null" >
and SAR_FILE_SPLIT_ITEMS.newcar_put_time ${newcarPutTimeOperator} #{newcarPutTime}
</if>
<if test="newcarPutTime1 != null" >
and SAR_FILE_SPLIT_ITEMS.newcar_put_time &gt;= #{newcarPutTime1}
</if>
<if test="newcarPutTime2 != null" >
and SAR_FILE_SPLIT_ITEMS.newcar_put_time &lt;= #{newcarPutTime2}
</if>
<if test="productPutTime != null" >
and SAR_FILE_SPLIT_ITEMS.product_put_time ${productPutTimeOperator} #{productPutTime}
</if>
<if test="productPutTime1 != null" >
and SAR_FILE_SPLIT_ITEMS.product_put_time &gt;= #{productPutTime1}
</if>
<if test="productPutTime2 != null" >
and SAR_FILE_SPLIT_ITEMS.product_put_time &lt;= #{productPutTime2}
</if>
<if test="sMenuId != null" >
and menu_id = #{sMenuId}
</if>
<if test="svpps != null" >
and svpps ${svppsOperator} #{svpps}
</if>
<if test="applyArctic != null" >
and apply_arctic ${applyArcticOperator} #{applyArctic}
</if>
<if test="referenceStand != null" >
and reference_stand ${referenceStandOperator} #{referenceStand}
</if>
<if test="specialRequest != null" >
and special_request ${specialRequestOperator} #{specialRequest}
</if>
<if test="relevanceFile != null" >
and relevance_file ${relevanceFileOperator} #{relevanceFile}
</if>
<if test="remarks != null" >
and SAR_FILE_SPLIT_ITEMS.remarks ${remarksOperator} #{remarks}
</if>
<if test="validFlag != null" >
and SAR_FILE_SPLIT_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
</if>
<if test="creationUser != null" >
and SAR_FILE_SPLIT_ITEMS.creation_user ${creationUserOperator} #{creationUser}
</if>
<if test="creationTime != null" >
and SAR_FILE_SPLIT_ITEMS.creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and SAR_FILE_SPLIT_ITEMS.creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and SAR_FILE_SPLIT_ITEMS.creation_time &lt;= #{creationTime2}
</if>
<if test="modifyTime != null" >
and SAR_FILE_SPLIT_ITEMS.modify_time ${modifyTimeOperator} #{modifyTime}
</if>
<if test="modifyTime1 != null" >
and SAR_FILE_SPLIT_ITEMS.modify_time &gt;= #{modifyTime1}
</if>
<if test="modifyTime2 != null" >
and SAR_FILE_SPLIT_ITEMS.modify_time &lt;= #{modifyTime2}
</if>
<if test="modifyUser != null" >
and SAR_FILE_SPLIT_ITEMS.modify_user ${modifyUserOperator} #{modifyUser}
</if>
</trim>
</sql>
<!-- 插入记录 -->
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_FILE_SPLIT_ITEMS.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_FILE_SPLIT_ITEMS(<include refid="Base_Column_List" />)
values (#{id, jdbcType=VARCHAR}, #{infoId, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itermsConditions, jdbcType=CLOB}, #{newcarPutTime, jdbcType=TIMESTAMP}, #{productPutTime, jdbcType=TIMESTAMP}, #{menuId, jdbcType=VARCHAR}, #{svpps, jdbcType=VARCHAR}, #{applyArctic, jdbcType=VARCHAR}, #{referenceStand, jdbcType=VARCHAR}, #{specialRequest, jdbcType=VARCHAR}, #{relevanceFile, jdbcType=VARCHAR}, #{remarks, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationUser, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
</insert>
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_FILE_SPLIT_ITEMS.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_FILE_SPLIT_ITEMS
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >id,</if>
<if test="infoId != null" >info_id,</if>
<if test="itemsNum != null" >items_num,</if>
<if test="itemsName != null" >items_name,</if>
<if test="itermsConditions != null" >iterms_conditions,</if>
<if test="newcarPutTime != null" >newcar_put_time,</if>
<if test="productPutTime != null" >product_put_time,</if>
<if test="menuId != null" >menu_id,</if>
<if test="svpps != null" >svpps,</if>
<if test="applyArctic != null" >apply_arctic,</if>
<if test="referenceStand != null" >reference_stand,</if>
<if test="specialRequest != null" >special_request,</if>
<if test="relevanceFile != null" >relevance_file,</if>
<if test="remarks != null" >remarks,</if>
<if test="validFlag != null" >valid_flag,</if>
<if test="creationUser != null" >creation_user,</if>
<if test="creationTime != null" >creation_time,</if>
<if test="modifyTime != null" >modify_time,</if>
<if test="modifyUser != null" >modify_user,</if>
<if test="fo != null" >fo,</if>
<if test="dutyEngineer != null" >duty_engineer,</if>
<if test="claimType != null" >claim_type,</if>
<if test="busStandCover != null">bus_stand_cover,</if>
<if test="fileType != null">file_type,</if>
<if test="responsibleUnit != null">responsible_unit</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<if test="infoId != null" >#{infoId, jdbcType=VARCHAR},</if>
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
<if test="itermsConditions != null" >#{itermsConditions, jdbcType=CLOB},</if>
<if test="newcarPutTime != null" >#{newcarPutTime, jdbcType=TIMESTAMP},</if>
<if test="productPutTime != null" >#{productPutTime, jdbcType=TIMESTAMP},</if>
<if test="menuId != null" >#{menuId, jdbcType=VARCHAR},</if>
<if test="svpps != null" >#{svpps, jdbcType=VARCHAR},</if>
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
<if test="referenceStand != null" >#{referenceStand, jdbcType=VARCHAR},</if>
<if test="specialRequest != null" >#{specialRequest, jdbcType=VARCHAR},</if>
<if test="relevanceFile != null" >#{relevanceFile, jdbcType=VARCHAR},</if>
<if test="remarks != null" >#{remarks, jdbcType=VARCHAR},</if>
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
<if test="busStandCover != null" >#{busStandCover, jdbcType=VARCHAR},</if>
<if test="fileType != null" >#{fileType, jdbcType=VARCHAR},</if>
<if test="responsibleUnit != null" >#{responsibleUnit, jdbcType=VARCHAR}</if>
</trim>
</insert>
<!-- 根据pk,修改记录-->
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" >
update SAR_FILE_SPLIT_ITEMS
set info_id = #{infoId},
items_num = #{itemsNum},
items_name = #{itemsName},
iterms_conditions = #{itermsConditions},
newcar_put_time = #{newcarPutTime},
product_put_time = #{productPutTime},
menu_id = #{menuId},
svpps = #{svpps},
apply_arctic = #{applyArctic},
reference_stand = #{referenceStand},
special_request = #{specialRequest},
relevance_file = #{relevanceFile},
remarks = #{remarks},
valid_flag = #{validFlag},
creation_user = #{creationUser},
creation_time = #{creationTime},
modify_time = #{modifyTime},
modify_user = #{modifyUser}
where id = #{id}
</update>
<!-- 修改记录,只修改只不为空的字段 -->
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO" >
update SAR_FILE_SPLIT_ITEMS
<set >
<if test="infoId != null" >
info_id = #{infoId},
</if>
<if test="itemsNum != null" >
items_num = #{itemsNum},
</if>
<if test="itemsName != null" >
items_name = #{itemsName},
</if>
<if test="itermsConditions != null" >
iterms_conditions = #{itermsConditions},
</if>
<if test="newcarPutTime != null" >
newcar_put_time = #{newcarPutTime},
</if>
<if test="newcarPutTime == null" >
newcar_put_time = null,
</if>
<if test="productPutTime != null" >
product_put_time = #{productPutTime},
</if>
<if test="productPutTime == null" >
product_put_time = null,
</if>
<if test="menuId != null" >
menu_id = #{menuId},
</if>
<if test="svpps != null" >
svpps = #{svpps},
</if>
<if test="applyArctic != null" >
apply_arctic = #{applyArctic},
</if>
<if test="referenceStand != null" >
reference_stand = #{referenceStand},
</if>
<if test="specialRequest != null" >
special_request = #{specialRequest},
</if>
<if test="relevanceFile != null" >
relevance_file = #{relevanceFile},
</if>
<if test="remarks != null" >
remarks = #{remarks},
</if>
<if test="validFlag != null" >
valid_flag = #{validFlag},
</if>
<if test="creationUser != null" >
creation_user = #{creationUser},
</if>
<if test="creationTime != null" >
creation_time = #{creationTime},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime},
</if>
<if test="modifyUser != null" >
modify_user = #{modifyUser},
</if>
<if test="fo != null" >
fo = #{fo},
</if>
<if test="dutyEngineer != null" >
duty_engineer = #{dutyEngineer},
</if>
<if test="claimType != null" >
claim_type = #{claimType},
</if>
<if test="busStandCover != null" >
bus_stand_cover = #{busStandCover},
</if>
<if test="fileType != null" >
file_type = #{fileType},
</if>
<if test="responsibleUnit != null" >
responsible_unit = #{responsibleUnit},
</if>
</set>
where id = #{id}
</update>
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS -->
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select <include refid="Base_Column_List" />
from SAR_FILE_SPLIT_ITEMS
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0)
where SAR_FILE_SPLIT_ITEMS.id = #{value}
</select>
<!-- 删除记录 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SAR_FILE_SPLIT_ITEMS
where id = #{value}
</delete>
<!-- SAR_FILE_SPLIT_ITEMS 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from SAR_FILE_SPLIT_ITEMS
<include refid="Base_Where_Clause"/>
<if test="menuIdList != null">
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
<foreach collection="menuIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="idList != null">
and SAR_FILE_SPLIT_ITEMS.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<!-- 查询SAR_FILE_SPLIT_ITEMS列表 -->
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEOPage">
select * from
(select tmp_tb.* from
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0)
<include refid="Base_Where_Clause"/>
<if test="menuIdList != null">
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
<foreach collection="menuIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="idList != null">
and SAR_FILE_SPLIT_ITEMS.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
</select>
<select id="queryByList2" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEOPage">
select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0
)
<include refid="Base_Where_Clause"/>
<if test="menuId != null">
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
<foreach collection="menuIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0
)
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
<!-- 批量插入接口 -->
<insert id="insertForeach" parameterType="java.util.List">
insert into SAR_FILE_SPLIT_ITEMS
(id, info_id, items_num, items_name, newcar_put_time, product_put_time, menu_id, svpps, apply_arctic, reference_stand, special_request, relevance_file, remarks, valid_flag, creation_user, creation_time, modify_time,
modify_user, iterms_conditions)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id, jdbcType=VARCHAR}, #{item.infoId, jdbcType=VARCHAR}, #{item.itemsNum, jdbcType=VARCHAR},
#{item.itemsName, jdbcType=VARCHAR},
#{item.newcarPutTime, jdbcType=TIMESTAMP}, #{item.productPutTime, jdbcType=TIMESTAMP},
#{item.menuId, jdbcType=VARCHAR}, #{item.svpps, jdbcType=VARCHAR}, #{item.applyArctic, jdbcType=VARCHAR},
#{item.referenceStand, jdbcType=VARCHAR}, #{item.specialRequest, jdbcType=VARCHAR},
#{item.relevanceFile, jdbcType=VARCHAR}, #{item.remarks, jdbcType=VARCHAR},
#{item.validFlag, jdbcType=INTEGER}, #{item.creationUser, jdbcType=VARCHAR},
#{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP},
#{item.modifyUser, jdbcType=VARCHAR}, #{item.itermsConditions, jdbcType=CLOB}
)
</foreach>
</insert>
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
delete from SAR_FILE_SPLIT_ITEMS
where info_id in
<foreach collection="infoIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<delete id="deleteByItemsIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
delete from SAR_FILE_SPLIT_ITEMS
where id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<delete id="deleteByMenuIds" parameterType="java.util.List">
delete from SAR_FILE_SPLIT_ITEMS
where menu_id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 通过menuid 查询目录下所有的条目 -->
<select id="queryItemsByMenuId" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0
)
where SAR_FILE_SPLIT_ITEMS.valid_flag = '0' and menu_id in (
SELECT t3.id FROM (
SELECT t1.*,
IF(FIND_IN_SET(id, @pids) > 0, @pids := CONCAT(@pids, ',', id), '0') AS ischild
FROM (
SELECT * FROM SAR_FILE_SPLIT_MENU AS t WHERE valid_flag=0 ORDER BY t.id ASC
) t1,
(SELECT @pids := #{menuId}) t2
) t3 WHERE ischild != '0'
)
order by SAR_FILE_SPLIT_MENU.display_seq asc
</select>
<select id="queryByItemsIds" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO">
select menu_id from SAR_FILE_SPLIT_ITEMS
where id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
group by menu_id
</select>
<delete id="deleteByItemsIdList" parameterType="java.util.List">
delete from SAR_FILE_SPLIT_ITEMS
where id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<select id="queryByOrdersForExport" resultMap="BaseResultMapExport" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEOPage">
select SAR_FILE_SPLIT_ITEMS.id,SAR_FILE_SPLIT_ITEMS.items_num,SAR_FILE_SPLIT_ITEMS.items_name,
newcar_put_time,product_put_time,svpps,apply_arctic,reference_stand,SAR_FILE_SPLIT_ITEMS.remarks,
relevance_file,
tsFo.name as foShow,SAR_FILE_SPLIT_ITEMS.duty_engineer,
SAR_FILE_SPLIT_ITEMS.claim_type,SAR_FILE_SPLIT_ITEMS.bus_stand_cover,SAR_FILE_SPLIT_ITEMS.file_type,SAR_FILE_SPLIT_ITEMS.responsible_unit,TS_ORG.org_name as responsibleUnitShow,
dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.name as dutyEngineerShow
from SAR_FILE_SPLIT_ITEMS
left join SAR_FILE_SPLIT_MENU on SAR_FILE_SPLIT_ITEMS.MENU_ID = SAR_FILE_SPLIT_MENU.id
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_FILE_SPLIT_ITEMS.claim_type and dicClaimType.dic_id is
not null and dicClaimType.valid_flag = 0)
left join TS_ORG on (SAR_FILE_SPLIT_ITEMS.responsible_unit =TS_ORG.id)
left join TS_ROLE tsdutyEngineer on (tsdutyEngineer.ID = SAR_FILE_SPLIT_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
)
left join TS_ROLE tsFo on (tsFo.ID = SAR_FILE_SPLIT_ITEMS.fo and tsFo.valid_flag=0
)
<include refid="Base_Where_Clause"/>
<if test="menuId != null">
and SAR_FILE_SPLIT_ITEMS.MENU_ID in (
select SAR_FILE_SPLIT_MENU.id from SAR_FILE_SPLIT_MENU start with id=#{menuId} connect by prior id= p_id
)
</if>
<if test="idList != null">
and SAR_FILE_SPLIT_ITEMS.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
</mapper>