add: 政策课题模块增删改查

This commit is contained in:
wxyclub
2023-10-18 14:23:15 +08:00
parent 5d8bed9af2
commit 4621286ca5
19 changed files with 1258 additions and 0 deletions
@@ -0,0 +1,23 @@
<?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.sarLawsTopic.dao.SarLawsContactInformationMapper">
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation">
<result property="id" column="ID" jdbcType="VARCHAR"/>
<result property="lawsTopicId" column="LAWS_TOPIC_ID" jdbcType="VARCHAR"/>
<result property="groupType" column="GROUP_TYPE" jdbcType="VARCHAR"/>
<result property="name" column="NAME" jdbcType="VARCHAR"/>
<result property="department" column="DEPARTMENT" jdbcType="VARCHAR"/>
<result property="phone" column="PHONE" jdbcType="VARCHAR"/>
<result property="email" column="EMAIL" jdbcType="VARCHAR"/>
<result property="identity" column="IDENTITY" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,LAWS_TOPIC_ID,GROUP_TYPE,
`NAME`,DEPARTMENT,PHONE,
EMAIL,IDENTITY
</sql>
</mapper>
@@ -0,0 +1,208 @@
<?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.sarLawsTopic.dao.SarLawsTopicMapper">
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopic">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="topicName" column="TOPIC_NAME" jdbcType="VARCHAR"/>
<result property="organizer" column="ORGANIZER" jdbcType="VARCHAR"/>
<result property="guidanceUnit" column="GUIDANCE_UNIT" jdbcType="VARCHAR"/>
<result property="participatingUnit" column="PARTICIPATING_UNIT" jdbcType="VARCHAR"/>
<result property="startTime" column="START_TIME" jdbcType="TIMESTAMP"/>
<result property="closeTime" column="CLOSE_TIME" jdbcType="TIMESTAMP"/>
<result property="topicStatus" column="TOPIC_STATUS" jdbcType="VARCHAR"/>
<result property="topicCost" column="TOPIC_COST" jdbcType="VARCHAR"/>
<result property="agreement" column="AGREEMENT" jdbcType="VARCHAR"/>
<result property="researchPlan" column="RESEARCH_PLAN" jdbcType="VARCHAR"/>
<result property="researchFindings" column="RESEARCH_FINDINGS" jdbcType="VARCHAR"/>
<result property="researchGroupOther" column="RESEARCH_GROUP_OTHER" jdbcType="VARCHAR"/>
<result property="conferenceMaterials" column="CONFERENCE_MATERIALS" jdbcType="VARCHAR"/>
<result property="insideProjectProposalRepost" column="INSIDE_PROJECT_PROPOSAL_REPORT" jdbcType="VARCHAR"/>
<result property="insideResearchPlan" column="INSIDE_RESEARCH_PLAN" jdbcType="VARCHAR"/>
<result property="insideConferenceMaterials" column="INSIDE_CONFERENCE_MATERIALS" jdbcType="VARCHAR"/>
<result property="insideResearchFindings" column="INSIDE_RESEARCH_FINDINGS" jdbcType="VARCHAR"/>
<result property="insideOther" column="INSIDE_OTHER" jdbcType="VARCHAR"/>
<result property="validFlag" column="VALID_FLAG" jdbcType="TINYINT"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="modifyTime" column="MODIFY_TIME" jdbcType="TIMESTAMP"/>
<collection property="meetingList" ofType="com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="lawsTopicId" column="LAWS_TOPIC_ID"/>
<result property="meetingName" column="MEETING_NAME"/>
<result property="meetingTime" column="MEETING_TIME"/>
<result property="meetingAddress" column="MEETING_ADDRESS"/>
<result property="participants" column="PARTICIPANTS"/>
<result property="meetingContent" column="MEETING_CONTENT"/>
</collection>
<collection property="topicContactInformationList" ofType="com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation">
<id property="id" column="slci1Id" jdbcType="VARCHAR"/>
<result property="lawsTopicId" column="slci1LawsTopicId"/>
<result property="groupType" column="slci1GroupType"/>
<result property="name" column="slci1Name"/>
<result property="department" column="slci1Department"/>
<result property="phone" column="slci1Phone"/>
<result property="email" column="slci1Email"/>
<result property="identity" column="slci1Identity" />
</collection>
<collection property="insideContactInformationList" ofType="com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation">
<id property="id" column="slci2Id" jdbcType="VARCHAR"/>
<result property="lawsTopicId" column="slci2LawsTopicId"/>
<result property="groupType" column="slci2GroupType"/>
<result property="name" column="slci2Name"/>
<result property="department" column="slci2Department"/>
<result property="phone" column="slci2Phone"/>
<result property="email" column="slci2Email"/>
<result property="identity" column="slci2Identity" />
</collection>
</resultMap>
<sql id="Base_Column_List">
ID,TOPIC_NAME,ORGANIZER,
GUIDANCE_UNIT,PARTICIPATING_UNIT,START_TIME,
CLOSE_TIME,TOPIC_STATUS,TOPIC_COST,AGREEMENT,
RESEARCH_PLAN,RESEARCH_FINDINGS,RESEARCH_GROUP_OTHER,
CONFERENCE_MATERIALS,INSIDE_PROJECT_PROPOSAL_REPORT,INSIDE_RESEARCH_PLAN,
INSIDE_CONFERENCE_MATERIALS,INSIDE_RESEARCH_FINDINGS,INSIDE_OTHER,
VALID_FLAG,CREATE_TIME,MODIFY_TIME
</sql>
<sql id="Base_Join_Column_List">
slt.ID,slt.TOPIC_NAME,slt.ORGANIZER,
slt.GUIDANCE_UNIT,slt.PARTICIPATING_UNIT,slt.START_TIME,
slt.CLOSE_TIME,slt.TOPIC_STATUS,slt.TOPIC_COST,slt.AGREEMENT,
sltm.ID,
sltm.LAWS_TOPIC_ID,
sltm.MEETING_NAME,
sltm.MEETING_TIME,
sltm.MEETING_ADDRESS,
sltm.PARTICIPANTS,
sltm.MEETING_CONTENT,
slt.RESEARCH_PLAN,slt.RESEARCH_FINDINGS,slt.RESEARCH_GROUP_OTHER,
slt.CONFERENCE_MATERIALS,
slci1.ID as slci1Id,
slci1.LAWS_TOPIC_ID as slci1LawsTopicId,
slci1.GROUP_TYPE slci1GroupType,
slci1.`NAME` as slci1Name,
slci1.DEPARTMENT as slci1Department,
slci1.PHONE as slci1Phone,
slci1.EMAIL as slci1Email,
slci1.IDENTITY as slci1Identity,
slci2.ID as slci2Id,
slci2.LAWS_TOPIC_ID as slci2LawsTopicId,
slci2.GROUP_TYPE as slci2GroupType,
slci2.`NAME` as slci2Name,
slci2.DEPARTMENT as slci2Department,
slci2.PHONE as slci2Phone,
slci2.EMAIL as slci2Email,
slci2.IDENTITY as slci2Identity,
slt.INSIDE_PROJECT_PROPOSAL_REPORT,slt.INSIDE_RESEARCH_PLAN,
slt.INSIDE_CONFERENCE_MATERIALS,slt.INSIDE_RESEARCH_FINDINGS,slt.INSIDE_OTHER,
slt.VALID_FLAG,slt.CREATE_TIME,slt.MODIFY_TIME
</sql>
<sql id="Base_Where_Clause">
<trim suffixOverrides="," >
<if test="topicName != null and topicName !=''">
and TOPIC_NAME like concat('%',#{topicName},'%')
</if>
<if test="organizer != null and organizer !=''">
and ORGANIZER like concat('%',#{organizer},'%')
</if>
<if test="guidanceUnit != null and guidanceUnit != ''" >
and GUIDANCE_UNIT like concat('%',#{guidanceUnit},'%')
</if>
<if test="participatingUnit != null and participatingUnit != ''" >
and PARTICIPATING_UNIT like concat('%',#{participatingUnit},'%')
</if>
<if test="startTime != null and startTime !=''">
and START_TIME ${startTimeOperator} #{startTime}
</if>
<if test="closeTime != null and closeTime !=''">
and CLOSE_TIME ${startTimeOperator} #{closeTime}
</if>
<if test="topicStatus != null and topicStatus != ''" >
and TOPIC_STATUS = #{topicStatus}
</if>
<if test="topicCost != null and topicCost != ''" >
and TOPIC_COST like concat('%',#{topicCost},'%')
</if>
</trim>
</sql>
<sql id="TopicMeeting_where">
<if test="meetingName != null and meetingName != ''">
and sltm.MEETING_NAME like concat('%',#{meetingName},'%')
</if>
<if test="meetingTime != null and meetingTime != ''">
and sltm.MEETING_TIME like concat('%',#{meetingTime},'%')
</if>
<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>
<if test="meetingContent != null and meetingContent != ''">
and sltm.MEETING_CONTENT like concat('%',#{meetingContent},'%')
</if>
</sql>
<sql id="ContactInformation_where">
<if test="topicGroupName != null and topicGroupName !=''">
and slci1.NAME like concat('%',#{topicGroupName},'%')
</if>
<if test="topicGroupDepartment != null and topicGroupDepartment != ''">
and slci1.DEPARTMENT like concat('%',#{topicGroupDepartment},'%')
</if>
<if test="topicGroupPhone != null and topicGroupPhone != ''">
and slci1.PHONE like concat('%',#{topicGroupPhone},'%')
</if>
<if test="topicGroupEmail != null and topicGroupEmail != ''">
and slci1.EMAIL like concat('%',#{topicGroupEmail},'%')
</if>
<if test="topicGroupIdentity != null and topicGroupIdentity != ''">
and slci1.IDENTITY like concat('%',#{topicGroupIdentity},'%')
</if>
<if test="insideName != null and insideName !=''">
and slci2.NAME like concat('%',#{insideName},'%')
</if>
<if test="insideDepartment != null and insideDepartment != ''">
and slci2.DEPARTMENT like concat('%',#{insideDepartment},'%')
</if>
<if test="insidePhone != null and insidePhone != ''">
and slci2.PHONE like concat('%',#{insidePhone},'%')
</if>
<if test="insideEmail != null and insideEmail != ''">
and slci2.EMAIL like concat('%',#{insideEmail},'%')
</if>
<if test="insideIdentity != null and insideIdentity != ''">
and slci2.IDENTITY like concat('%',#{insideIdentity},'%')
</if>
</sql>
<select id="queryByPageCount" resultType="java.lang.Integer">
select count(1) 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" />
</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
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>
</mapper>
@@ -0,0 +1,22 @@
<?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.sarLawsTopic.dao.SarLawsTopicMeetingMapper">
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="lawsTopicId" column="LAWS_TOPIC_ID" jdbcType="VARCHAR"/>
<result property="meetingName" column="MEETING_NAME" jdbcType="VARCHAR"/>
<result property="meetingTime" column="MEETING_TIME" jdbcType="TIMESTAMP"/>
<result property="meetingAddress" column="MEETING_ADDRESS" jdbcType="VARCHAR"/>
<result property="participants" column="PARTICIPANTS" jdbcType="VARCHAR"/>
<result property="meetingContent" column="MEETING_CONTENT" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,LAWS_TOPIC_ID,MEETING_NAME,
MEETING_TIME,MEETING_ADDRESS,PARTICIPANTS,
MEETING_CONTENT
</sql>
</mapper>