فهرست منبع

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

fanxp 1 سال پیش
والد
کامیت
85d12be9aa

+ 17 - 16
src/main/java/com/xjrsoft/module/personnel/controller/BasePersonnelLabourCapitalController.java

@@ -40,6 +40,8 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.validation.Valid;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -113,25 +115,24 @@ public class BasePersonnelLabourCapitalController {
     }
     @PostMapping("/import")
     @ApiOperation(value = "导入")
-    public RT<Boolean> importData(@Valid AddBasePersonnelLabourCapitalDto dto, @RequestParam("file") MultipartFile file) throws IOException {
-        List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(dto.getDataRow() - 1).doReadSync();
+    public RT<Boolean> importData(@Valid AddBasePersonnelLabourCapitalDto dto, @RequestParam("file") MultipartFile file) throws IOException, ParseException {
+        List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(4 - 1).doReadSync();
         //验证数据
 
-        //默认数据
-        dto.setDataRow(4);
-        dto.setIdNumberColumn(1);
-        dto.setIdTypeColumn(0);
-        dto.setPersonnelNameColumn(3);
-        dto.setJobNumberColumn(2);
-        dto.setAmountToColumn(4);
-
         //处理表头数据,目前只支持2行表头
         List<BasePersonnelLabourCapitalTitle> titleList = initTitleList(excelDataList.get(0), excelDataList.get(1));
         //读取表内容数据
         List<BasePersonnelLabourCapitalData> dataList = initDataList(dto, excelDataList);
-
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         //构造数据
         BasePersonnelLabourCapital basePersonnelLabourCapital = BeanUtil.toBean(dto, BasePersonnelLabourCapital.class);
+        basePersonnelLabourCapital.setDataRow(4);
+        basePersonnelLabourCapital.setPersonnelNameColumn(3);
+        basePersonnelLabourCapital.setAmountToColumn(4);
+        basePersonnelLabourCapital.setIdTypeColumn(0);
+        basePersonnelLabourCapital.setIdNumberColumn(1);
+        basePersonnelLabourCapital.setJobNumberColumn(2);
+        basePersonnelLabourCapital.setDateOfIssue(sdf.parse(dto.getDateOfIssue()));
         //添加表头数据
         basePersonnelLabourCapital.setBasePersonnelLabourCapitalTitleList(titleList);
         basePersonnelLabourCapital.setBasePersonnelLabourCapitalDataList(dataList);
@@ -154,11 +155,11 @@ public class BasePersonnelLabourCapitalController {
             }
             Map<Integer, Object> datatMap = excelDataList.get(i);
             BasePersonnelLabourCapitalData data = new BasePersonnelLabourCapitalData();
-            data.setName(datatMap.get(dto.getPersonnelNameColumn()) == null?null:datatMap.get(dto.getPersonnelNameColumn()).toString());
-            data.setIdNumber(datatMap.get(dto.getIdNumberColumn()) == null?null:datatMap.get(dto.getIdNumberColumn()).toString());
-            data.setIdType(datatMap.get(dto.getIdTypeColumn()) == null?null:datatMap.get(dto.getIdTypeColumn()).toString());
-            data.setAmountTo(datatMap.get(dto.getAmountToColumn()) == null?null:datatMap.get(dto.getAmountToColumn()).toString());
-            data.setJobNumber(datatMap.get(dto.getJobNumberColumn()) == null?null:datatMap.get(dto.getJobNumberColumn()).toString());
+            data.setName(datatMap.get(3) == null?null:datatMap.get(3).toString());
+            data.setIdNumber(datatMap.get(1) == null?null:datatMap.get(1).toString());
+            data.setIdType(datatMap.get(0) == null?null:datatMap.get(0).toString());
+            data.setAmountTo(datatMap.get(4) == null?null:datatMap.get(4).toString());
+            data.setJobNumber(datatMap.get(2) == null?null:datatMap.get(2).toString());
             data.setExtendJson(JsonUtil.toJsonString(datatMap));
             resultList.add(data);
         }

+ 2 - 36
src/main/java/com/xjrsoft/module/personnel/dto/AddBasePersonnelLabourCapitalDto.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.time.LocalDate;
 import java.util.Date;
 import java.util.List;
 
@@ -29,41 +30,6 @@ public class AddBasePersonnelLabourCapitalDto implements Serializable {
     * 发放年月
     */
     @ApiModelProperty("发放年月")
-    private Date dateOfIssue;
-    /**
-    * 数据开始行
-    */
-    @ApiModelProperty("数据开始行")
-    private Integer dataRow;
-    /**
-    * 证件类型所属列
-    */
-    @ApiModelProperty("证件类型所属列")
-    private Integer idTypeColumn;
-    /**
-    * 证件号码所属列
-    */
-    @ApiModelProperty("证件号码所属列")
-    private Integer idNumberColumn;
-    /**
-    * 工号所属列
-    */
-    @ApiModelProperty("工号所属列")
-    private Integer jobNumberColumn;
-    /**
-    * 名称所属列
-    */
-    @ApiModelProperty("名称所属列")
-    private Integer personnelNameColumn;
-    /**
-    * 合计所属列
-    */
-    @ApiModelProperty("合计所属列")
-    private Integer amountToColumn;
-    /**
-    * 数据文件
-    */
-    @ApiModelProperty("数据文件")
-    private String dataFile;
+    private String dateOfIssue;
 
 }

+ 56 - 39
src/main/java/com/xjrsoft/module/room/service/impl/RoomBedServiceImpl.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.toolkit.MPJWrappers;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
@@ -36,7 +37,6 @@ import com.xjrsoft.module.room.vo.DistributeResultListVo;
 import com.xjrsoft.module.room.vo.DistributeRoomBedPageVo;
 import com.xjrsoft.module.room.vo.NoBedStudentPageVo;
 import com.xjrsoft.module.room.vo.RoomBedPageVo;
-import com.xjrsoft.module.room.vo.RoomBedVo;
 import com.xjrsoft.module.room.vo.RoomClassCountVo;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
@@ -49,8 +49,10 @@ import org.springframework.stereotype.Service;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
 * @title: 寝室床位
@@ -131,16 +133,22 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
 
     @Override
     public Boolean distributeRoomBed(DistributeRoomBedDto dto) {
-        //查询出所有床位信息
-        List<RoomBedVo> bedInfoList = roomBedMapper.getBedInfo(dto.getRoomIds());
-
-        Room room = roomMapper.selectById(dto.getRoomIds().get(0));
-        String gender = room.getGender();
-        Integer genderNumber = null;
-        if("SB10001".equals(gender)){
-            genderNumber = 1;
-        }else if("SB10002".equals(gender)){
-            genderNumber = 2;
+        List<Room> roomList = roomMapper.selectList(new QueryWrapper<Room>().lambda().in(Room::getId, dto.getRoomIds()));
+        Set<Integer> genderSet = new HashSet<>();
+        for (Room room : roomList) {
+            if("SB10001".equals(room.getGender())){
+                genderSet.add(1);
+            }else if("SB10002".equals(room.getGender())){
+                genderSet.add(2);
+            }
+        }
+        Map<Integer, String> genderMap = new HashMap<>();
+        for (Integer genderNumber : genderSet) {
+            if(genderNumber == 1){
+                genderMap.put(genderNumber, "SB10001");
+            }else if(genderNumber == 2){
+                genderMap.put(genderNumber, "SB10002");
+            }
         }
 
         Date modifyDate = new Date();
@@ -150,38 +158,47 @@ public class RoomBedServiceImpl extends MPJBaseServiceImpl<RoomBedMapper, RoomBe
         int i = 0;
         Map<Long, Integer> classDistributeBedNumber = new HashMap<>();
         Map<Long, Integer> classStudent = new HashMap<>();
-        for (Long classId : dto.getClassIds()) {
-            List<BaseStudent> studentList = baseStudentMapper.selectList(
-                MPJWrappers.<BaseStudent>lambdaJoin()
-                .select(BaseStudent::getUserId)
-                .eq(BaseClass::getId, classId)
-                .eq(XjrUser::getGender, genderNumber)
-                .eq(BaseStudentSchoolRoll::getStduyStatus, "FB3002")
-                .eq(BaseStudent::getDeleteMark, DeleteMark.NODELETE.getCode())
-                .eq(XjrUser::getDeleteMark, DeleteMark.NODELETE.getCode())
-                .innerJoin(XjrUser.class, XjrUser::getId, BaseStudent::getUserId)
-                .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BaseStudent::getUserId)
-                .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId)
+        for (Integer genderNumber : genderSet) {
+            //根据性别查询出所有床位信息
+            List<RoomBed> bedInfoList = roomBedMapper.selectList(
+                new MPJLambdaWrapper<RoomBed>()
+                .innerJoin(Room.class, Room::getId, RoomBed::getRoomId)
+                .eq(Room::getGender, genderMap.get(genderNumber))
+                .in(RoomBed::getRoomId, dto.getRoomIds())
             );
-            //已分配床位数
-            int distributeBedNumber = 0;
-            for (BaseStudent studentInfoVo : studentList) {
-                if(i >= bedInfoList.size()){
-                    continue;
-                }
-                RoomBedVo roomBedVo = bedInfoList.get(i);
-                RoomBed roomBed = BeanUtil.toBean(roomBedVo, RoomBed.class);
-                roomBed.setStudentUserId(studentInfoVo.getUserId());
-                roomBed.setModifyDate(modifyDate);
-                roomBed.setModifyUserId(modifyUserId);
-                roomBedMapper.updateById(roomBed);
-                i ++;
-                distributeBedNumber ++;
 
+            for (Long classId : dto.getClassIds()) {
+                List<BaseStudent> studentList = baseStudentMapper.selectList(
+                    MPJWrappers.<BaseStudent>lambdaJoin()
+                    .select(BaseStudent::getUserId)
+                    .eq(BaseClass::getId, classId)
+                    .eq(XjrUser::getGender, genderNumber)
+                    .eq(BaseStudentSchoolRoll::getStduyStatus, "FB3002")
+                    .eq(BaseStudent::getDeleteMark, DeleteMark.NODELETE.getCode())
+                    .eq(XjrUser::getDeleteMark, DeleteMark.NODELETE.getCode())
+                    .innerJoin(XjrUser.class, XjrUser::getId, BaseStudent::getUserId)
+                    .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BaseStudent::getUserId)
+                    .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId)
+                );
+                //已分配床位数
+                int distributeBedNumber = 0;
+                for (BaseStudent studentInfoVo : studentList) {
+                    if(i >= bedInfoList.size()){
+                        continue;
+                    }
+                    RoomBed roomBed = bedInfoList.get(i);
+                    roomBed.setStudentUserId(studentInfoVo.getUserId());
+                    roomBed.setModifyDate(modifyDate);
+                    roomBed.setModifyUserId(modifyUserId);
+                    roomBedMapper.updateById(roomBed);
+                    i ++;
+                    distributeBedNumber ++;
+                }
+                classDistributeBedNumber.put(classId, distributeBedNumber);
+                classStudent.put(classId, studentList.size());
             }
-            classDistributeBedNumber.put(classId, distributeBedNumber);
-            classStudent.put(classId, studentList.size());
         }
+
         Map<Long, Long> classGradeMap = new HashMap<>();
         baseClassMapper.selectList(
             MPJWrappers.<BaseClass>lambdaJoin().in(BaseClass::getId, dto.getClassIds())

+ 10 - 0
src/main/java/com/xjrsoft/module/room/vo/DistributeClassPageVo.java

@@ -52,4 +52,14 @@ public class DistributeClassPageVo {
     @ExcelProperty("已分配床位数")
     @ApiModelProperty("已分配床位数")
     private Integer distributeCount;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("需要住宿的男生人数")
+    @ApiModelProperty("需要住宿的男生人数")
+    private Integer maleCount;
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("需要住宿的女生人数")
+    @ApiModelProperty("需要住宿的女生人数")
+    private Integer femaleCount;
 }

+ 2 - 2
src/main/java/com/xjrsoft/module/student/controller/StudentHonorsController.java

@@ -2,7 +2,7 @@ package com.xjrsoft.module.student.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
@@ -43,7 +43,7 @@ public class StudentHonorsController {
     @ApiOperation(value="学生荣誉列表(分页)")
     @SaCheckPermission("studenthonors:detail")
     public RT<PageOutput<StudentHonorsPageVo>> page(@Valid StudentHonorsPageDto dto){
-        Page<StudentHonorsPageVo> page = studentHonorsService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        IPage<StudentHonorsPageVo> page = studentHonorsService.getPage(dto);
         PageOutput<StudentHonorsPageVo> pageOutput = ConventPage.getPageOutput(page, StudentHonorsPageVo.class);
         return RT.ok(pageOutput);
     }

+ 31 - 0
src/main/java/com/xjrsoft/module/student/dto/StudentHonorsPageDto.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
 import java.util.List;
 
 
@@ -26,4 +27,34 @@ public class StudentHonorsPageDto extends PageInput {
 
     @ApiModelProperty("学期Id")
     private Long baseSemesterId;
+    /**
+     * 学生用户编号
+     */
+    @ApiModelProperty("学生用户编号")
+    private Long studentUserId;
+    /**
+     * 荣誉级别(xjr_dictionary_item[honors_level])
+     */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+     * 荣誉等级(xjr_dictionary_item[honors_grade])
+     */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+     * 荣誉类型(xjr_dictionary_item[honors_type])
+     */
+    @ApiModelProperty("荣誉类型(xjr_dictionary_item[honors_type])")
+    private String honorsType;
+    /**
+     * 获奖日期
+     */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+     * 学生姓名
+     */
+    @ApiModelProperty("学生姓名")
+    private String userName;
 }

+ 2 - 2
src/main/java/com/xjrsoft/module/student/mapper/StudentHonorsMapper.java

@@ -1,6 +1,6 @@
 package com.xjrsoft.module.student.mapper;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
 import com.xjrsoft.module.student.entity.StudentHonors;
@@ -19,7 +19,7 @@ import java.util.List;
 */
 @Mapper
 public interface StudentHonorsMapper extends MPJBaseMapper<StudentHonors> {
-    Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto);
+    IPage<StudentHonorsPageVo> getPage(IPage<StudentHonorsPageDto> page, StudentHonorsPageDto dto);
 
     List<StudentHonorsListVo> getClassInfo();
 

+ 2 - 2
src/main/java/com/xjrsoft/module/student/service/IStudentHonorsService.java

@@ -1,6 +1,6 @@
 package com.xjrsoft.module.student.service;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
 import com.xjrsoft.module.student.entity.StudentHonors;
@@ -23,7 +23,7 @@ public interface IStudentHonorsService extends MPJBaseService<StudentHonors> {
     /**
      * 分页查询
      */
-    Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto);
+    IPage<StudentHonorsPageVo> getPage(StudentHonorsPageDto dto);
 
     /**
      * 查询班级信息

+ 4 - 3
src/main/java/com/xjrsoft/module/student/service/impl/StudentHonorsServiceImpl.java

@@ -3,9 +3,10 @@ package com.xjrsoft.module.student.service.impl;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.student.dto.StudentHonorsPageDto;
@@ -37,7 +38,7 @@ public class StudentHonorsServiceImpl extends MPJBaseServiceImpl<StudentHonorsMa
 
     private final BaseClassMapper baseClassMapper;
     @Override
-    public Page<StudentHonorsPageVo> getPage(Page<StudentHonorsPageDto> page, StudentHonorsPageDto dto) {
+    public IPage<StudentHonorsPageVo> getPage(StudentHonorsPageDto dto) {
         //获取当前用户所管理的班级
         LambdaQueryWrapper<BaseClass> queryWrapperClass = new LambdaQueryWrapper<>();
         queryWrapperClass
@@ -50,7 +51,7 @@ public class StudentHonorsServiceImpl extends MPJBaseServiceImpl<StudentHonorsMa
             }
             dto.setClassIdList(classIdList);
         }
-        return studentHonorsMapper.getPage(page, dto);
+        return studentHonorsMapper.getPage(ConventPage.getPage(dto), dto);
     }
 
     @Override

+ 6 - 6
src/main/java/com/xjrsoft/module/textbook/dto/TextbookIssueRecordPageDto.java

@@ -4,12 +4,6 @@ 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.LocalTime;
-import java.time.LocalDateTime;
-import java.math.BigDecimal;
-import java.util.Date;
 
 
 /**
@@ -48,4 +42,10 @@ public class TextbookIssueRecordPageDto extends PageInput {
 
     @ApiModelProperty("规划教材")
     public String isTextbookPlan;
+
+    /**
+     * 出版社
+     */
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
 }

+ 5 - 0
src/main/java/com/xjrsoft/module/textbook/dto/TextbookWarehouseRecordPageDto.java

@@ -42,4 +42,9 @@ public class TextbookWarehouseRecordPageDto extends PageInput {
 
     @ApiModelProperty("规划教材")
     public String isTextbookPlan;
+    /**
+     * 出版社
+     */
+    @ApiModelProperty("出版社")
+    private String publishingHouse;
 }

+ 20 - 1
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -64,7 +64,26 @@
                 and c4.gender = 2
             </if>
         </if>
-        ) AS need_count,(
+        ) AS need_count,
+        (
+            SELECT COUNT(*) FROM base_student c1
+            LEFT JOIN base_student_school_roll c2 ON c1.user_id = c2.user_id
+            LEFT JOIN xjr_dictionary_detail c3 ON c2.stduy_status = c3.code AND c3.item_id = 2023000000000000030
+            left join xjr_user c4 on c1.user_id = c4.id
+            WHERE c1.delete_mark = 0 AND c2.delete_mark = 0
+            AND c3.code = 'FB3002' AND c2.class_id = t1.id
+            and c4.gender = 1
+        ) as male_count,
+        (
+            SELECT COUNT(*) FROM base_student c1
+            LEFT JOIN base_student_school_roll c2 ON c1.user_id = c2.user_id
+            LEFT JOIN xjr_dictionary_detail c3 ON c2.stduy_status = c3.code AND c3.item_id = 2023000000000000030
+            left join xjr_user c4 on c1.user_id = c4.id
+            WHERE c1.delete_mark = 0 AND c2.delete_mark = 0
+            AND c3.code = 'FB3002' AND c2.class_id = t1.id
+            and c4.gender = 2
+        ) as female_count,
+        (
         SELECT COUNT(*) FROM room_bed a1
         LEFT JOIN base_student_school_roll a2 ON a1.student_user_id = a2.user_id
         left join xjr_user c4 on a2.user_id = c4.id

+ 71 - 29
src/main/resources/mapper/student/StudentHonorsMapper.xml

@@ -3,7 +3,8 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.student.mapper.StudentHonorsMapper">
-    <select id="getPage" parameterType="com.xjrsoft.module.student.dto.StudentHonorsPageDto" resultType="com.xjrsoft.module.student.vo.StudentHonorsPageVo">
+    <select id="getPage" parameterType="com.xjrsoft.module.student.dto.StudentHonorsPageDto"
+            resultType="com.xjrsoft.module.student.vo.StudentHonorsPageVo">
         SELECT t1.id,t1.sort_code,t2.name AS student_name,t1.student_id,t3.name AS honors_level,t4.name AS honors_type,
         t5.name AS honors_grade,t1.name, t1.award_date,t1.status,t1.file_id FROM student_honors t1
         LEFT JOIN xjr_user t2 ON t1.student_user_id = t2.id
@@ -18,45 +19,86 @@
                 #{classId}
             </foreach>
         </if>
-          <if test="dto.classId != null and dto.classId > 0">
-              AND t1.class_id = #{dto.classId}
-          </if>
-            <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
-                AND t1.base_semester_id = #{dto.baseSemesterId}
-            </if>
-          and t1.status = 1
+        <if test="dto.classId != null and dto.classId > 0">
+            AND t1.class_id = #{dto.classId}
+        </if>
+        <if test="dto.baseSemesterId != null and dto.baseSemesterId > 0">
+            AND t1.base_semester_id = #{dto.baseSemesterId}
+        </if>
+        <if test="dto.honorsLevel != null and dto.honorsLevel != ''">
+            AND t1.honors_level = #{dto.honorsLevel}
+        </if>
+        <if test="dto.honorsGrade != null and dto.honorsGrade != ''">
+            AND t1.honors_grade = #{dto.honorsGrade}
+        </if>
+        <if test="dto.honorsType != null and dto.honorsType != ''">
+            AND t1.honors_type = #{dto.honorsType}
+        </if>
+        <if test="dto.awardDate != null and dto.awardDate != ''">
+            AND t1.award_date > #{dto.awardDate}
+        </if>
+        <if test="dto.userName != null and dto.userName != ''">
+            AND t2.name like concat('%',#{dto.userName},'%')
+        </if>
+        <if test="dto.studentUserId != null and dto.studentUserId != ''">
+            AND t1.student_user_id = #{dto.studentUserId}
+        </if>
+        and t1.status = 1
+        order by t1.id desc
     </select>
 
     <select id="getSemesterInfo" resultType="com.xjrsoft.module.student.vo.StudentHonorsListVo">
-        SELECT DISTINCT t1.base_semester_id as id,t2.name FROM student_honors t1
-        INNER JOIN base_semester t2 ON t1.base_semester_id = t2.id
+        SELECT DISTINCT t1.base_semester_id as id, t2.name
+        FROM student_honors t1
+                 INNER JOIN base_semester t2 ON t1.base_semester_id = t2.id
         WHERE t1.delete_mark = 0
     </select>
     <select id="getClassInfo" resultType="com.xjrsoft.module.student.vo.StudentHonorsListVo">
-        SELECT DISTINCT t1.class_id as id,t2.name,t1.base_semester_id as parent_id FROM student_honors t1
-        INNER JOIN base_class t2 ON t1.class_id = t2.id
+        SELECT DISTINCT t1.class_id as id, t2.name, t1.base_semester_id as parent_id
+        FROM student_honors t1
+                 INNER JOIN base_class t2 ON t1.class_id = t2.id
         WHERE t1.delete_mark = 0
     </select>
 
     <select id="getInfo" resultType="com.xjrsoft.module.student.vo.StudentHonorsVo">
-        SELECT t1.id,t2.name AS student_name,t1.student_id,t3.grade_id,t4.name AS grade_name,t1.class_id,t5.name AS class_name,
-        t1.major_set_id,t11.name AS major_set_name,t1.applicant_user_id,t1.name AS applicant_user_name,t1.award_date,
-        t1.name,t1.honors_level,t8.name AS honors_level_cn,
-        t1.honors_type,t9.name AS honors_type_cn,t1.honors_grade, t10.name AS honors_grade_cn,
-        t1.file_id,t1.base_semester_id,t1.student_user_id  FROM student_honors t1
-        LEFT JOIN xjr_user t2 ON t1.student_user_id = t2.id
-        LEFT JOIN base_student_school_roll t3 ON t1.student_user_id = t3.user_id
-        LEFT JOIN base_grade t4 ON t3.grade_id = t4.id
-        LEFT JOIN base_class t5 ON t1.class_id = t5.id
-        LEFT JOIN base_major_set t6 ON t3.major_set_id = t6.id
-        LEFT JOIN xjr_user t7 ON t1.applicant_user_id = t7.id
-        LEFT JOIN xjr_dictionary_detail t8 ON t1.honors_level = t8.code AND t8.item_id = 1731576278748352514
-        LEFT JOIN xjr_dictionary_detail t9 ON t1.honors_type = t9.code AND t9.item_id = 1731577666295418881
-        LEFT JOIN xjr_dictionary_detail t10 ON t1.honors_grade = t10.code AND t10.item_id = 1731577201793028098
-        LEFT JOIN base_major_set t11 ON t1.major_set_id = t11.id
-        WHERE t1.id = #{id} and t1.delete_mark = 0
+        SELECT t1.id,
+               t2.name  AS student_name,
+               t1.student_id,
+               t3.grade_id,
+               t4.name  AS grade_name,
+               t1.class_id,
+               t5.name  AS class_name,
+               t1.major_set_id,
+               t11.name AS major_set_name,
+               t1.applicant_user_id,
+               t1.name  AS applicant_user_name,
+               t1.award_date,
+               t1.name,
+               t1.honors_level,
+               t8.name  AS honors_level_cn,
+               t1.honors_type,
+               t9.name  AS honors_type_cn,
+               t1.honors_grade,
+               t10.name AS honors_grade_cn,
+               t1.file_id,
+               t1.base_semester_id,
+               t1.student_user_id
+        FROM student_honors t1
+                 LEFT JOIN xjr_user t2 ON t1.student_user_id = t2.id
+                 LEFT JOIN base_student_school_roll t3 ON t1.student_user_id = t3.user_id
+                 LEFT JOIN base_grade t4 ON t3.grade_id = t4.id
+                 LEFT JOIN base_class t5 ON t1.class_id = t5.id
+                 LEFT JOIN base_major_set t6 ON t3.major_set_id = t6.id
+                 LEFT JOIN xjr_user t7 ON t1.applicant_user_id = t7.id
+                 LEFT JOIN xjr_dictionary_detail t8 ON t1.honors_level = t8.code AND t8.item_id = 1731576278748352514
+                 LEFT JOIN xjr_dictionary_detail t9 ON t1.honors_type = t9.code AND t9.item_id = 1731577666295418881
+                 LEFT JOIN xjr_dictionary_detail t10 ON t1.honors_grade = t10.code AND t10.item_id = 1731577201793028098
+                 LEFT JOIN base_major_set t11 ON t1.major_set_id = t11.id
+        WHERE t1.id = #{id}
+          and t1.delete_mark = 0
     </select>
     <select id="getSortCode" resultType="java.lang.Integer">
-        SELECT IFNULL(MAX(IFNULL(sort_code, 0)), 0) + 1 FROM student_honors
+        SELECT IFNULL(MAX(IFNULL(sort_code, 0)), 0) + 1
+        FROM student_honors
     </select>
 </mapper>

+ 3 - 0
src/main/resources/mapper/textbook/TextbookIssueRecordMapper.xml

@@ -24,6 +24,9 @@
         <if test="dto.baseSemesterId != null">
             and t3.base_semester_id = #{dto.baseSemesterId}
         </if>
+        <if test="dto.publishingHouse != null">
+            and t3.publishing_house = like concat('%',#{dto.publishingHouse}, '%')
+        </if>
         <if test="dto.subjectGroupId != null">
             and t3.subject_group_id = #{dto.subjectGroupId}
         </if>

+ 4 - 1
src/main/resources/mapper/textbook/TextbookWarehouseRecordMapper.xml

@@ -18,6 +18,9 @@
         <if test="dto.baseSemesterId != null">
             and t3.base_semester_id = #{dto.baseSemesterId}
         </if>
+        <if test="dto.publishingHouse != null">
+            and t3.publishing_house = like concat('%',#{dto.publishingHouse}, '%')
+        </if>
         <if test="dto.subjectGroupId != null">
             and t3.subject_group_id = #{dto.subjectGroupId}
         </if>
@@ -39,7 +42,7 @@
         <if test="dto.isTextbookPlan != null and dto.isTextbookPlan != ''">
             and t3.is_textbook_plan = #{dto.isTextbookPlan}
         </if>
-        ORDER BY t1.sort_code
+        ORDER BY t1.create_date
     </select>
 
 </mapper>