Browse Source

Merge remote-tracking branch 'origin/dev' into dev

fanxp 1 year ago
parent
commit
dec8ff99f6

+ 50 - 34
src/main/java/com/xjrsoft/module/oa/service/impl/NewsServiceImpl.java

@@ -161,7 +161,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
 
         //如果状态是2,表示立即发布的公告,需要将阅读人添加进阅读关系表
         if(addProclamationDto.getStatus() == 2){
-            addRelation(news);
+            addRelation(news, addProclamationDto, 2);
         }
 
         //公告需要添加阅读关系,关系类型 1=部门 2=人员 3=班级
@@ -251,7 +251,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
                 .eq(News::getTypeId, 2)
                 .like(dto.getFullHead() != null, News::getFullHead, dto.getFullHead())
                 .like(dto.getKeyword() != null, News::getNewsContent, dto.getKeyword())
-                .orderByDesc(News::getReleaseTime)
+                .orderByDesc(News::getId)
                 .disableSubLogicDel();
         IPage<ProclamationPageVo> page = this.selectJoinListPage(ConventPage.getPage(dto), ProclamationPageVo.class, queryNews);
         return page;
@@ -272,7 +272,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
                 .eq(NewsRelation::getUserId, StpUtil.getLoginIdAsLong())
                 .or()
                 .eq(News::getSendRange, 2)
-                .orderByDesc(News::getReleaseTime)
+                .orderByDesc(News::getId)
                 .disableSubLogicDel();
         ;
         IPage<ProclamationPageVo> page = this.selectJoinListPage(ConventPage.getPage(dto), ProclamationPageVo.class, queryNews);
@@ -304,7 +304,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
             xjrNews.setModifyUserId(StpUtil.getLoginIdAsLong());
             xjrNews.setModifyDate(LocalDateTime.now());
 
