bug: 内外部会议分页bug修改
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface InsideOutsideMeetingDao extends BaseMapper<InsideOutsideMeeting> {
|
public interface InsideOutsideMeetingDao extends BaseMapper<InsideOutsideMeeting> {
|
||||||
|
|
||||||
List<Integer> queryByPageCount(InsideOutsideMeetingVO page);
|
Integer queryByPageCount(InsideOutsideMeetingVO page);
|
||||||
|
|
||||||
List<InsideOutsideMeetingVO> queryByPage(InsideOutsideMeetingVO page);
|
List<InsideOutsideMeetingVO> queryByPage(InsideOutsideMeetingVO page);
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -40,9 +40,10 @@ public class InsideOutsideMeetingVO extends BasePage {
|
|||||||
@Excel(name = "会议地点", needMerge = true)
|
@Excel(name = "会议地点", needMerge = true)
|
||||||
private String meetingAddress;
|
private String meetingAddress;
|
||||||
|
|
||||||
|
private String agendaNameStr;
|
||||||
|
|
||||||
@Excel(name = "参会人员", needMerge = true)
|
@Excel(name = "参会人员", needMerge = true)
|
||||||
private String participants;
|
private String participants;
|
||||||
private List<String> participantsList;
|
|
||||||
|
|
||||||
private String meetingMinutes;
|
private String meetingMinutes;
|
||||||
|
|
||||||
@@ -82,9 +83,9 @@ public class InsideOutsideMeetingVO extends BasePage {
|
|||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
private String sortField = "ID";
|
private String sortField = "meetingTime";
|
||||||
|
|
||||||
private String sortMode = "asc";
|
private String sortMode = "desc";
|
||||||
|
|
||||||
// 会议时间查询字段
|
// 会议时间查询字段
|
||||||
private String meetingTimeBegin;
|
private String meetingTimeBegin;
|
||||||
|
|||||||
+3
-6
@@ -176,19 +176,16 @@ public class InsideOutsideMeetingServiceImpl extends ServiceImpl<InsideOutsideMe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<InsideOutsideMeetingVO> queryByPage(InsideOutsideMeetingVO page){
|
public List<InsideOutsideMeetingVO> queryByPage(InsideOutsideMeetingVO page){
|
||||||
if (StringUtils.isNotBlank(page.getParticipants())) {
|
|
||||||
page.setParticipantsList(Arrays.asList(page.getParticipants().split(",")));
|
|
||||||
}
|
|
||||||
// 设置排序字段
|
// 设置排序字段
|
||||||
if (StringUtils.isNotBlank(page.getSortField())) {
|
if (StringUtils.isNotBlank(page.getSortField())) {
|
||||||
// 小驼峰变成 ABC_DEF
|
// 小驼峰变成 ABC_DEF
|
||||||
String sortField = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(page.getSortField()),"_").toUpperCase();
|
String sortField = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(page.getSortField()),"_").toUpperCase();
|
||||||
page.setSortField(sortField);
|
page.setSortField(sortField);
|
||||||
} else {
|
} else {
|
||||||
page.setSortField("ID");
|
page.setSortField("MEETING_TIME");
|
||||||
page.setSortMode("asc");
|
page.setSortMode("desc");
|
||||||
}
|
}
|
||||||
int rowCount = this.baseMapper.queryByPageCount(page).size();
|
int rowCount = this.baseMapper.queryByPageCount(page);
|
||||||
page.getPager().setRowCount(rowCount);
|
page.getPager().setRowCount(rowCount);
|
||||||
List<InsideOutsideMeetingVO> insideOutsideMeetingVOList = this.baseMapper.queryByPage(page);
|
List<InsideOutsideMeetingVO> insideOutsideMeetingVOList = this.baseMapper.queryByPage(page);
|
||||||
for (InsideOutsideMeetingVO insideOutsideMeeting : insideOutsideMeetingVOList) {
|
for (InsideOutsideMeetingVO insideOutsideMeeting : insideOutsideMeetingVOList) {
|
||||||
|
|||||||
+21
-17
@@ -10,6 +10,7 @@
|
|||||||
<result column="MEETING_ORGANIZER" property="meetingOrganizer" />
|
<result column="MEETING_ORGANIZER" property="meetingOrganizer" />
|
||||||
<result column="MEETING_TIME" property="meetingTime" />
|
<result column="MEETING_TIME" property="meetingTime" />
|
||||||
<result column="MEETING_ADDRESS" property="meetingAddress" />
|
<result column="MEETING_ADDRESS" property="meetingAddress" />
|
||||||
|
<result column="agendaNameStr" property="agendaNameStr" />
|
||||||
<result column="PARTICIPANTS" property="participants" />
|
<result column="PARTICIPANTS" property="participants" />
|
||||||
<result column="MEETING_MINUTES" property="meetingMinutes" />
|
<result column="MEETING_MINUTES" property="meetingMinutes" />
|
||||||
<result column="MEETING_CONTENT" property="meetingContent" />
|
<result column="MEETING_CONTENT" property="meetingContent" />
|
||||||
@@ -39,7 +40,8 @@
|
|||||||
iom.PARTICIPANTS,iom.MEETING_MINUTES,iom.MEETING_CONTENT,iom.FIRST_MEETING_TYPE,iom.SECOND_MEETING_TYPE,
|
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.ID as mtId,mt.MEETING_ID,mt.AGENDA_NAME,mt.AGENDA_MATERIALS,mt.REPORTER,mt.REPORTING_UNIT,
|
||||||
mt.AGENDA_CONTENT,
|
mt.AGENDA_CONTENT,
|
||||||
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME
|
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME,
|
||||||
|
iom.agendaNameStr
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Where_Clause">
|
<sql id="Base_Where_Clause">
|
||||||
<trim suffixOverrides="," >
|
<trim suffixOverrides="," >
|
||||||
@@ -58,11 +60,8 @@
|
|||||||
<if test="meetingAddress != null and meetingAddress != ''" >
|
<if test="meetingAddress != null and meetingAddress != ''" >
|
||||||
and MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
|
and MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="participantsList != null and participantsList.size() > 0" >
|
<if test="participants != null and participants != ''">
|
||||||
and PARTICIPANTS in
|
and PARTICIPANTS like concat('%',#{participants},'%')
|
||||||
<foreach collection="participantsList" separator="," open="(" close=")" item="participant">
|
|
||||||
#{participant}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
<if test="meetingContent != null" >
|
<if test="meetingContent != null" >
|
||||||
and MEETING_CONTENT like concat('%',#{meetingContent},'%')
|
and MEETING_CONTENT like concat('%',#{meetingContent},'%')
|
||||||
@@ -90,30 +89,35 @@
|
|||||||
</if>
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
<select id="queryByPageCount" resultType="java.lang.Integer">
|
<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
|
select count(1) from (
|
||||||
where iom.VALID_FLAG = 0
|
select count(1) from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
|
||||||
<include refid="Base_Where_Clause"/>
|
where iom.VALID_FLAG = 0
|
||||||
<include refid="MeetingTopic_where" />
|
<include refid="Base_Where_Clause"/>
|
||||||
group by iom.ID
|
<include refid="MeetingTopic_where" />
|
||||||
|
group by iom.ID
|
||||||
|
) subquery
|
||||||
</select>
|
</select>
|
||||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeetingVO">
|
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeetingVO">
|
||||||
select <include refid="Base_Column_Join_MeetingTopic_List" />
|
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 agendaNameStr from inside_outside_meeting where VALID_FLAG = 0
|
||||||
|
<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
|
where iom.VALID_FLAG = 0
|
||||||
<include refid="Base_Where_Clause" />
|
<include refid="Base_Where_Clause" />
|
||||||
<include refid="MeetingTopic_where" />
|
<include refid="MeetingTopic_where" />
|
||||||
order by
|
order by
|
||||||
<choose>
|
<choose>
|
||||||
<when test="sortField == 'AGENDA_NAME'">
|
<when test="sortField == 'AGENDA_NAME'">
|
||||||
mt.${sortField} ${sortMode},
|
mt.${sortField} ${sortMode}
|
||||||
mt.AGENDA_NAME asc
|
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
iom.${sortField} ${sortMode},
|
iom.${sortField} ${sortMode}
|
||||||
mt.AGENDA_NAME asc
|
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
limit ${pager.startIndex-1},${pageSize}
|
|
||||||
</select>
|
</select>
|
||||||
<select id="queryMeetingById" resultMap="BaseResultMap">
|
<select id="queryMeetingById" resultMap="BaseResultMap">
|
||||||
select <include refid="Base_Column_Join_MeetingTopic_List" />
|
select <include refid="Base_Column_Join_MeetingTopic_List" />
|
||||||
|
|||||||
Reference in New Issue
Block a user