Browse Source

会议室列别magic-api
会议申请台账

大数据与最优化研究所 2 weeks ago
parent
commit
bd9f81b9cf

+ 10 - 0
src/main/java/com/xjrsoft/module/oa/controller/WfMeetingApplyController.java

@@ -51,6 +51,16 @@ public class WfMeetingApplyController {
         return RT.ok(pageOutput);
     }
 
+    @GetMapping(value = "/today-meeting-mobile-page")
+    @ApiOperation(value="移动端今日会议列表(分页)")
+    @SaCheckPermission("wfmeetingapply:detail")
+    @XjrLog(value = "移动端今日会议列表(分页)")
+    public RT<PageOutput<TodayMeetingMobilePageVo>> todayMeetingMobilePage(@Valid TodayMeetingMobilePageDto dto){
+        IPage<TodayMeetingMobilePageVo> page = wfMeetingApplyService.todayMeetingMobilePage(dto);
+        PageOutput<TodayMeetingMobilePageVo> pageOutput = ConventPage.getPageOutput(page, TodayMeetingMobilePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
     @GetMapping(value = "/info_in_workflow")
     @ApiOperation(value="按照流程查看详情")
     @SaCheckPermission("wfmeetingapply:detail")

+ 27 - 0
src/main/java/com/xjrsoft/module/oa/dto/TodayMeetingMobilePageDto.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.oa.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
+
+
+/**
+* @title: 分页查询入参
+* @Author phoenix
+* @Date: 2025-03-26
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class TodayMeetingMobilePageDto extends PageInput {
+
+    /**
+     * 会议日期
+     */
+    @ApiModelProperty("会议日期")
+    private LocalDate meetingApplyDate;
+}

+ 2 - 0
src/main/java/com/xjrsoft/module/oa/service/IWfMeetingApplyService.java

@@ -21,6 +21,8 @@ public interface IWfMeetingApplyService extends MPJBaseService<WfMeetingApply> {
 
     IPage<WfMeetingApplyPageVo> pageRabAndHand(WfMeetingApplyPageDto dto);
 
+    IPage<TodayMeetingMobilePageVo> todayMeetingMobilePage(TodayMeetingMobilePageDto dto);
+
     WfMeetingApplyInWorkflowVo infoInWorkflow(Long id);
 
     List<MeetingConfereeListVo> listMeetingConferee(MeetingConfereeListDto dto);

+ 18 - 7
src/main/java/com/xjrsoft/module/oa/service/impl/WfMeetingApplyServiceImpl.java

@@ -84,11 +84,12 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
 
     @Override
     public List<MeetingRoomListVo> listMeetingRoom(MeetingRoomListDto dto) {
+        List<MeetingRoomListVo> usableResult = new ArrayList<>();
         if(ObjectUtils.isEmpty(dto.getMeetingApplyDate())
                 || ObjectUtils.isEmpty(dto.getMeetingApplyS())
                 || ObjectUtils.isEmpty(dto.getMeetingApplyE())
         ){
-            return new ArrayList<>();
+            return usableResult;
         }
 
         // 处理时间
@@ -114,6 +115,7 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
                 .eq(WfMeetingApply::getMeetingApplyDate, meetingApplyDate)
                 .eq(WfMeetingApply::getMeetingApplyFormat, MeetingTypeEnum.HMT0002.getCode())// 线下会议
                 .ne(WfMeetingApply::getMeetingStatus, 1)
+                .ne(WfMeetingApply::getWorkflowStatus, 2)
         );
 
         // 根据会议室id分组
@@ -145,15 +147,17 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
         for (MeetingRoomListVo vo : result){
             vo.setStatus(0);
             MeetingRoomListVo reservationRoom = reservationMap.get(vo.getId());
-            if(ObjectUtils.isNotEmpty(reservationRoom)){
-                vo.setReservationDetail(reservationRoom.getReservationDetail());
-                vo.setStatus(reservationRoom.getStatus());
+            if(ObjectUtils.isEmpty(reservationRoom)){
+                usableResult.add(vo);
+            }
+            if(ObjectUtils.isNotEmpty(reservationRoom) && reservationRoom.getStatus() == 0){
+                usableResult.add(vo);
             }
         }
 
         // 根据可用排序
-        result.sort(Comparator.comparingInt(MeetingRoomListVo::getStatus));
-        return result;
+        usableResult.sort(Comparator.comparing(MeetingRoomListVo::getName));
+        return usableResult;
     }
 
     @Override
@@ -161,7 +165,7 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
         // 权限设置
         Long loginId = StpUtil.getLoginIdAsLong();
         int permission =  1;
-        if(StpUtil.hasRole("")){
+        if(StpUtil.hasRole("Conference") || StpUtil.hasRole("ADMIN")){
             permission = 2;
         }
 
@@ -188,6 +192,7 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
                                 .like(StringUtils.isNotEmpty(dto.getMeetingApplyHostCn()), XjrUser::getName, dto.getMeetingApplyHostCn())
                 )
                 .eq(permission == 1, WfMeetingApply::getSponsorId, loginId)
+                .eq(WfMeetingApply::getWorkflowStatus, 1)
                 .ge(ObjectUtils.isNotEmpty(dto.getStartMeetingApplyDate()), WfMeetingApply::getMeetingApplyDate, dto.getStartMeetingApplyDate())
                 .le(ObjectUtils.isNotEmpty(dto.getEndMeetingApplyDate()), WfMeetingApply::getMeetingApplyDate, dto.getEndMeetingApplyDate())
                 .eq(StringUtils.isNotEmpty(dto.getMeetingApplyFormat()), WfMeetingApply::getMeetingApplyFormat, dto.getMeetingApplyFormat())
@@ -252,6 +257,12 @@ public class WfMeetingApplyServiceImpl extends MPJBaseServiceImpl<WfMeetingApply
         return page;
     }
 
+    @Override
+    public IPage<TodayMeetingMobilePageVo> todayMeetingMobilePage(TodayMeetingMobilePageDto dto) {
+
+        return null;
+    }
+
     @Override
     public WfMeetingApplyInWorkflowVo infoInWorkflow(Long id) {
         MPJLambdaWrapper<WfMeetingApply> wfMeetingApplyPageVoMPJLambdaWrapper = new MPJLambdaWrapper<>();

+ 74 - 0
src/main/java/com/xjrsoft/module/oa/vo/TodayMeetingMobilePageVo.java

@@ -0,0 +1,74 @@
+package com.xjrsoft.module.oa.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+
+/**
+* @title: 移动端今日会议列表(分页)出参
+* @Author phoenix
+* @Date: 2025-03-26
+* @Version 1.0
+*/
+@Data
+public class TodayMeetingMobilePageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 会议开始时间
+    */
+    @ApiModelProperty("会议开始时间")
+    private LocalTime meetingApplyS;
+    /**
+    * 会议结束时间
+    */
+    @ApiModelProperty("会议结束时间")
+    private LocalTime meetingApplyE;
+    /**
+    * 会议形式(xjr_dictionary_item(meeting_type))
+    */
+    @ApiModelProperty("会议形式(xjr_dictionary_item(meeting_type))")
+    private String meetingApplyFormat;
+    /**
+     * 会议形式(xjr_dictionary_item(meeting_type))
+     */
+    @ApiModelProperty("会议形式(xjr_dictionary_item(meeting_type))")
+    private String meetingApplyFormatCn;
+    /**
+    * 会议室管理主键id(meeting_room)
+    */
+    @ApiModelProperty("会议室管理主键id(meeting_room)")
+    private Long meetingRoomId;
+    /**
+     * 会议室管理主键id(meeting_room)
+     */
+    @ApiModelProperty("会议室管理主键id(meeting_room)")
+    private String meetingRoomIdCn;
+    /**
+    * 线上会议链接
+    */
+    @ApiModelProperty("线上会议链接")
+    private String meetingApplyUrl;
+    /**
+    * 会议主题
+    */
+    @ApiModelProperty("会议主题")
+    private String meetingApplyTheme;
+    /**
+    * 会议状态(0:未开始 1:已经撤销,2:已结束)
+    */
+    @ApiModelProperty("会议状态(0:未开始 1:已经撤销,2:已结束,3:进行中)")
+    private Integer meetingStatus;
+
+    /**
+     * 当前用户的会议状态(0:未开始 1:已经撤销,2:已结束)
+     */
+    @ApiModelProperty("当前用户的会议状态(0:未开始 1:已经撤销,2:已结束,3:进行中)")
+    private Integer userMeetingStatus;
+}

+ 3 - 0
src/main/resources/sqlScript/20250324_sql.sql

@@ -113,6 +113,9 @@ alter table wf_meeting_apply
 
 alter table wf_meeting_apply
     add workflow_status int default 0 not null comment '会议申请流程状态(0:未结束,1:已经结束,正常通过,2:已经结束,未正常通过)';
+
+alter table wf_meeting_apply
+    modify workflow_status int default 0 null comment '会议申请流程状态(0:未结束,1:已经结束,正常通过,2:已经结束,未正常通过)';
 -- ----------------------------
 -- 会议参会人员
 -- ----------------------------