-            addRelation(xjrNews);
+            addRelation(xjrNews, null, 1);
         }
 
         if (xjrNews.getStatus() == 3) {
@@ -399,40 +399,56 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
      * @param xjrNews
      * @return
      */
-    private Boolean addRelation(News xjrNews){
+    private Boolean addRelation(News xjrNews ,AddProclamationDto addProclamationDto, int flag){
         if (xjrNews.getSendRange() == 3) {
-            //查出当前公告的关系配置
-            //部门
-            LambdaQueryWrapper<NewsRelationConfig> queryDeptList = new LambdaQueryWrapper<>();
-            queryDeptList
-                    .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
-                    .eq(NewsRelationConfig::getRelationType, 1);
-            List<NewsRelationConfig> deptList = newsRelationConfigMapper.selectList(queryDeptList);
             List<Long> deptIdList = new ArrayList<>();
-            for (NewsRelationConfig newsRelationConfig : deptList) {
-                deptIdList.add(newsRelationConfig.getRelationId());
-            }
-
-            //人员
-            LambdaQueryWrapper<NewsRelationConfig> queryPersonalList = new LambdaQueryWrapper<>();
-            queryPersonalList
-                    .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
-                    .eq(NewsRelationConfig::getRelationType, 2);
-            List<NewsRelationConfig> personalList = newsRelationConfigMapper.selectList(queryPersonalList);
             List<Long> personalIdList = new ArrayList<>();
-            for (NewsRelationConfig newsRelationConfig : personalList) {
-                personalIdList.add(newsRelationConfig.getRelationId());
+            List<Long> classIdList = new ArrayList<>();
+            if(flag == 1) {
+                //查出当前公告的关系配置
+                //部门
+                LambdaQueryWrapper<NewsRelationConfig> queryDeptList = new LambdaQueryWrapper<>();
+                queryDeptList
+                        .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
+                        .eq(NewsRelationConfig::getRelationType, 1);
+                List<NewsRelationConfig> deptList = newsRelationConfigMapper.selectList(queryDeptList);
+                for (NewsRelationConfig newsRelationConfig : deptList) {
+                    deptIdList.add(newsRelationConfig.getRelationId());
+                }
+
+                //人员
+                LambdaQueryWrapper<NewsRelationConfig> queryPersonalList = new LambdaQueryWrapper<>();
+                queryPersonalList
+                        .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
+                        .eq(NewsRelationConfig::getRelationType, 2);
+                List<NewsRelationConfig> personalList = newsRelationConfigMapper.selectList(queryPersonalList);
+                for (NewsRelationConfig newsRelationConfig : personalList) {
+                    personalIdList.add(newsRelationConfig.getRelationId());
+                }
+
+                //班级
+                LambdaQueryWrapper<NewsRelationConfig> queryClassList = new LambdaQueryWrapper<>();
+                queryClassList
+                        .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
+                        .eq(NewsRelationConfig::getRelationType, 3);
+                List<NewsRelationConfig> classList = newsRelationConfigMapper.selectList(queryClassList);
+                for (NewsRelationConfig newsRelationConfig : classList) {
+                    classIdList.add(newsRelationConfig.getRelationId());
+                }
             }
 
-            //班级
-            LambdaQueryWrapper<NewsRelationConfig> queryClassList = new LambdaQueryWrapper<>();
-            queryClassList
-                    .eq(NewsRelationConfig::getNewsId, xjrNews.getId())
-                    .eq(NewsRelationConfig::getRelationType, 3);
-            List<NewsRelationConfig> classList = newsRelationConfigMapper.selectList(queryClassList);
-            List<Long> classIdList = new ArrayList<>();
-            for (NewsRelationConfig newsRelationConfig : classList) {
-                classIdList.add(newsRelationConfig.getRelationId());
+            if(flag == 2){
+                for (AddNewsRelationDto addNewsRelationDto : addProclamationDto.getRelationList()) {
+                    if(addNewsRelationDto.getRelationType() == 1){
+                        deptIdList.add(addNewsRelationDto.getRelationId());
+                    }
+                    if(addNewsRelationDto.getRelationType() == 2){
+                        personalIdList.add(addNewsRelationDto.getRelationId());
+                    }
+                    if(addNewsRelationDto.getRelationType() == 3){
+                        classIdList.add(addNewsRelationDto.getRelationId());
+                    }
+                }
             }
 
             //对人员进行筛选,避免重复添加
@@ -452,7 +468,6 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
                     }
                 }
             }
-
             //添加部门人员
             if (deptIdList != null) {
                 newsRelationMapper.insertDeptUser(xjrNews.getId(), deptIdList);
@@ -467,6 +482,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
             if (userIdList != null) {
                 newsRelationMapper.insertPersonl(xjrNews.getId(), userIdList);
             }
+
         }
 
         //遍历所有关系配置

+ 5 - 12
src/main/java/com/xjrsoft/module/room/dto/DistributeRoomBedPageDto.java

@@ -22,22 +22,15 @@ public class DistributeRoomBedPageDto extends PageInput {
     @ApiModelProperty("楼层")
     public Integer floorNumber;
 
-
-    @ApiModelProperty("寝室id")
-    public Long roomId;
+    @ApiModelProperty("寝室号")
+    public String roomName;
 
     @ApiModelProperty("入住性别")
     public String gender;
 
-    @ApiModelProperty("寝室id")
-    public Long gradeId;
-
-    @ApiModelProperty("年级id")
+    @ApiModelProperty("班级id")
     public Long classId;
 
-    @ApiModelProperty("寝室id")
-    public String studentName;
-
-    @ApiModelProperty("学号")
-    public String studentId;
+    @ApiModelProperty("入住身份")
+    public String checkInStatus;
 }

+ 16 - 0
src/main/java/com/xjrsoft/module/room/service/impl/RoomBedServiceImpl.java

@@ -42,6 +42,7 @@ import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.mapper.BaseStudentMapper;
 import com.xjrsoft.module.teacher.entity.XjrUser;
+import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
@@ -64,6 +65,7 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
     private final RoomBedMapper roomBedMapper;
     private final BaseStudentMapper baseStudentMapper;
     private final BaseClassMapper baseClassMapper;
+    private final XjrUserMapper xjrUserMapper;
     private final RoomBedRecordMapper roomBedRecordMapper;
     @Override
     public Page<RoomBedPageVo> getPage(Page<RoomBedPageVo> page, RoomBedPageDto dto) {
@@ -279,6 +281,20 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
 
     @Override
     public Boolean adjustBed(AdjustStudentBedDto dto) {
+        //查询学生的性别
+        XjrUser xjrUser = xjrUserMapper.selectById(dto.getStudentUserId());
+        String studentGender = null;
+        if(1 == xjrUser.getGender()){
+            studentGender = "SB10001";
+        }else if(2 == xjrUser.getGender()){
+            studentGender = "SB10002";
+        }
+        RoomBed roomBedInfo = roomBedMapper.selectById(dto.getBedId());
+        Room room = roomMapper.selectById(roomBedInfo.getRoomId());
+        if(!room.getGender().equals(studentGender)){
+            return true;
+        }
+
         //先清空学生原来的床位
         UpdateWrapper<RoomBed> updateWrapper = new UpdateWrapper<>();
         updateWrapper.eq("student_user_id", dto.getStudentUserId());

+ 19 - 12
src/main/java/com/xjrsoft/module/textbook/controller/TextbookController.java

@@ -8,23 +8,30 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.textbook.dto.AddTextbookDto;
 import com.xjrsoft.module.textbook.dto.AddTextbookWarehouseRecordDto;
 import com.xjrsoft.module.textbook.dto.TextbookPageDto;
+import com.xjrsoft.module.textbook.dto.UpdateTextbookDto;
 import com.xjrsoft.module.textbook.entity.Textbook;
+import com.xjrsoft.module.textbook.service.ITextbookService;
+import com.xjrsoft.module.textbook.vo.TextbookIssueRecordListVo;
 import com.xjrsoft.module.textbook.vo.TextbookPageVo;
 import com.xjrsoft.module.textbook.vo.TextbookSubscriptionRecordVo;
 import com.xjrsoft.module.textbook.vo.TextbookVo;
-import com.xjrsoft.module.textbook.vo.WfTextbookClaimListVo;
-import com.xjrsoft.module.textbook.dto.AddTextbookDto;
-import com.xjrsoft.module.textbook.dto.UpdateTextbookDto;
-import com.xjrsoft.module.textbook.service.ITextbookService;
 import com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordListVo;
-import com.xjrsoft.module.textbook.vo.TextbookIssueRecordListVo;
+import com.xjrsoft.module.textbook.vo.WfTextbookClaimListVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
 import java.io.ByteArrayOutputStream;
@@ -61,7 +68,7 @@ public class TextbookController {
     public RT<TextbookVo> info(@RequestParam Long id){
         Textbook textbook = textbookService.getById(id);
         if (textbook == null) {
-           return RT.error("找不到此数据!");
+           return RT.ok();
         }
         textbook.setTextbookClassRelationList(textbookService.getClassRelation(textbook.getId()));
         return RT.ok(BeanUtil.toBean(textbook, TextbookVo.class));
@@ -84,7 +91,7 @@ public class TextbookController {
     public RT<List<TextbookSubscriptionRecordVo>> subscriptionList(@RequestParam Long id){
         List<TextbookSubscriptionRecordVo> result = textbookService.subscriptionList(id);
         if (result == null) {
-            return RT.error("找不到此数据!");
+            return RT.ok(new ArrayList<>());
         }
         return RT.ok(result);
     }
@@ -95,7 +102,7 @@ public class TextbookController {
     public RT<List<TextbookWarehouseRecordListVo>> warehouseList(@RequestParam Long id){
         List<TextbookWarehouseRecordListVo> result = textbookService.warehouseList(id);
         if (result == null) {
-            return RT.error("找不到此数据!");
+            return RT.ok(new ArrayList<>());
         }
         return RT.ok(result);
     }
@@ -106,7 +113,7 @@ public class TextbookController {
     public RT<List<TextbookIssueRecordListVo>> issueList(@RequestParam Long id){
         List<TextbookIssueRecordListVo> result = textbookService.issueList(id);
         if (result == null) {
-            return RT.error("找不到此数据!");
+            return RT.ok(new ArrayList<>());
         }
         return RT.ok(result);
     }
@@ -117,7 +124,7 @@ public class TextbookController {
     public RT<List<WfTextbookClaimListVo>> claimList(@RequestParam Long id){
         List<WfTextbookClaimListVo> result = textbookService.claimList(id);
         if (result == null) {
-            return RT.error("找不到此数据!");
+            return RT.ok(new ArrayList<>());
         }
         return RT.ok(result);
     }
@@ -129,7 +136,7 @@ public class TextbookController {
     public RT<Boolean> add(@Valid @RequestBody AddTextbookDto dto){
         Textbook textbook = BeanUtil.toBean(dto, Textbook.class);
         boolean isSuccess = textbookService.add(textbook);
-    return RT.ok(isSuccess);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping

+ 4 - 1
src/main/java/com/xjrsoft/module/textbook/controller/TextbookIssueRecordController.java

@@ -13,6 +13,7 @@ import com.xjrsoft.module.textbook.dto.TextbookIssueRecordPageDto;
 import com.xjrsoft.module.textbook.dto.UpdateTextbookIssueRecordDto;
 import com.xjrsoft.module.textbook.entity.TextbookIssueRecord;
 import com.xjrsoft.module.textbook.service.ITextbookIssueRecordService;
+import com.xjrsoft.module.textbook.vo.TextbookIssueRecordExcelVo;
 import com.xjrsoft.module.textbook.vo.TextbookIssueRecordPageVo;
 import com.xjrsoft.module.textbook.vo.TextbookIssueRecordVo;
 import io.swagger.annotations.Api;
@@ -95,15 +96,17 @@ public class TextbookIssueRecordController {
     @ApiOperation(value = "导出")
     public ResponseEntity<byte[]> exportData(@Valid TextbookIssueRecordPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
         List<TextbookIssueRecordPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<TextbookIssueRecordPageVo>) page(dto).getData()).getList();
+        List<TextbookIssueRecordExcelVo> dataList = new ArrayList<>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
         for (TextbookIssueRecordPageVo textbookIssueRecordPageVo : customerList) {
             if(textbookIssueRecordPageVo.getCreateDate() == null){
                 continue;
             }
             textbookIssueRecordPageVo.setCreateDateStr(sdf.format(textbookIssueRecordPageVo.getCreateDate()));
+            dataList.add(BeanUtil.toBean(textbookIssueRecordPageVo, TextbookIssueRecordExcelVo.class));
         }
         ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, TextbookIssueRecordPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
+        EasyExcel.write(bot, TextbookIssueRecordExcelVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(dataList);
 
         return RT.fileStream(bot.toByteArray(), "TextbookIssueRecord" + ExcelTypeEnum.XLSX.getValue());
     }

+ 4 - 1
src/main/java/com/xjrsoft/module/textbook/controller/TextbookWarehouseRecordController.java

@@ -9,6 +9,7 @@ import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.textbook.entity.TextbookWarehouseRecord;
+import com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordExcelVo;
 import com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordPageVo;
 import com.xjrsoft.module.textbook.dto.AddTextbookWarehouseRecordDto;
 import com.xjrsoft.module.textbook.dto.TextbookWarehouseRecordPageDto;
@@ -30,6 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
 import java.io.ByteArrayOutputStream;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -100,8 +102,9 @@ public class TextbookWarehouseRecordController {
     @ApiOperation(value = "导出")
     public ResponseEntity<byte[]> exportData(@Valid TextbookWarehouseRecordPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
         List<TextbookWarehouseRecordPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<TextbookWarehouseRecordPageVo>) page(dto).getData()).getList();
+        List<TextbookWarehouseRecordExcelVo> dataList = BeanUtil.copyToList(customerList, TextbookWarehouseRecordExcelVo.class);
         ByteArrayOutputStream bot = new ByteArrayOutputStream();
-        EasyExcel.write(bot, TextbookWarehouseRecordPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
+        EasyExcel.write(bot, TextbookWarehouseRecordExcelVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(dataList);
 
         return RT.fileStream(bot.toByteArray(), "TextbookClassWarehouse" + ExcelTypeEnum.XLSX.getValue());
     }

+ 96 - 0
src/main/java/com/xjrsoft/module/textbook/vo/TextbookIssueRecordExcelVo.java

@@ -0,0 +1,96 @@
+package com.xjrsoft.module.textbook.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 教材出库记录分页列表出参
+* @Author szs
+* @Date: 2023-12-27
+* @Version 1.0
+*/
+@Data
+public class TextbookIssueRecordExcelVo {
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("书号")
+    @ApiModelProperty("书号")
+    private String issn;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("书名")
+    @ApiModelProperty("书名")
+    private String bookName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("出版社")
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("作者(主编)")
+    @ApiModelProperty("作者(主编)")
+    private String editorInChief;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("学科组")
+    @ApiModelProperty("学科组")
+    private String groupName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("使用年级")
+    @ApiModelProperty("使用年级")
+    private String gradeName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("使用班级")
+    @ApiModelProperty("使用班级")
+    private String className;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("对应课程")
+    @ApiModelProperty("对应课程")
+    private String courseName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("类型")
+    @ApiModelProperty("类型")
+    private String textbookTypeCn;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("规格型号")
+    @ApiModelProperty("规格型号")
+    private String specificationsModels;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("出库方式")
+    @ApiModelProperty("出库方式")
+    private String issueModeCn;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("出库时间")
+    @ApiModelProperty("出库时间")
+    private String createDateStr;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("领取人员")
+    @ApiModelProperty("领取人员")
+    private String claimUser;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("出库数量")
+    @ApiModelProperty("出库数量")
+    private Integer issueNumber;
+
+}

+ 87 - 0
src/main/java/com/xjrsoft/module/textbook/vo/TextbookWarehouseRecordExcelVo.java

@@ -0,0 +1,87 @@
+package com.xjrsoft.module.textbook.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 教材入库分页列表出参
+* @Author szs
+* @Date: 2023-12-26
+* @Version 1.0
+*/
+@Data
+public class TextbookWarehouseRecordExcelVo {
+
+
+    /**
+    * 序号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+
+    /**
+     * 来源
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("书号")
+    @ApiModelProperty("书号")
+    private String issn;
+
+    /**
+    * 书名
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("书名")
+    @ApiModelProperty("书名")
+    private String bookName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("出版社")
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("作者(主编)")
+    @ApiModelProperty("作者(主编)")
+    private String editorInChief;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("学科组")
+    @ApiModelProperty("学科组")
+    private String groupName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("对应课程")
+    @ApiModelProperty("对应课程")
+    private String courseName;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("类型")
+    @ApiModelProperty("类型")
+    private String textbookTypeCn;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("规格型号")
+    @ApiModelProperty("规格型号")
+    private String specificationsModels;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("入库人员")
+    @ApiModelProperty("入库人员")
+    private String warehouseUser;
+
+    /**
+    * 入库数量
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("入库数量")
+    @ApiModelProperty("入库数量")
+    private Integer warehouseNumber;
+
+
+
+}

+ 16 - 4
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -126,6 +126,21 @@
                 WHERE delete_mark = 0 AND room_id = t1.id
                   AND student_user_id IS NOT NULL
             ) != t1.bed_count
+        <if test="dto.gender != null and dto.gender != ''">
+            and t1.gender = #{dto.gender}
+        </if>
+        <if test="dto.officeBuildId != null">
+            and t2.id = #{dto.officeBuildId}
+        </if>
+        <if test="dto.floorNumber != null">
+            and t1.floor_number = #{dto.floorNumber}
+        </if>
+        <if test="dto.checkInStatus != null and dto.checkInStatus !=''">
+            and t1.check_in_status = #{dto.checkInStatus}
+        </if>
+        <if test="dto.roomName != null and dto.roomName !=''">
+            and t1.room_name like concat('%',#{dto.roomName},'%')
+        </if>
         ORDER BY t1.sort_code
     </select>
 
@@ -175,10 +190,7 @@
             and t4.id = #{dto.classId}
         </if>
         <if test="dto.gender != null and dto.gender != ''">
-            and t6.gender = #{dto.gender}
-        </if>
-        <if test="dto.gender != null and dto.gender != ''">
-            and t6.gender = #{dto.gender}
+            and REPLACE(REPLACE(t2.gender,1,'SB10001'),2,'SB10002') = #{dto.gender}
         </if>
         <if test="dto.isDistribute != null">
             <if test="dto.isDistribute == 1">