Bläddra i källkod

1、处分查询接口增加查询条件

dzx142631 2 år sedan
förälder
incheckning
9cf8343ebc

+ 4 - 47
src/main/java/com/xjrsoft/module/student/controller/BaseStudentCadreController.java

@@ -85,53 +85,8 @@ public class BaseStudentCadreController {
     public RT<PageOutput<BaseStudentCadrePageVo>> mobliepage(@Valid BaseStudentCadrePageDto dto){
         // 如果未传班级id和职务id,
         if(!StrUtil.equals(dto.getLevel(), StudentCadreLevelEnum.CLASS.getCode()) && ObjectUtil.isEmpty(dto.getPostId())){
-            IPage<BaseStudentCadrePageVo> page = new IPage<BaseStudentCadrePageVo>() {
-                @Override
-                public List<OrderItem> orders() {
-                    return null;
-                }
-
-                @Override
-                public List<BaseStudentCadrePageVo> getRecords() {
-                    return null;
-                }
-
-                @Override
-                public IPage<BaseStudentCadrePageVo> setRecords(List<BaseStudentCadrePageVo> records) {
-                    return null;
-                }
-
-                @Override
-                public long getTotal() {
-                    return 0;
-                }
-
-                @Override
-                public IPage<BaseStudentCadrePageVo> setTotal(long total) {
-                    return null;
-                }
-
-                @Override
-                public long getSize() {
-                    return 0;
-                }
-
-                @Override
-                public IPage<BaseStudentCadrePageVo> setSize(long size) {
-                    return null;
-                }
-
-                @Override
-                public long getCurrent() {
-                    return 0;
-                }
-
-                @Override
-                public IPage<BaseStudentCadrePageVo> setCurrent(long current) {
-                    return null;
-                }
-            };
-            return RT.ok(ConventPage.getPageOutput(page));
+            PageOutput<BaseStudentCadrePageVo> result = ConventPage.getPageOutputNull(BaseStudentCadrePageVo.class);
+            return RT.ok(result);
         }
 
         IPage<BaseStudentCadrePageVo> page = baseStudentCadreService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentCadrePageVo.class,
@@ -142,6 +97,8 @@ public class BaseStudentCadreController {
                 .eq(ObjectUtil.isNotEmpty(dto.getLevel()), BaseStudentPost::getLevel, dto.getLevel())
                 .eq(ObjectUtil.isNotEmpty(dto.getPost()), BaseStudentPost::getPost, dto.getPost())
                 .eq(StrUtil.equals(dto.getLevel(), StudentCadreLevelEnum.CLASS.getCode()), BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
+                .between(ObjectUtil.isNotNull(dto.getStartTimeStart()) && ObjectUtil.isNotNull(dto.getStartTimeEnd()), BaseStudentCadre::getStartTime,dto.getStartTimeStart(),dto.getStartTimeEnd())
+                .between(ObjectUtil.isNotNull(dto.getEndTimeStart()) && ObjectUtil.isNotNull(dto.getEndTimeEnd()), BaseStudentCadre::getEndTime,dto.getEndTimeStart(),dto.getEndTimeEnd())
                 .orderByDesc(BaseStudentCadre::getId)
                 .selectAs(BaseStudent::getStudentId, BaseStudentCadrePageVo::getStudentId)
                 .selectAs(XjrUser::getName, BaseStudentCadrePageVo::getUserName)

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

@@ -2,12 +2,14 @@ package com.xjrsoft.module.student.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseSemester;
 import com.xjrsoft.module.student.dto.AddBaseStudentPunishmentInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoPageDto;
@@ -61,8 +63,17 @@ public class BaseStudentPunishmentInfoController {
                 .like(StrUtil.isNotBlank(dto.getUserName()), BasePunishmentStudentRelation::getName, dto.getUserName())
                 .like(StrUtil.isNotBlank(dto.getStudentId()), BasePunishmentStudentRelation::getStudentId, dto.getStudentId())
                 .like(StrUtil.isNotBlank(dto.getCredentialNumber()), XjrUser::getCredentialNumber, dto.getCredentialNumber())
-                .like(StrUtil.isNotBlank(dto.getArchivesStatus()), BaseStudentSchoolRoll::getArchivesStatus, dto.getArchivesStatus())
-                .like(StrUtil.isNotBlank(dto.getSemesterId()), BaseStudentPunishmentInfo::getBaseSemesterId, dto.getSemesterId())
+                .eq(StrUtil.isNotBlank(dto.getArchivesStatus()), BaseStudentSchoolRoll::getArchivesStatus, dto.getArchivesStatus())
+                .eq(StrUtil.isNotBlank(dto.getSemesterId()), BaseStudentPunishmentInfo::getBaseSemesterId, dto.getSemesterId())
+                .eq(ObjectUtil.isNotNull(dto.getClassId()), BaseStudentPunishmentInfo::getClassId, dto.getClassId())
+                .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseStudentSchoolRoll::getGradeId, dto.getGradeId())
+                .eq(ObjectUtil.isNotNull(dto.getAdjustType()), BasePunishmentStudentRelation::getAdjustType, dto.getAdjustType())
+                .eq(ObjectUtil.isNotNull(dto.getIsPublicity()), BaseStudentPunishmentInfo::getIsPublicity, dto.getIsPublicity())
+                .in(ObjectUtil.isNotNull(dto.getOrgIds()), BaseClass::getOrgId, dto.getOrgIds())
+                .between(ObjectUtil.isNotNull(dto.getStartTimeStart()) && ObjectUtil.isNotNull(dto.getStartTimeEnd()), BaseStudentPunishmentInfo::getStartTime,dto.getStartTimeStart(),dto.getStartTimeEnd())
+                .between(ObjectUtil.isNotNull(dto.getEndTimeStart()) && ObjectUtil.isNotNull(dto.getEndTimeEnd()), BaseStudentPunishmentInfo::getEndTime,dto.getEndTimeStart(),dto.getEndTimeEnd())
+                .between(ObjectUtil.isNotNull(dto.getAdjustDateStart()) && ObjectUtil.isNotNull(dto.getAdjustDateEnd()), BasePunishmentStudentRelation::getAdjustDate,dto.getAdjustDateStart(),dto.getAdjustDateEnd())
+                .between(ObjectUtil.isNotNull(dto.getModifyDateStart()) && ObjectUtil.isNotNull(dto.getModifyDateEnd()), BasePunishmentStudentRelation::getModifyDate,dto.getModifyDateStart(),dto.getModifyDateEnd())
                 .select(BasePunishmentStudentRelation::getId)
                 .select(BasePunishmentStudentRelation::getStudentId)
                 .select(BasePunishmentStudentRelation::getName)
@@ -84,6 +95,7 @@ public class BaseStudentPunishmentInfoController {
                 .innerJoin(XjrUser.class, XjrUser::getId, BasePunishmentStudentRelation::getUserId)
                 .innerJoin(BaseSemester.class, BaseSemester::getId, BaseStudentPunishmentInfo::getBaseSemesterId)
                 .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BasePunishmentStudentRelation::getUserId)
+                .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentPunishmentInfo::getClassId)
         );
 
 

+ 2 - 16
src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentPunishmentInfoDto.java

@@ -2,15 +2,10 @@ package com.xjrsoft.module.student.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
-import java.time.LocalTime;
+import java.io.Serializable;
 import java.time.LocalDateTime;
-import java.math.BigDecimal;
 import java.util.List;
-import java.util.Date;
-import com.xjrsoft.module.student.entity.BasePunishmentStudentRelation;
 
 
 
@@ -36,16 +31,6 @@ public class AddBaseStudentPunishmentInfoDto implements Serializable {
     @ApiModelProperty("处分类型id")
     private Long punishmentTypeId;
     /**
-    * 处分开始日期
-    */
-    @ApiModelProperty("处分开始日期")
-    private Date startTime;
-    /**
-    * 处分结束日期
-    */
-    @ApiModelProperty("处分结束日期")
-    private Date endTime;
-    /**
     * 是否公示(1:是 0:否)
     */
     @ApiModelProperty("是否公示(1:是 0:否)")
@@ -76,4 +61,5 @@ public class AddBaseStudentPunishmentInfoDto implements Serializable {
     */
     @ApiModelProperty("basePunishmentStudentRelation子表")
     private List<AddBasePunishmentStudentRelationDto> basePunishmentStudentRelationList;
+
 }

+ 52 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentPunishmentInfoPageDto.java

@@ -8,10 +8,12 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.LocalDateTime;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 
 /**
@@ -49,5 +51,55 @@ public class BaseStudentPunishmentInfoPageDto extends PageInput {
     @ApiModelProperty("处分学期")
     private String semesterId;
 
+    /**
+     * orgIds
+     */
+    @ApiModelProperty("组织机构id")
+    private List<Long> orgIds;
 
+    /**
+     * orgIds
+     */
+    @ApiModelProperty("年级id")
+    private Long gradeId;
+
+    /**
+     * marjorSetId
+     */
+    @ApiModelProperty("专业")
+    private Long marjorSetId;
+
+    @ApiModelProperty("处分开始日期-开始")
+    private LocalDate startTimeStart;
+
+    @ApiModelProperty("处分开始日期-结束")
+    private LocalDate startTimeEnd;
+
+    @ApiModelProperty("处分结束日期-开始")
+    private LocalDate endTimeStart;
+
+    @ApiModelProperty("处分结束日期-结束")
+    private LocalDate endTimeEnd;
+
+    @ApiModelProperty("调整类型")
+    private Integer adjustType;
+
+    @ApiModelProperty("升级/降级日期-开始")
+    private LocalDate adjustDateStart;
+
+    @ApiModelProperty("升级/降级日期-结束")
+    private LocalDate adjustDateEnd;
+
+
+    @ApiModelProperty("操作时间-开始")
+    private LocalDate modifyDateStart;
+
+    @ApiModelProperty("操作时间-结束")
+    private LocalDate modifyDateEnd;
+
+    @ApiModelProperty("操作时间-结束")
+    private Long classId;
+
+    @ApiModelProperty("是否公示(1:是 0:否)")
+    private Integer isPublicity;
 }