Merge branch 'develop_master' of http://101.36.229.190:90/LiuChao/foton-slrs-system-rest into develop_2
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
<?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.sarMenuStandard.dao.SarMenuStandardDao">
|
||||
|
||||
</mapper>
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
<?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.SarFileSplitInfoEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="sar_type" property="sarType" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="stand_id" property="standId" />
|
||||
<result column="file_type" property="fileType" />
|
||||
<result column="att_id" property="attId" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
<result column="stand_num_split" property="standNumSplit" />
|
||||
<result column="stand_name_split" property="standNameSplit" />
|
||||
<result column="result" property="result" />
|
||||
<result column="split_status" property="splitStatus" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_INFO table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
sar_type, file_name, id, stand_id, file_type, att_id, valid_flag, creation_time,
|
||||
creation_user, modify_time, modify_user,stand_num_split,stand_name_split,result
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="sarType != null" >
|
||||
and sar_type ${sarTypeOperator} #{sarType}
|
||||
</if>
|
||||
<if test="fileName != null" >
|
||||
and file_name ${fileNameOperator} #{fileName}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="standId != null" >
|
||||
and stand_id ${standIdOperator} #{standId}
|
||||
</if>
|
||||
<if test="fileType != null" >
|
||||
and file_type ${fileTypeOperator} #{fileType}
|
||||
</if>
|
||||
<if test="attId != null" >
|
||||
and att_id ${attIdOperator} #{attId}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_INFO.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_INFO(<include refid="Base_Column_List" />)
|
||||
values (#{sarType, jdbcType=VARCHAR}, #{fileName, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{fileType, jdbcType=VARCHAR}, #{attId, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{creationUser, jdbcType=VARCHAR}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_INFO.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="sarType != null" >sar_type,</if>
|
||||
<if test="fileName != null" >file_name,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="standId != null" >stand_id,</if>
|
||||
<if test="fileType != null" >file_type,</if>
|
||||
<if test="attId != null" >att_id,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
<if test="standNumSplit != null" >stand_num_split,</if>
|
||||
<if test="standNameSplit != null" >stand_name_split,</if>
|
||||
<if test="result != null" >result,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="sarType != null" >#{sarType, jdbcType=VARCHAR},</if>
|
||||
<if test="fileName != null" >#{fileName, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
||||
<if test="fileType != null" >#{fileType, jdbcType=VARCHAR},</if>
|
||||
<if test="attId != null" >#{attId, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
<if test="standNumSplit != null" >#{standNumSplit, jdbcType=VARCHAR},</if>
|
||||
<if test="standNameSplit != null" >#{standNameSplit, jdbcType=VARCHAR},</if>
|
||||
<if test="result != null" >#{result, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO" >
|
||||
update SAR_FILE_SPLIT_INFO
|
||||
set sar_type = #{sarType},
|
||||
file_name = #{fileName},
|
||||
stand_id = #{standId},
|
||||
file_type = #{fileType},
|
||||
att_id = #{attId},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
creation_user = #{creationUser},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO" >
|
||||
update SAR_FILE_SPLIT_INFO
|
||||
<set >
|
||||
<if test="sarType != null" >
|
||||
sar_type = #{sarType},
|
||||
</if>
|
||||
<if test="fileName != null" >
|
||||
file_name = #{fileName},
|
||||
</if>
|
||||
<if test="standId != null" >
|
||||
stand_id = #{standId},
|
||||
</if>
|
||||
<if test="fileType != null" >
|
||||
file_type = #{fileType},
|
||||
</if>
|
||||
<if test="attId != null" >
|
||||
att_id = #{attId},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
modify_user = #{modifyUser},
|
||||
</if>
|
||||
<if test="result != null" >
|
||||
result = #{result},
|
||||
</if>
|
||||
<if test="standNumSplit != null" >
|
||||
stand_num_split = #{standNumSplit},
|
||||
</if>
|
||||
<if test="standNameSplit != null" >
|
||||
stand_name_split = #{standNameSplit},
|
||||
</if>
|
||||
<if test="splitStatus != null" >
|
||||
split_status = #{splitStatus}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_FILE_SPLIT_INFO -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_FILE_SPLIT_INFO
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_INFO
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_INFO 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_FILE_SPLIT_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_INFO列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryByPageOwn" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(SELECT
|
||||
SAR_FILE_SPLIT_INFO.*,
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) AS showNumber,
|
||||
SAR_STANDARDS_INFO.stand_name as standName
|
||||
FROM
|
||||
SAR_FILE_SPLIT_INFO
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON SAR_FILE_SPLIT_INFO.STAND_ID = SAR_STANDARDS_INFO.id
|
||||
where SAR_FILE_SPLIT_INFO.valid_flag =0
|
||||
<if test="numOrName != null and numOrName != ''" >
|
||||
and (
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{numOrName}),'%') or SAR_STANDARDS_INFO.stand_name like concat(concat('%',#{numOrName}),'%')
|
||||
or SAR_FILE_SPLIT_INFO.stand_num_split like concat(concat('%',#{numOrName}),'%')
|
||||
or SAR_FILE_SPLIT_INFO.stand_name_split like concat(concat('%',#{numOrName}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="standId != null and standId != ''">
|
||||
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
and SAR_FILE_SPLIT_INFO.id = #{id}
|
||||
</if>
|
||||
<if test="fileType != null and fileType != ''">
|
||||
and SAR_FILE_SPLIT_INFO.file_type = #{fileType}
|
||||
</if>
|
||||
<if test="splitStatus != null and splitStatus != ''">
|
||||
and SAR_FILE_SPLIT_INFO.split_status = #{splitStatus}
|
||||
</if>
|
||||
<if test="result != null ">
|
||||
and SAR_FILE_SPLIT_INFO.result = #{result}
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByCountOwn" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEOPage">
|
||||
SELECT
|
||||
count(0)
|
||||
FROM
|
||||
SAR_FILE_SPLIT_INFO
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON SAR_FILE_SPLIT_INFO.STAND_ID = SAR_STANDARDS_INFO.id
|
||||
where SAR_FILE_SPLIT_INFO.valid_flag =0
|
||||
<if test="numOrName != null and numOrName != ''" >
|
||||
and (
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{numOrName}),'%') or SAR_STANDARDS_INFO.stand_name like concat(concat('%',#{numOrName}),'%')
|
||||
or SAR_FILE_SPLIT_INFO.stand_num_split like concat(concat('%',#{numOrName}),'%')
|
||||
or SAR_FILE_SPLIT_INFO.stand_name_split like concat(concat('%',#{numOrName}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="standId != null and standId != ''">
|
||||
and SAR_FILE_SPLIT_INFO.stand_id = #{standId}
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
and SAR_FILE_SPLIT_INFO.id = #{id}
|
||||
</if>
|
||||
<if test="fileType != null and fileType != ''">
|
||||
and SAR_FILE_SPLIT_INFO.file_type = #{fileType}
|
||||
</if>
|
||||
<if test="splitStatus != null and splitStatus != ''">
|
||||
and SAR_FILE_SPLIT_INFO.split_status = #{splitStatus}
|
||||
</if>
|
||||
<if test="result != null ">
|
||||
and SAR_FILE_SPLIT_INFO.result = #{result}
|
||||
</if>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitInfoEO">
|
||||
delete from SAR_FILE_SPLIT_INFO
|
||||
where id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
+572
@@ -0,0 +1,572 @@
|
||||
<?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 >= #{newcarPutTime1}
|
||||
</if>
|
||||
<if test="newcarPutTime2 != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.newcar_put_time <= #{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 >= #{productPutTime1}
|
||||
</if>
|
||||
<if test="productPutTime2 != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.product_put_time <= #{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 >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.creation_time <= #{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 >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and SAR_FILE_SPLIT_ITEMS.modify_time <= #{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>
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
<?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.SarFileSplitItemsParamsEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsParamsEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="item_id" property="itemId" />
|
||||
<result column="description" property="description" />
|
||||
<result column="figure" property="figure" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="info_id" property="infoId" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_PARAMS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, item_id, description, figure, valid_flag, creation_time, modify_time, info_id
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="itemId != null" >
|
||||
and item_id ${itemIdOperator} #{itemId}
|
||||
</if>
|
||||
<if test="description != null" >
|
||||
and description ${descriptionOperator} #{description}
|
||||
</if>
|
||||
<if test="figure != null" >
|
||||
and figure ${figureOperator} #{figure}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="infoId != null" >
|
||||
and info_id ${infoIdOperator} #{infoId}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsParamsEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_PARAMS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{itemId, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{figure, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{infoId, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsParamsEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_PARAMS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="itemId != null" >item_id,</if>
|
||||
<if test="description != null" >description,</if>
|
||||
<if test="figure != null" >figure,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="infoId != null" >info_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="itemId != null" >#{itemId, jdbcType=VARCHAR},</if>
|
||||
<if test="description != null" >#{description, jdbcType=VARCHAR},</if>
|
||||
<if test="figure != null" >#{figure, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="infoId != null" >#{infoId, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsParamsEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
set item_id = #{itemId},
|
||||
description = #{description},
|
||||
figure = #{figure},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime},
|
||||
info_id = #{infoId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsParamsEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
<set >
|
||||
<if test="itemId != null" >
|
||||
item_id = #{itemId},
|
||||
</if>
|
||||
<if test="description != null" >
|
||||
description = #{description},
|
||||
</if>
|
||||
<if test="figure != null" >
|
||||
figure = #{figure},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="infoId != null" >
|
||||
info_id = #{infoId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_PARAMS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_PARAMS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_PARAMS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByItemIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
where item_id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
insert into SAR_FILE_SPLIT_ITEMS_PARAMS(<include refid="Base_Column_List" />)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.id, jdbcType=VARCHAR}, #{item.itemId, jdbcType=VARCHAR}, #{item.description, jdbcType=VARCHAR}, #{item.figure, jdbcType=VARCHAR}, #{item.validFlag, jdbcType=INTEGER}, #{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP}, #{item.infoId, jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByInfoIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
where info_id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
||||
<select id="queryItemsParamsByMenuId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_PARAMS
|
||||
where valid_flag = '0' and ITEM_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
<?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.SarFileSplitItemsTableEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsTableEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="items_val_id" property="itemsValId" />
|
||||
<result column="items_id" property="itemsId" />
|
||||
<result column="row_num" property="rowNum" />
|
||||
<result column="col_num" property="colNum" />
|
||||
<result column="content" property="content" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_TABLE table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, items_val_id, items_id, row_num, col_num, content, valid_flag, creation_time, modify_time, modify_user
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="itemsValId != null" >
|
||||
and items_val_id ${itemsValIdOperator} #{itemsValId}
|
||||
</if>
|
||||
<if test="itemsId != null" >
|
||||
and items_id ${itemsIdOperator} #{itemsId}
|
||||
</if>
|
||||
<if test="rowNum != null" >
|
||||
and row_num ${rowNumOperator} #{rowNum}
|
||||
</if>
|
||||
<if test="colNum != null" >
|
||||
and col_num ${colNumOperator} #{colNum}
|
||||
</if>
|
||||
<if test="content != null" >
|
||||
and content ${contentOperator} #{content}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsTableEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_TABLE.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{itemsValId, jdbcType=VARCHAR}, #{itemsId, jdbcType=VARCHAR}, #{rowNum, jdbcType=INTEGER}, #{colNum, jdbcType=INTEGER}, #{content, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsTableEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_TABLE.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="itemsValId != null" >items_val_id,</if>
|
||||
<if test="itemsId != null" >items_id,</if>
|
||||
<if test="rowNum != null" >row_num,</if>
|
||||
<if test="colNum != null" >col_num,</if>
|
||||
<if test="content != null" >content,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsValId != null" >#{itemsValId, jdbcType=VARCHAR},</if>
|
||||
<if test="itemsId != null" >#{itemsId, jdbcType=VARCHAR},</if>
|
||||
<if test="rowNum != null" >#{rowNum, jdbcType=INTEGER},</if>
|
||||
<if test="colNum != null" >#{colNum, jdbcType=INTEGER},</if>
|
||||
<if test="content != null" >#{content, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsTableEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
set items_val_id = #{itemsValId},
|
||||
items_id = #{itemsId},
|
||||
row_num = #{rowNum},
|
||||
col_num = #{colNum},
|
||||
content = #{content},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsTableEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<set >
|
||||
<if test="itemsValId != null" >
|
||||
items_val_id = #{itemsValId},
|
||||
</if>
|
||||
<if test="itemsId != null" >
|
||||
items_id = #{itemsId},
|
||||
</if>
|
||||
<if test="rowNum != null" >
|
||||
row_num = #{rowNum},
|
||||
</if>
|
||||
<if test="colNum != null" >
|
||||
col_num = #{colNum},
|
||||
</if>
|
||||
<if test="content != null" >
|
||||
content = #{content},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</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>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_TABLE -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_TABLE 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_TABLE列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
insert into SAR_FILE_SPLIT_ITEMS_TABLE(<include refid="Base_Column_List" />)
|
||||
values (#{item.id, jdbcType=VARCHAR}, #{item.itemsValId, jdbcType=VARCHAR},
|
||||
#{item.itemsId, jdbcType=VARCHAR}, #{item.rowNum, jdbcType=INTEGER}, #{item.colNum, jdbcType=INTEGER},
|
||||
#{item.content, jdbcType=VARCHAR}, #{item.validFlag, jdbcType=INTEGER}, #{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP}, #{item.modifyUser, jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="queryByRowNum" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select row_num from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
group by row_num
|
||||
order by row_num
|
||||
</select>
|
||||
|
||||
<delete id="deleteByitemValIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where ITEMS_VAL_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTableByMenuIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where EXISTS (
|
||||
select 1 from SAR_FILE_SPLIT_ITEMS
|
||||
where SAR_FILE_SPLIT_ITEMS_TABLE.ITEMS_ID=SAR_FILE_SPLIT_ITEMS.id
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByitemIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where ITEMS_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
||||
<select id="queryItemsTableByMenuId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_TABLE
|
||||
where valid_flag = '0' and ITEMS_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+295
@@ -0,0 +1,295 @@
|
||||
<?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.SarFileSplitItemsValEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="type" property="type" />
|
||||
<result column="item_id" property="itemId" />
|
||||
<result column="item_content" property="itemContent" />
|
||||
<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="display_seq" property="displaySeq" />
|
||||
<result column="img_name" property="imgName" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_VAL table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, type, item_id, item_content, valid_flag, creation_user, creation_time, modify_time, modify_user, display_seq,img_name
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
and type ${typeOperator} #{type}
|
||||
</if>
|
||||
<if test="itemId != null" >
|
||||
and item_id ${itemIdOperator} #{itemId}
|
||||
</if>
|
||||
<if test="itemContent != null" >
|
||||
and item_content ${itemContentOperator} #{itemContent}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
<if test="displaySeq != null" >
|
||||
and display_seq ${displaySeqOperator} #{displaySeq}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_VAL.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_VAL(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{type, jdbcType=VARCHAR}, #{itemId, jdbcType=VARCHAR}, #{itemContent, jdbcType=CLOB}, #{validFlag, jdbcType=INTEGER}, #{creationUser, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{modifyUser, jdbcType=VARCHAR}, #{displaySeq, jdbcType=INTEGER})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_ITEMS_VAL.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="type != null" >type,</if>
|
||||
<if test="itemId != null" >item_id,</if>
|
||||
<if test="itemContent != null" >item_content,</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="displaySeq != null" >display_seq,</if>
|
||||
<if test="imgName != null" >img_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="type != null" >#{type, jdbcType=VARCHAR},</if>
|
||||
<if test="itemId != null" >#{itemId, jdbcType=VARCHAR},</if>
|
||||
<if test="itemContent != null" >#{itemContent, jdbcType=CLOB},</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="displaySeq != null" >#{displaySeq, jdbcType=INTEGER},</if>
|
||||
<if test="imgName != null" >#{imgName, jdbcType=INTEGER},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_VAL
|
||||
set type = #{type},
|
||||
item_id = #{itemId},
|
||||
item_content = #{itemContent},
|
||||
valid_flag = #{validFlag},
|
||||
creation_user = #{creationUser},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser},
|
||||
display_seq = #{displaySeq}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO" >
|
||||
update SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<set >
|
||||
<if test="type != null" >
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="itemId != null" >
|
||||
item_id = #{itemId},
|
||||
</if>
|
||||
<if test="itemContent != null" >
|
||||
item_content = #{itemContent},
|
||||
</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="displaySeq != null" >
|
||||
display_seq = #{displaySeq},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_FILE_SPLIT_ITEMS_VAL -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_ITEMS_VAL 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_ITEMS_VAL列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsValEO">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByitemId" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where item_id = #{value}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 批量插入接口 -->
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
insert into SAR_FILE_SPLIT_ITEMS_VAL
|
||||
(id, type, item_id, valid_flag, creation_user, creation_time, modify_time, modify_user, display_seq, img_name, item_content)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
#{item.id, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR},
|
||||
#{item.itemId, jdbcType=VARCHAR},
|
||||
#{item.validFlag, jdbcType=INTEGER}, #{item.creationUser, jdbcType=VARCHAR},
|
||||
#{item.creationTime, jdbcType=TIMESTAMP}, #{item.modifyTime, jdbcType=TIMESTAMP},
|
||||
#{item.modifyUser, jdbcType=VARCHAR}, #{item.displaySeq, jdbcType=INTEGER},
|
||||
#{item.imgName, jdbcType=INTEGER},
|
||||
#{item.itemContent, jdbcType=CLOB})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteValByInfoIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where EXISTS (
|
||||
select 1 from SAR_FILE_SPLIT_ITEMS
|
||||
where SAR_FILE_SPLIT_ITEMS_VAL.ITEM_ID=SAR_FILE_SPLIT_ITEMS.id
|
||||
and SAR_FILE_SPLIT_ITEMS.INFO_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
|
||||
<delete id="deleteValByitemIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where ITEM_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateForeach" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
update SAR_FILE_SPLIT_ITEMS_VAL
|
||||
<set >
|
||||
item_content = #{item.itemContent, jdbcType=VARCHAR},
|
||||
modify_time = #{item.modifyTime, jdbcType=TIMESTAMP},
|
||||
modify_user = #{item.modifyUser, jdbcType=VARCHAR},
|
||||
display_seq = #{item.displaySeq, jdbcType=INTEGER},
|
||||
</set>
|
||||
where id = #{item.id, jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
;
|
||||
</update>
|
||||
|
||||
<delete id="deleteValByMenuIds" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where EXISTS (
|
||||
select 1 from SAR_FILE_SPLIT_ITEMS
|
||||
where SAR_FILE_SPLIT_ITEMS_VAL.ITEM_ID=SAR_FILE_SPLIT_ITEMS.id
|
||||
and SAR_FILE_SPLIT_ITEMS.MENU_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
|
||||
<!-- 通过menuid 查询目录下所有的条目 -->
|
||||
<select id="queryItemsValByMenuId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_ITEMS_VAL
|
||||
where valid_flag = '0' and ITEM_ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
+363
@@ -0,0 +1,363 @@
|
||||
<?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.SarFileSplitMenuEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="info_id" property="infoId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="p_id" property="pId" />
|
||||
<result column="display_seq" property="displaySeq" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="remarks" property="remarks" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="modify_user" property="modifyUser" />
|
||||
<result column="item_name" property="itemName" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_MENU table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, info_id, name, p_id, display_seq, valid_flag, creation_time, modify_time, remarks, creation_user, modify_user,item_name
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="infoId != null" >
|
||||
and info_id ${infoIdOperator} #{infoId}
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
and name ${nameOperator} #{name}
|
||||
</if>
|
||||
<if test="pId != null" >
|
||||
and p_id ${pIdOperator} #{pId}
|
||||
</if>
|
||||
<if test="displaySeq != null" >
|
||||
and display_seq ${displaySeqOperator} #{displaySeq}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
and remarks ${remarksOperator} #{remarks}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_MENU.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_MENU(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{infoId, jdbcType=VARCHAR}, #{name, jdbcType=VARCHAR}, #{pId, jdbcType=VARCHAR}, #{displaySeq, jdbcType=VARCHAR}, #{validFlag, jdbcType=INTEGER}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{remarks, jdbcType=VARCHAR}, #{creationUser, jdbcType=VARCHAR}, #{modifyUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_FILE_SPLIT_MENU.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_FILE_SPLIT_MENU
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="infoId != null" >info_id,</if>
|
||||
<if test="name != null" >name,</if>
|
||||
<if test="pId != null" >p_id,</if>
|
||||
<if test="displaySeq != null" >display_seq,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="remarks != null" >remarks,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
<if test="itemName != null" >item_name,</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="name != null" >#{name, jdbcType=VARCHAR},</if>
|
||||
<if test="pId != null" >#{pId, jdbcType=VARCHAR},</if>
|
||||
<if test="displaySeq != null" >#{displaySeq, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="remarks != null" >#{remarks, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
<if test="itemName != null" >#{itemName, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
set info_id = #{infoId},
|
||||
name = #{name},
|
||||
p_id = #{pId},
|
||||
display_seq = #{displaySeq},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime},
|
||||
remarks = #{remarks},
|
||||
creation_user = #{creationUser},
|
||||
modify_user = #{modifyUser}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
<set >
|
||||
<if test="infoId != null" >
|
||||
info_id = #{infoId},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="pId != null" >
|
||||
p_id = #{pId},
|
||||
</if>
|
||||
<if test="displaySeq != null" >
|
||||
display_seq = #{displaySeq},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="remarks != null" >
|
||||
remarks = #{remarks},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
<if test="modifyUser != null" >
|
||||
modify_user = #{modifyUser},
|
||||
</if>
|
||||
<if test="itemName != null" >
|
||||
item_name = #{itemName},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_FILE_SPLIT_MENU -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_FILE_SPLIT_MENU
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_FILE_SPLIT_MENU
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_FILE_SPLIT_MENU 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_FILE_SPLIT_MENU
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_FILE_SPLIT_MENU列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_FILE_SPLIT_MENU
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_FILE_SPLIT_MENU
|
||||
<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_MENU(<include refid="Base_Column_List" />)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.id, jdbcType=VARCHAR},
|
||||
#{item.infoId, jdbcType=VARCHAR},
|
||||
#{item.name, jdbcType=VARCHAR},
|
||||
#{item.pId, jdbcType=VARCHAR},
|
||||
#{item.displaySeq, jdbcType=VARCHAR},
|
||||
#{item.validFlag, jdbcType=INTEGER},
|
||||
#{item.creationTime, jdbcType=TIMESTAMP},
|
||||
#{item.modifyTime, jdbcType=TIMESTAMP}, #{item.remarks, jdbcType=VARCHAR},
|
||||
#{item.creationUser, jdbcType=VARCHAR}, #{item.modifyUser, jdbcType=VARCHAR} , #{item.itemName, jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByIds" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO">
|
||||
delete from SAR_FILE_SPLIT_MENU
|
||||
where info_id in
|
||||
<foreach collection="infoIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<update id="updateDisplaySeqAdd" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
set display_seq = display_seq+#{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where display_seq >= #{displaySeqStart} and display_seq < #{displaySeqEnd} and valid_flag = 0 and info_id = #{infoId}
|
||||
</update>
|
||||
|
||||
<update id="updateDisplaySeqCut" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
set display_seq = display_seq-#{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where display_seq <= #{displaySeqEnd} and display_seq > #{displaySeqStart} and valid_flag = 0 and info_id = #{infoId}
|
||||
</update>
|
||||
|
||||
<!--oracle-->
|
||||
<!--<select id="queryByPidExcpetSelf" resultMap="BaseResultMap" parameterType="com.adc.da.lawss.entity.SarFileSplitMenuEO">-->
|
||||
<!--select SAR_FILE_SPLIT_MENU.* from SAR_FILE_SPLIT_MENU-->
|
||||
<!--where valid_flag=0 and id != #{id}-->
|
||||
<!--start with id=#{id} connect by prior id= p_id-->
|
||||
<!--</select>-->
|
||||
|
||||
<select id="queryByPidExcpetSelf" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO">
|
||||
SELECT * 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 := #{id}) t2
|
||||
) t3 WHERE ischild != '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPId" parameterType="java.lang.String">
|
||||
delete
|
||||
from SAR_FILE_SPLIT_MENU
|
||||
where id in
|
||||
<foreach collection="id" open="(" index="index" item="item" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</delete>
|
||||
<select id="getChild" resultType="String">
|
||||
select n.id
|
||||
from SAR_FILE_SPLIT_MENU n,
|
||||
(select (@nodes := queryChildrenTempNode1(#{id})) as pids) t
|
||||
WHERE FIND_IN_SET(n.id, t.pids)
|
||||
</select>
|
||||
|
||||
<!--<select id="getMaxDisplayByid" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">-->
|
||||
<!--SELECT max(SAR_FILE_SPLIT_MENU.DISPLAY_SEQ) FROM-->
|
||||
<!--SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = p_id-->
|
||||
<!--</select>-->
|
||||
|
||||
<select id="getMaxDisplayByid" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT max(t3.DISPLAY_SEQ) 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 := #{id}) t2
|
||||
) t3 WHERE ischild != '0'
|
||||
</select>
|
||||
|
||||
<select id="getChildrenCountByParentId" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT count(*) FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = p_id
|
||||
</select>
|
||||
|
||||
<update id="updateChildrenDisplaySeqByIDAdd" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
set display_seq = display_seq + #{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id in ( SELECT id FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = p_id)
|
||||
</update>
|
||||
|
||||
<update id="updateChildrenDisplaySeqByIDCut" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO" >
|
||||
update SAR_FILE_SPLIT_MENU
|
||||
set display_seq = display_seq - #{childrenCount},
|
||||
modify_time = #{modifyTime},
|
||||
modify_user = #{modifyUser}
|
||||
where id in ( SELECT id FROM
|
||||
SAR_FILE_SPLIT_MENU START WITH id = #{id} CONNECT BY PRIOR id = p_id)
|
||||
</update>
|
||||
|
||||
<!--oracle 写法-->
|
||||
<!--<select id="queryAllChildrenByid" resultMap="BaseResultMap" parameterType="com.adc.da.lawss.entity.SarFileSplitMenuEO">-->
|
||||
<!--select SAR_FILE_SPLIT_MENU.* from SAR_FILE_SPLIT_MENU-->
|
||||
<!--where valid_flag=0-->
|
||||
<!--start with id=#{id} connect by prior id= p_id-->
|
||||
<!--</select>-->
|
||||
|
||||
|
||||
<select id="queryAllChildrenByid" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarFileSplitMenuEO">
|
||||
SELECT * 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 := #{id}) t2
|
||||
) t3 WHERE ischild != '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIdList" parameterType="java.util.List">
|
||||
delete from SAR_FILE_SPLIT_MENU
|
||||
where id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
<?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.SarStandAttrDetailsEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="attr_field" property="attrField" />
|
||||
<result column="attr_name" property="attrName" />
|
||||
<result column="attr_type" property="attrType" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="is_edit" property="isEdit" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="attr_len" property="attrLen" />
|
||||
<result column="is_must" property="isMust" />
|
||||
<result column="is_show_imp" property="isShowImp" />
|
||||
<result column="show_region_id" property="showRegionId" />
|
||||
<result column="sel_val" property="selVal" />
|
||||
<result column="sar_type" property="sarType" />
|
||||
<result column="is_search" property="isSearch" />
|
||||
<result column="is_warn" property="isWarn" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_ATTR_DETAILS table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
id, attr_field, attr_name, attr_type, order_num, is_edit, creation_user,
|
||||
valid_flag, creation_time, modify_time,
|
||||
attr_len,is_must,is_show_imp,show_region_id,sel_val,sar_type,is_search,is_warn
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_Show" >
|
||||
SAR_STAND_ATTR_DETAILS.id, attr_field, attr_name, attr_type, SAR_STAND_ATTR_DETAILS.order_num, is_edit, SAR_STAND_ATTR_DETAILS.creation_user,
|
||||
SAR_STAND_ATTR_DETAILS.valid_flag, SAR_STAND_ATTR_DETAILS.creation_time, SAR_STAND_ATTR_DETAILS.modify_time,
|
||||
attr_len,is_must,is_show_imp,show_region_id,sel_val,SAR_STAND_ATTR_DETAILS.sar_type,is_search,is_warn
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1 and SAR_STAND_ATTR_DETAILS.valid_flag=0
|
||||
<trim suffixOverrides="," >
|
||||
<if test="isShow != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.is_show_imp = 0
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="attrField != null" >
|
||||
and attr_field ${attrFieldOperator} #{attrField}
|
||||
</if>
|
||||
<if test="attrName != null" >
|
||||
and attr_name ${attrNameOperator} #{attrName}
|
||||
</if>
|
||||
<if test="attrType != null" >
|
||||
and attr_type ${attrTypeOperator} #{attrType}
|
||||
</if>
|
||||
<if test="orderNum != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.order_num ${orderNumOperator} #{orderNum}
|
||||
</if>
|
||||
<if test="isEdit != null" >
|
||||
and is_edit ${isEditOperator} #{isEdit}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="attrLen != null" >
|
||||
and attr_len ${attrLenOperator} #{attrLen}
|
||||
</if>
|
||||
<if test="sarType != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.sar_type like concat(concat('%',#{sarType}),'%')
|
||||
</if>
|
||||
<if test="isSearch != null" >
|
||||
and is_search = #{isSearch}
|
||||
</if>
|
||||
<if test="isWarn != null" >
|
||||
and is_warn = #{isWarn}
|
||||
</if>
|
||||
<if test="notId != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.ID != #{notId}
|
||||
</if>
|
||||
<if test="idList != null" >
|
||||
and SAR_STAND_ATTR_DETAILS.ID in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ATTR_DETAILS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ATTR_DETAILS(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{attrField, jdbcType=VARCHAR}, #{attrName, jdbcType=VARCHAR}, #{attrType, jdbcType=VARCHAR}, #{orderNum, jdbcType=VARCHAR}, #{isEdit, jdbcType=VARCHAR}, #{creationUser, jdbcType=VARCHAR}, #{validFlag, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP}, #{attrLen, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_ATTR_DETAILS.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_ATTR_DETAILS
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="attrField != null" >attr_field,</if>
|
||||
<if test="attrName != null" >attr_name,</if>
|
||||
<if test="attrType != null" >attr_type,</if>
|
||||
<if test="orderNum != null" >order_num,</if>
|
||||
<if test="isEdit != null" >is_edit,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="attrLen != null" >attr_len,</if>
|
||||
<if test="isMust != null" >is_must,</if>
|
||||
<if test="isShowImp != null" >is_show_imp,</if>
|
||||
<if test="showRegionId != null" >show_region_id,</if>
|
||||
<if test="selVal != null" >sel_val,</if>
|
||||
<if test="sarType != null" >sar_type,</if>
|
||||
<if test="isSearch != null" >is_search,</if>
|
||||
<if test="isWarn != null" >is_warn,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="attrField != null" >#{attrField, jdbcType=VARCHAR},</if>
|
||||
<if test="attrName != null" >#{attrName, jdbcType=VARCHAR},</if>
|
||||
<if test="attrType != null" >#{attrType, jdbcType=VARCHAR},</if>
|
||||
<if test="orderNum != null" >#{orderNum, jdbcType=VARCHAR},</if>
|
||||
<if test="isEdit != null" >#{isEdit, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=VARCHAR},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="attrLen != null" >#{attrLen, jdbcType=VARCHAR},</if>
|
||||
<if test="isMust != null" >#{isMust, jdbcType=VARCHAR},</if>
|
||||
<if test="isShowImp != null" >#{isShowImp, jdbcType=VARCHAR},</if>
|
||||
<if test="showRegionId != null" >#{showRegionId, jdbcType=VARCHAR},</if>
|
||||
<if test="selVal != null" >#{selVal, jdbcType=VARCHAR},</if>
|
||||
<if test="sarType != null" >#{sarType, jdbcType=VARCHAR},</if>
|
||||
<if test="isSearch != null" >#{isSearch, jdbcType=VARCHAR},</if>
|
||||
<if test="isWarn != null" >#{isWarn, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO" >
|
||||
update SAR_STAND_ATTR_DETAILS
|
||||
set attr_field = #{attrField},
|
||||
attr_name = #{attrName},
|
||||
attr_type = #{attrType},
|
||||
order_num = #{orderNum},
|
||||
is_edit = #{isEdit},
|
||||
creation_user = #{creationUser},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime},
|
||||
attr_len = #{attrLen}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandAttrDetailsEO" >
|
||||
update SAR_STAND_ATTR_DETAILS
|
||||
<set >
|
||||
<if test="attrField != null" >
|
||||
attr_field = #{attrField},
|
||||
</if>
|
||||
<if test="attrName != null" >
|
||||
attr_name = #{attrName},
|
||||
</if>
|
||||
<if test="attrType != null" >
|
||||
attr_type = #{attrType},
|
||||
</if>
|
||||
<if test="orderNum != null" >
|
||||
order_num = #{orderNum},
|
||||
</if>
|
||||
<if test="isEdit != null" >
|
||||
is_edit = #{isEdit},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="attrLen != null" >
|
||||
attr_len = #{attrLen},
|
||||
</if>
|
||||
<if test="isMust != null" >
|
||||
is_must = #{isMust},
|
||||
</if>
|
||||
<if test="isShowImp != null" >
|
||||
is_show_imp = #{isShowImp},
|
||||
</if>
|
||||
<if test="showRegionId != null" >
|
||||
show_region_id = #{showRegionId},
|
||||
</if>
|
||||
<if test="selVal != null" >
|
||||
sel_val = #{selVal},
|
||||
</if>
|
||||
<if test="sarType != null" >
|
||||
sar_type = #{sarType},
|
||||
</if>
|
||||
<if test="isSearch != null" >
|
||||
is_search = #{isSearch},
|
||||
</if>
|
||||
<if test="isWarn != null" >
|
||||
is_warn = #{isWarn},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STAND_ATTR_DETAILS -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_ATTR_DETAILS
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_ATTR_DETAILS 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_ATTR_DETAILS列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" />,areaName from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List_Show" />,UT_AREA.area_name as areaName from SAR_STAND_ATTR_DETAILS
|
||||
left join UT_AREA on SAR_STAND_ATTR_DETAILS.show_region_id = UT_AREA.id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by SAR_STAND_ATTR_DETAILS.order_num,SAR_STAND_ATTR_DETAILS.id
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<update id="deleteByIds" parameterType="java.lang.String" >
|
||||
delete from SAR_STAND_ATTR_DETAILS
|
||||
where id in
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectAllFieldToStr" resultType="java.lang.String" parameterType="com.adc.da.base.page.BasePage">
|
||||
SELECT listagg ( attr_field, ',' ) within GROUP ( ORDER BY attr_field )
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<select id="selectFieldByName" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where attr_name = #{attrName} and valid_flag=0
|
||||
<if test='sarType != null and sarType == "INLAND_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
|
||||
and sar_type=#{sarType}
|
||||
</if>
|
||||
limit 0,1
|
||||
</select>
|
||||
|
||||
<select id="selectFileFieldForSel" resultType="com.adc.da.sys.common.SelectionResult" parameterType="java.lang.String">
|
||||
SELECT attr_field as value, attr_name as label
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where valid_flag=0 and attr_type='FILE' and
|
||||
(sar_type='STAND' or sar_type='INLAND_STAND' or sar_type='FOREIGN_STAND')
|
||||
<if test="attrField != null">
|
||||
and attr_field=#{attrField}
|
||||
</if>
|
||||
group by attr_field,attr_name
|
||||
</select>
|
||||
|
||||
<!-- 标准拆分在用-->
|
||||
<select id="selectFileFieldForSel1" resultType="com.adc.da.sys.common.SelectionResult"
|
||||
parameterType="java.lang.String">
|
||||
SELECT attr_field as value, attr_name as label
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where valid_flag=0 and attr_type='FILE' and
|
||||
(sar_type='STAND' or sar_type='INLAND_STAND' or sar_type='FOREIGN_STAND' or SAR_TYPE = 'FOREIGN_LAWS')
|
||||
<if test="attrField != null">
|
||||
and attr_field=#{attrField}
|
||||
</if>
|
||||
group by attr_field,attr_name
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNameByField" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT attr_name
|
||||
from SAR_STAND_ATTR_DETAILS
|
||||
where attr_field = #{attrField} and valid_flag=0
|
||||
<if test='sarType != null and sarType == "INLAND_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType == "FOREIGN_STAND"'>
|
||||
and (sar_type=#{sarType} or sar_type='STAND')
|
||||
</if>
|
||||
<if test='sarType != null and sarType != "FOREIGN_STAND" and sarType != "INLAND_STAND"'>
|
||||
and sar_type=#{sarType}
|
||||
</if>
|
||||
limit 0,1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,359 @@
|
||||
<?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.SarStandFileEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarStandFileEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="use_model" property="useModel" />
|
||||
<result column="att_id" property="attId" />
|
||||
<result column="ori_att_id" property="oriAttId" />
|
||||
<result column="stand_id" property="standId" />
|
||||
<result column="file_suffix" property="fileSuffix" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="stand_file_classify" property="standFileClassify" />
|
||||
<result column="password" property="password" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="resId" property="resId" />
|
||||
<result column="standNumber" property="standNumber" />
|
||||
<result column="standName" property="standName" />
|
||||
<result column="sarType" property="sarType" />
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STAND_FILE table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
modify_time, creation_time, valid_flag, use_model, att_id, stand_id, id,file_suffix,file_name,stand_file_classify,
|
||||
password,creation_user,ori_att_id
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1
|
||||
<trim suffixOverrides="," >
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="useModel != null" >
|
||||
and use_model ${useModelOperator} #{useModel}
|
||||
</if>
|
||||
<if test="attId != null" >
|
||||
and att_id ${attIdOperator} #{attId}
|
||||
</if>
|
||||
<if test="standId != null" >
|
||||
and stand_id ${standIdOperator} #{standId}
|
||||
</if>
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandFileEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_SAR_STAND_FILE.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into SAR_STAND_FILE(<include refid="Base_Column_List" />)
|
||||
values (#{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER},
|
||||
#{useModel, jdbcType=VARCHAR}, #{attId, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR},
|
||||
#{id, jdbcType=VARCHAR},#{fileSuffix, jdbcType=VARCHAR},#{fileName, jdbcType=VARCHAR},#{standFileClassify, jdbcType=VARCHAR},
|
||||
#{password, jdbcType=VARCHAR},#{creationUser, jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandFileEO" >
|
||||
insert into SAR_STAND_FILE
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="useModel != null" >use_model,</if>
|
||||
<if test="attId != null" >att_id,</if>
|
||||
<if test="standId != null" >stand_id,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="fileSuffix != null" >file_suffix,</if>
|
||||
<if test="fileName != null" >file_name,</if>
|
||||
<if test="standFileClassify != null" >stand_file_classify,</if>
|
||||
<if test="password != null" >password,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="oriAttId != null" >ori_att_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||
<if test="useModel != null" >#{useModel, jdbcType=VARCHAR},</if>
|
||||
<if test="attId != null" >#{attId, jdbcType=VARCHAR},</if>
|
||||
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="fileSuffix != null" >#{fileSuffix, jdbcType=VARCHAR},</if>
|
||||
<if test="fileName != null" >#{fileName, jdbcType=VARCHAR},</if>
|
||||
<if test="standFileClassify != null" >#{standFileClassify, jdbcType=VARCHAR},</if>
|
||||
<if test="password != null" >#{password, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="oriAttId != null" >#{oriAttId, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandFileEO" >
|
||||
update SAR_STAND_FILE
|
||||
<set >
|
||||
<if test="oriAttId != null" >
|
||||
ori_att_id = #{oriAttId},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="useModel != null" >
|
||||
use_model = #{useModel},
|
||||
</if>
|
||||
<if test="attId != null" >
|
||||
att_id = #{attId},
|
||||
</if>
|
||||
<if test="standId != null" >
|
||||
stand_id = #{standId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STAND_FILE -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where id = #{value} and valid_flag=0
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_FILE
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STAND_FILE 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STAND_FILE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STAND_FILE列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_STAND_FILE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STAND_FILE
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectFileByStandId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where stand_id = #{value} and valid_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="selectFileByAttId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where valid_flag = 0
|
||||
and stand_id = (
|
||||
select stand_id
|
||||
from SAR_STAND_FILE
|
||||
where att_id = #{value} and valid_flag = 0 and use_model = 'SOURCE_FILE'
|
||||
limit 0,1
|
||||
)
|
||||
and use_model = 'WEB_FILE'
|
||||
and ori_att_id = #{value}
|
||||
order by modify_time desc
|
||||
</select>
|
||||
|
||||
<!-- gaoyan 根据resid 查询 -->
|
||||
<select id="selectFileByResId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandFileEO">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where use_model = 'SOURCE_FILE'
|
||||
</select>
|
||||
|
||||
<select id="selectFileMsgByAttId" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where valid_flag = 0
|
||||
and att_id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="selectFileByStandIdAndId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandFileEO">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_FILE
|
||||
where valid_flag = 0
|
||||
<if test="standId != null" >
|
||||
and stand_id = #{standId}
|
||||
</if>
|
||||
<if test="idlist != null">
|
||||
and id not in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByStandId" parameterType="java.lang.String">
|
||||
delete from SAR_STAND_FILE
|
||||
where stand_id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<insert id="insertForeach" parameterType="java.util.List">
|
||||
insert into SAR_STAND_FILE
|
||||
(<include refid="Base_Column_List" />)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.modifyTime, jdbcType=TIMESTAMP},
|
||||
#{item.creationTime, jdbcType=TIMESTAMP},
|
||||
#{item.validFlag, jdbcType=INTEGER},
|
||||
#{item.useModel, jdbcType=VARCHAR},
|
||||
#{item.attId, jdbcType=VARCHAR},
|
||||
#{item.standId, jdbcType=VARCHAR},
|
||||
#{item.id, jdbcType=VARCHAR},
|
||||
#{item.fileSuffix, jdbcType=VARCHAR},
|
||||
#{item.fileName, jdbcType=VARCHAR},
|
||||
#{item.standFileClassify, jdbcType=VARCHAR},
|
||||
#{item.password, jdbcType=VARCHAR},
|
||||
#{item.creationUser, jdbcType=VARCHAR},
|
||||
#{item.oriAttId, jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getStandFileListByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(
|
||||
SELECT
|
||||
SAR_STAND_FILE.id AS resId,
|
||||
SAR_STAND_FILE.stand_id,
|
||||
SAR_STAND_FILE.STAND_FILE_CLASSIFY,
|
||||
SAR_STAND_FILE.file_name,
|
||||
(
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) ) AS standNumber,
|
||||
SAR_STANDARDS_INFO.stand_name as standName,
|
||||
SAR_STAND_FILE.att_id AS attId,
|
||||
SAR_STANDARDS_INFO.STAND_TYPE as sarType
|
||||
FROM
|
||||
SAR_STAND_FILE
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON ( SAR_STAND_FILE.STAND_ID = SAR_STANDARDS_INFO.ID AND SAR_STANDARDS_INFO.VALID_FLAG = 0 )
|
||||
where SAR_STANDARDS_INFO.VALID_FLAG =0 and SAR_STAND_FILE.VALID_FLAG =0
|
||||
<if test="fileSuffixList != null">
|
||||
and SAR_STAND_FILE.file_suffix in
|
||||
<foreach collection="fileSuffixList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName != null">
|
||||
and SAR_STANDARDS_INFO.stand_name like concat(concat ('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standFileClassify != null">
|
||||
and SAR_STAND_FILE.STAND_FILE_CLASSIFY = #{standFileClassify}
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
and SAR_STANDARDS_INFO.STAND_TYPE = #{fileType}
|
||||
</if>
|
||||
order by SAR_STAND_FILE.modify_time desc,SAR_STAND_FILE.id
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryStandFileListByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from (
|
||||
SELECT
|
||||
SAR_STAND_FILE.id AS resId,
|
||||
SAR_STAND_FILE.stand_id,
|
||||
SAR_STAND_FILE.STAND_FILE_CLASSIFY,
|
||||
SAR_STAND_FILE.file_name,
|
||||
(
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) ) AS standNumber,
|
||||
SAR_STANDARDS_INFO.stand_name as standName,
|
||||
SAR_STAND_FILE.att_id AS attId,
|
||||
SAR_STANDARDS_INFO.STAND_TYPE as sarType
|
||||
FROM
|
||||
SAR_STAND_FILE
|
||||
LEFT JOIN SAR_STANDARDS_INFO ON ( SAR_STAND_FILE.STAND_ID = SAR_STANDARDS_INFO.ID AND SAR_STANDARDS_INFO.VALID_FLAG = 0 )
|
||||
where SAR_STANDARDS_INFO.VALID_FLAG =0 and SAR_STAND_FILE.VALID_FLAG =0
|
||||
<if test="fileSuffixList != null">
|
||||
and SAR_STAND_FILE.file_suffix in
|
||||
<foreach collection="fileSuffixList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName != null">
|
||||
and SAR_STANDARDS_INFO.stand_name like concat(concat ('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standFileClassify != null">
|
||||
and SAR_STAND_FILE.STAND_FILE_CLASSIFY = #{standFileClassify}
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
and SAR_STANDARDS_INFO.STAND_TYPE = #{fileType}
|
||||
</if>
|
||||
) r
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+844
@@ -0,0 +1,844 @@
|
||||
<?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.SarStandardsInfoEODao" >
|
||||
<!-- Result Map-->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO" >
|
||||
<id column="id" property="id" />
|
||||
<result column="stand_type" property="standType" />
|
||||
<result column="country" property="country" />
|
||||
<result column="stand_sort" property="standSort" />
|
||||
<result column="stand_number" property="standNumber" />
|
||||
<result column="stand_year" property="standYear" />
|
||||
<result column="stand_name" property="standName" />
|
||||
<result column="stand_en_name" property="standEnName" />
|
||||
<result column="stand_state" property="standState" />
|
||||
<result column="stand_nature" property="standNature" />
|
||||
<result column="issue_time" property="issueTime" />
|
||||
<result column="put_time" property="putTime" />
|
||||
<result column="synopsis" property="synopsis" />
|
||||
<result column="replace_stand_num" property="replaceStandNum" />
|
||||
<result column="replaced_stand_num" property="replacedStandNum" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="newCarPutTime" property="newCarPutTime" />
|
||||
<result column="is_relate_access" property="isRelateAccess" />
|
||||
<result column="cite_stand" property="citeStand" />
|
||||
<result column="cited_stand" property="citedStand" />
|
||||
<result column="allPutTime" property="allPutTime" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapExcel" type="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
<result column="is_relate_access" property="isRelateAccess" />
|
||||
<result column="synopsis" property="synopsis"/>
|
||||
<result column="put_time" property="putTime"/>
|
||||
<result column="issue_time" property="issueTime"/>
|
||||
<result column="replaced_stand_num" property="replacedStandNum"/>
|
||||
<result column="replace_stand_num" property="replaceStandNum"/>
|
||||
<result column="stand_en_name" property="standEnName"/>
|
||||
<result column="stand_name" property="standName"/>
|
||||
<result column="stand_year" property="standYear"/>
|
||||
<result column="stand_number" property="standNumber"/>
|
||||
<result column="id" property="id"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- SAR_STANDARDS_INFO table all fields -->
|
||||
<sql id="Base_Column_List" >
|
||||
SAR_STANDARDS_INFO.id, SAR_STANDARDS_INFO.stand_type, SAR_STANDARDS_INFO.country, SAR_STANDARDS_INFO.stand_sort,
|
||||
SAR_STANDARDS_INFO.stand_number, SAR_STANDARDS_INFO.stand_year, SAR_STANDARDS_INFO.stand_name, SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
SAR_STANDARDS_INFO.synopsis, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,SAR_STANDARDS_INFO.is_relate_access,SAR_STANDARDS_INFO.cite_stand,SAR_STANDARDS_INFO.cited_stand
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_Show" >
|
||||
SAR_STANDARDS_INFO.id, SAR_STANDARDS_INFO.stand_type, SAR_STANDARDS_INFO.country, SAR_STANDARDS_INFO.stand_sort,
|
||||
SAR_STANDARDS_INFO.stand_number, SAR_STANDARDS_INFO.stand_year, SAR_STANDARDS_INFO.stand_name, SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
concat(SAR_STANDARDS_INFO.synopsis, '') as synopsis, concat(replace_stand_num, '') as replace_stand_num, replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME as countryShow, dicstandSort.DIC_TYPE_NAME as standSortShow,
|
||||
dicstandState.DIC_TYPE_NAME as standStateShow,dicstandNature.DIC_TYPE_NAME as standNatureShow,is_relate_access,cite_stand,cited_stand
|
||||
</sql>
|
||||
|
||||
<sql id="Group_Column_List_Show">
|
||||
SAR_STANDARDS_INFO.id, SAR_STANDARDS_INFO.stand_type, SAR_STANDARDS_INFO.country, SAR_STANDARDS_INFO.stand_sort,
|
||||
SAR_STANDARDS_INFO.stand_number, SAR_STANDARDS_INFO.stand_year, SAR_STANDARDS_INFO.stand_name, SAR_STANDARDS_INFO.stand_en_name,
|
||||
SAR_STANDARDS_INFO.stand_state, SAR_STANDARDS_INFO.stand_nature, SAR_STANDARDS_INFO.issue_time, SAR_STANDARDS_INFO.put_time,
|
||||
concat(SAR_STANDARDS_INFO.synopsis, ''), concat(replace_stand_num, ''), replaced_stand_num, SAR_STANDARDS_INFO.creation_user, SAR_STANDARDS_INFO.valid_flag,
|
||||
SAR_STANDARDS_INFO.creation_time, SAR_STANDARDS_INFO.modify_time,dicountry.DIC_TYPE_NAME, dicstandSort.DIC_TYPE_NAME,
|
||||
dicstandState.DIC_TYPE_NAME,dicstandNature.DIC_TYPE_NAME,is_relate_access,cite_stand,cited_stand
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
|
||||
<trim suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="standType != null" >
|
||||
and stand_type ${standTypeOperator} #{standType}
|
||||
</if>
|
||||
<if test="country != null" >
|
||||
and country ${countryOperator} #{country}
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
and stand_sort ${standSortOperator} #{standSort}
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
and stand_number ${standNumberOperator} #{standNumber}
|
||||
</if>
|
||||
<if test="standYear != null" >
|
||||
and stand_year ${standYearOperator} #{standYear}
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
and stand_name ${standNameOperator} #{standName}
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
and stand_en_name ${standEnNameOperator} #{standEnName}
|
||||
</if>
|
||||
<if test="standState != null" >
|
||||
and stand_state ${standStateOperator} #{standState}
|
||||
</if>
|
||||
<if test="standNature != null" >
|
||||
and stand_nature ${standNatureOperator} #{standNature}
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
and issue_time ${issueTimeOperator} #{issueTime}
|
||||
</if>
|
||||
<if test="issueTime1 != null" >
|
||||
and issue_time >= #{issueTime1}
|
||||
</if>
|
||||
<if test="issueTime2 != null" >
|
||||
and issue_time <= #{issueTime2}
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
and put_time ${putTimeOperator} #{putTime}
|
||||
</if>
|
||||
<if test="putTime1 != null" >
|
||||
and put_time >= #{putTime1}
|
||||
</if>
|
||||
<if test="putTime2 != null" >
|
||||
and put_time <= #{putTime2}
|
||||
</if>
|
||||
<if test="synopsis != null" >
|
||||
and synopsis ${synopsisOperator} #{synopsis}
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
and replace_stand_num ${replaceStandNumOperator} #{replaceStandNum}
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
and replaced_stand_num ${replacedStandNumOperator} #{replacedStandNum}
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
and creation_user ${creationUserOperator} #{creationUser}
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and creation_time <= #{creationTime2}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="isRelateAccess != null" >
|
||||
and is_relate_access = #{isRelateAccess}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 插入记录 -->
|
||||
<insert id="insert" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO" >
|
||||
insert into SAR_STANDARDS_INFO(<include refid="Base_Column_List" />)
|
||||
values (#{id, jdbcType=VARCHAR}, #{standType, jdbcType=VARCHAR}, #{country, jdbcType=VARCHAR}, #{standSort, jdbcType=VARCHAR}, #{standNumber, jdbcType=VARCHAR}, #{standYear, jdbcType=VARCHAR}, #{standName, jdbcType=VARCHAR}, #{standEnName, jdbcType=VARCHAR}, #{standState, jdbcType=VARCHAR}, #{standNature, jdbcType=VARCHAR}, #{issueTime, jdbcType=TIMESTAMP}, #{putTime, jdbcType=TIMESTAMP}, #{synopsis, jdbcType=CLOB}, #{replaceStandNum, jdbcType=CLOB}, #{replacedStandNum, jdbcType=VARCHAR}, #{creationUser, jdbcType=VARCHAR}, #{validFlag, jdbcType=VARCHAR}, #{creationTime, jdbcType=TIMESTAMP}, #{modifyTime, jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
|
||||
<!-- 动态插入记录 主键是序列 -->
|
||||
<insert id="insertSelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO" >
|
||||
insert into SAR_STANDARDS_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="standType != null" >stand_type,</if>
|
||||
<if test="country != null" >country,</if>
|
||||
<if test="standSort != null" >stand_sort,</if>
|
||||
<if test="standNumber != null" >stand_number,</if>
|
||||
<if test="standYear != null" >stand_year,</if>
|
||||
<if test="standName != null" >stand_name,</if>
|
||||
<if test="standEnName != null" >stand_en_name,</if>
|
||||
<if test="standState != null" >stand_state,</if>
|
||||
<if test="standNature != null" >stand_nature,</if>
|
||||
<if test="issueTime != null" >issue_time,</if>
|
||||
<if test="putTime != null" >put_time,</if>
|
||||
<if test="synopsis != null" >synopsis,</if>
|
||||
<if test="replaceStandNum != null" >replace_stand_num,</if>
|
||||
<if test="replacedStandNum != null" >replaced_stand_num,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="isRelateAccess != null" >is_relate_access,</if>
|
||||
<if test="citeStand != null" >cite_stand,</if>
|
||||
<if test="citedStand != null" >cited_stand,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="standType != null" >#{standType, jdbcType=VARCHAR},</if>
|
||||
<if test="country != null" >#{country, jdbcType=VARCHAR},</if>
|
||||
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
|
||||
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
|
||||
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
|
||||
<if test="standName != null" >#{standName, jdbcType=VARCHAR},</if>
|
||||
<if test="standEnName != null" >#{standEnName, jdbcType=VARCHAR},</if>
|
||||
<if test="standState != null" >#{standState, jdbcType=VARCHAR},</if>
|
||||
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
|
||||
<if test="issueTime != null" >#{issueTime, jdbcType=VARCHAR},</if>
|
||||
<if test="putTime != null" >#{putTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="synopsis != null" >#{synopsis, jdbcType=CLOB},</if>
|
||||
<if test="replaceStandNum != null" >#{replaceStandNum, jdbcType=CLOB},</if>
|
||||
<if test="replacedStandNum != null" >#{replacedStandNum, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=VARCHAR},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="isRelateAccess != null" >#{isRelateAccess, jdbcType=VARCHAR},</if>
|
||||
<if test="citeStand != null" >#{citeStand, jdbcType=VARCHAR},</if>
|
||||
<if test="citedStand != null" >#{citedStand, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 根据pk,修改记录-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO" >
|
||||
update SAR_STANDARDS_INFO
|
||||
set stand_type = #{standType},
|
||||
country = #{country},
|
||||
stand_sort = #{standSort},
|
||||
stand_number = #{standNumber},
|
||||
stand_year = #{standYear},
|
||||
stand_name = #{standName},
|
||||
stand_en_name = #{standEnName},
|
||||
stand_state = #{standState},
|
||||
stand_nature = #{standNature},
|
||||
issue_time = #{issueTime},
|
||||
put_time = #{putTime},
|
||||
synopsis = #{synopsis},
|
||||
replace_stand_num = #{replaceStandNum},
|
||||
replaced_stand_num = #{replacedStandNum},
|
||||
creation_user = #{creationUser},
|
||||
valid_flag = #{validFlag},
|
||||
creation_time = #{creationTime},
|
||||
modify_time = #{modifyTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 修改记录,只修改只不为空的字段 -->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO" >
|
||||
update SAR_STANDARDS_INFO
|
||||
<set >
|
||||
<if test="standType != null" >
|
||||
stand_type = #{standType},
|
||||
</if>
|
||||
<if test="country != null" >
|
||||
country = #{country},
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
stand_sort = #{standSort},
|
||||
</if>
|
||||
<if test="standNumber != null" >
|
||||
stand_number = #{standNumber},
|
||||
</if>
|
||||
<if test="standYear != null" >
|
||||
stand_year = #{standYear},
|
||||
</if>
|
||||
<if test="standName != null" >
|
||||
stand_name = #{standName},
|
||||
</if>
|
||||
<if test="standEnName != null" >
|
||||
stand_en_name = #{standEnName},
|
||||
</if>
|
||||
<if test="standState != null" >
|
||||
stand_state = #{standState},
|
||||
</if>
|
||||
<if test="standNature != null" >
|
||||
stand_nature = #{standNature},
|
||||
</if>
|
||||
<if test="issueTime != null" >
|
||||
issue_time = #{issueTime},
|
||||
</if>
|
||||
<if test="putTime != null" >
|
||||
put_time = #{putTime},
|
||||
</if>
|
||||
<if test="synopsis != null" >
|
||||
synopsis = #{synopsis},
|
||||
</if>
|
||||
<if test="replaceStandNum != null" >
|
||||
replace_stand_num = #{replaceStandNum},
|
||||
</if>
|
||||
<if test="replacedStandNum != null" >
|
||||
replaced_stand_num = #{replacedStandNum},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="isRelateAccess != null" >
|
||||
is_relate_access = #{isRelateAccess},
|
||||
</if>
|
||||
<if test="citeStand != null" >
|
||||
cite_stand = #{citeStand},
|
||||
</if>
|
||||
<if test="citedStand != null" >
|
||||
cited_stand = #{citedStand},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据id查询 SAR_STANDARDS_INFO -->
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STANDARDS_INFO
|
||||
where id = #{value}
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 删除记录 -->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from SAR_STANDARDS_INFO
|
||||
where id = #{value}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- SAR_STANDARDS_INFO 列表总数-->
|
||||
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from SAR_STANDARDS_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询SAR_STANDARDS_INFO列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" /> from SAR_STANDARDS_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from SAR_STANDARDS_INFO
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<sql id="SarStandardsInfo_Where_Clause">
|
||||
left join TS_DICTYPE dicountry on (dicountry.dic_type_code = SAR_STANDARDS_INFO.country and dicountry.dic_id is
|
||||
not null and dicountry.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
||||
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
left join TS_PERSON_COLLECT on (TS_PERSON_COLLECT.COLLECT_RES_ID = SAR_STANDARDS_INFO.id and TS_PERSON_COLLECT.VALID_FLAG=0)
|
||||
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
|
||||
<trim suffixOverrides=",">
|
||||
<!-- 标准分类 国内标准,国外标准 必要搜索项 -->
|
||||
<if test='standType != null and standType != "ALL"'>
|
||||
and stand_type = #{standType}
|
||||
</if>
|
||||
<!-- 基本搜索项 -->
|
||||
<!-- 国家、地区 -->
|
||||
<if test="country != null">
|
||||
and country = #{country}
|
||||
</if>
|
||||
<!-- 标准编号 -->
|
||||
<if test="standNumber != null and isNumYear == null">
|
||||
and (
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
or (stand_name like concat(concat('%',#{standNumber}),'%'))
|
||||
)
|
||||
</if>
|
||||
-- 精准查询时使用
|
||||
<if test="standNumber != null and isNumYear != null">
|
||||
and (
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) = #{standNumber} and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) = #{standNumber}
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
or (stand_name = #{standNumber}
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 标准名称 -->
|
||||
<if test="standName != null">
|
||||
and stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="standEnName != null">
|
||||
and stand_en_name like concat(concat('%',#{standEnName}),'%')
|
||||
</if>
|
||||
<!-- 标准状态 -->
|
||||
<if test="standState != null">
|
||||
and stand_state = #{standState}
|
||||
</if>
|
||||
<!-- 高级检索项 -->
|
||||
<!-- 标准性质 -->
|
||||
<if test="standNature != null">
|
||||
and stand_nature = #{standNature}
|
||||
</if>
|
||||
<!-- 代替标准 允许输入的时候输入多个-->
|
||||
<if test="replaceStandNum != null">
|
||||
and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')
|
||||
</if>
|
||||
<!-- 被代替标准 -->
|
||||
<if test="replacedStandNum != null">
|
||||
and replaced_stand_num like concat(concat('%',#{replacedStandNum}),'%')
|
||||
</if>
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<!-- 游离态标准查询 -->
|
||||
<!-- <if test="menuId != null and menuId =='nomenu' and standType =='INLAND'">
|
||||
and SAR_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide
|
||||
='INLAND_STAND')
|
||||
<!–-查询游离态标准,编号和名称是分开的 –>
|
||||
<if test="standNumber != null">
|
||||
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR is null))
|
||||
</if>
|
||||
</if>
|
||||
<if test="menuId != null and menuId =='nomenu' and standType =='FOREIGN'">
|
||||
and SAR_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide
|
||||
='FOREIGN_STAND')
|
||||
<if test="standNumber != null">
|
||||
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) like concat(concat('%',#{standNumber}),'%') and SAR_STANDARDS_INFO.STAND_YEAR is not null)
|
||||
or (concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) like concat(concat('%',#{standNumber}),'%')
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR is null))
|
||||
</if>
|
||||
</if> -->
|
||||
<!-- 当第一次进入页面未选择记录时-->
|
||||
<!-- <if test="(menuId == null or menuId =='') and standType =='INLAND'">-->
|
||||
<!-- and SAR_STAND_MENU.MENU_ID in (-->
|
||||
<!-- select SAR_MENU.id from SAR_MENU start with id=(select SAR_MENU.id from SAR_MENU WHERE parent_id is null-->
|
||||
<!-- and sor_divide-->
|
||||
<!-- ='INLAND_STAND') connect by prior id= parent_id-->
|
||||
<!-- )-->
|
||||
<!-- </if>-->
|
||||
<!-- 新修改需求,根据角色查询有权限的菜单数据-->
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="(menuId == null or menuId =='') and standType =='FOREIGN'">-->
|
||||
<!-- and SAR_STAND_MENU.MENU_ID in (-->
|
||||
<!-- select SAR_MENU.id from SAR_MENU start with id=(select SAR_MENU.id from SAR_MENU WHERE parent_id is null-->
|
||||
<!-- and sor_divide-->
|
||||
<!-- ='FOREIGN_STAND') connect by prior id= parent_id-->
|
||||
<!-- )-->
|
||||
<!-- </if>-->
|
||||
<!-- 导出数据过程中,选择的id -->
|
||||
<if test="idlist != null">
|
||||
and SAR_STANDARDS_INFO.id in
|
||||
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="standSort != null" >
|
||||
and SAR_STANDARDS_INFO.stand_sort = #{standSort}
|
||||
</if>
|
||||
<!--内容摘要-->
|
||||
<if test="synopsis != null" >
|
||||
AND dbms_lob.instr(SYNOPSIS, #{synopsis} ,1,1) > 0
|
||||
</if>
|
||||
<if test="collectMenuId != null">
|
||||
and SAR_STANDARDS_INFO.id in (
|
||||
select COLLECT_RES_ID from TS_PERSON_COLLECT where TS_PERSON_COLLECT.VALID_FLAG=0
|
||||
and (collect_type='INLAND_STAND' or collect_type='FOREIGN_STAND')
|
||||
and TS_PERSON_COLLECT.user_id=#{userId}
|
||||
)
|
||||
</if>
|
||||
<if test='labelMenuId != null and labelMenuId == "gxhbq"'>
|
||||
and SAR_STAND_ATTR_INFO.GXHBQ is not null
|
||||
</if>
|
||||
<if test='labelMenuId != null and labelMenuId != "gxhbq"'>
|
||||
and SAR_STAND_ATTR_INFO.GXHBQ like concat(concat('%',#{labelMenuId}),'%')
|
||||
</if>
|
||||
<if test="applyArctic != null">
|
||||
and SAR_STAND_ATTR_INFO.SYCLLX = #{applyArctic}
|
||||
</if>
|
||||
<if test="isRelateAccess != null" >
|
||||
and is_relate_access = #{isRelateAccess}
|
||||
</if>
|
||||
<if test="advanceSearchStr != null">
|
||||
and (${advanceSearchStr})
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询-->
|
||||
<select id="getSarStandardsInfoPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select
|
||||
<include refid="Base_Column_List_Show"/>,SAR_STAND_ATTR_INFO.CHJL AS CHJL,
|
||||
(case WHEN dicstandState.DIC_TYPE_NAME = '草稿' THEN 1
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '征求意见稿' THEN 2
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '送审稿' THEN 3
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '报批稿' THEN 4
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '发布稿' THEN 5
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '已实施' THEN 6
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '计划修订' THEN 7
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '修订中' THEN 8
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '已修订' THEN 9
|
||||
WHEN dicstandState.DIC_TYPE_NAME = '已作废' THEN 10
|
||||
WHEN dicstandState.DIC_TYPE_NAME IS NULL THEN 11
|
||||
WHEN dicstandState.DIC_TYPE_NAME ='' THEN 11
|
||||
END) AS paixu,
|
||||
(
|
||||
CASE
|
||||
WHEN ZCCSSRQ = 'TBD' THEN '6999-01-01'
|
||||
WHEN ZCCSSRQ = '已发布' THEN '7000-01-01'
|
||||
WHEN ZCCSSRQ = '已实施' THEN '7999-01-01'
|
||||
WHEN ZCCSSRQ = 'N/A' THEN '8999-01-01'
|
||||
WHEN ZCCSSRQ IS NULL THEN '9999-01-01'
|
||||
WHEN ZCCSSRQ ='' THEN '9999-01-01'
|
||||
ELSE ZCCSSRQ
|
||||
END
|
||||
) AS ZCCSSRQPAIXU,
|
||||
(
|
||||
CASE
|
||||
WHEN XCXSSRQ = 'TBD' THEN '6999-01-01'
|
||||
WHEN XCXSSRQ = '已发布' THEN '7000-01-01'
|
||||
WHEN XCXSSRQ = '已实施' THEN '7999-01-01'
|
||||
WHEN XCXSSRQ = 'N/A' THEN '8999-01-01'
|
||||
WHEN XCXSSRQ IS NULL THEN '9999-01-01'
|
||||
WHEN XCXSSRQ ='' THEN '9999-01-01'
|
||||
ELSE XCXSSRQ
|
||||
END
|
||||
) AS XCXSSRQPAIXU,
|
||||
(
|
||||
CASE
|
||||
WHEN SAR_STANDARDS_INFO.issue_time = 'TBD' THEN '6999-01-01'
|
||||
WHEN SAR_STANDARDS_INFO.issue_time = '已发布' THEN '7000-01-01'
|
||||
WHEN SAR_STANDARDS_INFO.issue_time = '已实施' THEN '7999-01-01'
|
||||
WHEN SAR_STANDARDS_INFO.issue_time = 'N/A' THEN '8999-01-01'
|
||||
WHEN SAR_STANDARDS_INFO.issue_time IS NULL THEN '9999-01-01'
|
||||
WHEN SAR_STANDARDS_INFO.issue_time ='' THEN '9999-01-01'
|
||||
ELSE SAR_STANDARDS_INFO.issue_time
|
||||
END
|
||||
) AS issueTime
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>,CHJL,SAR_STAND_ATTR_INFO.XCXSSRQ,SAR_STAND_ATTR_INFO.ZCCSSRQ
|
||||
order by
|
||||
${orderBy1} ${order1},SAR_STANDARDS_INFO.id
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
<!--FIELD(SAR_STANDARDS_INFO.issue_time,'已发布'), FIELD(SAR_STANDARDS_INFO.issue_time,'TBD'), FIELD(SAR_STANDARDS_INFO.issue_time,'N/A') ,-->
|
||||
<!--if(isnull(SAR_STANDARDS_INFO.issue_time),0,1) desc ,-->
|
||||
<!-- 分页查询条件查询一共有多少条数据,配合分页 -->
|
||||
<select id="getSarStandardsInfoCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKeyAndModifyTime" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
where id = #{id} and valid_flag=0
|
||||
<if test="modifyTime != null">
|
||||
and (modify_time > #{modifyTime} or modify_time < #{modifyTime}) a
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 根据标准号查询-->
|
||||
<select id="selectStandardsByStandnumber" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||
where SAR_STANDARDS_INFO.valid_flag = 0
|
||||
<!-- 标准类型 -->
|
||||
<if test="standType != null">
|
||||
and stand_type = #{standType}
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and ((concat(dicstandSort.DIC_TYPE_NAME,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) = ( #{standNumber}) and SAR_STANDARDS_INFO.STAND_YEAR != '')
|
||||
or (concat(dicstandSort.DIC_TYPE_NAME,' ',SAR_STANDARDS_INFO.STAND_NUMBER) = ( #{standNumber})
|
||||
and SAR_STANDARDS_INFO.STAND_YEAR = '')
|
||||
)
|
||||
</if>
|
||||
<if test="sychronId != null">
|
||||
and id != #{sychronId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询表中是否存在某字段-->
|
||||
<select id="selectStandColumn" resultType="java.lang.Integer" parameterType="java.lang.String">
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'SAR_STANDARDS_INFO' AND column_name = #{columnName}
|
||||
</select>
|
||||
|
||||
<!-- 统计更新过的标准数量-->
|
||||
<select id="selectCounterStandardsCount" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
SELECT count(1)
|
||||
FROM SAR_STANDARDS_INFO
|
||||
WHERE STAND_TYPE = #{standType} And Valid_flag = 0
|
||||
<if test="modifyTime != null">
|
||||
and MODIFY_TIME > #{modifyTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateByStandNum" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
update SAR_STANDARDS_INFO set
|
||||
stand_state=#{standState} where 1=1 and valid_flag=0
|
||||
<if test="standSort != null">
|
||||
and stand_sort = #{standSort}
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
and stand_Number = #{standNumber}
|
||||
</if>
|
||||
<if test="standYear != null">
|
||||
and stand_year = #{standYear}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="selectStandardsInfoByIdAndRole" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select SAR_STANDARDS_INFO.id
|
||||
from SAR_STANDARDS_INFO
|
||||
left join SAR_STAND_MENU on SAR_STANDARDS_INFO.id=SAR_STAND_MENU.stand_id
|
||||
where SAR_STANDARDS_INFO.valid_flag=0
|
||||
and SAR_STAND_MENU.valid_flag=0
|
||||
<if test="id != null">
|
||||
and SAR_STANDARDS_INFO.id = #{id}
|
||||
</if>
|
||||
<if test="menuRoleList != null">
|
||||
and SAR_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuRoleList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKeyFlag" parameterType="java.lang.String">
|
||||
delete from SAR_STANDARDS_INFO
|
||||
where id = #{id} and valid_flag=1
|
||||
</delete>
|
||||
|
||||
<update id="updateReplacedNumById" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
update SAR_STANDARDS_INFO set REPLACED_STAND_NUM = #{replacedStandNum} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateCitedStandById" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEO">
|
||||
update SAR_STANDARDS_INFO set CITED_STAND = #{citedStand} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getSarStandardsExportInfo" resultMap="BaseResultMapExcel"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select<include refid="Base_Column_List_Show"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_Where_Clause"/>
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>
|
||||
order by SAR_STANDARDS_INFO.issue_time is null,SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id
|
||||
</select>
|
||||
|
||||
<select id="selectStandardsInfoByKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List_Show"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicountry on (dicountry.dic_type_code = SAR_STANDARDS_INFO.country and dicountry.dic_id is
|
||||
not null and dicountry.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
||||
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
|
||||
where SAR_STANDARDS_INFO.id = #{id}
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>
|
||||
</select>
|
||||
|
||||
<select id="selectRecommendStand" resultType="com.adc.da.slrs.standardSplit.vo.RecommendVO"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select tmp_tb.* from
|
||||
(select
|
||||
if(
|
||||
SAR_STANDARDS_INFO.STAND_YEAR='',
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number),
|
||||
CONCAT(SAR_STANDARDS_INFO.stand_sort,' ',SAR_STANDARDS_INFO.stand_number,'-',SAR_STANDARDS_INFO.stand_year)
|
||||
) as numberShow,
|
||||
SAR_STANDARDS_INFO.stand_name as nameShow,
|
||||
SAR_STANDARDS_INFO.id,
|
||||
concat(SAR_STANDARDS_INFO.stand_type,'_STAND') as typeShow
|
||||
from SAR_STANDARDS_INFO
|
||||
where SAR_STANDARDS_INFO.valid_flag = '0'
|
||||
<if test="id != null">
|
||||
and id != #{id}
|
||||
</if>
|
||||
<!-- 标准种类-->
|
||||
<if test="standSort != null">
|
||||
and stand_sort = #{standSort}
|
||||
</if>
|
||||
<if test="standNumber != null">
|
||||
or stand_number like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName != null">
|
||||
or stand_name like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
order by modify_time desc
|
||||
) tmp_tb limit 0,5
|
||||
</select>
|
||||
|
||||
<select id="countReplaceMsg" resultType="java.lang.String" parameterType="java.lang.String">
|
||||
SELECT SAR_STANDARDS_INFO.stand_state
|
||||
FROM SAR_STANDARDS_INFO
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
WHERE SAR_STAND_ATTR_INFO.DTBJH like concat(concat('%',#{standNum}),'%') and SAR_STANDARDS_INFO.valid_flag=0
|
||||
</select>
|
||||
|
||||
<select id="selectStandToUpState" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
SAR_STAND_ATTR_INFO.XCXSSRQ as allPutTime
|
||||
from SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
where SAR_STANDARDS_INFO.valid_flag=0 and dicstandState.DIC_TYPE_NAME!=#{stateName}
|
||||
and SAR_STAND_ATTR_INFO.XCXSSRQ != ''
|
||||
</select>
|
||||
|
||||
<select id="selectStandToUpRepState" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,dicstandState.DIC_TYPE_NAME as standStateShow,SAR_STAND_ATTR_INFO.DTBJH as replace_stand_num
|
||||
from SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
where SAR_STANDARDS_INFO.valid_flag=0 and dicstandState.DIC_TYPE_NAME != ''
|
||||
and SAR_STAND_ATTR_INFO.DTBJH != ''
|
||||
</select>
|
||||
|
||||
<select id="selectStandToUpRepAndTime" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,dicstandState.DIC_TYPE_NAME as standStateShow,
|
||||
SAR_STAND_ATTR_INFO.DTBJH as replace_stand_num,
|
||||
concat(SAR_STAND_ATTR_INFO.XCXSSRQ,',',SAR_STAND_ATTR_INFO.ZCCSSRQ) as allPutTime
|
||||
from SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
where SAR_STANDARDS_INFO.valid_flag=0
|
||||
and SAR_STAND_ATTR_INFO.DTBJH != ''
|
||||
and (SAR_STAND_ATTR_INFO.XCXSSRQ != '' or SAR_STAND_ATTR_INFO.ZCCSSRQ != '')
|
||||
</select>
|
||||
|
||||
<select id="selectIsExit" resultType="java.lang.Integer">
|
||||
select count(*) from SAR_STANDARDS_INFO where id = #{id} and valid_flag != 0
|
||||
</select>
|
||||
|
||||
<update id="updateStateById" parameterType="java.lang.String">
|
||||
update SAR_STANDARDS_INFO set stand_state = #{state}
|
||||
where id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")" index="index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectStandardsInfoByIdAndRoleAll" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select SAR_STANDARDS_INFO.id
|
||||
from SAR_STANDARDS_INFO
|
||||
where
|
||||
SAR_STANDARDS_INFO.valid_flag=1
|
||||
<if test="id != null">
|
||||
and SAR_STANDARDS_INFO.id = #{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectStandardsInfoBynumber" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.standardSplit.entity.SarStandardsInfoEOPage">
|
||||
select * from
|
||||
(select tmp_tb.* from
|
||||
(select
|
||||
<include refid="Base_Column_List_Show"/>,SAR_STAND_ATTR_INFO.CHJL AS CHJL
|
||||
from SAR_STANDARDS_INFO
|
||||
left join TS_DICTYPE dicountry on (dicountry.dic_type_code = SAR_STANDARDS_INFO.country and dicountry.dic_id is
|
||||
not null and dicountry.valid_flag = 0)
|
||||
left join TS_DICTYPE dicstandSort on (dicstandSort.dic_type_code = SAR_STANDARDS_INFO.stand_sort and
|
||||
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
|
||||
left join TS_DICTYPE dicstandState on (dicstandState.dic_type_code = SAR_STANDARDS_INFO.stand_state and
|
||||
dicstandState.dic_id is not null and dicstandState.valid_flag = 0 )
|
||||
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
|
||||
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
|
||||
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
|
||||
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
|
||||
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
|
||||
left join TS_PERSON_COLLECT on (TS_PERSON_COLLECT.COLLECT_RES_ID = SAR_STANDARDS_INFO.id and TS_PERSON_COLLECT.VALID_FLAG=0)
|
||||
where 1=1 AND SAR_STANDARDS_INFO.valid_flag = 0
|
||||
<if test="standNumber != null">
|
||||
and
|
||||
(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
|
||||
SAR_STANDARDS_INFO.STAND_YEAR) = #{standNumber} OR
|
||||
concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER) = #{standNumber})
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and SAR_STANDARDS_INFO.id = #{id}
|
||||
</if>
|
||||
GROUP BY <include refid="Group_Column_List_Show"/>,CHJL
|
||||
order by SAR_STANDARDS_INFO.issue_time is null, SAR_STANDARDS_INFO.issue_time desc,SAR_STANDARDS_INFO.id
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user