Merge branch 'dev_20230829_change' into dev_20231201_feizhi

# Conflicts:
#	adc-da-search/src/main/java/com/adc/da/search/service/impl/SearchCenterServiceImpl.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussStandFile/service/impl/SarBussStandFileServiceImpl.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarRole/service/ITsRoleService.java
#	adc-da-slrs/src/main/java/com/adc/da/slrs/sarUser/service/impl/TsUserServiceImpl.java
This commit is contained in:
wxyclub
2023-12-01 18:11:16 +08:00
96 changed files with 3924 additions and 693 deletions
@@ -10,6 +10,7 @@
<result column="MEETING_ORGANIZER" property="meetingOrganizer" />
<result column="MEETING_TIME" property="meetingTime" />
<result column="MEETING_ADDRESS" property="meetingAddress" />
<result column="AGENDA_NAME_STR" property="agendaNameStr" />
<result column="PARTICIPANTS" property="participants" />
<result column="MEETING_MINUTES" property="meetingMinutes" />
<result column="MEETING_CONTENT" property="meetingContent" />
@@ -26,6 +27,8 @@
<result column="REPORTER" property="reporter" />
<result column="REPORTING_UNIT" property="reportingUnit" />
<result column="AGENDA_CONTENT" property="agendaContent" />
<result column="CREATE_TIME" property="createTime" />
<result column="MODIFY_TIME" property="modifyTime" />
</collection>
</resultMap>
<sql id="Base_Column_List">
@@ -37,7 +40,8 @@
iom.PARTICIPANTS,iom.MEETING_MINUTES,iom.MEETING_CONTENT,iom.FIRST_MEETING_TYPE,iom.SECOND_MEETING_TYPE,
mt.ID as mtId,mt.MEETING_ID,mt.AGENDA_NAME,mt.AGENDA_MATERIALS,mt.REPORTER,mt.REPORTING_UNIT,
mt.AGENDA_CONTENT,
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME,
iom.AGENDA_NAME_STR
</sql>
<sql id="Base_Where_Clause">
<trim suffixOverrides="," >
@@ -50,17 +54,20 @@
<if test="meetingOrganizer != null and meetingOrganizer != ''" >
and MEETING_ORGANIZER like concat('%',#{meetingOrganizer},'%')
</if>
<if test="meetingTimeBegin!= null and meetingTimeEnd == null">
and MEETING_TIME &gt;= DATE_FORMAT(#{meetingTimeBegin}, '%Y-%m-%d')
</if>
<if test="meetingTimeBegin == null and meetingTimeEnd != null">
and MEETING_TIME &lt;= DATE_FORMAT(#{meetingTimeEnd}, '%Y-%m-%d')
</if>
<if test="meetingTimeBegin != null and meetingTimeEnd != null">
and MEETING_TIME between #{meetingTimeBegin} and #{meetingTimeEnd}
and MEETING_TIME between DATE_FORMAT(#{meetingTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{meetingTimeEnd}, '%Y-%m-%d')
</if>
<if test="meetingAddress != null and meetingAddress != ''" >
and MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
</if>
<if test="participantsList != null and participantsList.size() > 0" >
and PARTICIPANTS in
<foreach collection="participantsList" separator="," open="(" close=")" item="participant">
#{participant}
</foreach>
<if test="participants != null and participants != ''">
and PARTICIPANTS like concat('%',#{participants},'%')
</if>
<if test="meetingContent != null" >
and MEETING_CONTENT like concat('%',#{meetingContent},'%')
@@ -88,44 +95,63 @@
</if>
</sql>
<select id="queryByPageCount" resultType="java.lang.Integer">
select count(iom.ID) from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="MeetingTopic_where" />
group by iom.ID
select count(1) from (
select count(1)
from (select * from inside_outside_meeting where VALID_FLAG = 0 <include refid="Base_Where_Clause" /> ) iom
left join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="MeetingTopic_where" />
group by iom.ID
) a
</select>
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeetingVO">
select <include refid="Base_Column_Join_MeetingTopic_List" />
from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
from (select <include refid="Base_Column_List" />,(
select GROUP_CONCAT(AGENDA_NAME SEPARATOR ',') from meeting_topic where inside_outside_meeting.ID = meeting_topic.MEETING_ID
) as AGENDA_NAME_STR from inside_outside_meeting where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>
<if test="sortField != 'AGENDA_NAME'">
order by ${sortField} ${sortMode}
</if>
limit ${pager.startIndex-1},${pageSize}) iom left join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause" />
<include refid="MeetingTopic_where" />
order by
<choose>
<when test="sortField == 'AGENDA_NAME'">
mt.${sortField} ${sortMode}
mt.${sortField} ${sortMode},
mt.CREATE_TIME asc
</when>
<otherwise>
iom.${sortField} ${sortMode}
iom.${sortField} ${sortMode},
mt.CREATE_TIME asc
</otherwise>
</choose>
limit ${pager.startIndex-1},${pageSize}
</select>
<select id="queryMeetingById" resultMap="BaseResultMap">
select <include refid="Base_Column_Join_MeetingTopic_List" />
select
iom.ID,iom.MEETING_NAME,iom.TOPIC_NAME,iom.MEETING_ORGANIZER,iom.MEETING_TIME,iom.MEETING_ADDRESS,
iom.PARTICIPANTS,iom.MEETING_MINUTES,iom.MEETING_CONTENT,iom.FIRST_MEETING_TYPE,iom.SECOND_MEETING_TYPE,
mt.ID as mtId,mt.MEETING_ID,mt.AGENDA_NAME,mt.AGENDA_MATERIALS,mt.REPORTER,mt.REPORTING_UNIT,
mt.AGENDA_CONTENT,
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME
from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0 and iom.ID in
<foreach collection="exportIdList" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
order by iom.MEETING_NAME
order by iom.MEETING_TIME desc
</select>
<select id="queryAllMeeting" resultMap="BaseResultMap">
select <include refid="Base_Column_Join_MeetingTopic_List" />
select
iom.ID,iom.MEETING_NAME,iom.TOPIC_NAME,iom.MEETING_ORGANIZER,iom.MEETING_TIME,iom.MEETING_ADDRESS,
iom.PARTICIPANTS,iom.MEETING_MINUTES,iom.MEETING_CONTENT,iom.FIRST_MEETING_TYPE,iom.SECOND_MEETING_TYPE,
mt.ID as mtId,mt.MEETING_ID,mt.AGENDA_NAME,mt.AGENDA_MATERIALS,mt.REPORTER,mt.REPORTING_UNIT,
mt.AGENDA_CONTENT,
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME
from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause" />
<include refid="MeetingTopic_where" />
order by iom.MEETING_NAME
order by iom.MEETING_TIME desc
</select>
</mapper>
@@ -144,5 +144,135 @@
</select>
<select id="getGBStandMenu" resultType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
select
DISTINCT
sms.ID AS menuId,
stand.ID as standId
from SAR_STAND_MENU AS sm
LEFT JOIN sar_standards_info AS stand ON sm.STAND_ID = stand.ID AND stand.VALID_FLAG = '0'
LEFT JOIN sar_menu_standard sms on sm.MENU_ID = sms.ID
where stand.STAND_TYPE = 'INLAND'
AND sms.MENU_NAME IS NOT NULL
AND LENGTH(sm.MENU_ID) > 30
AND sm.VALID_FLAG = '0'
AND sms.id in (select id from sar_menu_standard where valid_flag = 0)
</select>
<select id="getFBStandMenu" resultType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
select
DISTINCT
sms.ID AS menuId,
stand.ID as standId
from SAR_STAND_MENU AS sm
LEFT JOIN sar_standards_info AS stand ON sm.STAND_ID = stand.ID AND stand.VALID_FLAG = '0'
LEFT JOIN sar_menu_standard sms on sm.MENU_ID = sms.ID
where stand.STAND_TYPE = 'FOREIGN'
AND sms.MENU_NAME IS NOT NULL
AND LENGTH(sm.MENU_ID) > 30
AND sm.VALID_FLAG = '0'
AND sms.id in (select id from sar_menu_standard where valid_flag = 0)
</select>
<select id="getStandInfoSystemData" resultType="com.adc.da.slrs.sarMenuStandard.entity.StandSystemDTO">
SELECT
gb.ID AS standId,
CONCAT(gb.STAND_SORT, ' ', ifnull(gb.STAND_NUMBER,''),
case when gb.STAND_YEAR is not null and gb.STAND_YEAR!= '' then concat('-',gb.STAND_YEAR) else '' end) AS standNo,
gb.STAND_NAME AS standName,
gb.STAND_STATE AS standState,
gb.TEXT_STATUS AS textStatus,
CASE
WHEN gb.ISSUE_TIME = '' THEN NULL
ELSE gb.ISSUE_TIME
END AS releaseDate,
CASE
WHEN gba.SSRQ = '' THEN NULL
ELSE gba.SSRQ
END AS implementDate,
gb.REPLACE_STAND_NUM AS replaceStandardNo,
gba.QCDW AS dept,
gba.WSSMR AS draftUserName,
gb.STAND_TYPE AS dataSource,
gb.STAND_SORT AS standSort,
CASE
WHEN gb.STAND_TYPE = 'INLAND' THEN 1
WHEN gb.STAND_TYPE = 'FOREIGN' THEN 2
END AS standTypeSort,
sms.ID AS menuId
FROM
`sar_standards_info` AS gb
LEFT JOIN `sar_stand_attr_info` AS gba ON gb.ID = gba.STAND_ID
LEFT JOIN `sar_stand_menu` AS m ON gb.ID = m.STAND_ID AND LENGTH(m.MENU_ID) > 30
LEFT JOIN sar_menu_standard sms on m.MENU_ID = sms.ID
WHERE gb.VALID_FLAG = '0'
AND sms.id in (select id from sar_menu_standard where valid_flag = 0 )
<!--国标/外标-->
<if test="param.standNo != null and param.standNo != ''">
AND gb.STAND_TYPE = #{dataSource}
</if>
<!--关联的节点IDList-->
<if test="param.menuIdList != null and param.menuIdList.size() > 0">
AND m.MENU_ID IN
<foreach item="item" index="index" collection="param.menuIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--标准编号-->
<if test="param.standNo != null and param.standNo != ''">
AND gb.STAND_NUMBER LIKE CONCAT('%',#{param.standNo},'%')
</if>
<!--标准名称-->
<if test="param.standName != null and param.standName != ''">
AND gb.STAND_NAME LIKE CONCAT('%',#{param.standName},'%')
</if>
<!-- 发布时间 -->
<if test="param.startReleaseDateString != null and param.startReleaseDateString != ''">
AND gb.ISSUE_TIME >= #{param.startReleaseDateString}
</if>
<if test="param.endReleaseDateString != null and param.endReleaseDateString != ''">
AND gb.ISSUE_TIME &lt;= CONCAT(#{param.endReleaseDateString}, ' 23:59:59')
</if>
<!-- 实施日期 -->
<if test="param.startImplementDateString != null and param.startImplementDateString != ''">
AND gba.SSRQ >= #{param.startImplementDateString}
</if>
<if test="param.endImplementDateString != null and param.endImplementDateString != '' ">
AND gba.SSRQ &lt;= CONCAT(#{param.endImplementDateString}, ' 23:59:59')
</if>
<!--代替标准-->
<if test="param.replaceStandardNo != null and param.replaceStandardNo != ''">
AND gb.REPLACE_STAND_NUM LIKE CONCAT('%',#{param.replaceStandardNo},'%')
</if>
<!--编制单位-->
<if test="param.dept != null and param.dept != ''">
AND gba.QCDW LIKE CONCAT('%',#{param.dept},'%')
</if>
<!--起草人-->
<if test="param.draftUserName != null and param.draftUserName != ''">
AND gba.WSSMR LIKE CONCAT('%',#{param.draftUserName},'%')
</if>
<!--搜索条件数据来源-->
<if test="param.dataSource != null and param.dataSource != ''">
AND gb.STAND_TYPE = #{param.dataSource}
</if>
<!--SQL复用数据来源-->
<if test="dataSource != null and dataSource != ''">
AND gb.STAND_TYPE = #{dataSource}
</if>
<!--体系结构树搜索-->
<if test="param.standSystemIdList != null and param.standSystemIdList.size() > 0">
AND m.MENU_ID IN
<foreach item="item" index="index" collection="param.standSystemIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.selectIdList != null and param.selectIdList.size() > 0">
AND gb.ID IN
<foreach item="item" index="index" collection="param.selectIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
@@ -0,0 +1,15 @@
<?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.roleReplacePosition.mapper.PositionRoleMapper">
<resultMap id="BaseResultMap" type="com.adc.da.slrs.roleReplacePosition.domain.PositionRole">
<id property="roleId" column="role_id" jdbcType="VARCHAR"/>
<id property="positionId" column="position_id" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
role_id,position_id
</sql>
</mapper>
@@ -203,6 +203,23 @@
where buss_stand_id = #{bussStandId} and valid_flag=0
</select>
<select id="getESStandMenu" resultType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu">
select
DISTINCT
sms.ID AS menuId,
stand.ID AS bussStandId
from sar_buss_stand_menu AS sm
LEFT JOIN sar_bussioness_stand AS stand
ON sm.BUSS_STAND_ID = stand.ID AND
stand.VALID_FLAG = 0
LEFT JOIN sar_menu_standard sms on sm.MENU_ID = sms.ID
where LENGTH(sm.MENU_ID) > 30
AND sms.MENU_NAME IS NOT NULL
AND sm.VALID_FLAG = 0
AND sm.TREE_TYPE is null
AND sms.id in (select id from sar_menu_standard where valid_flag = 0)
</select>
<delete id="deleteByStandIdAndMenuId" parameterType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu">
delete from SAR_BUSS_STAND_MENU
where buss_stand_id = #{bussStandId, jdbcType=VARCHAR} and MENU_ID = #{menuId, jdbcType=VARCHAR}
@@ -362,6 +362,11 @@
where id = #{value}
</delete>
<update id="deleteStandSystem">
update sar_buss_stand_attr_info
set TXLBBUSS = null
where TXLBBUSS like #{menuName}
</update>
<!-- SAR_BUSSIONESS_STAND 列表总数-->
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
@@ -1267,4 +1272,108 @@
where id = #{attfId}
</update>
<select id="getESSystemData" resultType="com.adc.da.slrs.sarMenuStandard.entity.StandSystemDTO">
SELECT
DISTINCT
es.ID AS standId,
es.STAND_CODE AS standNo,
es.STAND_NAME AS standName,
es.TEXT_STATUS_BUSS AS standState,
es.ISSUE_TIME AS releaseDate,
es.PUT_TIME AS implementDate,
es.REPLACE_STAND_NUM AS replaceStandardNo,
esa.QCDW AS dept,
esa.QCRBUSS AS draftUserName,
'ENTERPRISE' AS dataSource,
sms.ID AS menuId,
3 AS standTypeSort,
CASE
when es.stand_code like concat('%', 'Q/FT A', '%') THEN 0
when es.stand_code like concat('%', 'Q/FT B', '%') THEN 1
when es.stand_code like concat('%', 'Q/FT E', '%') THEN 2
when es.stand_code like concat('%', 'Q/FT F', '%') THEN 3
when es.stand_code like concat('%', 'Q/FT G', '%') THEN 4
when es.stand_code like concat('%', 'Q/FT M', '%') THEN 5
when es.stand_code like concat('%', 'Q/FT Q', '%') THEN 6
when es.stand_code like concat('%', 'Q/FT R', '%') THEN 7
when es.stand_code like concat('%', 'Q/FT S', '%') THEN 8
when es.stand_code like concat('%', 'Q/FT T', '%') THEN 9
when es.stand_code like concat('%', 'Q/FT V', '%') THEN 10
when es.stand_code like concat('%', 'Q/FT X', '%') THEN 11
when es.stand_code like concat('%', 'Q/FT Y', '%') THEN 12
when es.stand_code like concat('%', 'Q/FT Z', '%') THEN 13
when es.stand_code like concat('%', 'Q/QCBFC', '%') THEN 14
when es.stand_code like concat('%', '雷萨企标Q/FL', '%') THEN 15
when es.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
ELSE 17
END AS standCategorySort
FROM
`sar_bussioness_stand` AS es
LEFT JOIN `sar_buss_stand_attr_info` AS esa ON es.ID = esa.STAND_ID
LEFT JOIN `sar_buss_stand_menu` AS m ON es.ID = m.BUSS_STAND_ID
AND LENGTH(m.MENU_ID) > 30
AND m.TREE_TYPE is null
AND m.VALID_FLAG = 0
LEFT JOIN sar_menu_standard sms on m.MENU_ID = sms.ID
WHERE 1 = 1
AND sms.id in (select id from sar_menu_standard where valid_flag = 0)
<!--标准编号-->
<if test="param.standNo != null and param.standNo != ''">
AND es.STAND_CODE LIKE CONCAT('%',#{param.standNo},'%')
</if>
<!--关联的节点IDList-->
<if test="param.menuIdList != null and param.menuIdList.size() > 0">
AND m.MENU_ID IN
<foreach item="item" index="index" collection="param.menuIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--标准名称-->
<if test="param.standName != null and param.standName != ''">
AND es.STAND_NAME LIKE CONCAT('%',#{param.standName},'%')
</if>
<!--发布时间-->
<if test="param.startReleaseDate != null">
AND es.ISSUE_TIME >= #{param.startReleaseDateString}
</if>
<if test="param.endReleaseDate != null">
AND es.ISSUE_TIME &lt;= CONCAT(#{param.endReleaseDateString}, ' 23:59:59')
</if>
<!-- 实施日期 -->
<if test="param.startImplementDate != null">
AND es.PUT_TIME >= #{param.startImplementDate}
</if>
<if test="param.endImplementDate != null">
AND es.PUT_TIME &lt;= CONCAT(#{param.endImplementDate}, ' 23:59:59')
</if>
<!--代替标准-->
<if test="param.replaceStandardNo != null and param.replaceStandardNo != ''">
AND es.REPLACE_STAND_NUM LIKE CONCAT('%',#{param.replaceStandardNo},'%')
</if>
<!--编制单位-->
<if test="param.dept != null and param.dept != ''">
AND esa.QCDW LIKE CONCAT('%',#{param.dept},'%')
</if>
<!--起草人-->
<if test="param.draftUserName != null and param.draftUserName != ''">
AND esa.QCRBUSS LIKE CONCAT('%',#{param.draftUserName},'%')
</if>
<!--数据来源-->
<if test="param.dataSource != null and param.dataSource != ''">
AND 'ENTERPRISE' = #{param.dataSource}
</if>
<!--体系结构树搜索-->
<if test="param.standSystemIdList != null and param.standSystemIdList.size() > 0">
AND m.MENU_ID IN
<foreach item="item" index="index" collection="param.standSystemIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.selectIdList != null and param.selectIdList.size() > 0">
AND es.ID IN
<foreach item="item" index="index" collection="param.selectIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
@@ -52,8 +52,14 @@
<if test="name != null and name != ''">
and `NAME` like concat('%',#{name},'%')
</if>
<if test="uploadTimeBegin != null and uploadTimeEnd == null">
and UPLOAD_TIME &gt;= DATE_FORMAT(#{uploadTimeBegin}, '%Y-%m-%d')
</if>
<if test="uploadTimeBegin == null and uploadTimeEnd!= null">
and UPLOAD_TIME &lt;= DATE_FORMAT(#{uploadTimeEnd}, '%Y-%m-%d')
</if>
<if test="uploadTimeBegin != null and uploadTimeEnd != null">
and UPLOAD_TIME between DATE_FORMAT(#{uploadTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(${uploadTimeEnd}, '%Y-%m-%d')
and UPLOAD_TIME between DATE_FORMAT(#{uploadTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{uploadTimeEnd}, '%Y-%m-%d')
</if>
<if test="treeNodeIdList != null and treeNodeIdList.size() &gt; 0">
and TREE_NODE_ID in
@@ -88,6 +94,6 @@
from sar_laws_information
where VALID_FLAG = 0
<include refid="Base_Where_Clause" />
order by ID asc
order by UPLOAD_TIME desc
</select>
</mapper>
@@ -466,7 +466,7 @@
</when>
<otherwise>
<if test='orderByA != null and orderByA != "" and order1 != null and order1 != ""'>
${orderByA} ${order1},
${orderByA} is null desc, ${orderByA} ${order1},
</if>
</otherwise>
</choose>
@@ -114,8 +114,14 @@
<if test="participatingUnit != null and participatingUnit != ''" >
and PARTICIPATING_UNIT like concat('%',#{participatingUnit},'%')
</if>
<if test="startTimeBegin!= null and startTimeEnd == null">
and START_TIME &gt;= DATE_FORMAT(#{startTimeBegin}, '%Y-%m-%d')
</if>
<if test="startTimeBegin == null and startTimeEnd != null" >
and START_TIME &lt;= DATE_FORMAT(#{startTimeEnd}, '%Y-%m-%d')
</if>
<if test="startTimeBegin != null and startTimeEnd != null">
and START_TIME between #{startTimeBegin} and ${startTimeEnd}
and START_TIME between DATE_FORMAT(#{startTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{startTimeEnd}, '%Y-%m-%d')
</if>
<if test="topicStatus != null and topicStatus != ''" >
and TOPIC_STATUS = #{topicStatus}
@@ -135,12 +141,6 @@
<if test="meetingAddress != null and meetingAddress != ''">
and sltm.MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
</if>
<!-- <if test="participantsList != null and participantsList.size() > 0" >-->
<!-- and PARTICIPANTS in-->
<!-- <foreach collection="participantsList" separator="," open="(" close=")" item="participant">-->
<!-- #{participant}-->
<!-- </foreach>-->
<!-- </if>-->
<if test="participants != null and participants != ''">
and sltm.PARTICIPANTS like concat('%',#{participants},'%')
</if>
@@ -182,26 +182,28 @@
</sql>
<select id="queryByPageCount" resultType="java.lang.Integer">
select count(slt.ID) from sar_laws_topic slt left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
left join sar_laws_contact_information slci1 on slt.ID = slci1.LAWS_TOPIC_ID and slci1.GROUP_TYPE = 'topicGroup'
left join sar_laws_contact_information slci2 on slt.ID = slci2.LAWS_TOPIC_ID and slci2.GROUP_TYPE = 'inside'
where slt.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="TopicMeeting_where" />
<include refid="ContactInformation_where" />
group by slt.ID
select count(1) from (
select count(slt.ID) from (select * from sar_laws_topic where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>) slt
left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
left join sar_laws_contact_information slci1 on slt.ID = slci1.LAWS_TOPIC_ID and slci1.GROUP_TYPE = 'topicGroup'
left join sar_laws_contact_information slci2 on slt.ID = slci2.LAWS_TOPIC_ID and slci2.GROUP_TYPE = 'inside'
where slt.VALID_FLAG = 0
<include refid="TopicMeeting_where" />
<include refid="ContactInformation_where" />
group by slt.ID
) a
</select>
<select id="queryByPage" resultMap="BaseResultMap">
select <include refid="Base_Join_Column_List" />
from sar_laws_topic slt left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
from (select <include refid="Base_Column_List" /> from sar_laws_topic where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>
order by ${sortField} ${sortMode} limit ${pager.startIndex-1},${pageSize}) slt
left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
left join sar_laws_contact_information slci1 on slt.ID = slci1.LAWS_TOPIC_ID and slci1.GROUP_TYPE = 'topicGroup'
left join sar_laws_contact_information slci2 on slt.ID = slci2.LAWS_TOPIC_ID and slci2.GROUP_TYPE = 'inside'
where slt.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="TopicMeeting_where" />
<include refid="ContactInformation_where" />
order by slt.${sortField} ${sortMode}
limit ${pager.startIndex-1},${pageSize}
</select>
<select id="getLawsTopicByIds" resultMap="BaseResultMap">
select <include refid="Base_Join_Column_List" />
@@ -212,7 +214,7 @@
<foreach collection="idList" open="(" close=")" separator="," item="id">
#{id}
</foreach>
order by slt.ID asc
order by slt.START_TIME desc
</select>
<select id="getAllLawsTopic" resultMap="BaseResultMap">
select <include refid="Base_Join_Column_List" />
@@ -223,6 +225,6 @@
<include refid="Base_Where_Clause"/>
<include refid="TopicMeeting_where" />
<include refid="ContactInformation_where" />
order by slt.ID asc
order by slt.START_TIME desc
</select>
</mapper>
@@ -35,4 +35,8 @@
select * from ts_role where ID in ( SELECT ROLE_ID FROM `ts_user_role` where USER_ID = #{userId})
</select>
<select id="getRoleDataByUserId" resultType="com.adc.da.slrs.sarRole.entity.TsRole">
select * from ts_role where ID in ( SELECT ROLE_ID FROM `ts_user_role` where USER_ID = #{userId})
</select>
</mapper>
@@ -48,5 +48,11 @@
where ID=#{id}
</update>
<update id="deleteStandSystem">
update sar_standards_info
set STAND_SYSTEM = null
where STAND_SYSTEM like #{menuName}
</update>
</mapper>
@@ -152,10 +152,10 @@
<select id="selectUserByRole" resultType="java.lang.Integer">
SELECT count(ts_user.USID) from ts_user
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
LEFT JOIN ts_user_position on ts_user.USID = ts_user_position.user_id
WHERE ts_user_position.position_id in (
SELECT ts_position_role.position_id from ts_position_role
WHERE ts_position_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
LEFT JOIN ts_user_role on ts_user.USID = ts_user_role.user_id
WHERE ts_user_role.role_id in (
SELECT ts_user_role.role_id from ts_user_role
WHERE ts_user_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
<if test="null != role.userId and role.userId != ''">
and ts_user.USID like concat(concat('%',#{role.userId}),'%')
</if>
@@ -174,10 +174,10 @@
<select id="selectUserByRoleByPage" resultMap="UserPosition">
SELECT ts_user.UNAME,ts_user.USID,ts_user.INSTITUTION_ID , ts_institution.name as institution_name from ts_user
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
LEFT JOIN ts_user_position on ts_user.USID = ts_user_position.user_id
WHERE ts_user_position.position_id in (
SELECT ts_position_role.position_id from ts_position_role
WHERE ts_position_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
LEFT JOIN ts_user_role on ts_user.USID = ts_user_role.user_id
WHERE ts_user_role.role_id in (
SELECT ts_user_role.role_id from ts_user_role
WHERE ts_user_role.role_id = #{role.roleId} ) and ts_user.DISABLE_FLAG = '0'
<if test="null != role.userId and role.userId != ''">
and ts_user.USID like concat(concat('%',#{role.userId}),'%')
</if>
@@ -2,4 +2,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.tsRoleMeunData.dao.TsRoleMenuDataDao">
<insert id="insertResourceMenuData">
INSERT INTO ts_role_menu_data
VALUES(#{roleId},#{menuId} )
</insert>
</mapper>
@@ -0,0 +1,15 @@
<?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.roleReplacePosition.mapper.UserPositionMapper">
<resultMap id="BaseResultMap" type="com.adc.da.slrs.roleReplacePosition.domain.UserPosition">
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
<result property="positionId" column="position_id" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
user_id,position_id
</sql>
</mapper>