Merge branch 'develop_3' into 'develop_master'

Develop 3  feat: 标准库 左侧树 相关 配置标准 更新记录相关等

See merge request !18
This commit is contained in:
super_liu
2021-07-08 14:59:10 +00:00
16 changed files with 444 additions and 34 deletions
@@ -1,5 +1,155 @@
<?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.sarUpdLog.dao.SarUpdLogDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarUpdLog.entity.SarUpdLog" >
<id column="id" property="id" />
<result column="sar_type" property="sarType" />
<result column="sar_id" property="sarId" />
<result column="content" property="content" />
<result column="creation_time" property="creationTime" />
<result column="creation_user" property="creationUser" />
<result column="creationUserName" property="creationUserName" />
</resultMap>
<!-- SAR_UPD_LOG table all fields -->
<sql id="Base_Column_List" >
SAR_UPD_LOG.id, sar_type, sar_id, content, SAR_UPD_LOG.creation_time,SAR_UPD_LOG.creation_user
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="id != null" >
and id ${idOperator} #{id}
</if>
<if test="sarType != null" >
and sar_type ${sarTypeOperator} #{sarType}
</if>
<if test="sarId != null" >
and sar_id ${sarIdOperator} #{sarId}
</if>
<if test="content != null" >
and content ${contentOperator} #{content}
</if>
<if test="creationTime != null" >
and creation_time ${creationTimeOperator} #{creationTime}
</if>
<if test="creationTime1 != null" >
and creation_time &gt;= #{creationTime1}
</if>
<if test="creationTime2 != null" >
and creation_time &lt;= #{creationTime2}
</if>
</trim>
</sql>
<!-- 插入记录 -->
<insert id="insert" parameterType="com.adc.da.slrs.sarUpdLog.entity.SarUpdLog" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_UPD_LOG.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_UPD_LOG(<include refid="Base_Column_List" />)
values (#{id, jdbcType=VARCHAR}, #{sarType, jdbcType=VARCHAR}, #{sarId, jdbcType=VARCHAR}, #{content, jdbcType=CLOB}, #{creationTime, jdbcType=TIMESTAMP})
</insert>
<!-- 动态插入记录 主键是序列 -->
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarUpdLog.entity.SarUpdLog" >
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
SELECT SEQ_SAR_UPD_LOG.NEXTVAL FROM DUAL
</selectKey> -->
insert into SAR_UPD_LOG
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >id,</if>
<if test="sarType != null" >sar_type,</if>
<if test="sarId != null" >sar_id,</if>
<if test="content != null" >content,</if>
<if test="creationTime != null" >creation_time,</if>
<if test="creationUser != null" >creation_user,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<if test="sarType != null" >#{sarType, jdbcType=VARCHAR},</if>
<if test="sarId != null" >#{sarId, jdbcType=VARCHAR},</if>
<if test="content != null" >#{content, jdbcType=CLOB},</if>
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
</trim>
</insert>
<!-- 根据pk,修改记录-->
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarUpdLog.entity.SarUpdLog" >
update SAR_UPD_LOG
set sar_type = #{sarType},
sar_id = #{sarId},
content = #{content},
creation_time = #{creationTime}
where id = #{id}
</update>
<!-- 修改记录,只修改只不为空的字段 -->
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarUpdLog.entity.SarUpdLog" >
update SAR_UPD_LOG
<set >
<if test="sarType != null" >
sar_type = #{sarType},
</if>
<if test="sarId != null" >
sar_id = #{sarId},
</if>
<if test="content != null" >
content = #{content},
</if>
<if test="creationTime != null" >
creation_time = #{creationTime},
</if>
<if test="creationUser != null" >
creation_user = #{creationUser},
</if>
</set>
where id = #{id}
</update>
<!-- 根据id查询 SAR_UPD_LOG -->
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select <include refid="Base_Column_List" />
from SAR_UPD_LOG
where id = #{value}
</select>
<!-- 删除记录 -->
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SAR_UPD_LOG
where id = #{value}
</delete>
<!-- SAR_UPD_LOG 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
select count(1) from SAR_UPD_LOG
<include refid="Base_Where_Clause"/>
</select>
<!-- 查询SAR_UPD_LOG列表 -->
<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_UPD_LOG
<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"/>,TS_USER.uname as creationUserName from SAR_UPD_LOG
left join TS_USER on SAR_UPD_LOG.creation_user = TS_USER.usid
<include refid="Base_Where_Clause"/>
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
${pager.orderCondition}
</if>
</select>
</mapper>
@@ -392,11 +392,11 @@
</if>
<!-- 基本搜索项 -->
<!-- 国家、地区 -->
<if test="country != null">
<if test="country != null and country != ''">
and country = #{country}
</if>
<!-- 标准编号 -->
<if test="standNumber != null">
<if test="standNumber != null and standNumber != ''">
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 != '')
@@ -406,27 +406,27 @@
)
</if>
<!-- 标准名称 -->
<if test="standName != null">
<if test="standName != null and standName != ''">
and stand_name like concat(concat('%',#{standName}),'%')
</if>
<if test="standEnName != null">
<if test="standEnName != null and standEnName != ''">
and stand_en_name like concat(concat('%',#{standEnName}),'%')
</if>
<!-- 标准状态 -->
<if test="standState != null">
<if test="standState != null and standState != ''">
and stand_state = #{standState}
</if>
<!-- 高级检索项 -->
<!-- 标准性质 -->
<if test="standNature != null">
<if test="standNature != null and standNature != ''">
and stand_nature = #{standNature}
</if>
<!-- 代替标准 允许输入的时候输入多个-->
<if test="replaceStandNum != null">
<if test="replaceStandNum != null and replaceStandNum != ''">
and replace_stand_num like concat(concat('%',#{replaceStandNum}),'%')
</if>
<!-- 被代替标准 -->
<if test="replacedStandNum != null">
<if test="replacedStandNum != null and replacedStandNum != ''">
and replaced_stand_num like concat(concat('%',#{replacedStandNum}),'%')
</if>
<!-- 目录判断 -->
@@ -488,14 +488,14 @@
#{item}
</foreach>
</if>
<if test="standSort != null" >
<if test="standSort != null and standSort != ''" >
and SAR_STANDARDS_INFO.stand_sort = #{standSort}
</if>
<!--内容摘要-->
<if test="synopsis != null" >
<if test="synopsis != null and synopsis != ''" >
AND dbms_lob.instr(SYNOPSIS, #{synopsis} ,1,1) > 0
</if>
<if test="collectMenuId != null">
<if test="collectMenuId != null and collectMenuId != ''">
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')
@@ -508,13 +508,13 @@
<if test='labelMenuId != null and labelMenuId != "gxhbq"'>
and SAR_STAND_ATTR_INFO.GXHBQ like concat(concat('%',#{labelMenuId}),'%')
</if>
<if test="applyArctic != null">
<if test="applyArctic != null and applyArctic != ''">
and SAR_STAND_ATTR_INFO.SYCLLX = #{applyArctic}
</if>
<if test="isRelateAccess != null" >
<if test="isRelateAccess != null and isRelateAccess != ''" >
and is_relate_access = #{isRelateAccess}
</if>
<if test="advanceSearchStr != null">
<if test="advanceSearchStr != null and advanceSearchStr != ''">
and (${advanceSearchStr})
</if>
</trim>