+33
@@ -0,0 +1,33 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 校园卡号导入错误返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/19
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CardErrorExportDTO", description = "校园卡号导入错误返回类")
|
||||
public class CardErrorExportDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3132562554433758713L;
|
||||
|
||||
@ExcelProperty("学生学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ExcelProperty("校园卡号")
|
||||
private String stuCardNumber;
|
||||
|
||||
@ExcelProperty("错误信息")
|
||||
private String errorMessage;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 校园卡号导入类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/19
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "CardImportDTO", description = "校园卡号导入类")
|
||||
public class CardImportDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6536093595406368088L;
|
||||
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
@ExcelProperty(value = "学生学号")
|
||||
private String stuNumber;
|
||||
|
||||
/**
|
||||
* 校园卡号
|
||||
*/
|
||||
@ExcelProperty(value = "校园卡号")
|
||||
private String stuCardNumber;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 导入职工dto
|
||||
*/
|
||||
@Data
|
||||
public class ImportStaffInformationDTO {
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
@ExcelProperty("学号")
|
||||
private String studentNum;
|
||||
|
||||
|
||||
@ApiModelProperty("学生类型:0走读,1住宿")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("错误原因")
|
||||
@ExcelProperty("错误原因")
|
||||
private String error;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 导入住宿学生dto
|
||||
*/
|
||||
@Data
|
||||
public class ImportStudentTypeDTO {
|
||||
|
||||
@ApiModelProperty("学号")
|
||||
@ExcelProperty("学号")
|
||||
private String studentNum;
|
||||
|
||||
|
||||
@ApiModelProperty("学生类型:0走读,1住宿")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("错误原因")
|
||||
@ExcelProperty("错误原因")
|
||||
private String error;
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ListStudentApplyDTO {
|
||||
|
||||
@ApiModelProperty("当前页码,默认为1")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty("页面大小,默认为10")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ApiModelProperty("学生ID")
|
||||
private Long studentId;
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
@ApiModelProperty("学生学号")
|
||||
private String studentNumber;
|
||||
/**
|
||||
* 应用编码
|
||||
*/
|
||||
@ApiModelProperty("学生学号")
|
||||
private String applyCode;
|
||||
|
||||
@ApiModelProperty("有效期开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("有效期结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 学校ID
|
||||
*/
|
||||
@ApiModelProperty("学校ID")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学校IDList
|
||||
*/
|
||||
@ApiModelProperty("学校IDList")
|
||||
private List<Long> schoolIdList;
|
||||
|
||||
/**
|
||||
* 学区ID
|
||||
*/
|
||||
@ApiModelProperty("学区ID")
|
||||
private Long campusId;
|
||||
/**
|
||||
* 学段ID
|
||||
*/
|
||||
@ApiModelProperty("学段ID")
|
||||
private Long sectionId;
|
||||
/**
|
||||
* 年级ID
|
||||
*/
|
||||
@ApiModelProperty("年级ID")
|
||||
private Long gradeId;
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@ApiModelProperty("班级ID")
|
||||
private Long classId;
|
||||
|
||||
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ListStudentApplyForDTO {
|
||||
|
||||
@ApiModelProperty("当前页码,默认为1")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty("页面大小,默认为10")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
/**
|
||||
* 学生ID
|
||||
*/
|
||||
@ApiModelProperty("学生ID")
|
||||
private Long studentId;
|
||||
/**
|
||||
* 学生姓名
|
||||
*/
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
/**
|
||||
* 学生学号
|
||||
*/
|
||||
@ApiModelProperty("学生学号")
|
||||
private String studentNumber;
|
||||
/**
|
||||
* 应用编码
|
||||
*/
|
||||
@ApiModelProperty("应用编码")
|
||||
private String applyCode;
|
||||
|
||||
/**
|
||||
* 学校ID
|
||||
*/
|
||||
@ApiModelProperty("学校ID")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学校IDList
|
||||
*/
|
||||
@ApiModelProperty("学校IDList")
|
||||
private List<Long> schoolIdList;
|
||||
|
||||
/**
|
||||
* 学区ID
|
||||
*/
|
||||
@ApiModelProperty("学区ID")
|
||||
private Long campusId;
|
||||
/**
|
||||
* 学段ID
|
||||
*/
|
||||
@ApiModelProperty("学段ID")
|
||||
private Long sectionId;
|
||||
/**
|
||||
* 年级ID
|
||||
*/
|
||||
@ApiModelProperty("年级ID")
|
||||
private Long gradeId;
|
||||
/**
|
||||
* 班级ID
|
||||
*/
|
||||
@ApiModelProperty("班级ID")
|
||||
private Long classId;
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ManagerDTO {
|
||||
|
||||
private List<Long> deptIdList;
|
||||
private Long ruleId;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 分页查询学生列表数据请求类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/19
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "OutPageStudentDTO", description = "分页查询学生列表数据请求类")
|
||||
public class OutPageStudentDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4601644422338829002L;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "学校id", required = true)
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty(value = "当前页码", required = true)
|
||||
private Integer pageNum;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "每页数量")
|
||||
private Integer pageSize;
|
||||
}
|
||||
+6
@@ -3,6 +3,7 @@ package com.yida.data.user.dto;
|
||||
import com.yida.data.common.core.common.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -16,12 +17,17 @@ public class PageStudentDTO extends BaseDTO {
|
||||
private Integer type;
|
||||
@ApiModelProperty("校区id")
|
||||
private Long campusId;
|
||||
@ApiModelProperty("校区id")
|
||||
private List<Long> campusIdList;
|
||||
@ApiModelProperty("学段id")
|
||||
private Long sectionId;
|
||||
private List<Long> sectionIdList;
|
||||
@ApiModelProperty("年级id")
|
||||
private Long gradeId;
|
||||
private List<Long> gradeIdList;
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
private List<Long> classIdList;
|
||||
@ApiModelProperty("学号id")
|
||||
private String stuNumber;
|
||||
@ApiModelProperty("名字")
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Excel职工信息导入类
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StaffImportDTO", description = "Excel职工信息导入类")
|
||||
public class StaffImportDTO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 5414511146002233669L;
|
||||
/**
|
||||
* 职工姓名
|
||||
*/
|
||||
@ExcelProperty(index = 0, value = "职工姓名")
|
||||
@ApiModelProperty(value = "职工姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ExcelProperty(index = 1, value = "性别")
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@ExcelProperty(index = 2, value = "手机号")
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ExcelProperty(index = 3, value = "地址")
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@ExcelProperty(index = 4, value = "部门")
|
||||
@ApiModelProperty(value = "部门")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 身份
|
||||
*/
|
||||
@ExcelProperty(index = 5, value = "身份")
|
||||
@ApiModelProperty(value = "身份")
|
||||
private String identity;
|
||||
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
@ExcelProperty(index = 6, value = "职务")
|
||||
@ApiModelProperty(value = "职务")
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 是否同步企业微信
|
||||
*/
|
||||
@ExcelProperty(index = 7, value = "是否同步企业微信")
|
||||
@ApiModelProperty(value = "是否同步企业微信")
|
||||
private String isQw;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划信息保存类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategyPlanSaveDTO", description = "人脸组-策略-通行计划信息保存类")
|
||||
public class StrategyPlanSaveDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1264394221797979321L;
|
||||
|
||||
@ApiModelProperty("通行计划唯一编码")
|
||||
private String uniqueCode;
|
||||
|
||||
@ApiModelProperty("通行计划-时间段集合")
|
||||
private List<StrategyPlanTimeSaveDTO> planTimeList;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划-时间段信息保存类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategyPlanTimeSaveDTO", description = "人脸组-策略-通行计划-时间段信息保存类")
|
||||
public class StrategyPlanTimeSaveDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1666232372793999487L;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime planStartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime planEndTime;
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略信息保存类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategySaveDTO", description = "人脸组-策略信息保存类")
|
||||
public class StrategySaveDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4058986401549517015L;
|
||||
|
||||
@ApiModelProperty(value = "策略id")
|
||||
private Long strategyId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组id")
|
||||
private Long faceGroupId;
|
||||
|
||||
@ApiModelProperty(value = "策略生效时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime strategyStartDate;
|
||||
|
||||
@ApiModelProperty(value = "策略失效时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime strategyEndDate;
|
||||
|
||||
@ApiModelProperty(value = "星期一通行计划uuid")
|
||||
private String mondayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期二通行计划uuid")
|
||||
private String tuesdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期三通行计划uuid")
|
||||
private String wednesdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期四通行计划uuid")
|
||||
private String thursdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期五通行计划uuid")
|
||||
private String fridayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期六通行计划uuid")
|
||||
private String saturdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期天通行计划uuid")
|
||||
private String sundayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "通行计划集合")
|
||||
private List<StrategyPlanSaveDTO> planList;
|
||||
|
||||
@ApiModelProperty(value = "特殊日期集合")
|
||||
private List<StrategySpecialDateSaveDTO> specialList;
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期保存类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategySpecialDateSaveDTO", description = "人脸组-策略-特殊日期保存类")
|
||||
public class StrategySpecialDateSaveDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -418058543595524019L;
|
||||
|
||||
@ApiModelProperty("特殊日期开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate specialStartDate;
|
||||
|
||||
@ApiModelProperty("特殊日期结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate specialEndDate;
|
||||
|
||||
@ApiModelProperty("特殊日期-时间段集合")
|
||||
private List<StrategySpecialTimeSaveDTO> specialTimeList;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期-时间段信息保存类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategySpecialTimeSaveDTO", description = "人脸组-策略-特殊日期-时间段信息保存类")
|
||||
public class StrategySpecialTimeSaveDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3507582697531274693L;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime specialStartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime specialEndTime;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.yida.data.common.core.converter.LocalDateTimeConverter;
|
||||
import com.yida.data.common.core.entity.EasyExcelExportBaseDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学生宿舍信息导出类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/12/13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "StudentDormExportDTO", description = "学生宿舍信息导出类")
|
||||
public class StudentDormExportDTO extends EasyExcelExportBaseDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3404749621207403889L;
|
||||
|
||||
@ExcelProperty("学生姓名")
|
||||
private String stuName;
|
||||
|
||||
@ExcelProperty("学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ExcelProperty("班级信息")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("入住寝室")
|
||||
private String dormRoomName;
|
||||
|
||||
@ExcelProperty(value = "入住时间", converter = LocalDateTimeConverter.class)
|
||||
private LocalDateTime checkInTime;
|
||||
}
|
||||
+67
-5
@@ -1,12 +1,14 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.yida.data.common.core.converter.LocalDateConverter;
|
||||
import com.yida.data.common.core.entity.EasyExcelExportBaseDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 学生信息导出类
|
||||
@@ -17,22 +19,82 @@ import java.io.Serializable;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "StudentExportDTO", description = "学生信息导出类")
|
||||
public class StudentExportDTO extends EasyExcelExportBaseDTO implements Serializable {
|
||||
public class StudentExportDTO extends StudentDormExportDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6625908714399734930L;
|
||||
|
||||
@ExcelProperty("学生姓名")
|
||||
private String stuName;
|
||||
|
||||
@ExcelProperty("年级")
|
||||
private String gradeName;
|
||||
@ExcelProperty("班级信息")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("班级")
|
||||
private String className;
|
||||
@ExcelProperty("曾用名")
|
||||
private String formerName;
|
||||
|
||||
@ExcelProperty("学号")
|
||||
private String stuNumber;
|
||||
|
||||
@ExcelProperty("考生号")
|
||||
private String stuExamNumber;
|
||||
|
||||
@ExcelProperty("银行卡号")
|
||||
private String creditCardNumbers;
|
||||
|
||||
@ExcelProperty("邮箱")
|
||||
private String email;
|
||||
|
||||
@ExcelProperty("QQ号")
|
||||
private String qqCode;
|
||||
|
||||
@ExcelProperty("微信号")
|
||||
private String wxCode;
|
||||
|
||||
@ExcelProperty(value = "入学时间", converter = LocalDateConverter.class)
|
||||
private LocalDate startDate;
|
||||
|
||||
@ExcelProperty("入学年级")
|
||||
private String startGrade;
|
||||
|
||||
@ExcelProperty("政治面貌")
|
||||
private String politicsStatus;
|
||||
|
||||
@ExcelProperty("邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
@ExcelProperty("籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ExcelProperty("现住址")
|
||||
private String presentAddress;
|
||||
|
||||
/**
|
||||
* 学生性别,0-男,1-女"
|
||||
*/
|
||||
@ExcelProperty("学生性别")
|
||||
private String stuSex;
|
||||
|
||||
@ExcelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ExcelProperty("身份证号")
|
||||
private String idNumber;
|
||||
|
||||
@ExcelProperty("校园卡号")
|
||||
private String stuCardNumber;
|
||||
|
||||
/**
|
||||
* 学生类别,0-走读,1-住宿
|
||||
*/
|
||||
@ExcelProperty("学生类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 学籍状态:关联字典表
|
||||
*/
|
||||
@ExcelProperty("学籍状态")
|
||||
private String studentStatus;
|
||||
|
||||
@ExcelProperty("是否采集人脸")
|
||||
private String collectStatus;
|
||||
}
|
||||
+111
@@ -1,12 +1,15 @@
|
||||
package com.yida.data.user.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.yida.data.common.core.converter.LocalDateConverter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* Excel一键邀请信息导入类
|
||||
@@ -111,4 +114,112 @@ public class WelcomeInviteImportDTO implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(index = 14)
|
||||
private String familyName;
|
||||
|
||||
/**
|
||||
* 住宿类型
|
||||
*/
|
||||
@ExcelProperty(index = 15)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 曾用名
|
||||
*/
|
||||
@ExcelProperty(index = 16)
|
||||
private String formerName;
|
||||
|
||||
/**
|
||||
* 考生号
|
||||
*/
|
||||
@ExcelProperty(index = 17)
|
||||
private String stuExamNumber;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@ExcelProperty(index = 18)
|
||||
private String creditCardNumbers;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@ExcelProperty(index = 19)
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* QQ号
|
||||
*/
|
||||
@ExcelProperty(index = 20)
|
||||
private String qqCode;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
@ExcelProperty(index = 21)
|
||||
private String wxCode;
|
||||
|
||||
/**
|
||||
* 入学时间
|
||||
*/
|
||||
@ExcelProperty(index = 22)
|
||||
private String startDate;
|
||||
|
||||
/**
|
||||
* 入学年级
|
||||
*/
|
||||
@ExcelProperty(index = 23)
|
||||
private String startGrade;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@ExcelProperty(index = 24)
|
||||
private String politicsStatus;
|
||||
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
@ExcelProperty(index = 25)
|
||||
private String postalCode;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
@ExcelProperty(index = 26)
|
||||
private String nativePlace;
|
||||
|
||||
/**
|
||||
* 现住址
|
||||
*/
|
||||
@ExcelProperty(index = 27)
|
||||
private String presentAddress;
|
||||
|
||||
/**
|
||||
* 学生性别
|
||||
*/
|
||||
@ExcelProperty(index = 28)
|
||||
private String stuSex;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ExcelProperty(index = 29)
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty(index = 30)
|
||||
private String idNumber;
|
||||
|
||||
/**
|
||||
* 校园卡号
|
||||
*/
|
||||
@ExcelProperty(index = 31)
|
||||
private String stuCardNumber;
|
||||
|
||||
/**
|
||||
* 学籍状态
|
||||
*/
|
||||
@ExcelProperty(index = 32)
|
||||
private String studentStatus;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.yida.data.user.dto.h5;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 查询用户关联班级或者寝室考勤请求类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "ListUserDeptAttendanceDTO", description = "查询用户关联班级或者寝室考勤请求类")
|
||||
public class ListUserDeptAttendanceDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty("职工主键【用户统计数据】")
|
||||
private Long staffId;
|
||||
|
||||
@ApiModelProperty("查询日期【用户统计数据、详情】")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate date;
|
||||
|
||||
@ApiModelProperty("部门ID,班级或者宿舍【用于详情】")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty("类型:0班级,1宿舍【用于详情】")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.yida.data.user.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupDevice;
|
||||
import com.yida.data.common.core.entity.user.EduUserDevice;
|
||||
import com.yida.data.user.feign.RemoteFaceGroupDeviceService;
|
||||
import com.yida.data.user.feign.RemoteUserDeviceService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* RemoteFaceGroupDeviceService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/9/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteFaceGroupDeviceServiceFallback implements FallbackFactory<RemoteFaceGroupDeviceService> {
|
||||
|
||||
@Override
|
||||
public RemoteFaceGroupDeviceService create(Throwable throwable) {
|
||||
log.error("RemoteFaceGroupDeviceService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteFaceGroupDeviceService() {
|
||||
@Override
|
||||
public ResultBean<List<Long>> listFaceGroupOnlineDevice(Long faceGroupId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.yida.data.user.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategy;
|
||||
import com.yida.data.user.feign.RemoteFaceGroupStrategyService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteFaceGroupStrategyService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteFaceGroupStrategyServiceFallback implements FallbackFactory<RemoteFaceGroupStrategyService> {
|
||||
|
||||
@Override
|
||||
public RemoteFaceGroupStrategyService create(Throwable throwable) {
|
||||
log.error("RemoteFaceGroupStrategyService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteFaceGroupStrategyService() {
|
||||
@Override
|
||||
public ResultBean<EduFaceGroupStrategy> getStrategyInfo(Long faceGroupId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+31
@@ -8,6 +8,7 @@ import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.feign.RemoteStaffService;
|
||||
import com.yida.data.user.vo.TeacherClassVO;
|
||||
import com.yida.data.user.vo.TeacherDeptVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -75,6 +76,11 @@ public class RemoteStaffServiceFallback implements FallbackFactory<RemoteStaffSe
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<Long>> listStaffByDeptIdNoPermission(Long deptId, String nameOrPhone, Long schoolId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询职工列表
|
||||
*
|
||||
@@ -106,6 +112,11 @@ public class RemoteStaffServiceFallback implements FallbackFactory<RemoteStaffSe
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduStaffDept>> getStaffDeptByStaffIdsNoPermission(List<Long> staffIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean syncQywxStaff() {
|
||||
return null;
|
||||
@@ -174,6 +185,26 @@ public class RemoteStaffServiceFallback implements FallbackFactory<RemoteStaffSe
|
||||
public ResultBean saveWxPublicOpenId(Long staffId, String openId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<Integer>> listStaffRolesByStaffId(Long staffId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduStaff>> getStaffList(List<Long> staffIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updateStaffCache() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<Long>> listClassIdByStaffId() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.yida.data.user.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.user.feign.RemoteStudentApplyService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* RemoteStudentApplyService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteStudentApplyServiceFallback implements FallbackFactory<RemoteStudentApplyService> {
|
||||
|
||||
@Override
|
||||
public RemoteStudentApplyService create(Throwable throwable) {
|
||||
log.error("RemoteStudentApplyService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteStudentApplyService() {
|
||||
@Override
|
||||
public ResultBean<Map<Long, List<String>>> listApplyCode(Long[] studentIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<Boolean> hasApply(Long studentId, String applyCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<EduStudentApply> getStudentApply(Long studentId, String applyCode) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+22
@@ -1,5 +1,6 @@
|
||||
package com.yida.data.user.fallback;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
@@ -322,6 +323,27 @@ public class RemoteStudentServiceFallback implements FallbackFactory<RemoteStude
|
||||
public ResultBean<List<EduStudent>> listBaseStudentNoJoin(EduStudent eduStudent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<JSONObject> countUserDashboardNum(Long schoolId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean saveStudent(EduStudent eduStudent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean saveStudentDorm(EduStudent eduStudent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updateStudentCache() {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+1
-8
@@ -29,16 +29,9 @@ public class RemoteTeacherServiceFallback implements FallbackFactory<RemoteTeach
|
||||
return new RemoteTeacherService() {
|
||||
/**
|
||||
* 更新教师信息
|
||||
*
|
||||
* @param schoolId
|
||||
* @param campusId
|
||||
* @param sectionId
|
||||
* @param gradeId
|
||||
* @param classId
|
||||
* @param teacherList
|
||||
*/
|
||||
@Override
|
||||
public ResultBean dealWxTeacherChange(Long schoolId, Long campusId, Long sectionId, Long gradeId, Long classId, List<Map> teacherList) {
|
||||
public ResultBean dealWxTeacherChange(Long schoolId, Long campusId, Long sectionId, Long gradeId, Long classId, List<Map> teacherList, Long deptWxId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+15
@@ -115,6 +115,11 @@ public class RemoteUserDeptServiceFallback implements FallbackFactory<RemoteUser
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduUserDept>> getParentListByDeptId(Long deptId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存家校部门
|
||||
*
|
||||
@@ -193,6 +198,16 @@ public class RemoteUserDeptServiceFallback implements FallbackFactory<RemoteUser
|
||||
public ResultBean<List<EduUserDept>> findChildIdByParentAndTypeNoPermission(Long parentId, Integer type) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduUserDept>> findListByParent(Long deptId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List> getUserDeptTree(List<Long> deptIds) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -28,6 +28,16 @@ public class RemoteUserDeviceServiceFallback implements FallbackFactory<RemoteUs
|
||||
public ResultBean batchSave(List<EduUserDevice> list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<EduUserDevice>> listUserDevice(Long userId, Integer type, Long deviceId, Long faceGroupId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<String> deleteRelation(EduUserDevice userDevice) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.yida.data.user.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupDevice;
|
||||
import com.yida.data.common.core.entity.user.EduUserDevice;
|
||||
import com.yida.data.user.fallback.RemoteUserDeviceServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组设备 Feign
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/9/28
|
||||
*/
|
||||
@FeignClient(name = FebsServerConstant.EDU_USER, contextId = "faceGroupDeviceService",
|
||||
fallbackFactory = RemoteUserDeviceServiceFallback.class)
|
||||
public interface RemoteFaceGroupDeviceService {
|
||||
|
||||
/**
|
||||
* 查询人脸组设备id集合
|
||||
*
|
||||
* @param faceGroupId 人脸组id
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.util.List < java.lang.Long>>
|
||||
* @author ZYJ
|
||||
* @date 2023/9/28 16:08
|
||||
*/
|
||||
@GetMapping("/in/groupDevice/listFaceGroupOnlineDevice")
|
||||
ResultBean<List<Long>> listFaceGroupOnlineDevice(@RequestParam Long faceGroupId);
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.yida.data.user.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.user.EduCourse;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategy;
|
||||
import com.yida.data.user.fallback.RemoteCourseServiceFallback;
|
||||
import com.yida.data.user.fallback.RemoteFaceGroupStrategyServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "remoteFaceGroupStrategyServiceClient",
|
||||
fallbackFactory = RemoteFaceGroupStrategyServiceFallback.class)
|
||||
public interface RemoteFaceGroupStrategyService {
|
||||
|
||||
@GetMapping("/in/eduFaceGroupStrategy/getStrategyInfo")
|
||||
ResultBean<EduFaceGroupStrategy> getStrategyInfo(@RequestParam("faceGroupId") Long faceGroupId);
|
||||
}
|
||||
+52
-11
@@ -8,6 +8,7 @@ import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.fallback.RemoteStaffServiceFallback;
|
||||
import com.yida.data.user.vo.TeacherClassVO;
|
||||
import com.yida.data.user.vo.TeacherDeptVO;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
@@ -19,7 +20,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "StaffServiceClient",
|
||||
fallbackFactory = RemoteStaffServiceFallback.class)
|
||||
fallbackFactory = RemoteStaffServiceFallback.class)
|
||||
public interface RemoteStaffService {
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ public interface RemoteStaffService {
|
||||
*/
|
||||
@GetMapping("/staff/findTeacherRole")
|
||||
ResultBean<List<EduTeacherDept>> findTeacherRole(@RequestParam("teacherId") Long teacherId,
|
||||
@RequestParam("type") Integer type);
|
||||
@RequestParam("type") Integer type);
|
||||
|
||||
/**
|
||||
* 查询教师可见课程
|
||||
@@ -42,7 +43,7 @@ public interface RemoteStaffService {
|
||||
*/
|
||||
@GetMapping("/staff/findTeacherCourseId")
|
||||
ResultBean<List<Long>> findTeacherCourseId(@RequestParam("teacherId") Long teacherId,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
/**
|
||||
* 根据id查询职工信息
|
||||
@@ -60,13 +61,19 @@ public interface RemoteStaffService {
|
||||
*/
|
||||
@GetMapping("/staff/listStaffByDeptId")
|
||||
ResultBean<List<Long>> listStaffByDeptId(@RequestParam("deptId") @Param("deptId") Long deptId,
|
||||
@RequestParam("nameOrPhone") @Param("nameOrPhone") String nameOrPhone,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
@RequestParam("nameOrPhone") @Param("nameOrPhone") String nameOrPhone,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
|
||||
@GetMapping("/in/staff/listStaffByDeptId")
|
||||
ResultBean<List<Long>> listStaffByDeptIdNoPermission(@RequestParam("deptId") @Param("deptId") Long deptId,
|
||||
@RequestParam("nameOrPhone") @Param("nameOrPhone") String nameOrPhone,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
/**
|
||||
* 根据条件查询职工列表
|
||||
*/
|
||||
@PostMapping("/staff/listStaff")
|
||||
@PostMapping("/in/staff/listStaff")
|
||||
ResultBean<List<EduStaff>> listStaff(@RequestBody ListStaffDTO dto);
|
||||
|
||||
/**
|
||||
@@ -84,6 +91,9 @@ public interface RemoteStaffService {
|
||||
@PostMapping("/staff/getStaffDeptByStaffIds")
|
||||
ResultBean<List<EduStaffDept>> getStaffDeptByStaffIds(@ApiParam("职工id") @RequestBody List<Long> staffIds);
|
||||
|
||||
@PostMapping("/in/staff/getStaffDeptByStaffIds")
|
||||
ResultBean<List<EduStaffDept>> getStaffDeptByStaffIdsNoPermission(@ApiParam("职工id") @RequestBody List<Long> staffIds);
|
||||
|
||||
@GetMapping("/in/staff/syncQywxStaff")
|
||||
ResultBean syncQywxStaff();
|
||||
|
||||
@@ -99,16 +109,16 @@ public interface RemoteStaffService {
|
||||
*/
|
||||
@GetMapping("/in/staff/getStaffByWxOrMobileOrOpenId")
|
||||
ResultBean<EduStaff> getStaffByWxOrMobileOrOpenId(@RequestParam("wxId") String wxId,
|
||||
@RequestParam("mobile") String mobile,
|
||||
@RequestParam("wxOpenId") String wxOpenId,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
@RequestParam("mobile") String mobile,
|
||||
@RequestParam("wxOpenId") String wxOpenId,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
/**
|
||||
* 处理企业微信职工删除
|
||||
*/
|
||||
@GetMapping("/in/staff/dealWxUserDelete")
|
||||
ResultBean dealWxUserDelete(@RequestParam("wxId") String wxId,
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
@GetMapping("/in/staff/getStaffByDahua")
|
||||
ResultBean<EduStaff> getStaffByDahuaNoPermission(@RequestParam("dahuaCode") String dahuaCode);
|
||||
@@ -133,5 +143,36 @@ public interface RemoteStaffService {
|
||||
*/
|
||||
@GetMapping("/in/staff/saveWxPublicOpenId")
|
||||
ResultBean saveWxPublicOpenId(@RequestParam("staffId") Long staffId,
|
||||
@RequestParam("openId") String openId);
|
||||
@RequestParam("openId") String openId);
|
||||
|
||||
|
||||
@GetMapping("/in/staff/listStaffRolesByStaffId")
|
||||
ResultBean<List<Integer>> listStaffRolesByStaffId(@RequestParam("staffId") Long staffId);
|
||||
|
||||
/**
|
||||
* 根据职工id集合查询职工信息
|
||||
*
|
||||
* @param staffIds 职工id集合
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.util.List < com.yida.data.common.core.entity.user.EduStaff>>
|
||||
* @author ZYJ
|
||||
* @date 2023/6/8 17:24
|
||||
*/
|
||||
@PostMapping("/staff/getStaffList")
|
||||
ResultBean<List<EduStaff>> getStaffList(@RequestBody List<Long> staffIds);
|
||||
|
||||
/**
|
||||
* 更新职工信息缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("in/staff/updateStaffCache")
|
||||
ResultBean updateStaffCache();
|
||||
|
||||
/**
|
||||
* 查询职工管理班级
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("in/staff/listClassIdByStaffId")
|
||||
ResultBean<List<Long>> listClassIdByStaffId();
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.yida.data.user.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.user.fallback.RemoteStudentApplyServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "studentApplyServiceClient",
|
||||
fallbackFactory = RemoteStudentApplyServiceFallback.class)
|
||||
public interface RemoteStudentApplyService {
|
||||
|
||||
@GetMapping("/in/transaction/studentApply/listApply")
|
||||
ResultBean<Map<Long, List<String>>> listApplyCode(@RequestParam("studentIds") Long[] studentIds);
|
||||
|
||||
@GetMapping("/transaction/studentApply/hasApply")
|
||||
ResultBean<Boolean> hasApply(@RequestParam("studentId") Long studentId,
|
||||
@RequestParam("applyCode") String applyCode);
|
||||
|
||||
@GetMapping("/transaction/studentApply/getStudentApplyByIdAndCode")
|
||||
ResultBean<EduStudentApply> getStudentApply(@RequestParam("studentId") Long studentId,
|
||||
@RequestParam("applyCode") String applyCode);
|
||||
}
|
||||
+35
@@ -1,5 +1,6 @@
|
||||
package com.yida.data.user.feign;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
@@ -12,6 +13,7 @@ import com.yida.data.user.fallback.RemoteStudentServiceFallback;
|
||||
import com.yida.data.user.vo.ListParentByStudentIdsVO;
|
||||
import com.yida.data.user.vo.ParentInfoVO;
|
||||
import com.yida.data.user.vo.StudentClassInfoVO;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "studentServiceClient",
|
||||
fallbackFactory = RemoteStudentServiceFallback.class)
|
||||
@@ -249,4 +252,36 @@ public interface RemoteStudentService {
|
||||
*/
|
||||
@PostMapping(value = "/in/student/listBaseStudentNoJoin")
|
||||
ResultBean<List<EduStudent>> listBaseStudentNoJoin(@RequestBody EduStudent eduStudent);
|
||||
|
||||
/**
|
||||
* 查询校园大数据的人员统计数据
|
||||
*
|
||||
* @param schoolId 学校id
|
||||
* @return com.yida.data.common.core.common.ResultBean<cn.hutool.json.JSONObject>
|
||||
* @author ZYJ
|
||||
* @date 2023/4/24 15:09
|
||||
*/
|
||||
@GetMapping(value = "/in/student/countUserDashboardNum")
|
||||
ResultBean<JSONObject> countUserDashboardNum(@RequestParam Long schoolId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增/编辑学生
|
||||
*
|
||||
* @param eduStudent
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("out/student/saveStudent")
|
||||
ResultBean<EduStudent> saveStudent(@RequestBody EduStudent eduStudent);
|
||||
|
||||
@PostMapping("in/student/saveStudentDorm")
|
||||
ResultBean saveStudentDorm(@RequestBody EduStudent eduStudent);
|
||||
|
||||
/**
|
||||
* 更新学生信息缓存
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("in/student/updateStudentCache")
|
||||
ResultBean updateStudentCache();
|
||||
}
|
||||
|
||||
+3
-1
@@ -28,7 +28,8 @@ public interface RemoteTeacherService {
|
||||
@RequestParam("sectionId") Long sectionId,
|
||||
@RequestParam("gradeId") Long gradeId,
|
||||
@RequestParam("classId") Long classId,
|
||||
@RequestBody List<Map> teacherList);
|
||||
@RequestBody List<Map> teacherList,
|
||||
@RequestParam("deptWxId") Long deptWxId);
|
||||
|
||||
/**
|
||||
* 根据教师微信id查询教师信息
|
||||
@@ -96,6 +97,7 @@ public interface RemoteTeacherService {
|
||||
*
|
||||
* @param deptId 家校部门id
|
||||
* @param type 教师类型 1表示校区负责人,2表示年级负责人,3表示班主任,4表示任课老师,5表示学段负责人
|
||||
* 1表示班级,2表示年级,3表示学段,4表示校区
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.util.List < com.yida.data.common.core.entity.user.EduStaff>>
|
||||
* @author ZYJ
|
||||
* @date 2022/7/15 17:48
|
||||
|
||||
+28
-3
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
* @date 2021-11-22
|
||||
*/
|
||||
@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "userDeptServiceClient",
|
||||
fallbackFactory = RemoteUserDeptServiceFallback.class)
|
||||
fallbackFactory = RemoteUserDeptServiceFallback.class)
|
||||
public interface RemoteUserDeptService {
|
||||
|
||||
/**
|
||||
@@ -99,6 +99,16 @@ public interface RemoteUserDeptService {
|
||||
@GetMapping("/in/eduUserDept/getParentByDeptId")
|
||||
ResultBean<EduUserDept> getParentByDeptId(@RequestParam Long deptId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据家校部门id查询全部上级家校部门信息
|
||||
*
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/in/eduUserDept/getParentListByDeptId")
|
||||
ResultBean<List<EduUserDept>> getParentListByDeptId(@RequestParam Long deptId);
|
||||
|
||||
/**
|
||||
* 批量保存家校部门
|
||||
*
|
||||
@@ -146,9 +156,24 @@ public interface RemoteUserDeptService {
|
||||
ResultBean<List<EduUserDept>> findChildByParentAndType(@RequestParam Long parentId, @RequestParam Integer type);
|
||||
|
||||
/**
|
||||
* 向下查询指定家校部门类型的家校部门id(可查询非直接子家校部门)
|
||||
* 未毕业家校部门
|
||||
* 向下查询指定家校部门类型的家校部门id(可查询非直接子家校部门) 未毕业家校部门
|
||||
*/
|
||||
@GetMapping("/in/eduUserDept/findChildIdByParentAndType")
|
||||
ResultBean<List<EduUserDept>> findChildIdByParentAndTypeNoPermission(@RequestParam Long parentId, @RequestParam Integer type);
|
||||
|
||||
/**
|
||||
* 向下查询指定家校部门类型的家校部门id(可查询非直接子家校部门) 未毕业家校部门
|
||||
*/
|
||||
@GetMapping("/in/eduUserDept/findListByParent")
|
||||
ResultBean<List<EduUserDept>> findListByParent(@RequestParam Long deptId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取家校部门树
|
||||
*
|
||||
* @param deptIds
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("in/eduUserDept/getUserDeptTree")
|
||||
ResultBean<List> getUserDeptTree(@RequestBody List<Long> deptIds);
|
||||
}
|
||||
|
||||
+30
@@ -6,8 +6,10 @@ import com.yida.data.common.core.entity.user.EduUserDevice;
|
||||
|
||||
import com.yida.data.user.fallback.RemoteUserDeviceServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,4 +19,32 @@ public interface RemoteUserDeviceService {
|
||||
|
||||
@PostMapping("/in/userDevice/batchSave")
|
||||
ResultBean batchSave(@RequestBody List<EduUserDevice> list);
|
||||
|
||||
/**
|
||||
* 获取设备和人员关联信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param type 用户类型. 0-学生,1-职工
|
||||
* @param deviceId 设备id
|
||||
* @param faceGroupId 人脸组id
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.util.List < com.yida.data.common.core.entity.user.EduUserDevice>>
|
||||
* @author ZYJ
|
||||
* @date 2023/2/3 17:21
|
||||
*/
|
||||
@GetMapping("/in/userDevice/listUserDevice")
|
||||
ResultBean<List<EduUserDevice>> listUserDevice(@RequestParam Long userId,
|
||||
@RequestParam Integer type,
|
||||
@RequestParam Long deviceId,
|
||||
@RequestParam Long faceGroupId);
|
||||
|
||||
/**
|
||||
* 删除设备和人员关联信息
|
||||
*
|
||||
* @param userDevice 删除信息
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.lang.String>
|
||||
* @author ZYJ
|
||||
* @date 2023/2/23 17:32
|
||||
*/
|
||||
@PostMapping("/in/userDevice/deleteRelation")
|
||||
ResultBean<String> deleteRelation(@RequestBody EduUserDevice userDevice);
|
||||
}
|
||||
|
||||
+9
@@ -16,6 +16,15 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
fallbackFactory = RemoteUserFaceServiceFallback.class)
|
||||
public interface RemoteUserFaceService {
|
||||
|
||||
/**
|
||||
* 获取用户人脸信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param type 用户类型,0-学生,1-职工
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.user.EduUserFace>
|
||||
* @author ZYJ
|
||||
* @date 2023/2/2 16:59
|
||||
*/
|
||||
@GetMapping("/in/face/getFaceByUser")
|
||||
ResultBean<EduUserFace> getFaceByUser(@RequestParam("userId") Long userId,
|
||||
@RequestParam("type") Integer type);
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ClassAttendanceDataVO {
|
||||
|
||||
/**
|
||||
* 宿舍名称/班级名称
|
||||
*/
|
||||
@ApiModelProperty(value = "班级ID")
|
||||
private Long classId;
|
||||
/**
|
||||
* 宿舍名称/班级名称
|
||||
*/
|
||||
@ApiModelProperty(value = "类型:0班级,1宿舍")
|
||||
private Integer type;
|
||||
/**
|
||||
* 宿舍名称/班级名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
/**
|
||||
* 总人数
|
||||
*/
|
||||
@ApiModelProperty(value = "总人数")
|
||||
private Integer totalNum;
|
||||
/**
|
||||
* 已采集人数
|
||||
*/
|
||||
@ApiModelProperty(value = "异常人数")
|
||||
private Integer abnormalNum;
|
||||
/**
|
||||
* 关联学生数据
|
||||
*/
|
||||
@ApiModelProperty(value = "关联学生数据")
|
||||
private List<Object> studentList;
|
||||
/**
|
||||
* 考勤时段ID
|
||||
*/
|
||||
@ApiModelProperty(value = "考勤时段ID")
|
||||
private Long ruleTimeId;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeptManagetVO {
|
||||
|
||||
@ApiModelProperty("部门Id")
|
||||
private Long deptId;
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
@ApiModelProperty("部门管理员")
|
||||
private List<ManagerVo> managerVoList;
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ public class DownLoadPicVO {
|
||||
|
||||
@ApiModelProperty("是否上传完成,0-否,1-是")
|
||||
private Integer finish;
|
||||
|
||||
|
||||
@ApiModelProperty("下载总数")
|
||||
private Integer totalNum;
|
||||
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 下载职工通行记录进度-实体
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DownLoadStaffAttendanceRecordVO {
|
||||
|
||||
@ApiModelProperty("本次操作标识")
|
||||
private String key;
|
||||
|
||||
@ApiModelProperty("进度 0-100")
|
||||
private Integer percent;
|
||||
|
||||
@ApiModelProperty("是否下载完成,0-否,1-是")
|
||||
private Integer finish;
|
||||
|
||||
@ApiModelProperty("下载总数")
|
||||
private Integer totalNum;
|
||||
|
||||
@ApiModelProperty("当前下载到第几个")
|
||||
private Integer currentNum;
|
||||
|
||||
@ApiModelProperty("错误文件路径")
|
||||
private String filePath;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ManagerVo {
|
||||
|
||||
private Long userId;
|
||||
private String userName;
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 分页查询学生列表数据返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/20
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "OutPageStudentVO", description = "分页查询学生列表数据返回类")
|
||||
public class OutPageStudentVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7179610417104867560L;
|
||||
|
||||
@ApiModelProperty("学生id")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("校园卡号")
|
||||
private String stuCardNumber;
|
||||
|
||||
@ApiModelProperty("学生头像url")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateDate;
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略信息返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategyInfoVO", description = "人脸组-策略信息返回类")
|
||||
public class StrategyInfoVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 5883547164739281028L;
|
||||
|
||||
@ApiModelProperty(value = "策略id")
|
||||
private Long strategyId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组id")
|
||||
private Long faceGroupId;
|
||||
|
||||
@ApiModelProperty(value = "策略生效时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime strategyStartDate;
|
||||
|
||||
@ApiModelProperty(value = "策略失效时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime strategyEndDate;
|
||||
|
||||
@ApiModelProperty(value = "星期一通行计划uuid")
|
||||
private String mondayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期二通行计划uuid")
|
||||
private String tuesdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期三通行计划uuid")
|
||||
private String wednesdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期四通行计划uuid")
|
||||
private String thursdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期五通行计划uuid")
|
||||
private String fridayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期六通行计划uuid")
|
||||
private String saturdayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "星期天通行计划uuid")
|
||||
private String sundayUniqueCode;
|
||||
|
||||
@ApiModelProperty(value = "通行计划集合")
|
||||
private List<StrategyPlanVO> planList;
|
||||
|
||||
@ApiModelProperty(value = "特殊日期集合")
|
||||
private List<StrategySpecialDateVO> specialList;
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划-时间段信息返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategyPlanTimeVO", description = "人脸组-策略-通行计划-时间段信息返回类")
|
||||
public class StrategyPlanTimeVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3006837050525867421L;
|
||||
|
||||
@ApiModelProperty(value = "人脸组id")
|
||||
@TableField("face_group_id")
|
||||
private Long faceGroupId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组-策略id")
|
||||
private Long faceGroupStrategyId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组-策略-通行计划id")
|
||||
private Long faceGroupStrategyPlanId;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime planStartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime planEndTime;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划信息返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategyPlanVO", description = "人脸组-策略-通行计划信息返回类")
|
||||
public class StrategyPlanVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4014484234037617273L;
|
||||
|
||||
@ApiModelProperty(value = "通行计划id")
|
||||
private Long planId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组id")
|
||||
private Long faceGroupId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组-策略id")
|
||||
private Long faceGroupStrategyId;
|
||||
|
||||
@ApiModelProperty("通行计划唯一编码")
|
||||
private String uniqueCode;
|
||||
|
||||
@ApiModelProperty("通行计划-时间段集合")
|
||||
private List<StrategyPlanTimeVO> planTimeList;
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategySpecialDateVO", description = "人脸组-策略-特殊日期返回类")
|
||||
public class StrategySpecialDateVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3513266099905879137L;
|
||||
|
||||
@ApiModelProperty(value = "特殊日期主键id")
|
||||
private Long specialId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组id")
|
||||
private Long faceGroupId;
|
||||
|
||||
@ApiModelProperty(value = "人脸组-策略id")
|
||||
private Long faceGroupStrategyId;
|
||||
|
||||
@ApiModelProperty(value = "特殊日期开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate specialStartDate;
|
||||
|
||||
@ApiModelProperty(value = "特殊日期结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate specialEndDate;
|
||||
|
||||
@ApiModelProperty("特殊日期-时间段集合")
|
||||
private List<StrategySpecialTimeVO> specialTimeList;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期-时间返回类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "StrategySpecialTimeVO", description = "人脸组-策略-特殊日期-时间返回类")
|
||||
public class StrategySpecialTimeVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3886115890777830964L;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime specialStartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
|
||||
private LocalTime specialEndTime;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StudentApplyImportErrorVO {
|
||||
|
||||
@ExcelProperty(index = 0, value = "错误信息")
|
||||
@ApiModelProperty("错误信息")
|
||||
private String errorMsg;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StudentApplyImportProgressVO {
|
||||
|
||||
private Integer totalNum;
|
||||
private Integer currentNum;
|
||||
private String errorPageUrl;
|
||||
private Integer finish;
|
||||
private String redisKey;
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StudentApplyImportVO {
|
||||
|
||||
@ExcelProperty(index = 0, value = "序号")
|
||||
@ApiModelProperty(value = "序号")
|
||||
private Long indexNo;
|
||||
|
||||
@ExcelProperty(index = 1, value = "学校名称")
|
||||
@ApiModelProperty("学校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ExcelProperty(index = 2, value = "校区名称")
|
||||
@ApiModelProperty("校区名称")
|
||||
private String campusName;
|
||||
|
||||
@ExcelProperty(index = 3, value = "学段名称")
|
||||
@ApiModelProperty("学段名称")
|
||||
private String sectionName;
|
||||
|
||||
@ExcelProperty(index = 4, value = "年级名称")
|
||||
@ApiModelProperty("年级名称")
|
||||
private String gradeName;
|
||||
|
||||
@ExcelProperty(index = 5, value = "班级名称")
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ExcelProperty(index = 6, value = "学生姓名")
|
||||
@ApiModelProperty("学生姓名")
|
||||
private String studentName;
|
||||
|
||||
@ExcelProperty(index = 7, value = "学生学号")
|
||||
@ApiModelProperty("学生学号")
|
||||
private String studentNumber;
|
||||
|
||||
@ExcelProperty(index = 8, value = "开通应用")
|
||||
@ApiModelProperty("开通应用")
|
||||
private String applyName;
|
||||
|
||||
@ExcelProperty(index = 9, value = "有效开始时间")
|
||||
@ApiModelProperty("有效开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ExcelProperty(index = 10, value = "有效结束时间")
|
||||
@ApiModelProperty("有效结束时间")
|
||||
private String endTime;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.yida.data.user.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StudentApplyStatusVO {
|
||||
|
||||
@ApiModelProperty("应用状态,0-未开通,1-使用中,2-已过期")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("过期时间")
|
||||
private LocalDate deadLine;
|
||||
}
|
||||
+8
@@ -10,6 +10,11 @@ import lombok.Data;
|
||||
@ApiModel("教师班级学科关系")
|
||||
public class TeacherDeptVO {
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
@ApiModelProperty("学校名称")
|
||||
private String schoolName;
|
||||
|
||||
@ApiModelProperty("校区id")
|
||||
private Long campusId;
|
||||
@ApiModelProperty("校区名称")
|
||||
@@ -30,6 +35,9 @@ public class TeacherDeptVO {
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("班级人数")
|
||||
private Long classStudentNum;
|
||||
|
||||
|
||||
@ApiModelProperty("教师类型 1表示校区负责人,2表示年级负责人,3表示班主任,4表示任课老师,5表示学段负责人")
|
||||
private Integer type;
|
||||
|
||||
+9
-1
@@ -5,8 +5,13 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class UserInfoVO {
|
||||
public class UserInfoVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2183584074714449444L;
|
||||
|
||||
@ApiModelProperty("用户名称")
|
||||
@ExcelProperty("用户名称")
|
||||
private String name;
|
||||
@@ -18,4 +23,7 @@ public class UserInfoVO {
|
||||
@ApiModelProperty("学号/手机号")
|
||||
@ExcelProperty("学号/手机号")
|
||||
private String number;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,7 @@ com.yida.data.user.fallback.RemoteTeacherServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteUserDeptServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteUserDeviceFactoryServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteUserDeviceServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteUserFaceServiceFallback
|
||||
com.yida.data.user.fallback.RemoteUserFaceServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteStudentApplyServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteFaceGroupDeviceServiceFallback,\
|
||||
com.yida.data.user.fallback.RemoteFaceGroupStrategyServiceFallback
|
||||
@@ -50,7 +50,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yida.data.attendance</groupId>
|
||||
<artifactId>edu-attendance-api</artifactId>
|
||||
<artifactId>attendance-api</artifactId>
|
||||
<version>${febs-cloud.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.yida.data.user.config;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.school.feign.facility.RemoteDormitoryService;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* excel功能配置类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/10/20
|
||||
*/
|
||||
@Configuration
|
||||
public class ExcelConfiguration {
|
||||
|
||||
@Value("${febs.uploadUrl}")
|
||||
private String uploadUrl;
|
||||
|
||||
@Bean
|
||||
ExportStudentClient exportStudentClient(
|
||||
EduStudentService eduStudentService,
|
||||
RedisService redisService, CommonService commonService) {
|
||||
return new ExportStudentClient(eduStudentService, redisService, commonService,
|
||||
CachePrefixConstant.EXPORT_STUDENT_DATA, uploadUrl);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ExportStudentDormClient exportStudentDormClient(
|
||||
EduStudentService eduStudentService,
|
||||
RedisService redisService, CommonService commonService, RemoteDormitoryService remoteDormitoryService) {
|
||||
return new ExportStudentDormClient(eduStudentService, redisService, commonService,
|
||||
CachePrefixConstant.EXPORT_STUDENT_DORM_DATA, uploadUrl, remoteDormitoryService);
|
||||
}
|
||||
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.yida.data.user.config;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.yida.data.common.core.entity.Dict;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.excel.DefaultExportExcelClient;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.user.dto.PageStudentDTO;
|
||||
import com.yida.data.user.dto.StudentExportDTO;
|
||||
import com.yida.data.user.excel.SelectStudentExportData;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 学生信息导出处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/12/12 15:00
|
||||
*/
|
||||
public class ExportStudentClient
|
||||
extends DefaultExportExcelClient<SelectStudentExportData, StudentExportDTO, EduStudent, EduStudentService> {
|
||||
|
||||
public ExportStudentClient(EduStudentService eduStudentService, RedisService redisService, CommonService commonService,
|
||||
String exportCacheKey, String uploadUrl) {
|
||||
super(eduStudentService, redisService, commonService, exportCacheKey, uploadUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EduStudent> selectExportData(SelectStudentExportData selectStudentExportData) {
|
||||
// 查询数据
|
||||
PageStudentDTO dto = new PageStudentDTO();
|
||||
BeanUtils.copyProperties(selectStudentExportData, dto);
|
||||
return this.baseService.selectStudent(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentExportDTO handleSingleData(EduStudent o) {
|
||||
StudentExportDTO exportDTO = new StudentExportDTO();
|
||||
BeanUtils.copyProperties(o, exportDTO);
|
||||
// 采集状态
|
||||
String collectStatus = "未采集";
|
||||
if (Objects.nonNull(o.getCollectType()) && o.getCollectType() == 1) {
|
||||
collectStatus = "已采集";
|
||||
}
|
||||
exportDTO.setCollectStatus(collectStatus);
|
||||
// 班级信息
|
||||
if (StrUtil.isNotBlank(o.getCampusName()) && StrUtil.isNotBlank(o.getSectionName())
|
||||
&& StrUtil.isNotBlank(o.getGradeName()) && StrUtil.isNotBlank(o.getClassName())) {
|
||||
exportDTO.setDeptName(o.getCampusName() + "-" + o.getSectionName() + "-" +
|
||||
o.getGradeName() + "-" + o.getClassName());
|
||||
}
|
||||
// 政治面貌
|
||||
Dict politicsStatus = this.commonService.getDictByTypeAndValueOrLabel("politics_status", null, o.getPoliticsStatus());
|
||||
if (Objects.nonNull(politicsStatus)) {
|
||||
exportDTO.setPoliticsStatus(politicsStatus.getValue());
|
||||
} else {
|
||||
exportDTO.setPoliticsStatus("");
|
||||
}
|
||||
// 学生性别
|
||||
String sex = o.getStuSex();
|
||||
if (StrUtil.isEmpty(sex)) {
|
||||
exportDTO.setStuSex("");
|
||||
} else {
|
||||
exportDTO.setStuSex("0".equals(sex) ? "男" : "女");
|
||||
}
|
||||
// 民族
|
||||
Dict nation = this.commonService.getDictByTypeAndValueOrLabel("nation", null, o.getNation());
|
||||
if (Objects.nonNull(nation)) {
|
||||
exportDTO.setNation(nation.getValue());
|
||||
} else {
|
||||
exportDTO.setNation("");
|
||||
}
|
||||
// 学生类型
|
||||
Integer type = o.getType();
|
||||
if (Objects.nonNull(type)) {
|
||||
exportDTO.setType(type == 0 ? "走读" : "住宿");
|
||||
}
|
||||
// 学籍状态
|
||||
Dict studentStatus = this.commonService.getDictByTypeAndValueOrLabel("student_status", null, o.getStudentStatus());
|
||||
if (Objects.nonNull(studentStatus)) {
|
||||
exportDTO.setStudentStatus(studentStatus.getValue());
|
||||
} else {
|
||||
exportDTO.setStudentStatus("");
|
||||
}
|
||||
return exportDTO;
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.yida.data.user.config;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.yida.data.common.core.entity.school.EduDormitoryRoom;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.common.excel.DefaultExportExcelClient;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.school.dto.index.ListDormRoomDTO;
|
||||
import com.yida.data.school.feign.facility.RemoteDormitoryService;
|
||||
import com.yida.data.user.dto.StudentDormExportDTO;
|
||||
import com.yida.data.user.excel.SelectStudentDormExportData;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 学生住宿信息导出处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/12/13 15:00
|
||||
*/
|
||||
public class ExportStudentDormClient
|
||||
extends DefaultExportExcelClient<SelectStudentDormExportData, StudentDormExportDTO, EduStudent, EduStudentService> {
|
||||
|
||||
private final RemoteDormitoryService remoteDormitoryService;
|
||||
|
||||
private Map<Long, List<EduDormitoryRoom>> dormRoomGroup = new HashMap<>();
|
||||
|
||||
public ExportStudentDormClient(EduStudentService eduStudentService, RedisService redisService, CommonService commonService,
|
||||
String exportCacheKey, String uploadUrl, RemoteDormitoryService remoteDormitoryService) {
|
||||
super(eduStudentService, redisService, commonService, exportCacheKey, uploadUrl);
|
||||
this.remoteDormitoryService = remoteDormitoryService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EduStudent> selectExportData(SelectStudentDormExportData data) {
|
||||
List<Long> dormIds = new ArrayList<>();
|
||||
// 查询匹配的宿舍
|
||||
if (data.getDormRoomId() == null) {
|
||||
List<EduDormitoryRoom> dormRooms = remoteDormitoryService.listDormRoomNoAuth(ListDormRoomDTO.builder()
|
||||
.schoolId(data.getSchoolId())
|
||||
.floor(data.getFloor())
|
||||
.dormIds(data.getDormId() != null ? Collections.singletonList(data.getDormId()) : null).build()).getData();
|
||||
if (CollUtil.isNotEmpty(dormRooms)) {
|
||||
dormRoomGroup = dormRooms.stream().collect(Collectors.groupingBy(EduDormitoryRoom::getDormId));
|
||||
dormIds = dormRooms.stream().map(EduDormitoryRoom::getId).collect(Collectors.toList());
|
||||
}
|
||||
} else {
|
||||
dormIds = Collections.singletonList(data.getDormRoomId());
|
||||
}
|
||||
// 宿舍为空 不查询数据
|
||||
if (CollUtil.isEmpty(dormIds)) {
|
||||
dormIds = new ArrayList<>();
|
||||
dormIds.add(-1L);
|
||||
}
|
||||
// 查询学生信息
|
||||
return this.baseService.listStudentDorm(dormIds, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentDormExportDTO handleSingleData(EduStudent o) {
|
||||
// 年级班级信息
|
||||
EduUserDept grade = this.commonService.getUserDept(o.getGradeId());
|
||||
EduUserDept clazz = this.commonService.getUserDept(o.getClassId());
|
||||
StringBuilder gradeClass = new StringBuilder();
|
||||
if (grade != null) {
|
||||
gradeClass.append(grade.getDeptName());
|
||||
}
|
||||
if (clazz != null) {
|
||||
gradeClass.append(clazz.getDeptName());
|
||||
}
|
||||
o.setClassName(gradeClass.toString());
|
||||
// 入住寝室信息
|
||||
EduDormitoryRoom dormRoom;
|
||||
if (CollUtil.isNotEmpty(dormRoomGroup) && dormRoomGroup.containsKey(o.getDormRoomId())) {
|
||||
dormRoom = dormRoomGroup.get(o.getDormRoomId()).get(0);
|
||||
} else {
|
||||
dormRoom = remoteDormitoryService.getDormRoomNoPermission(o.getDormRoomId()).getData();
|
||||
if (dormRoom != null) {
|
||||
dormRoomGroup.put(dormRoom.getId(), Collections.singletonList(dormRoom));
|
||||
}
|
||||
}
|
||||
// 查询到了寝室信息
|
||||
if (Objects.nonNull(dormRoom)) {
|
||||
String dormRoomName = dormRoom.getDormName() +
|
||||
dormRoom.getFloor() + "层" +
|
||||
dormRoom.getName();
|
||||
o.setDormRoomName(dormRoomName);
|
||||
}
|
||||
StudentDormExportDTO exportDTO = new StudentDormExportDTO();
|
||||
BeanUtils.copyProperties(o, exportDTO);
|
||||
exportDTO.setDeptName(o.getClassName());
|
||||
return exportDTO;
|
||||
}
|
||||
}
|
||||
+5
-3
@@ -2,10 +2,13 @@ package com.yida.data.user.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduCourse;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.service.EduCourseService;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -32,14 +35,13 @@ public class EduCourseController {
|
||||
|
||||
@ApiOperation("根据学校查询课程")
|
||||
@GetMapping("/listCourse")
|
||||
@ControllerLog(operation = "按学校查询课程")
|
||||
public ResultBean<List<EduCourse>> listCourse(@ApiParam("学校id") @RequestParam Long schoolId) {
|
||||
return ResultBean.buildSuccess(eduCourseService.list(Wrappers.lambdaQuery(new EduCourse()).eq(EduCourse::getSchoolId, schoolId)));
|
||||
}
|
||||
|
||||
@ApiOperation("添加课程")
|
||||
@PostMapping("/saveCourse")
|
||||
@ControllerLog(operation = "添加课程")
|
||||
@OperationLog(module = ModuleName.COURSE, methods = "添加课程", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean saveCourse(@RequestBody EduCourse course) {
|
||||
Asserts.isNotNull(course.getCourseName(), "请输入科目名称");
|
||||
Asserts.isTrue(eduCourseService.count(Wrappers.<EduCourse>lambdaQuery()
|
||||
@@ -51,7 +53,7 @@ public class EduCourseController {
|
||||
|
||||
@ApiOperation("删除课程")
|
||||
@PostMapping("/delCourse")
|
||||
@ControllerLog(operation = "删除课程")
|
||||
@OperationLog(module = ModuleName.COURSE, methods = "删除课程", type = OperationLogTypeEnum.DELETE)
|
||||
public ResultBean delCourse(@RequestBody List<Long> ids) {
|
||||
eduCourseService.removeByIds(ids);
|
||||
return ResultBean.buildSuccess();
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.user.dto.StrategySaveDTO;
|
||||
import com.yida.data.user.service.EduFaceGroupStrategyService;
|
||||
import com.yida.data.user.vo.StrategyInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 人脸组-策略Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-12 11:04:39
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("eduFaceGroupStrategy")
|
||||
@Api(tags = "人脸组-策略api")
|
||||
public class EduFaceGroupStrategyController {
|
||||
|
||||
private final EduFaceGroupStrategyService eduFaceGroupStrategyService;
|
||||
|
||||
@GetMapping(value = "getStrategyInfo")
|
||||
@ApiOperation(value = "获取人脸组策略信息")
|
||||
public ResultBean<StrategyInfoVO> getStrategyInfo(@ApiParam(value = "人脸组id", required = true) @RequestParam Long faceGroupId) {
|
||||
return ResultBean.buildSuccess(eduFaceGroupStrategyService.getStrategyInfo(faceGroupId));
|
||||
}
|
||||
|
||||
@PostMapping(value = "saveStrategyInfo")
|
||||
@ApiOperation(value = "保存人脸组策略信息")
|
||||
public ResultBean<String> saveStrategyInfo(@RequestBody StrategySaveDTO strategySaveDTO) {
|
||||
eduFaceGroupStrategyService.saveStrategyInfo(strategySaveDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
+177
-63
@@ -5,18 +5,25 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.common.ResultMsgType;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.*;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.common.core.utils.FileUtil;
|
||||
import com.yida.data.common.core.utils.RedisUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.system.feign.RemoteDeptService;
|
||||
import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.dto.ManagerDTO;
|
||||
import com.yida.data.user.dto.PageTeacherDTO;
|
||||
import com.yida.data.user.mapper.EduTeacherDeptMapper;
|
||||
import com.yida.data.user.service.EduStaffDeptService;
|
||||
@@ -27,8 +34,13 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -58,7 +70,6 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("查询教师列表数据")
|
||||
@GetMapping("/listTeacherPage")
|
||||
@ControllerLog(operation = "分页查询教师列表")
|
||||
@PreAuthorize("hasAuthority('teacher:view')")
|
||||
public ResultBean<IPage<TeacherListVO>> listTeacherPage(PageTeacherDTO dto) {
|
||||
dto.setSchoolId(FebsUtil.getTopDeptId());
|
||||
@@ -68,17 +79,16 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("保存教师信息 新增或编辑")
|
||||
@PostMapping("/saveTeacher")
|
||||
@ControllerLog(operation = "新增、修改教师")
|
||||
@OperationLog(module = ModuleName.STAFF, methods = "新增、修改教师", type = OperationLogTypeEnum.SAVE)
|
||||
@PreAuthorize("hasAuthority('teacher:edit')")
|
||||
public ResultBean saveTeacher(@ApiParam("0-添加,1-编辑") @RequestParam("operation") Integer operation,
|
||||
@RequestBody EduStaff eduStaff) {
|
||||
@RequestBody EduStaff eduStaff) {
|
||||
eduStaffService.saveTeacher(operation, eduStaff);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("根据教师id查询教师详细信息")
|
||||
@GetMapping("/getTeacher")
|
||||
@ControllerLog(operation = "根据教师id查询教师详细信息")
|
||||
@PreAuthorize("hasAuthority('teacher:view')")
|
||||
public ResultBean<TeacherDetailVO> getTeacher(@ApiParam("教师Id") @RequestParam("teacherId") Long teacherId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.findTeacher(teacherId));
|
||||
@@ -92,6 +102,7 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("批量删除教师信息")
|
||||
@PostMapping("/delTeacherBatch")
|
||||
@OperationLog(module = ModuleName.STAFF, methods = "批量删除教师信息", type = OperationLogTypeEnum.DELETE)
|
||||
public ResultBean delTeacherBatch(@RequestBody List<Long> teacherIds) {
|
||||
eduStaffService.delTeacherBatch(teacherIds);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -99,7 +110,7 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("批量删除职工信息信息")
|
||||
@PostMapping("/delStaff")
|
||||
@ControllerLog(operation = "批量删除教师")
|
||||
@OperationLog(module = ModuleName.STAFF, methods = "批量删除职工信息信息", type = OperationLogTypeEnum.DELETE)
|
||||
@PreAuthorize("hasAuthority('staff:delete')")
|
||||
public ResultBean delTeacher(@RequestBody List<Long> staffIds) {
|
||||
eduStaffService.delStaffBatch(staffIds);
|
||||
@@ -108,7 +119,6 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("查询教师可见班级")
|
||||
@GetMapping("/listClassByTeacher")
|
||||
@ControllerLog(operation = "查询教师可见班级")
|
||||
@PreAuthorize("hasAuthority('teacher:view')")
|
||||
public ResultBean<List<TeacherClassVO>> listClassByTeacher(@ApiParam("教师id") @RequestParam Long teacherId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listClassByTeacher(teacherId));
|
||||
@@ -116,7 +126,6 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("查询教师可见班级和年级")
|
||||
@GetMapping("/listClassAndGradeByTeacher")
|
||||
@ControllerLog(operation = "查询教师可见班级和年级")
|
||||
@PreAuthorize("hasAuthority('teacher:view')")
|
||||
public ResultBean<List<TeacherClassAndGradeVO>> listClassAndGradeByTeacher(@ApiParam("教师id") @RequestParam Long teacherId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listClassAndGradeByTeacher(teacherId));
|
||||
@@ -134,14 +143,14 @@ public class EduStaffController {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
Long key = System.currentTimeMillis();
|
||||
Map<Object, Object> map = redisService
|
||||
.hmget(CachePrefixConstant.IMPORT_TEACHER_KEY + currentUser.getUsername());
|
||||
.hmget(CachePrefixConstant.IMPORT_TEACHER_KEY + currentUser.getUsername());
|
||||
if (CollUtil.size(map) >= 5) {
|
||||
throw new FebsException("导入文件已达上限,请稍后重试");
|
||||
}
|
||||
redisService.hset(CachePrefixConstant.IMPORT_TEACHER_KEY + currentUser.getUsername(), key.toString(), 0);
|
||||
redisService.hset(CachePrefixConstant.IMPORT_TEACHER_FILE + currentUser.getUsername(), key.toString(),
|
||||
file.getOriginalFilename());
|
||||
//eduStaffService.importTeacher(FileUtil.uploadMultipartFile(file), schoolId, currentUser, System.currentTimeMillis(), file.getName());
|
||||
file.getOriginalFilename());
|
||||
// eduStaffService.importTeacher(FileUtil.uploadMultipartFile(file), schoolId, currentUser, System.currentTimeMillis(), file.getName());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -152,37 +161,73 @@ public class EduStaffController {
|
||||
}
|
||||
|
||||
@ApiOperation("下载教师导入表格")
|
||||
@GetMapping("/downloadTemplate")
|
||||
@ControllerLog(operation = "下载教师导入表格")
|
||||
public void downloadTemplate(HttpServletResponse response, @ApiParam("模板类型,0-教师,1-职工") Integer type) {
|
||||
@PostMapping("/downloadTemplate")
|
||||
public void downloadTemplate(HttpServletResponse response,
|
||||
@ApiParam("模板类型,0-教师,1-职工") @RequestParam(required = false) Integer type) {
|
||||
eduStaffService.downloadTemplate(response, type);
|
||||
}
|
||||
|
||||
@ApiOperation("下载错误报告")
|
||||
@GetMapping("/downloadError")
|
||||
public void downloadError(HttpServletResponse response,
|
||||
@ApiParam("模板类型,0-教师,1-职工") Integer type,
|
||||
@ApiParam("通知id") Long noticeId) {
|
||||
@ApiParam("模板类型,0-教师,1-职工") Integer type,
|
||||
@ApiParam("通知id") Long noticeId) {
|
||||
eduStaffService.downloadError(response, type, noticeId);
|
||||
}
|
||||
|
||||
@ApiOperation("导入职工")
|
||||
@PostMapping("/importStaff")
|
||||
public ResultBean<Long> importStaff(MultipartFile file, @RequestParam("schoolId") Long schoolId) {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
Long key = System.currentTimeMillis();
|
||||
Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername());
|
||||
if (CollUtil.size(map) >= 5) {
|
||||
throw new FebsException("导入文件已达上限,请稍后重试");
|
||||
}
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STAFF_KEY + currentUser.getUsername(), key.toString(),
|
||||
0);
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername(), key.toString(),
|
||||
file.getOriginalFilename());
|
||||
eduStaffService.importStaff(FileUtil.uploadMultipartFile(file), schoolId, currentUser
|
||||
, key, file.getName());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
// @ApiOperation("导入职工信息")
|
||||
// @PostMapping("/importStaffInformation")
|
||||
// public ResultBean<Long> importStaffInformation(MultipartFile file, @RequestParam("schoolId") Long schoolId) {
|
||||
// CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
// Long key = System.currentTimeMillis();
|
||||
// Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername());
|
||||
// if (CollUtil.size(map) >= 5) {
|
||||
// throw new FebsException("导入文件已达上限,请稍后重试");
|
||||
// }
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_KEY + currentUser.getUsername(), key.toString(),
|
||||
// 0);
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername(), key.toString(),
|
||||
// file.getOriginalFilename());
|
||||
// eduStaffService.importStaff(FileUtil.uploadMultipartFile(file), schoolId, currentUser
|
||||
// , key, file.getName());
|
||||
// return ResultBean.buildSuccess();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("导入职工图片")
|
||||
// @PostMapping("/importStaffPic")
|
||||
// public ResultBean<Long> importStaffPic(MultipartFile file, @RequestParam("schoolId") Long schoolId) {
|
||||
// CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
// Long key = System.currentTimeMillis();
|
||||
// Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername());
|
||||
// if (CollUtil.size(map) >= 5) {
|
||||
// throw new FebsException("导入文件已达上限,请稍后重试");
|
||||
// }
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_KEY + currentUser.getUsername(), key.toString(),
|
||||
// 0);
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername(), key.toString(),
|
||||
// file.getOriginalFilename());
|
||||
// eduStaffService.importStaff(FileUtil.uploadMultipartFile(file), schoolId, currentUser
|
||||
// , key, file.getName());
|
||||
// return ResultBean.buildSuccess();
|
||||
// }
|
||||
|
||||
// @ApiOperation("导入职工")
|
||||
// @PostMapping("/importStaff")
|
||||
// public ResultBean<Long> importStaff(MultipartFile file, @RequestParam("schoolId") Long schoolId) {
|
||||
// CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
// Long key = System.currentTimeMillis();
|
||||
// Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername());
|
||||
// if (CollUtil.size(map) >= 5) {
|
||||
// throw new FebsException("导入文件已达上限,请稍后重试");
|
||||
// }
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_KEY + currentUser.getUsername(), key.toString(),
|
||||
// 0);
|
||||
// redisService.hset(CachePrefixConstant.IMPORT_STAFF_FILE + currentUser.getUsername(), key.toString(),
|
||||
// file.getOriginalFilename());
|
||||
// eduStaffService.importStaff(FileUtil.uploadMultipartFile(file), schoolId, currentUser
|
||||
// , key, file.getName());
|
||||
// return ResultBean.buildSuccess();
|
||||
// }
|
||||
|
||||
|
||||
@ApiOperation("职工导入信息进度")
|
||||
@@ -200,32 +245,33 @@ public class EduStaffController {
|
||||
@ApiOperation("分页查询职工列表数据")
|
||||
@GetMapping("/listStaffPage")
|
||||
public ResultBean<IPage<StaffPageVO>> listStaffPage(
|
||||
@ApiParam("区域id") Long areaId, @ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("部门id") Long deptId, @ApiParam("身份,0-普通成员,1-上级") Integer isLeader,
|
||||
@ApiParam("职务") String position, @ApiParam("姓名") String name,
|
||||
@ApiParam("电话") String mobile, @ApiParam("性别,0-男,1-女") Integer sex,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize,
|
||||
@ApiParam("人脸采集状态.0-未采集, 1-已采集") Integer collectType) {
|
||||
@ApiParam("区域id") Long areaId, @ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("部门id") Long deptId, @ApiParam("身份,0-普通成员,1-上级") Integer isLeader,
|
||||
@ApiParam("职务") String position, @ApiParam("姓名") String name,
|
||||
@ApiParam("电话") String mobile, @ApiParam("性别,0-男,1-女") Integer sex,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize,
|
||||
@ApiParam("人脸采集状态.0-未采集, 1-已采集") Integer collectType) {
|
||||
return ResultBean.buildSuccess(eduStaffService
|
||||
.listStaffPage(Page.of(pageNum, pageSize), FebsUtil.getCurrentUser(), areaId, schoolId, deptId, isLeader,
|
||||
position, name, mobile, sex, collectType));
|
||||
.listStaffPage(Page.of(pageNum, pageSize), FebsUtil.getCurrentUser(), areaId, schoolId, deptId, isLeader,
|
||||
position, name, mobile, sex, collectType));
|
||||
}
|
||||
|
||||
@ApiOperation("导出职工数据")
|
||||
@PostMapping("/exportStaff")
|
||||
public void exportStaff(
|
||||
@ApiParam("区域id") Long areaId, @ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("部门id") Long deptId, @ApiParam("身份,0-普通成员,1-上级") Integer isLeader,
|
||||
@ApiParam("职务") String position, @ApiParam("姓名") String name,
|
||||
@ApiParam("电话") String mobile, @ApiParam("性别,0-男,1-女") Integer sex,
|
||||
@ApiParam("人脸采集状态.0-未采集, 1-已采集") Integer collectType, HttpServletResponse response) {
|
||||
@ApiParam("区域id") Long areaId, @ApiParam("学校id") Long schoolId,
|
||||
@ApiParam("部门id") Long deptId, @ApiParam("身份,0-普通成员,1-上级") Integer isLeader,
|
||||
@ApiParam("职务") String position, @ApiParam("姓名") String name,
|
||||
@ApiParam("电话") String mobile, @ApiParam("性别,0-男,1-女") Integer sex,
|
||||
@ApiParam("人脸采集状态.0-未采集, 1-已采集") Integer collectType, HttpServletResponse response) {
|
||||
eduStaffService.exportStaff(areaId, schoolId, deptId, isLeader, position,
|
||||
name, mobile, sex, collectType, response);
|
||||
name, mobile, sex, collectType, response);
|
||||
}
|
||||
|
||||
@ApiOperation("添加、修改职工")
|
||||
@PostMapping("/saveStaff")
|
||||
@OperationLog(module = ModuleName.STAFF, methods = "添加、修改职工", type = OperationLogTypeEnum.SAVE)
|
||||
public ResultBean saveStaff(@RequestBody EduStaff staff) {
|
||||
//判断手机号是否存在
|
||||
int number = eduStaffService.checkTeacherTelephone(staff);
|
||||
@@ -238,15 +284,14 @@ public class EduStaffController {
|
||||
|
||||
@ApiOperation("根据教师id查询教师详情")
|
||||
@GetMapping("/findTeacherRole")
|
||||
public ResultBean<List<EduUserDept>> findTeacherRole(@RequestParam Long teacherId, @RequestParam Integer type) {
|
||||
|
||||
public ResultBean<List<TeacherDeptVO>> findTeacherRole(@RequestParam Long teacherId, @RequestParam Integer type) {
|
||||
return ResultBean.buildSuccess(eduStaffService.findTeacherRole(teacherId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询家长孩子关联的教师(班主任、任课老师)")
|
||||
@GetMapping("/listTeacherByParent")
|
||||
public ResultBean<List<EduStaff>> listTeacherByParent(@RequestParam("parentId") Long parentId,
|
||||
@RequestParam(value = "teacherName", required = false) String teacherName) {
|
||||
@RequestParam(value = "teacherName", required = false) String teacherName) {
|
||||
List<EduStudent> studentList = eduStudentService.listStudentByParent(parentId, null);
|
||||
List<Long> classIds = studentList.stream().map(x -> x.getClassId()).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(classIds)) {
|
||||
@@ -264,7 +309,7 @@ public class EduStaffController {
|
||||
@ApiModelProperty("查询教师列表")
|
||||
@GetMapping("/listTeacherBySchool")
|
||||
ResultBean<List<EduStaff>> listTeacherBySchool(@ApiParam("学校id") @RequestParam("schoolId") Long schoolId,
|
||||
@ApiParam("教师名称") @RequestParam("name") String name) {
|
||||
@ApiParam("教师名称") @RequestParam("name") String name) {
|
||||
if (schoolId == null) {
|
||||
schoolId = FebsUtil.getCurrentUser().getDeptId();
|
||||
}
|
||||
@@ -286,8 +331,8 @@ public class EduStaffController {
|
||||
@ApiOperation("查询教师可见课程")
|
||||
@GetMapping("/findTeacherCourseId")
|
||||
ResultBean<List<Long>> findTeacherCourseId(@RequestParam Long teacherId,
|
||||
@RequestParam Long schoolId,
|
||||
@RequestParam(required = false) Long classId) {
|
||||
@RequestParam Long schoolId,
|
||||
@RequestParam(required = false) Long classId) {
|
||||
if (ObjectUtils.isEmpty(classId)) {
|
||||
return ResultBean.buildSuccess(eduTeacherDeptMapper.selectCoursetList(null, schoolId, null));
|
||||
}
|
||||
@@ -309,15 +354,25 @@ public class EduStaffController {
|
||||
@ApiOperation("按年级或者班级查询教师任课信息")
|
||||
@GetMapping("/listTeacherCourseByGrade")
|
||||
ResultBean<List<TeacherCourseInfoVO>> listTeacherCourseByGrade(
|
||||
@ApiParam("年级id") @RequestParam(value = "gradeId", required = false) Long gradeId,
|
||||
@ApiParam("班级id") @RequestParam(value = "classId", required = false) Long classId) {
|
||||
@ApiParam("年级id") @RequestParam(value = "gradeId", required = false) Long gradeId,
|
||||
@ApiParam("班级id") @RequestParam(value = "classId", required = false) Long classId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listTeacherCourseByGrade(gradeId, classId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据年级ID查询教师管理的班级")
|
||||
@GetMapping("/listClassByGradeIdAndTeacherId")
|
||||
ResultBean<List<EduUserDept>> listClassByGradeIdAndTeacherId(
|
||||
@NotNull(message = "不能为空") @ApiParam("年级id") @RequestParam(value = "gradeId", required = true) Long gradeId,
|
||||
@NotNull(message = "不能为空") @ApiParam("教师id") @RequestParam(value = "staffId", required = true) Long staffId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listClassByGradeIdAndTeacherId(gradeId, staffId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据班级或名称查询教师")
|
||||
@GetMapping("/listTeacherByClassAndName")
|
||||
ResultBean<List<EduStaff>> listTeacherByClassAndName(@RequestParam("classId") Long classId,
|
||||
@RequestParam("name") String name) {
|
||||
@RequestParam("name") String name) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listTeacherByClassAndName(classId, name));
|
||||
}
|
||||
|
||||
@@ -325,8 +380,8 @@ public class EduStaffController {
|
||||
@ApiOperation("根据根据部门id查询对应教职工")
|
||||
@GetMapping("/listStaffByDeptId")
|
||||
public ResultBean<List<Long>> listStaffByDeptId(@RequestParam(required = false) Long deptId,
|
||||
@RequestParam(required = false) String nameOrPhone,
|
||||
@RequestParam(required = false) Long schoolId) {
|
||||
@RequestParam(required = false) String nameOrPhone,
|
||||
@RequestParam(required = false) Long schoolId) {
|
||||
|
||||
return ResultBean.buildSuccess(eduStaffService.listStaffByDeptId(deptId, nameOrPhone, schoolId));
|
||||
}
|
||||
@@ -352,7 +407,7 @@ public class EduStaffController {
|
||||
@GetMapping("/staStaffDistribute")
|
||||
public ResultBean<StaStaffDistributeVO> staStaffDistribute() {
|
||||
List<Long> schoolIds = remoteDeptService.getSchoolByArea(null, null).getData().stream().map(Dept::getDeptId).collect(
|
||||
Collectors.toList());
|
||||
Collectors.toList());
|
||||
return ResultBean.buildSuccess(eduStaffService.staStaffDistribute(schoolIds));
|
||||
}
|
||||
|
||||
@@ -360,7 +415,7 @@ public class EduStaffController {
|
||||
@GetMapping("/staStaffNum")
|
||||
public ResultBean<StaStaffDistributeVO> staStaffNum() {
|
||||
List<Long> schoolIds = remoteDeptService.getSchoolByArea(null, null).getData().stream().map(Dept::getDeptId).collect(
|
||||
Collectors.toList());
|
||||
Collectors.toList());
|
||||
return ResultBean.buildSuccess(eduStaffService.staStaffNum(schoolIds));
|
||||
}
|
||||
|
||||
@@ -371,9 +426,68 @@ public class EduStaffController {
|
||||
*/
|
||||
@ApiOperation("查询教师可见部门")
|
||||
@GetMapping("/listDeptByTeacher")
|
||||
@ControllerLog(operation = "查询教师可见部门")
|
||||
public ResultBean<List<TeacherClassVO>> listDeptByTeacher(@ApiParam("教师id") @RequestParam Long teacherId,
|
||||
@ApiParam("type") @RequestParam Integer type) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listDeptByTeacher(teacherId,type));
|
||||
@ApiParam("type") @RequestParam Integer type) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listDeptByTeacher(teacherId, type));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sysUserId 系统用户Id
|
||||
* @param type 1表示校区负责人,2表示年级负责人,3表示班主任,4表示任课老师,5表示学段负责人
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询系统用户可见部门")
|
||||
@GetMapping("/listDeptBySysUserId")
|
||||
public ResultBean<List<TeacherClassVO>> listDeptBySysUserId(@ApiParam("教师id") @RequestParam Long sysUserId,
|
||||
@ApiParam("type") @RequestParam Integer type) {
|
||||
EduStaff staff = eduStaffService.getOne(Wrappers.lambdaQuery(new EduStaff())
|
||||
.eq(EduStaff::getSysUserId, sysUserId)
|
||||
.eq(EduStaff::getSchoolId, FebsUtil.getTopDeptId()));
|
||||
return ResultBean.buildSuccess(eduStaffService.listDeptByTeacher(staff.getId(), type));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param teacherId 教师ID
|
||||
* @param type 1表示校区负责人,2表示年级负责人,3表示班主任,4表示任课老师,5表示学段负责人
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询教师可见部门")
|
||||
@GetMapping("/listDeptByStaffId")
|
||||
public ResultBean<List<TeacherClassVO>> listDeptByStaffId(@ApiParam("教师id") @RequestParam Long teacherId,
|
||||
@ApiParam("type") @RequestParam Integer type) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listDeptByTeacher(teacherId, type));
|
||||
}
|
||||
|
||||
@ApiOperation("根据职工id集合查询职工信息")
|
||||
@PostMapping("/getStaffList")
|
||||
public ResultBean<List<EduStaff>> listDeptByStaffId(@RequestBody List<Long> staffIds) {
|
||||
return ResultBean.buildSuccess(eduStaffService.list(Wrappers.lambdaQuery(new EduStaff()).in(EduStaff::getId, staffIds)));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导入职工数据-新版")
|
||||
@PostMapping(value = "/importStaffDataExcel")
|
||||
public ResultBean<ConcurrentHashMap<Integer, Object>> importStaffDataExcel(
|
||||
@ApiParam(value = "导入的excel文件", required = true) @RequestParam("file") MultipartFile file,
|
||||
@ApiParam(value = "学校id", required = true) @RequestParam("schoolId") Long schoolId) {
|
||||
// 当前时间时间戳
|
||||
long timestamp = System.currentTimeMillis();
|
||||
try {
|
||||
// 导入迎新学生数据
|
||||
return eduStaffService.importStaff(file, schoolId, timestamp);
|
||||
} catch (Exception e) {
|
||||
log.error("导入迎新学生数据失败: {}", e.getMessage(), e);
|
||||
return ResultBean.buildError(ResultMsgType.IMPORT_EXCEL_FAIL.getValue());
|
||||
} finally {
|
||||
// 清空当前导入的redis学校数据
|
||||
redisService.del(RedisUtil.getDeptKey(String.valueOf(timestamp)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询dept负责人")
|
||||
@PostMapping("/getDeptManager")
|
||||
public ResultBean<List<DeptManagetVO>> getDeptManager(@RequestBody ManagerDTO dto) {
|
||||
return ResultBean.buildSuccess(eduStaffService.getDeptManager(dto.getDeptIdList(), dto.getRuleId()));
|
||||
}
|
||||
}
|
||||
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.dto.ListStudentApplyDTO;
|
||||
import com.yida.data.user.service.EduStudentApplyService;
|
||||
import com.yida.data.user.vo.StudentApplyImportProgressVO;
|
||||
import com.yida.data.user.vo.StudentApplyStatusVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Api(tags = "交易-学生应用关系")
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/transaction/studentApply")
|
||||
@RestController
|
||||
public class EduStudentApplyController {
|
||||
|
||||
private final EduStudentApplyService eduStudentApplyService;
|
||||
|
||||
private final RedisService redisService;
|
||||
|
||||
@ApiOperation("分页查询学生开通应用")
|
||||
@GetMapping("/listStudentApply")
|
||||
public ResultBean<IPage<EduStudentApply>> listApply(ListStudentApplyDTO dto) {
|
||||
Page<EduStudentApply> page = new Page<>();
|
||||
page.setCurrent(dto.getPageNum());
|
||||
page.setSize(dto.getPageSize());
|
||||
return ResultBean.buildSuccess(eduStudentApplyService.listStudentApply(dto, page));
|
||||
}
|
||||
|
||||
@ApiOperation("获取开通应用详情")
|
||||
@GetMapping("/getStudentApply")
|
||||
public ResultBean<EduStudentApply> getStudentApply(@ApiParam("主键ID") Long id) {
|
||||
return ResultBean.buildSuccess(eduStudentApplyService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("获取开通应用详情")
|
||||
@GetMapping("/getStudentApplyByIdAndCode")
|
||||
public ResultBean<EduStudentApply> getStudentApplyByIdAndCode(
|
||||
@RequestParam("studentId") Long studentId,
|
||||
@RequestParam("applyCode") String applyCode) {
|
||||
List<EduStudentApply> list = eduStudentApplyService.list(Wrappers.lambdaQuery(new EduStudentApply())
|
||||
.eq(EduStudentApply::getStudentId, studentId)
|
||||
.eq(EduStudentApply::getApplyCode, applyCode)
|
||||
.ge(EduStudentApply::getEndTime, LocalDateTime.now())
|
||||
.le(EduStudentApply::getStartTime, LocalDateTime.now())
|
||||
.orderByDesc(EduStudentApply::getEndTime)
|
||||
);
|
||||
EduStudentApply eduStudentApply = null;
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
eduStudentApply = list.get(0);
|
||||
}
|
||||
return ResultBean.buildSuccess(eduStudentApply);
|
||||
}
|
||||
|
||||
@ApiOperation("删除开通应用")
|
||||
@GetMapping("/deleteStudentApply")
|
||||
@OperationLog(module = ModuleName.TRANSATION, methods = "删除学生开通应用", type = OperationLogTypeEnum.DELETE)
|
||||
public ResultBean deleteStudentApply(@ApiParam("主键ID") Long id) {
|
||||
eduStudentApplyService.update(Wrappers.lambdaUpdate(new EduStudentApply())
|
||||
.eq(EduStudentApply::getId, id)
|
||||
.set(EduStudentApply::getDelFlag, 1));
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("保存学生开通应用")
|
||||
@PostMapping("/saveStudentApply")
|
||||
@OperationLog(module = ModuleName.TRANSATION, methods = "保存学生开通应用", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean insertApply(@ApiParam("开通应用") @RequestBody EduStudentApply eduStudentApply) {
|
||||
eduStudentApplyService.saveStudentApply(eduStudentApply);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询学生是否拥有该应用权限")
|
||||
@GetMapping("/hasApply")
|
||||
public ResultBean<Boolean> listApplyCode(@ApiParam("学生id") Long studentId,
|
||||
@ApiParam("应用编码") String applyCode) {
|
||||
return ResultBean.buildSuccess(eduStudentApplyService.count(Wrappers.lambdaQuery(new EduStudentApply())
|
||||
.eq(EduStudentApply::getStudentId, studentId)
|
||||
.eq(EduStudentApply::getApplyCode, applyCode)
|
||||
.ge(EduStudentApply::getEndTime, LocalDateTime.now())
|
||||
.le(EduStudentApply::getStartTime, LocalDateTime.now())) > 0);
|
||||
}
|
||||
|
||||
@ApiOperation("查询学生的应用状态")
|
||||
@GetMapping("/getApplyStatus")
|
||||
public ResultBean<StudentApplyStatusVO> getApplyStatus(@ApiParam("学生id") Long studentId,
|
||||
@ApiParam("应用编码") String applyCode) {
|
||||
return ResultBean.buildSuccess(eduStudentApplyService.getStudentApplyStatus(studentId, applyCode));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("下载学生开通应用导入模板")
|
||||
@PostMapping("/downloadTemplate")
|
||||
public void downloadTemplate(HttpServletResponse response) throws Exception {
|
||||
eduStudentApplyService.downloadTemplate(response);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导入学生开通应用信息")
|
||||
@PostMapping("/importStudentApplyInfo")
|
||||
public ResultBean<StudentApplyImportProgressVO> importStudentApplyInfo(@RequestParam(value = "file") MultipartFile file)
|
||||
throws Exception {
|
||||
String redisKey = UUID.randomUUID().toString();
|
||||
StudentApplyImportProgressVO progressVO = new StudentApplyImportProgressVO();
|
||||
progressVO.setRedisKey(redisKey);
|
||||
progressVO.setFinish(0);
|
||||
progressVO.setTotalNum(0);
|
||||
progressVO.setCurrentNum(0);
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_APPLY_PROGRESS, redisKey, progressVO);
|
||||
eduStudentApplyService.importStudentApplyInfo(file, redisKey);
|
||||
return ResultBean.buildSuccess(progressVO);
|
||||
}
|
||||
|
||||
@ApiOperation("获取导入学生开通应用信息进度")
|
||||
@GetMapping("/getImportStudentApplyInfoProgress")
|
||||
public ResultBean<StudentApplyImportProgressVO> getImportStudentApplyInfoProgress(@RequestParam("redisKey") String redisKey) {
|
||||
return ResultBean.buildSuccess(eduStudentApplyService.getImportStudentApplyInfoProgress(redisKey));
|
||||
}
|
||||
|
||||
@ApiOperation("删除缓存导入进度")
|
||||
@GetMapping("/deleteRedisStudentApplyImportProgress")
|
||||
public ResultBean deleteRedisStudentApplyImportProgress(@RequestParam("redisKey") String redisKey) {
|
||||
redisService.hdel(CachePrefixConstant.IMPORT_STUDENT_APPLY_PROGRESS, redisKey);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApplyFor;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.dto.ListStudentApplyDTO;
|
||||
import com.yida.data.user.dto.ListStudentApplyForDTO;
|
||||
import com.yida.data.user.service.EduStudentApplyForService;
|
||||
import com.yida.data.user.service.EduStudentApplyService;
|
||||
import com.yida.data.user.vo.StudentApplyImportProgressVO;
|
||||
import com.yida.data.user.vo.StudentApplyStatusVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Api(tags = "交易-学生应用关系")
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/transaction/studentApplyFor")
|
||||
@RestController
|
||||
public class EduStudentApplyForController {
|
||||
|
||||
private final EduStudentApplyForService eduStudentApplyForService;
|
||||
|
||||
private final RedisService redisService;
|
||||
|
||||
@ApiOperation("分页查询申请学生开通应用")
|
||||
@GetMapping("/listStudentApplyFor")
|
||||
public ResultBean<IPage<EduStudentApplyFor>> listApply(ListStudentApplyForDTO dto) {
|
||||
Page<EduStudentApplyFor> page = new Page<>();
|
||||
page.setCurrent(dto.getPageNum());
|
||||
page.setSize(dto.getPageSize());
|
||||
return ResultBean.buildSuccess(eduStudentApplyForService.listStudentApplyFor(dto, page));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询申请详情")
|
||||
@GetMapping("/getStudentApplyFor")
|
||||
public ResultBean<EduStudentApplyFor> getStudentApplyFor(@RequestParam("studentId") Long studentId,
|
||||
@RequestParam("applyCode") String applyCode) {
|
||||
return ResultBean.buildSuccess(eduStudentApplyForService.getByStudentId(studentId, applyCode));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("学生申请开通应用")
|
||||
@GetMapping("/saveStudentApplyFor")
|
||||
@OperationLog(module = ModuleName.STUDENT, methods = "学生申请开通应用", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean insertApplyFor(@RequestParam("studentId") Long studentId, @RequestParam("applyCode") String applyCode) {
|
||||
EduStudentApplyFor eduStudentApplyFor = new EduStudentApplyFor();
|
||||
eduStudentApplyFor.setStudentId(studentId);
|
||||
eduStudentApplyFor.setApplyCode(applyCode);
|
||||
eduStudentApplyForService.saveStudentApplyFor(eduStudentApplyFor);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("处理申请")
|
||||
@GetMapping("/dealApplyFor")
|
||||
@OperationLog(module = ModuleName.STUDENT, methods = "处理申请", type = OperationLogTypeEnum.UPDATE)
|
||||
public ResultBean dealApplyFor(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
|
||||
eduStudentApplyForService.dealApplyFor(id, status);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
+87
-31
@@ -3,19 +3,23 @@ package com.yida.data.user.controller;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.enums.DeptTypeEnum;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.common.core.enums.FileDealStatusEnum;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.file.common.export.ExportExcelData;
|
||||
import com.yida.data.common.core.file.common.export.ExportLargeData;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.common.core.utils.FileUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
@@ -26,11 +30,7 @@ import com.yida.data.user.dto.PageStudentDTO;
|
||||
import com.yida.data.user.service.EduParentService;
|
||||
import com.yida.data.user.service.EduStaffService;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import com.yida.data.user.vo.DownLoadPicVO;
|
||||
import com.yida.data.user.vo.ListParentByStudentIdsVO;
|
||||
import com.yida.data.user.vo.ParentInfoVO;
|
||||
import com.yida.data.user.vo.StaStudentVO;
|
||||
import com.yida.data.user.vo.StudentClassInfoVO;
|
||||
import com.yida.data.user.vo.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@@ -65,28 +65,24 @@ public class EduStudentController {
|
||||
private final RedisService redisService;
|
||||
|
||||
@ApiOperation("家长查询拥有的学生")
|
||||
@OperationLog(module = ModuleName.USER, methods = "家长查询拥有的学生")
|
||||
@GetMapping("/listStudentByParent")
|
||||
@ControllerLog(operation = "查询家长拥有的学生")
|
||||
public ResultBean<List<EduStudent>> listStudentByParent(@ApiParam("家长id") @RequestParam Long parentId,
|
||||
@ApiParam("应用编码") @RequestParam(required = false) String applyCode) {
|
||||
@ApiParam("应用编码") @RequestParam(required = false) String applyCode) {
|
||||
return ResultBean.buildSuccess(parentId != null ? eduStudentService.listStudentByParent(parentId, applyCode)
|
||||
: new ArrayList<>());
|
||||
: new ArrayList<>());
|
||||
}
|
||||
|
||||
@ApiOperation("查询学生列表数据")
|
||||
@GetMapping("/listStudentPage")
|
||||
@ControllerLog(operation = "分页查询学生列表")
|
||||
@PreAuthorize("hasAuthority('student:view')")
|
||||
public ResultBean<IPage<EduStudent>> listStudentPage(PageStudentDTO dto) {
|
||||
dto.setSchoolId(FebsUtil.getTopDeptId());
|
||||
IPage<EduStudent> list = eduStudentService.findStudentPage(dto);
|
||||
return ResultBean.buildSuccess(list);
|
||||
}
|
||||
|
||||
@ApiOperation("保存学生信息 新增或编辑")
|
||||
@PostMapping("/saveStudent")
|
||||
@ControllerLog(operation = "新增、修改学生")
|
||||
@OperationLog(module = ModuleName.STUDENT, methods = "新增、修改学生", type = OperationLogTypeEnum.SAVE)
|
||||
@PreAuthorize("hasAuthority('student:edit')")
|
||||
public ResultBean saveStudent(@RequestBody EduStudent eduStudent) {
|
||||
eduStudentService.saveStudent(eduStudent, FebsUtil.getCurrentUser(), false);
|
||||
@@ -95,7 +91,6 @@ public class EduStudentController {
|
||||
|
||||
@ApiOperation("根据学生id查询学生详情")
|
||||
@GetMapping("/getStudent")
|
||||
@ControllerLog(operation = "按id查询学生详情")
|
||||
public ResultBean<EduStudent> getStudent(@ApiParam("学生id") @RequestParam("id") Long id) {
|
||||
EduStudent eduStudent = eduStudentService.getStudent(id);
|
||||
return ResultBean.buildSuccess(eduStudent);
|
||||
@@ -103,9 +98,9 @@ public class EduStudentController {
|
||||
|
||||
@ApiOperation("批量删除学生")
|
||||
@PostMapping("/delStudentBatch")
|
||||
@ControllerLog(operation = "批量删除学生")
|
||||
@OperationLog(module = ModuleName.STUDENT, methods = "批量删除学生", type = OperationLogTypeEnum.DELETE)
|
||||
@PreAuthorize("hasAuthority('student:delete')")
|
||||
public ResultBean delTeacherBatchIds(@RequestBody List<Long> ids) {
|
||||
public ResultBean delStudentBatch(@RequestBody List<Long> ids) {
|
||||
//批量删除学生信息
|
||||
eduStudentService.delStudentBatchIds(ids, false);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -113,9 +108,8 @@ public class EduStudentController {
|
||||
|
||||
@ApiOperation("导入学生(压缩包导入)")
|
||||
@PostMapping("/import")
|
||||
@ControllerLog(operation = "导入学生")
|
||||
public ResultBean importStudent(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam("schoolId") Long schoolId) {
|
||||
@RequestParam("schoolId") Long schoolId) {
|
||||
long key = System.currentTimeMillis();
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STUDENT_KEY + currentUser.getUsername());
|
||||
@@ -124,9 +118,9 @@ public class EduStudentController {
|
||||
}
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_KEY + currentUser.getUsername(), Long.toString(key), 0);
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_FILE + currentUser.getUsername(), Long.toString(key),
|
||||
file.getOriginalFilename());
|
||||
file.getOriginalFilename());
|
||||
eduStudentService.importStudent(FileUtil.uploadMultipartFile(file), currentUser,
|
||||
schoolId, System.currentTimeMillis(), file.getName());
|
||||
schoolId, System.currentTimeMillis(), file.getName());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -148,17 +142,38 @@ public class EduStudentController {
|
||||
eduStudentService.downloadTemplate(response, FebsUtil.getCurrentUser());
|
||||
}
|
||||
|
||||
@ApiOperation("校园卡号导入")
|
||||
@PostMapping("/importCard")
|
||||
public ResultBean<String> importCard(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam("schoolId") Long schoolId) {
|
||||
long key = System.currentTimeMillis();
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
Map<Object, Object> map = redisService.hmget(CachePrefixConstant.IMPORT_STUDENT_CARD_NUMBER_KEY +
|
||||
currentUser.getUsername());
|
||||
if (CollUtil.size(map) >= 5) {
|
||||
throw new FebsException("上传文件已达最大值,请稍后重试");
|
||||
}
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_CARD_NUMBER_KEY + currentUser.getUsername(), Long.toString(key), 0);
|
||||
eduStudentService.importCard(FileUtil.uploadMultipartFile(file), currentUser,
|
||||
schoolId, System.currentTimeMillis(), file.getName());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("下载导入模板(校园卡号)")
|
||||
@GetMapping("/downloadCardTemplate")
|
||||
public void downloadCardTemplate(HttpServletResponse response) {
|
||||
eduStudentService.downloadCardTemplate(response, FebsUtil.getCurrentUser());
|
||||
}
|
||||
|
||||
@ApiOperation("统计班上学生数量")
|
||||
@GetMapping("/countStudentNum")
|
||||
@ControllerLog(operation = "统计班级学生数量")
|
||||
public ResultBean countStudentNum(@ApiParam("班级id") Long classId) {
|
||||
return ResultBean.buildSuccess(
|
||||
eduStudentService.count(Wrappers.lambdaQuery(new EduStudent()).eq(EduStudent::getClassId, classId)));
|
||||
eduStudentService.count(Wrappers.lambdaQuery(new EduStudent()).eq(EduStudent::getClassId, classId)));
|
||||
}
|
||||
|
||||
@ApiOperation("根据企业微信通讯录初始化学生")
|
||||
@PostMapping("/initStudent")
|
||||
@ControllerLog(operation = "根据企业微信通讯录初始化学生")
|
||||
@PreAuthorize("hasAuthority('student:edit')")
|
||||
public ResultBean initStudent(@RequestBody List<EduStudent> student) {
|
||||
eduStudentService.initStudent(student);
|
||||
@@ -168,18 +183,18 @@ public class EduStudentController {
|
||||
@ApiOperation("查询学生班级信息")
|
||||
@GetMapping("/getClassInfoByStudent")
|
||||
public ResultBean<StudentClassInfoVO> getClassInfoByStudent(@ApiParam("学生id") Long studentId,
|
||||
@ApiParam("家长手机号") String parentMobile) {
|
||||
@ApiParam("家长手机号") String parentMobile) {
|
||||
return ResultBean.buildSuccess(eduStudentService.getClassInfoByStudent(studentId, parentMobile));
|
||||
}
|
||||
|
||||
@ApiOperation("根据教师查询家长列表")
|
||||
@GetMapping("/listParentByTeacher")
|
||||
public ResultBean listParentByTeacher(@ApiParam("教师id") Long teacherId,
|
||||
@ApiParam("家长名称") String parentName) {
|
||||
@ApiParam("家长名称") String parentName) {
|
||||
List<EduTeacherDept> teacherRole = eduStaffService.listTeacherDept(teacherId);
|
||||
if (CollUtil.isNotEmpty(teacherRole)) {
|
||||
List<Long> classIds = teacherRole.stream().map(EduTeacherDept::getClassId).filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
.collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(classIds)) {
|
||||
List<ParentInfoVO> parentInfoVOList = eduParentService.listParentByClass(classIds, parentName);
|
||||
return ResultBean.buildSuccess(parentInfoVOList);
|
||||
@@ -219,16 +234,35 @@ public class EduStudentController {
|
||||
|
||||
@ApiOperation("导出学生数据")
|
||||
@PostMapping("/exportStudent")
|
||||
public void exportStudent(@RequestBody PageStudentDTO dto, HttpServletResponse response) {
|
||||
eduStudentService.exportStudent(dto, response);
|
||||
public ResultBean<ExportExcelData> exportStudent(@RequestBody PageStudentDTO dto) {
|
||||
|
||||
String key = IdUtil.simpleUUID();
|
||||
ExportExcelData vo = ExportExcelData.builder()
|
||||
.key(key)
|
||||
.exportStatus(FileDealStatusEnum.DEALING.getStatus())
|
||||
// 初始化数据
|
||||
.total(1)
|
||||
.finish(0)
|
||||
.build();
|
||||
|
||||
redisService.hset(CachePrefixConstant.EXPORT_STUDENT_DATA, key, vo);
|
||||
// 异步导出学生数据
|
||||
eduStudentService.exportStudent(dto, key);
|
||||
return ResultBean.buildSuccess(vo);
|
||||
}
|
||||
|
||||
@ApiOperation("查询导出学生详情")
|
||||
@GetMapping("/getStudentExportInfo")
|
||||
public ResultBean<Object> getExportRosterPicInfo(@RequestParam String key) {
|
||||
return ResultBean.buildSuccess(eduStudentService.getStudentExportInfo(key));
|
||||
}
|
||||
|
||||
@ApiOperation("解除学生与宿舍的绑定")
|
||||
@PostMapping("/unbindDormRoom")
|
||||
public ResultBean unbindDormRoom(@RequestBody List<Long> dormIds) {
|
||||
eduStudentService.update(Wrappers.<EduStudent>lambdaUpdate()
|
||||
.in(EduStudent::getDormRoomId, dormIds)
|
||||
.set(EduStudent::getDormRoomId, null));
|
||||
.in(EduStudent::getDormRoomId, dormIds)
|
||||
.set(EduStudent::getDormRoomId, null));
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -236,7 +270,7 @@ public class EduStudentController {
|
||||
@PostMapping("/staStudentDistribu")
|
||||
public ResultBean<StaStudentVO> staStudentDistribu() {
|
||||
List<Long> schoolIds = remoteDeptService.getSchoolByArea(null, null).getData().stream().map(Dept::getDeptId).collect(
|
||||
Collectors.toList());
|
||||
Collectors.toList());
|
||||
return ResultBean.buildSuccess(eduStudentService.staStudentDistribu(schoolIds));
|
||||
}
|
||||
|
||||
@@ -255,5 +289,27 @@ public class EduStudentController {
|
||||
return ResultBean.buildSuccess(dto);
|
||||
}
|
||||
|
||||
@ApiOperation("批量导入学生类型")
|
||||
@PostMapping("/importStudentUpdateType")
|
||||
public ResultBean importStudentUpdateType(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam("schoolId") Long schoolId) {
|
||||
eduStudentService.importStudentUpdateType(file, schoolId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("批量导入学生类型:导入进度")
|
||||
@GetMapping("/importStudentDormPercent")
|
||||
public ResultBean importStudenrTypePercent() {
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
return ResultBean.buildSuccess(redisService.hget(CachePrefixConstant.IMPORT_STUDENT_TYPE,
|
||||
currentUser.getUserId().toString()));
|
||||
}
|
||||
|
||||
@ApiOperation("根据班级ID查询学生")
|
||||
@GetMapping("/listStudentByClassId")
|
||||
public ResultBean<List<EduStudent>> listStudentByClassId(
|
||||
@ApiParam(required = true, value = "班级ID") @RequestParam Long classId) {
|
||||
List<EduStudent> studentList = eduStudentService.listStudentByClassId(ListStudentDTO.builder().classId(classId).build());
|
||||
return ResultBean.buildSuccess(studentList);
|
||||
}
|
||||
}
|
||||
|
||||
+30
-5
@@ -1,12 +1,15 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.enums.FileDealStatusEnum;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.file.common.export.ExportExcelData;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.common.core.utils.ExcelUtil;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
@@ -14,6 +17,7 @@ import com.yida.data.common.core.utils.FileUtil;
|
||||
import com.yida.data.common.core.vo.ImportPercentVO;
|
||||
import com.yida.data.user.dto.ExchangeDormDTO;
|
||||
import com.yida.data.user.dto.ImportStudentDormDTO;
|
||||
import com.yida.data.user.dto.PageStudentDTO;
|
||||
import com.yida.data.user.dto.PageStudentDormDTO;
|
||||
import com.yida.data.user.service.EduStudentDormService;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
@@ -26,11 +30,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Api(tags = "学生住宿管理")
|
||||
@@ -119,4 +119,29 @@ public class EduStudentDormController {
|
||||
throw new FebsException("下载住宿学生导入模板失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("导出宿舍数据")
|
||||
@PostMapping("/exportStudentDorm")
|
||||
public ResultBean<ExportExcelData> exportStudentDorm(@RequestBody PageStudentDormDTO dto) {
|
||||
|
||||
String key = IdUtil.simpleUUID();
|
||||
ExportExcelData vo = ExportExcelData.builder()
|
||||
.key(key)
|
||||
.exportStatus(FileDealStatusEnum.DEALING.getStatus())
|
||||
// 初始化数据
|
||||
.total(1)
|
||||
.finish(0)
|
||||
.build();
|
||||
|
||||
redisService.hset(CachePrefixConstant.EXPORT_STUDENT_DORM_DATA, key, vo);
|
||||
// 异步导出宿舍数据
|
||||
eduStudentDormService.exportStudentDorm(dto, key);
|
||||
return ResultBean.buildSuccess(vo);
|
||||
}
|
||||
|
||||
@ApiOperation("查询导出学生宿舍详情")
|
||||
@GetMapping("/getStudentDormExportInfo")
|
||||
public ResultBean<Object> getStudentDormExportInfo(@RequestParam String key) {
|
||||
return ResultBean.buildSuccess(eduStudentDormService.getStudentDormExportInfo(key));
|
||||
}
|
||||
}
|
||||
|
||||
+37
-20
@@ -7,6 +7,7 @@ import com.yida.data.common.core.entity.QueryRequest;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduCollectData;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.common.core.entity.user.EduUserDeptStandardGrade;
|
||||
import com.yida.data.common.core.entity.user.enums.SectionTypeEnum;
|
||||
@@ -14,12 +15,17 @@ import com.yida.data.common.core.enums.IncludeTypeEnum;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.system.vo.ClassInfoVO;
|
||||
import com.yida.data.user.dto.*;
|
||||
import com.yida.data.user.dto.h5.ListUserDeptAttendanceDTO;
|
||||
import com.yida.data.user.service.EduUserDeptService;
|
||||
import com.yida.data.user.vo.AllDeptInfoVO;
|
||||
import com.yida.data.user.vo.ClassAttendanceDataVO;
|
||||
import com.yida.data.user.vo.CollectDataVO;
|
||||
import com.yida.data.user.vo.TeacherDeptVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.MediaType;
|
||||
@@ -54,7 +60,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("查询父级家校部门")
|
||||
@GetMapping("/getParent")
|
||||
@OperationLog(module = ModuleName.USER, methods = "查询父级家校部门")
|
||||
public ResultBean<EduUserDept> getParent(@ApiParam("家校部门id") @RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getById(this.eduUserDeptService.getById(deptId).getParentId()));
|
||||
}
|
||||
@@ -69,7 +74,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("查询所有子节点")
|
||||
@GetMapping("/findListByParent")
|
||||
@OperationLog(module = ModuleName.USER, methods = "查询所有子节点")
|
||||
public ResultBean<List<EduUserDept>> findListByParent(@ApiParam("家校部门id") @RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.findListByParent(Collections.singletonList(deptId)));
|
||||
}
|
||||
@@ -84,7 +88,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("查询直接子节点")
|
||||
@GetMapping("/findChildByParent")
|
||||
@OperationLog(module = ModuleName.USER, methods = "查询子节点")
|
||||
public ResultBean<List<EduUserDept>> findChildByParent(@ApiParam("家校部门父节点id,不能为空") @RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.findChildByParent(deptId));
|
||||
}
|
||||
@@ -92,7 +95,7 @@ public class EduUserDeptController {
|
||||
/**
|
||||
* 向下查询指定家校部门类型的家校部门数据(可查询非直接子家校部门)
|
||||
*
|
||||
* @param parentId 父节点id
|
||||
* @param parentId 父节点id schoolId 为 负数
|
||||
* @param type 子节点类型, 1表示班级,2表示年级,3表示学段,4表示校区, 默认所有直接子节点
|
||||
* @return com.yida.data.common.core.common.ResultBean<java.util.List < com.yida.data.common.core.entity.user.EduUserDept>>
|
||||
* @author ZYJ
|
||||
@@ -100,20 +103,34 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("向下查询指定家校部门类型的家校部门数据(可查询非直接子家校部门)")
|
||||
@GetMapping("/findChildByParentAndType")
|
||||
@OperationLog(module = ModuleName.USER, methods = "向下查询到要查询的家校部门类别的子家校部门")
|
||||
public ResultBean<List<EduUserDept>> findChildByParentAndType(@ApiParam("父节点id,不能为空") @RequestParam Long parentId,
|
||||
@ApiParam("子节点类型, 1表示班级,2表示年级,3表示学段,4表示校区, 默认所有直接子节点") Integer type) {
|
||||
return ResultBean
|
||||
.buildSuccess(this.eduUserDeptService.findChildByParentAndType(Collections.singletonList(parentId), type));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据用户ID查询可见班级采集数据统计")
|
||||
@GetMapping("/findClassChildByParent")
|
||||
@OperationLog(module = ModuleName.USER, methods = "根据用户ID查询可见班级采集数据统计")
|
||||
public ResultBean<List<CollectDataVO>> findVisibleClassByUserId(@ApiParam("用户主键ID") @RequestParam Long staffId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.findVisibleClassByUserId(staffId));
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询可见班级考勤统计数据")
|
||||
@PostMapping("/findClassAttendanceByUserId")
|
||||
public ResultBean<List<ClassAttendanceDataVO>> findClassAttendanceByUserId(@RequestBody ListUserDeptAttendanceDTO dto) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService
|
||||
.findClassAttendanceByUserId(dto.getStaffId(), dto.getDate()));
|
||||
}
|
||||
|
||||
@ApiOperation("查询班级详细宿舍考勤数据")
|
||||
@PostMapping("/findClassAttendanceDetailByDeptId")
|
||||
public ResultBean<List<Object>> findClassAttendanceDetailByDeptId(@RequestBody ListUserDeptAttendanceDTO dto) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService
|
||||
.findClassAttendanceDetailByDeptId(dto.getDeptId(), dto.getType(), dto.getDate()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据家校部门id查询所属学校
|
||||
*
|
||||
@@ -124,7 +141,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("根据家校部门id查询所属学校")
|
||||
@GetMapping("findSchoolByDept")
|
||||
@OperationLog(module = ModuleName.USER, methods = "根据家校部门id查询所属学校")
|
||||
public ResultBean<Dept> findSchoolByDept(@ApiParam("父节点id,不能为空") @RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.findSchoolByDept(deptId));
|
||||
}
|
||||
@@ -141,7 +157,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("查询家校部门")
|
||||
@GetMapping("/userDeptList")
|
||||
@OperationLog(module = ModuleName.USER, methods = "查询家校部门")
|
||||
public FebsResponse userDeptList(QueryRequest request, EduUserDept dept,
|
||||
@ApiParam("是否包含班级. 0:包含, 1:不包含.不传默认查询全部") String includeType) {
|
||||
Map<String, Object> deptList = this.eduUserDeptService.findDeptList(request, dept, includeType);
|
||||
@@ -158,7 +173,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("根据id查询家校部门")
|
||||
@GetMapping("/getInfoById")
|
||||
@OperationLog(module = ModuleName.USER, methods = "根据id查询家校部门")
|
||||
public ResultBean<EduUserDept> getInfoById(@ApiParam("家校部门id") @RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getById(deptId));
|
||||
}
|
||||
@@ -173,7 +187,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("家校部门树(若当前登陆角色是学校负责人则不用传递参数)")
|
||||
@GetMapping("/getUserDeptTree")
|
||||
@OperationLog(module = ModuleName.USER, methods = "家校部门树")
|
||||
public ResultBean<List> getUserDeptTree(@ApiParam("根节点Id") Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getUserDeptTree(deptId));
|
||||
}
|
||||
@@ -193,7 +206,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("根据各层名称查询班级信息")
|
||||
@GetMapping("/findClassInfoByName")
|
||||
@OperationLog(module = ModuleName.USER, methods = "根据各层名称查询班级信息")
|
||||
public ResultBean<Map<String, EduUserDept>> findClassInfoByName(
|
||||
Long schoolId, String campusName, String sectionName,
|
||||
String gradeName, String className) {
|
||||
@@ -211,7 +223,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation("查询班级信息")
|
||||
@GetMapping("/getClassInfo")
|
||||
@OperationLog(module = ModuleName.USER, methods = "查询班级信息")
|
||||
public ResultBean<ClassInfoVO> getClassInfo(Long classId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getClassInfo(classId));
|
||||
}
|
||||
@@ -226,7 +237,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "新增学区信息(包含学段、年级和班级)", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = "addCampus", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@OperationLog(module = ModuleName.USER, methods = "新增学区信息(包含学段、年级和班级)", type = OperationLogTypeEnum.INSERT)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "新增学区信息(包含学段、年级和班级)", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean<String> addCampus(@RequestBody SaveCampusDTO saveCampusDTO) {
|
||||
this.eduUserDeptService.addCampus(saveCampusDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -242,7 +253,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "新增学段信息(包含年级和班级)", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = "addSection", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@OperationLog(module = ModuleName.USER, methods = "新增学段信息(包含年级和班级)", type = OperationLogTypeEnum.INSERT)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "新增学段信息(包含年级和班级)", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean<String> addSection(@RequestBody SectionDTO sectionDTO) {
|
||||
this.eduUserDeptService.addSection(sectionDTO, true, false, null, false);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -258,7 +269,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "新增年级信息(包含班级)", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = "addGrade", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@OperationLog(module = ModuleName.USER, methods = "新增年级信息(包含班级)", type = OperationLogTypeEnum.INSERT)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "新增年级信息(包含班级)", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean<String> addGrade(@RequestBody SaveGradeDTO saveGradeDTO) {
|
||||
this.eduUserDeptService.addGrade(saveGradeDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -274,7 +285,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "页面添加家校部门", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = "addUserDept", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@OperationLog(module = ModuleName.USER, methods = "添加家校部门", type = OperationLogTypeEnum.INSERT)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "添加家校部门", type = OperationLogTypeEnum.INSERT)
|
||||
public ResultBean<String> addUserDept(@RequestBody AddUserDeptDTO addUserDeptDTO) {
|
||||
this.eduUserDeptService.addUserDept(addUserDeptDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -290,7 +301,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "编辑家校部门", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@PostMapping(value = "editUserDept", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@OperationLog(module = ModuleName.USER, methods = "编辑家校部门", type = OperationLogTypeEnum.UPDATE)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "编辑家校部门", type = OperationLogTypeEnum.UPDATE)
|
||||
public ResultBean<String> editUserDept(@RequestBody EditUserDeptDTO editUserDeptDTO) {
|
||||
this.eduUserDeptService.editUserDept(editUserDeptDTO);
|
||||
return ResultBean.buildSuccess();
|
||||
@@ -306,7 +317,7 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "批量删除家校部门")
|
||||
@GetMapping("/deleteUserDeptBatch")
|
||||
@OperationLog(module = ModuleName.USER, methods = "批量删除家校部门", type = OperationLogTypeEnum.DELETE)
|
||||
@OperationLog(module = ModuleName.USER_DEPT, methods = "批量删除家校部门", type = OperationLogTypeEnum.DELETE)
|
||||
public ResultBean<String> deleteUserDeptBatch(
|
||||
@ApiParam(value = "家校部门id字符串", required = true) @RequestParam String deptIds,
|
||||
@ApiParam(value = "学校id", required = true) @RequestParam Long schoolId) {
|
||||
@@ -324,7 +335,6 @@ public class EduUserDeptController {
|
||||
*/
|
||||
@ApiOperation(value = "根据学段类型查询对应的标准年级")
|
||||
@GetMapping("/listStandardGradeBySectionType")
|
||||
@OperationLog(module = ModuleName.USER, methods = "根据学段类型查询对应的标准年级")
|
||||
public ResultBean<List<EduUserDeptStandardGrade>> listStandardGradeBySectionType(
|
||||
@ApiParam(value = "学段类型", required = true) @RequestParam String sectionType) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.listStandardGradeBySectionType(sectionType));
|
||||
@@ -333,9 +343,16 @@ public class EduUserDeptController {
|
||||
|
||||
@ApiOperation("向上查询父级部门")
|
||||
@GetMapping("/findParentUp")
|
||||
@OperationLog(module = ModuleName.USER, methods = "向上查询父级部门")
|
||||
public ResultBean<AllDeptInfoVO> findParentUp(@ApiParam("部门id") Long deptId,
|
||||
@ApiParam("最上级部门类型,1表示班级,2表示年级,3表示学段,4表示校区") Integer type) {
|
||||
return ResultBean.buildSuccess(eduUserDeptService.findParentUp(deptId, type));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询职工管理班级,包含班级学生人数")
|
||||
@GetMapping("/listClassByStaffId")
|
||||
public ResultBean<List<TeacherDeptVO>> listClassByStaffId(@RequestParam Long staffId) {
|
||||
return ResultBean.buildSuccess(eduUserDeptService.listClassByStaffId(staffId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,8 +1,11 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduUserDevice;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.service.EduUserDeviceService;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -24,7 +27,7 @@ public class EduUserDeviceController {
|
||||
|
||||
@ApiOperation("保存、更新用户设备联系信息")
|
||||
@PostMapping("/saveUserDevice")
|
||||
@ControllerLog(operation = "保存、更新用户和厂商的关联信息")
|
||||
@OperationLog(module = ModuleName.USER, methods = "保存、更新用户和厂商的关联信息", type = OperationLogTypeEnum.SAVE)
|
||||
public ResultBean saveUserDevice(@RequestBody EduUserDevice userDevice) {
|
||||
eduUserDeviceService.saveUserDevice(userDevice);
|
||||
return ResultBean.buildSuccess();
|
||||
|
||||
+13
-12
@@ -1,7 +1,6 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
@@ -33,7 +32,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,15 +55,17 @@ public class EduUserFaceController {
|
||||
|
||||
@ApiOperation("分页查询人脸组列表")
|
||||
@GetMapping("/listFaceGroupPage")
|
||||
public ResultBean<IPage<EduFaceGroup>> listFaceGroupPage(@ApiParam("组名") @RequestParam(required = false) String groupName,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
public ResultBean<IPage<EduFaceGroup>> listFaceGroupPage(
|
||||
@ApiParam("组名") @RequestParam(required = false) String groupName,
|
||||
@ApiParam("组id") @RequestParam(required = false) Long groupId,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
Long schoolId = null;
|
||||
CurrentUser currentUser = FebsUtil.getCurrentUser();
|
||||
if (currentUser.getDeptType() == 0) {
|
||||
schoolId = currentUser.getDeptId();
|
||||
}
|
||||
return ResultBean.buildSuccess(eduFaceGroupService.listFaceGroupPage(new Page(pageNum, pageSize), groupName, schoolId));
|
||||
return ResultBean.buildSuccess(eduFaceGroupService.listFaceGroupPage(new Page(pageNum, pageSize), groupName, schoolId, groupId));
|
||||
}
|
||||
|
||||
@ApiOperation("保存、修改人脸组")
|
||||
@@ -109,9 +109,10 @@ public class EduUserFaceController {
|
||||
Long schoolId, Long groupId,
|
||||
@ApiParam("当前页码") @RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@ApiParam("页面大小") @RequestParam(defaultValue = "10") Integer pageSize,
|
||||
Long dormId, Long dormRoomId) {
|
||||
Long dormId, Long dormRoomId,
|
||||
Long campusId, Long sectionId, Long gradeId, Long classId) {
|
||||
return ResultBean.buildSuccess(eduFaceGroupUserService.listStudentNotImport(new Page(pageNum,
|
||||
pageSize), depId, type, sex, keyword, schoolId, groupId, dormId, dormRoomId));
|
||||
pageSize), depId, type, sex, keyword, schoolId, groupId, dormId, dormRoomId, campusId, sectionId, gradeId, classId));
|
||||
}
|
||||
|
||||
|
||||
@@ -130,14 +131,14 @@ public class EduUserFaceController {
|
||||
@ApiOperation("学生全部导入")
|
||||
@GetMapping("/saveAllStudent")
|
||||
public ResultBean saveAllStudent(
|
||||
@RequestParam(required = false) Long[] classId,
|
||||
@ApiParam("0-走读,1-寄宿") @RequestParam(required = false) Integer type,
|
||||
@ApiParam("0-男,1-女") @RequestParam(required = false) Integer sex,
|
||||
@RequestParam(required = false) String keyword,
|
||||
Long schoolId, Long groupId,
|
||||
Long dormId, Long dormRoomId) {
|
||||
eduFaceGroupUserService.saveAllStudent(ArrayUtil.isNotEmpty(classId) ? Arrays.asList(classId)
|
||||
: null, type, sex, keyword, schoolId, groupId, dormId, dormRoomId);
|
||||
Long dormId, Long dormRoomId,
|
||||
Long campusId, Long sectionId, Long gradeId, Long classId) {
|
||||
eduFaceGroupUserService.saveAllStudent(type, sex, keyword, schoolId, groupId, dormId, dormRoomId,
|
||||
campusId, sectionId, gradeId, classId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
+47
-5
@@ -1,8 +1,10 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.common.core.entity.user.enums.UserDeptTypeEnum;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.dto.DeleteUserDeptDTO;
|
||||
import com.yida.data.user.service.DaHuaSyncService;
|
||||
import com.yida.data.user.service.EduUserDeptService;
|
||||
@@ -13,6 +15,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -44,7 +47,15 @@ public class InEduUserDeptController {
|
||||
@GetMapping("/syncUserDept")
|
||||
public ResultBean<String> syncUserDept() {
|
||||
log.info("同步企业微信家校部门数据");
|
||||
this.eduUserDeptService.syncUserDept();
|
||||
this.eduUserDeptService.syncUserDept(null);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("同步指定学校企业微信家校部门")
|
||||
@GetMapping("/syncSchoolUserDept")
|
||||
public ResultBean<String> syncSchoolUserDept(@RequestParam Long schoolId) {
|
||||
log.info("同步企业微信家校部门数据: schoolId: [{}]", schoolId);
|
||||
eduUserDeptService.syncUserDept(schoolId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -128,6 +139,13 @@ public class InEduUserDeptController {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getParentByDeptId(deptId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("根据家校部门id查询全部上级家校部门信息")
|
||||
@GetMapping("/getParentListByDeptId")
|
||||
public ResultBean<List<EduUserDept>> getParentListByDeptId(@RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getParentListByDeptId(deptId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存家校部门
|
||||
*
|
||||
@@ -177,8 +195,7 @@ public class InEduUserDeptController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 向下查询指定家校部门类型的家校部门id(可查询非直接子家校部门)
|
||||
* 未毕业家校部门
|
||||
* 向下查询指定家校部门类型的家校部门id(可查询非直接子家校部门) 未毕业家校部门
|
||||
*
|
||||
* @param parentId 父节点id
|
||||
* @param type 家校部门类型 {@link UserDeptTypeEnum}
|
||||
@@ -189,7 +206,32 @@ public class InEduUserDeptController {
|
||||
@ApiOperation("向下查询指定家校部门类型的家校部门数据(可查询非直接子家校部门)")
|
||||
@GetMapping("/findChildIdByParentAndType")
|
||||
public ResultBean<List<EduUserDept>> findChildIdByParentAndType(@ApiParam("父节点id,不能为空") @RequestParam Long parentId,
|
||||
@ApiParam("子节点类型. 默认所有直接子节点") Integer type) {
|
||||
return ResultBean.buildSuccess(eduUserDeptService.findChildIdByParentAndType(Collections.singletonList(parentId), type));
|
||||
@ApiParam("子节点类型. 默认所有直接子节点") Integer type) {
|
||||
List<EduUserDept> resultList = new ArrayList<>();
|
||||
return ResultBean.buildSuccess(
|
||||
eduUserDeptService.findChildIdByParentAndType(Collections.singletonList(parentId), type, resultList));
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有子节点")
|
||||
@GetMapping("/findListByParent")
|
||||
public ResultBean<List<EduUserDept>> findListByParent(@RequestParam Long deptId) {
|
||||
return ResultBean.buildSuccess(
|
||||
eduUserDeptService.findListByParent(Collections.singletonList(deptId)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 家校部门树
|
||||
*
|
||||
* @param deptIds 根节点Id集合
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("家校部门树(根节点多个)")
|
||||
@PostMapping("/getUserDeptTree")
|
||||
@OperationLog(module = ModuleName.USER, methods = "家校部门树")
|
||||
public ResultBean<List> getUserDeptTree(@ApiParam("根节点Id") @RequestBody List<Long> deptIds) {
|
||||
return ResultBean.buildSuccess(this.eduUserDeptService.getUserDeptTree(deptIds));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+30
-9
@@ -1,19 +1,15 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduUserDevice;
|
||||
import com.yida.data.user.service.EduUserDeviceService;
|
||||
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "人脸下发记录(不鉴权)")
|
||||
@RestController
|
||||
@@ -24,8 +20,33 @@ public class InEduUserDeviceController {
|
||||
|
||||
@ApiOperation("批量保存")
|
||||
@PostMapping("/batchSave")
|
||||
public ResultBean batchSave(@RequestBody List<EduUserDevice> list) {
|
||||
public ResultBean<String> batchSave(@RequestBody List<EduUserDevice> list) {
|
||||
eduUserDeviceService.batchSaveUserDevice(list);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("获取设备和人员关联信息")
|
||||
@GetMapping("/listUserDevice")
|
||||
public ResultBean<List<EduUserDevice>> listUserDevice(@RequestParam Long userId, @RequestParam Integer type,
|
||||
@RequestParam Long deviceId, @RequestParam Long faceGroupId) {
|
||||
List<EduUserDevice> list = eduUserDeviceService.list(Wrappers.lambdaQuery(new EduUserDevice())
|
||||
.eq(EduUserDevice::getUserId, userId)
|
||||
.eq(EduUserDevice::getUserType, type)
|
||||
.eq(EduUserDevice::getDeviceId, deviceId)
|
||||
.eq(EduUserDevice::getFaceGroupId, faceGroupId)
|
||||
);
|
||||
return ResultBean.buildSuccess(list);
|
||||
}
|
||||
|
||||
@ApiOperation("删除设备和人员关联信息")
|
||||
@PostMapping("/deleteRelation")
|
||||
public ResultBean<String> deleteRelation(@RequestBody EduUserDevice userDevice) {
|
||||
eduUserDeviceService.remove(Wrappers.lambdaQuery(new EduUserDevice())
|
||||
.eq(EduUserDevice::getUserId, userDevice.getUserId())
|
||||
.eq(EduUserDevice::getUserType, userDevice.getUserType())
|
||||
.eq(EduUserDevice::getDeviceId, userDevice.getDeviceId())
|
||||
.eq(EduUserDevice::getFaceGroupId, userDevice.getFaceGroupId())
|
||||
);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
+9
-13
@@ -1,41 +1,37 @@
|
||||
package com.yida.data.user.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduUserFace;
|
||||
import com.yida.data.user.dto.UpdateFaceGroupUserStatusDTO;
|
||||
import com.yida.data.user.service.EduFaceGroupUserService;
|
||||
import com.yida.data.user.service.EduUserFaceService;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
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 cn.hutool.core.collection.CollUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ApiOperation("人脸管理(不鉴权)")
|
||||
@RestController
|
||||
@RequestMapping("/in/face")
|
||||
@RequiredArgsConstructor
|
||||
public class InEduUserFaceController {
|
||||
|
||||
private final EduUserFaceService eduUserFaceService;
|
||||
private final EduFaceGroupUserService eduFaceGroupUserService;
|
||||
|
||||
@GetMapping("/getFaceByUser")
|
||||
public ResultBean<EduUserFace> getFaceByUser(@RequestParam("userId") Long userId,
|
||||
@RequestParam("type") Integer type) {
|
||||
return ResultBean.buildSuccess(eduUserFaceService.getOne(Wrappers.lambdaQuery(new EduUserFace()).eq(EduUserFace::getUserId, userId).eq(EduUserFace::getUserType, type)));
|
||||
@RequestParam("type") Integer type) {
|
||||
return ResultBean.buildSuccess(eduUserFaceService.getOne(
|
||||
Wrappers.lambdaQuery(new EduUserFace()).eq(EduUserFace::getUserId, userId).eq(EduUserFace::getUserType, type)));
|
||||
}
|
||||
|
||||
@GetMapping("/delFaceByUser")
|
||||
public ResultBean delFaceByUser(@RequestParam("userId") Long userId,
|
||||
@RequestParam("type") Integer type) {
|
||||
eduUserFaceService.remove(Wrappers.lambdaQuery(new EduUserFace()).eq(EduUserFace::getUserId, userId).eq(EduUserFace::getUserType, type));
|
||||
@RequestParam("type") Integer type) {
|
||||
eduUserFaceService.remove(
|
||||
Wrappers.lambdaQuery(new EduUserFace()).eq(EduUserFace::getUserId, userId).eq(EduUserFace::getUserType, type));
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
+42
-7
@@ -14,6 +14,7 @@ import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.service.EduStaffService;
|
||||
import com.yida.data.user.service.EduTeacherDeptService;
|
||||
import com.yida.data.user.service.QywxSyncService;
|
||||
import com.yida.data.user.vo.TeacherClassVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@@ -42,8 +43,8 @@ public class InStaffController {
|
||||
@ApiOperation("处理企业微信更改教师信息")
|
||||
@PostMapping("/dealWxTeacherChange")
|
||||
public ResultBean<EduStaff> dealWxTeacherChange(Long schoolId, Long campusId, Long sectionId, Long gradeId,
|
||||
Long classId, @RequestBody List<Map> teacherList) {
|
||||
eduStaffService.dealWxTeacherChange(schoolId, campusId, sectionId, gradeId, classId, teacherList);
|
||||
Long classId, @RequestBody List<Map> teacherList, Long deptWxId) {
|
||||
eduStaffService.dealWxTeacherChange(schoolId, campusId, sectionId, gradeId, classId, teacherList, deptWxId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -103,7 +104,15 @@ public class InStaffController {
|
||||
@GetMapping("/syncQywxStaff")
|
||||
public ResultBean syncQywxStaff() {
|
||||
// eduStaffService.syncQywxStaff();
|
||||
qywxSyncService.syncQywxStaff();
|
||||
qywxSyncService.syncQywxStaff(null);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("同步指定学校企业微信职工数据")
|
||||
@GetMapping("/syncSchoolQywxStaff")
|
||||
public ResultBean syncSchoolQywxStaff(@RequestParam Long schoolId) {
|
||||
// eduStudentService.syncQywxStudent();
|
||||
qywxSyncService.syncQywxStaff(schoolId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -115,8 +124,8 @@ public class InStaffController {
|
||||
}
|
||||
|
||||
@ApiOperation("查询职工列表")
|
||||
@GetMapping("/listStaff")
|
||||
ResultBean<List<EduStaff>> listStaff(ListStaffDTO dto) {
|
||||
@PostMapping("/listStaff")
|
||||
ResultBean<List<EduStaff>> listStaff(@RequestBody ListStaffDTO dto) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listStaff(dto));
|
||||
}
|
||||
|
||||
@@ -140,18 +149,44 @@ public class InStaffController {
|
||||
@ApiOperation("根据家校部门id和类型查询对应教师信息")
|
||||
@GetMapping("/listTeacherByDeptId")
|
||||
public ResultBean<List<EduStaff>> listTeacherByDeptId(@RequestParam("deptId") Long deptId,
|
||||
@RequestParam("type") String type) {
|
||||
@RequestParam("type") String type) {
|
||||
return ResultBean.buildSuccess(eduTeacherDeptService.listTeacherDept(deptId, type));
|
||||
}
|
||||
|
||||
@ApiOperation("保存职工openId")
|
||||
@GetMapping("/saveWxPublicOpenId")
|
||||
ResultBean saveWxPublicOpenId(@RequestParam("staffId") Long staffId,
|
||||
@RequestParam("openId") String openId) {
|
||||
@RequestParam("openId") String openId) {
|
||||
EduStaff staff = new EduStaff();
|
||||
staff.setId(staffId);
|
||||
staff.setWxPublicOpenId(openId);
|
||||
eduStaffService.updateById(staff);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("根据员工id获取企业微信密文用户id")
|
||||
@GetMapping("/getWxIdByStaffId")
|
||||
public ResultBean<String> getWxIdByStaffId(@RequestParam Long staffId) {
|
||||
eduStaffService.getWxIdByStaffId(staffId);
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("根据StaffID查询教师家校沟通部门信息")
|
||||
@GetMapping("/listDeptByTeacher")
|
||||
public ResultBean<List<TeacherClassVO>> listDeptByTeacher(@RequestParam Long teacherId, Integer type) {
|
||||
List<TeacherClassVO> teacherClassVOS = eduStaffService.listDeptByTeacher(teacherId, type);
|
||||
return ResultBean.buildSuccess(teacherClassVOS);
|
||||
}
|
||||
|
||||
@ApiOperation("查询职工角色")
|
||||
@GetMapping("/listStaffRolesByStaffId")
|
||||
public ResultBean<List<Integer>> listStaffRolesByStaffId(@RequestParam Long staffId) {
|
||||
return ResultBean.buildSuccess(eduStaffService.listStaffRolesByStaffId(staffId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询职工管理班级")
|
||||
@GetMapping("/listClassIdByStaffId")
|
||||
public ResultBean<List<Long>> listClassIdByStaffId() {
|
||||
return ResultBean.buildSuccess(eduStaffService.listClassIdByStaffId());
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.yida.data.user.controller.in;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupDevice;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.user.dto.BatchIssueDTO;
|
||||
import com.yida.data.user.service.EduFaceGroupDeviceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸设备 Controller(不鉴权)
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/9/28
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("in/groupDevice")
|
||||
public class InEduFaceGroupDeviceController {
|
||||
|
||||
private final EduFaceGroupDeviceService eduFaceGroupDeviceService;
|
||||
|
||||
/**
|
||||
* 查询人脸组设备id集合
|
||||
*/
|
||||
@GetMapping("/listFaceGroupOnlineDevice")
|
||||
public ResultBean<List<Long>> listFaceGroupOnlineDevice(@RequestParam Long faceGroupId) {
|
||||
return ResultBean.buildSuccess(eduFaceGroupDeviceService.listFaceGroupOnlineDevice(faceGroupId));
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.yida.data.user.controller.in;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategy;
|
||||
import com.yida.data.user.dto.StrategySaveDTO;
|
||||
import com.yida.data.user.service.EduFaceGroupStrategyService;
|
||||
import com.yida.data.user.vo.StrategyInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 人脸组-策略Controller(不鉴权)
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-12 11:04:39
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("in/eduFaceGroupStrategy")
|
||||
@Api(tags = "人脸组-策略api(不鉴权)")
|
||||
public class InEduFaceGroupStrategyController {
|
||||
|
||||
private final EduFaceGroupStrategyService eduFaceGroupStrategyService;
|
||||
|
||||
@GetMapping(value = "getStrategyInfo")
|
||||
@ApiOperation(value = "获取人脸组策略信息")
|
||||
public ResultBean<EduFaceGroupStrategy> getStrategyInfo(@RequestParam Long faceGroupId) {
|
||||
return ResultBean.buildSuccess(eduFaceGroupStrategyService.getOne(Wrappers.lambdaQuery(new EduFaceGroupStrategy())
|
||||
.eq(EduFaceGroupStrategy::getFaceGroupId, faceGroupId)));
|
||||
}
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.yida.data.user.controller.in;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.common.core.entity.user.EduStaffDept;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.common.core.utils.FileUtil;
|
||||
import com.yida.data.system.feign.RemoteDeptService;
|
||||
import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.dto.PageTeacherDTO;
|
||||
import com.yida.data.user.mapper.EduTeacherDeptMapper;
|
||||
import com.yida.data.user.service.EduStaffDeptService;
|
||||
import com.yida.data.user.service.EduStaffService;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import com.yida.data.user.vo.StaStaffDistributeVO;
|
||||
import com.yida.data.user.vo.StaffPageVO;
|
||||
import com.yida.data.user.vo.StaffWithDeptVO;
|
||||
import com.yida.data.user.vo.TeacherClassAndGradeVO;
|
||||
import com.yida.data.user.vo.TeacherClassVO;
|
||||
import com.yida.data.user.vo.TeacherCourseInfoVO;
|
||||
import com.yida.data.user.vo.TeacherDetailVO;
|
||||
import com.yida.data.user.vo.TeacherListVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Api(tags = "教师管理 仅学校管理员有权限")
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("in/staff")
|
||||
@RequiredArgsConstructor
|
||||
public class InEduStaffController {
|
||||
|
||||
|
||||
private final EduStaffService eduStaffService;
|
||||
private final RedisService redisService;
|
||||
private final EduStudentService eduStudentService;
|
||||
private final EduTeacherDeptMapper eduTeacherDeptMapper;
|
||||
private final EduStaffDeptService eduStaffDeptService;
|
||||
|
||||
private final RemoteDeptService remoteDeptService;
|
||||
|
||||
@ApiOperation("根据根据部门id查询对应教职工")
|
||||
@GetMapping("/listStaffByDeptId")
|
||||
public ResultBean<List<Long>> listStaffByDeptId(@RequestParam(required = false) Long deptId,
|
||||
@RequestParam(required = false) String nameOrPhone,
|
||||
@RequestParam(required = false) Long schoolId) {
|
||||
|
||||
return ResultBean.buildSuccess(eduStaffService.listStaffByDeptId(deptId, nameOrPhone, schoolId));
|
||||
}
|
||||
|
||||
@ApiOperation("查询职工部门信息")
|
||||
@PostMapping("/getStaffDeptByStaffIds")
|
||||
public ResultBean<List<EduStaffDept>> getStaffDeptByStaffIds(@ApiParam("职工id") @RequestBody List<Long> staffIds) {
|
||||
return ResultBean.buildSuccess(eduStaffDeptService.getStaffDeptByStaffIds(staffIds));
|
||||
}
|
||||
|
||||
@ApiOperation("更新教职工信息缓存")
|
||||
@GetMapping("/updateStaffCache")
|
||||
public ResultBean updateStaffCache() {
|
||||
eduStaffService.updateStaffCache();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.yida.data.user.controller.in;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.user.service.EduStudentApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "交易-学生应用关系(不鉴权)")
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/in/transaction/studentApply")
|
||||
@RestController
|
||||
public class InEduStudentApplyController {
|
||||
|
||||
private final EduStudentApplyService eduStudentApplyService;
|
||||
private final RedisService redisService;
|
||||
|
||||
@ApiOperation("查询学生的应用编码列表")
|
||||
@GetMapping("/listApply")
|
||||
public ResultBean<Map<Long, List<String>>> listApplyCode(@RequestParam("studentIds") Long[] studentIds) {
|
||||
List<EduStudentApply> applyCodeList = eduStudentApplyService.list(Wrappers.lambdaQuery(new EduStudentApply())
|
||||
.in(EduStudentApply::getStudentId, studentIds)
|
||||
.ge(EduStudentApply::getEndTime, LocalDateTime.now())
|
||||
.le(EduStudentApply::getStartTime, LocalDateTime.now()));
|
||||
Map<Long, List<String>> res = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(applyCodeList)) {
|
||||
Map<Long, List<EduStudentApply>> collect = applyCodeList.stream()
|
||||
.collect(Collectors.groupingBy(EduStudentApply::getStudentId));
|
||||
for (Map.Entry<Long, List<EduStudentApply>> entry : collect.entrySet()) {
|
||||
List<String> applyCode = entry.getValue().stream().map(x -> x.getApplyCode()).distinct()
|
||||
.collect(Collectors.toList());
|
||||
res.put(entry.getKey(), applyCode);
|
||||
redisService.hset(CachePrefixConstant.STUDENT_APPLY, entry.getKey().toString(), applyCode);
|
||||
}
|
||||
}
|
||||
return ResultBean.buildSuccess(res);
|
||||
}
|
||||
|
||||
}
|
||||
+46
-5
@@ -3,18 +3,25 @@ package com.yida.data.user.controller.in;
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.user.EduParent;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.common.core.entity.user.enums.DeptVisibleTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.enums.UserDeptTypeEnum;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.school.dto.transaction.ListBuyStudentDTO;
|
||||
import com.yida.data.user.dto.ListStudentDTO;
|
||||
import com.yida.data.user.mapper.EduParentMapper;
|
||||
import com.yida.data.user.service.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -36,6 +43,8 @@ public class InStudentController {
|
||||
private final QywxSyncService qywxSyncService;
|
||||
private final DaHuaSyncService daHuaSyncService;
|
||||
private final RedisService redisService;
|
||||
private final EduTeacherDeptService eduTeacherDeptService;
|
||||
private final EduStudentDormService eduStudentDormService;
|
||||
|
||||
@ApiOperation("处理企业微信 改变学生事件")
|
||||
@PostMapping("/dealWxStudentChange")
|
||||
@@ -217,11 +226,7 @@ public class InStudentController {
|
||||
student.setStatus(status);
|
||||
student.setDormStatus(dormStatus);
|
||||
eduStudentService.updateById(student);
|
||||
//更新缓存信息
|
||||
if (redisService.hHasKey(CachePrefixConstant.STUDENT_DATA, studentId.toString())) {
|
||||
redisService.hdel(CachePrefixConstant.STUDENT_DATA, studentId.toString());
|
||||
}
|
||||
redisService.hset(CachePrefixConstant.STUDENT_DATA, studentId.toString(), student);
|
||||
redisService.hdel(CachePrefixConstant.STUDENT_DATA, studentId.toString());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@@ -268,4 +273,40 @@ public class InStudentController {
|
||||
public ResultBean<List<Long>> listDormIdsByDeptId(@RequestBody ListStudentDTO dto) {
|
||||
return ResultBean.buildSuccess(eduStudentService.listDormIdsByDeptId(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询校园大数据的人员统计数据")
|
||||
@GetMapping("/countUserDashboardNum")
|
||||
public ResultBean<JSONObject> countUserDashboardNum(@RequestParam Long schoolId) {
|
||||
JSONObject jsonObject = JSONUtil.createObj();
|
||||
// 学生数量
|
||||
long studentNum = eduStudentService.count(Wrappers.lambdaQuery(new EduStudent())
|
||||
.eq(EduStudent::getSchoolId, schoolId));
|
||||
jsonObject.set("studentNum", studentNum);
|
||||
// 班级数量
|
||||
long classNum = eduUserDeptService.count(Wrappers.lambdaQuery(new EduUserDept())
|
||||
.eq(EduUserDept::getSchoolId, schoolId)
|
||||
.eq(EduUserDept::getDeptType, UserDeptTypeEnum.CLASS_TYPE.getValue())
|
||||
.eq(EduUserDept::getVisible, DeptVisibleTypeEnum.VISIBLE_TYPE.getValue())
|
||||
);
|
||||
jsonObject.set("classNum", classNum);
|
||||
// 教师数量
|
||||
jsonObject.set("teacherNum", eduTeacherDeptService.countTeacherNumber(schoolId));
|
||||
return ResultBean.buildSuccess(jsonObject);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("新增住宿生")
|
||||
@PostMapping("/saveStudentDorm")
|
||||
public ResultBean saveStudentDorm(@RequestBody EduStudent eduStudent) {
|
||||
Asserts.isNotNull(eduStudent, "学生不存在");
|
||||
eduStudentDormService.saveStudentDorm(eduStudent.getId(), eduStudent.getDormRoomId(), eduStudent.getDormId());
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("更新学生信息缓存")
|
||||
@GetMapping("/updateStudentCache")
|
||||
public ResultBean updateStudentCache() {
|
||||
eduStudentService.updateStudentCache();
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
+27
-1
@@ -1,24 +1,37 @@
|
||||
package com.yida.data.user.controller.out;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yida.data.common.core.annotation.ControllerLog;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.dto.OutPageStudentDTO;
|
||||
import com.yida.data.user.service.EduStudentService;
|
||||
import com.yida.data.user.vo.OutPageStudentVO;
|
||||
import com.yida.data.user.vo.StaStudentVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.Arrays;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Api(tags = "家长管理")
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping(value = "/out/student")
|
||||
public class OutEduStudentController {
|
||||
|
||||
private final EduStudentService eduStudentService;
|
||||
|
||||
@ApiOperation("统计学生分布数据")
|
||||
@@ -26,4 +39,17 @@ public class OutEduStudentController {
|
||||
public ResultBean<StaStudentVO> staStudentDistribu(Long[] schoolIds) {
|
||||
return ResultBean.buildSuccess(eduStudentService.staStudentDistribu(Arrays.asList(schoolIds)));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询学生列表数据")
|
||||
@GetMapping("/listStudentPage")
|
||||
public ResultBean<IPage<OutPageStudentVO>> listStudentOutPage(OutPageStudentDTO dto, HttpServletRequest request) {
|
||||
return ResultBean.buildSuccess(eduStudentService.listStudentOutPage(dto, request));
|
||||
}
|
||||
|
||||
@ApiOperation("保存学生信息 新增或编辑")
|
||||
@PostMapping("/saveStudent")
|
||||
@OperationLog(module = ModuleName.STUDENT, methods = "新增、修改学生", type = OperationLogTypeEnum.SAVE)
|
||||
public ResultBean<EduStudent> saveStudent(@RequestBody EduStudent eduStudent) {
|
||||
return ResultBean.buildSuccess(eduStudentService.saveStudent(eduStudent, null, false));
|
||||
}
|
||||
}
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.yida.data.user.controller.out;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.user.service.EduParentService;
|
||||
import com.yida.data.user.service.EduUserDeptService;
|
||||
import com.yida.data.user.vo.StaParentDistributeVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 家校部门外部Controller (不鉴权)
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/4/25
|
||||
*/
|
||||
@Api(tags = "家校部门API")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping(value = "/out/userDept")
|
||||
public class OutEduUserDeptController {
|
||||
|
||||
private final EduUserDeptService eduUserDeptService;
|
||||
|
||||
@ApiOperation("查询学校年级分布")
|
||||
@GetMapping("/getGradeDistribution")
|
||||
public ResultBean<JSONArray> getGradeDistribution(@ApiParam("学校id") @RequestParam Long schoolId) {
|
||||
return ResultBean.buildSuccess(eduUserDeptService.getGradeDistribution(schoolId));
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -184,8 +184,7 @@ public class WebEduSchoolWelcomeStudentController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入一键邀请数据
|
||||
* 学生基础信息
|
||||
* 导入学生基础信息
|
||||
*
|
||||
* @param file 导入的excel文件
|
||||
* @param schoolId 学校id
|
||||
@@ -193,7 +192,7 @@ public class WebEduSchoolWelcomeStudentController {
|
||||
* @author ZYJ
|
||||
* @date 2021/8/24 17:12
|
||||
*/
|
||||
@ApiOperation("导入一键邀请数据(学生基础信息)")
|
||||
@ApiOperation("导入学生基础信息")
|
||||
@PostMapping(value = "/importWelcomeInviteData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public ResultBean<String> importWelcomeInviteData(
|
||||
@ApiParam(value = "导入的excel文件", required = true) @RequestParam("file") MultipartFile file,
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package com.yida.data.user.excel;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yida.data.common.core.entity.CurrentUser;
|
||||
import com.yida.data.user.dto.CardErrorExportDTO;
|
||||
import com.yida.data.user.dto.CardImportDTO;
|
||||
import com.yida.data.user.service.ImportWelcomeStudentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 校园卡号导入监听类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2021/8/24
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class CardDataDataExcelListener extends AnalysisEventListener<CardImportDTO> {
|
||||
|
||||
private final ImportWelcomeStudentService importWelcomeStudentService;
|
||||
|
||||
/**
|
||||
* 错误信息集合
|
||||
*/
|
||||
private final List<CardErrorExportDTO> errorList;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
private final Long schoolId;
|
||||
|
||||
/**
|
||||
* 当前登录用户信息
|
||||
*/
|
||||
private final CurrentUser currentUser;
|
||||
|
||||
/**
|
||||
* 每次存储条数
|
||||
* 每隔5条存储数据库, 实际使用中可以3000条, 然后清理list, 方便内存回收
|
||||
*/
|
||||
private static final int BATCH_COUNT = 3000;
|
||||
|
||||
/**
|
||||
* 需要保存的数据集合
|
||||
*/
|
||||
ConcurrentHashMap<Integer, CardImportDTO> concurrentHashMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 解析成功一条数据调用一次
|
||||
*
|
||||
* @param dto 导入类
|
||||
* @param analysisContext analysisContext类型
|
||||
* @author ZYJ
|
||||
* @date 2021/8/23 16:12
|
||||
*/
|
||||
@Override
|
||||
public void invoke(CardImportDTO dto, AnalysisContext analysisContext) {
|
||||
// 获取读取的第几条数据
|
||||
Integer i = analysisContext.readRowHolder().getRowIndex();
|
||||
log.info("解析到第: {}条数据: {}", i, JSON.toJSONString(dto));
|
||||
concurrentHashMap.put(i, dto);
|
||||
// 达到BATCH_COUNT了, 需要去存储一次数据库, 防止数据几万条数据在内存, 容易OOM
|
||||
if (concurrentHashMap.size() >= BATCH_COUNT) {
|
||||
saveData();
|
||||
// 存储完成清理集合
|
||||
concurrentHashMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有数据解析完成调用
|
||||
*
|
||||
* @param analysisContext analysisContext类
|
||||
* @author ZYJ
|
||||
* @date 2021/8/23 16:18
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
// 这里也要保存数据, 确保最后遗留的数据也存储到数据库
|
||||
saveData();
|
||||
log.info("所有数据解析完成!");
|
||||
if (CollUtil.isNotEmpty(errorList)) {
|
||||
log.error("错误数据有: {}条", errorList.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存导入数据
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2021/8/23 16:20
|
||||
*/
|
||||
private void saveData() {
|
||||
log.info("{}条数据,开始存储数据库!", concurrentHashMap.size());
|
||||
importWelcomeStudentService.saveCardExcelData(concurrentHashMap, errorList, schoolId, currentUser);
|
||||
log.info("存储数据库成功!");
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.yida.data.user.excel;
|
||||
|
||||
import com.yida.data.common.core.file.common.export.SelectExportData;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 导出学生宿舍查询类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/12/13 16:41
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SelectStudentDormExportData extends SelectExportData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1138422440767435262L;
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("宿舍楼")
|
||||
private Long dormId;
|
||||
|
||||
@ApiModelProperty("楼层")
|
||||
private Integer floor;
|
||||
|
||||
@ApiModelProperty("寝室id")
|
||||
private Long dormRoomId;
|
||||
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("关键词")
|
||||
private String keyword;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.yida.data.user.excel;
|
||||
|
||||
import com.yida.data.common.core.file.common.export.SelectExportData;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 导出学生查询类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/12/12 15:41
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SelectStudentExportData extends SelectExportData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7368186456144813899L;
|
||||
|
||||
@ApiModelProperty("区域id")
|
||||
private Long areaId;
|
||||
|
||||
@ApiModelProperty("学校id")
|
||||
private Long schoolId;
|
||||
|
||||
@ApiModelProperty("学生类型id")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("校区id")
|
||||
private Long campusId;
|
||||
|
||||
@ApiModelProperty("校区id")
|
||||
private List<Long> campusIdList;
|
||||
|
||||
@ApiModelProperty("学段id")
|
||||
private Long sectionId;
|
||||
private List<Long> sectionIdList;
|
||||
|
||||
@ApiModelProperty("年级id")
|
||||
private Long gradeId;
|
||||
private List<Long> gradeIdList;
|
||||
|
||||
@ApiModelProperty("班级id")
|
||||
private Long classId;
|
||||
private List<Long> classIdList;
|
||||
|
||||
@ApiModelProperty("学号id")
|
||||
private String stuNumber;
|
||||
|
||||
@ApiModelProperty("名字")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("家庭类型 字典值")
|
||||
private String familyType;
|
||||
|
||||
@ApiModelProperty("是否采集人脸:0否,1是")
|
||||
private String collectType;
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.yida.data.user.excel;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yida.data.user.dto.StaffImportDTO;
|
||||
import com.yida.data.user.dto.WelcomeStudentImportDTO;
|
||||
import com.yida.data.user.service.EduStaffService;
|
||||
import com.yida.data.user.service.ImportWelcomeStudentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* Excel 职工信息监听类
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class StaffDataExcelListener extends AnalysisEventListener<StaffImportDTO> {
|
||||
|
||||
private final EduStaffService eduStaffService;
|
||||
|
||||
/**
|
||||
* 错误信息集合
|
||||
*/
|
||||
private final ConcurrentHashMap<Integer, Object> errorMap;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
private final Long schoolId;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
private final long timestamp;
|
||||
|
||||
/**
|
||||
* 每次存储条数 每隔5条存储数据库, 实际使用中可以3000条, 然后清理list, 方便内存回收
|
||||
*/
|
||||
private static final int BATCH_COUNT = 3000;
|
||||
|
||||
/**
|
||||
* 需要保存的数据集合
|
||||
*/
|
||||
ConcurrentHashMap<Integer, StaffImportDTO> concurrentHashMap = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 解析成功一条数据调用一次
|
||||
*/
|
||||
@Override
|
||||
public void invoke(StaffImportDTO staffImportDTO, AnalysisContext analysisContext) {
|
||||
// 获取读取的第几条数据
|
||||
Integer i = analysisContext.readRowHolder().getRowIndex();
|
||||
log.info("解析到第: {}条数据: {}", i, JSON.toJSONString(staffImportDTO));
|
||||
concurrentHashMap.put(i, staffImportDTO);
|
||||
// 达到BATCH_COUNT了, 需要去存储一次数据库, 防止数据几万条数据在内存, 容易OOM
|
||||
if (concurrentHashMap.size() >= BATCH_COUNT) {
|
||||
saveData();
|
||||
// 存储完成清理集合
|
||||
concurrentHashMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有数据解析完成调用
|
||||
*
|
||||
* @param analysisContext analysisContext类
|
||||
* @author ZYJ
|
||||
* @date 2021/8/23 16:18
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
// 这里也要保存数据, 确保最后遗留的数据也存储到数据库
|
||||
saveData();
|
||||
log.info("所有数据解析完成!");
|
||||
if (errorMap.size() > 0) {
|
||||
log.error("错误数据有: {}条", errorMap.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存导入数据
|
||||
*/
|
||||
private void saveData() {
|
||||
log.info("{}条数据,开始存储数据库!", concurrentHashMap.size());
|
||||
eduStaffService.saveExcelData(concurrentHashMap, errorMap, schoolId, timestamp);
|
||||
log.info("存储数据库成功!");
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.yida.data.user.listener;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.entity.attendance.EduAttendanceRule;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.school.EduDormitory;
|
||||
import com.yida.data.common.core.entity.school.EduDormitoryRoom;
|
||||
import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.vo.ImportPercentVO;
|
||||
import com.yida.data.school.dto.index.EditPersonNumDTO;
|
||||
import com.yida.data.school.feign.facility.RemoteDormitoryService;
|
||||
import com.yida.data.user.dto.ImportStudentTypeDTO;
|
||||
import com.yida.data.user.dto.ImportStudentTypeDTO;
|
||||
import com.yida.data.user.mapper.EduStudentMapper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class ImportStudentTypeListener extends AnalysisEventListener<ImportStudentTypeDTO> {
|
||||
|
||||
private final RedisService redisService;
|
||||
private final EduStudentMapper eduStudentMapper;
|
||||
|
||||
private final ImportPercentVO res;
|
||||
private final Long schoolId;
|
||||
private final String key;
|
||||
|
||||
private final static Integer BATCH_COUNT = 100;
|
||||
|
||||
// 最后一行用作保存数据的进度
|
||||
private Integer rowNum = -1;
|
||||
private List<ImportStudentTypeDTO> list = new ArrayList<>(BATCH_COUNT);
|
||||
|
||||
/**
|
||||
* 这个每一条数据解析都会来调用
|
||||
*
|
||||
* @param data one row value. Is is same as {@link AnalysisContext#readRowHolder()}
|
||||
* @param context
|
||||
*/
|
||||
@Override
|
||||
public void invoke(ImportStudentTypeDTO data, AnalysisContext context) {
|
||||
// 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
|
||||
list.add(data);
|
||||
//if (list.size() >= BATCH_COUNT) {
|
||||
// saveData();
|
||||
// // 存储完成清理 list
|
||||
// list = new ArrayList<>(BATCH_COUNT);
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有数据解析完成了 都会来调用
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
// 这里也要保存数据,确保最后遗留的数据也存储到数据库
|
||||
saveData();
|
||||
res.setFinish(1);
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_TYPE, key, res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加上存储数据库
|
||||
*/
|
||||
private void saveData() {
|
||||
log.info("{}条数据,开始存储数据库!", list.size());
|
||||
res.setTotal((long) list.size());
|
||||
if (list.size() > 0) {
|
||||
// 错误数据
|
||||
List<ImportStudentTypeDTO> errorData = new ArrayList<>();
|
||||
for (ImportStudentTypeDTO dto : list) {
|
||||
// 学生是否存在
|
||||
EduStudent student = eduStudentMapper.selectOne(Wrappers.<EduStudent>lambdaQuery()
|
||||
.eq(EduStudent::getStuNumber, dto.getStudentNum())
|
||||
.eq(EduStudent::getSchoolId, schoolId));
|
||||
|
||||
if (student == null) {
|
||||
dto.setError("学生不存在");
|
||||
errorData.add(dto);
|
||||
continue;
|
||||
}
|
||||
eduStudentMapper.update(null,
|
||||
Wrappers.<EduStudent>lambdaUpdate().eq(EduStudent::getStuNumber, dto.getStudentNum())
|
||||
.set(EduStudent::getType, Integer.valueOf(dto.getType())));
|
||||
|
||||
rowNum++;
|
||||
if (rowNum * 100 / res.getTotal() != res.getPercent()) {
|
||||
res.setPercent((int) (rowNum * 100 / res.getTotal()));
|
||||
redisService.hset(CachePrefixConstant.IMPORT_STUDENT_TYPE, key, res);
|
||||
}
|
||||
}
|
||||
// 错误数据
|
||||
res.setError(errorData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.yida.data.user.listener;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.yida.data.user.service.EduStudentApplyService;
|
||||
import com.yida.data.user.vo.StudentApplyImportVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class importStudentApplyListener extends AnalysisEventListener<StudentApplyImportVO> {
|
||||
|
||||
|
||||
private EduStudentApplyService eduStudentApplyService;
|
||||
|
||||
|
||||
private List<StudentApplyImportVO> list = new ArrayList<>();
|
||||
|
||||
private String key;
|
||||
|
||||
|
||||
public importStudentApplyListener(EduStudentApplyService eduStudentApplyService, String key) {
|
||||
this.eduStudentApplyService = eduStudentApplyService;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(StudentApplyImportVO data, AnalysisContext context) {
|
||||
if (null == data) {
|
||||
log.info("excel导入失败:{}", data.toString());
|
||||
}
|
||||
list.add(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
saveData();
|
||||
}
|
||||
|
||||
public void saveData() {
|
||||
eduStudentApplyService.insertStudentApplyData(list, key);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-1
@@ -16,5 +16,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface EduFaceGroupMapper extends BaseMapper<EduFaceGroup> {
|
||||
IPage<EduFaceGroup> listFaceGroupPage(Page page,
|
||||
@Param("groupName") String groupName,
|
||||
@Param("schoolId") Long schoolId);
|
||||
@Param("schoolId") Long schoolId,
|
||||
@Param("groupId") Long groupId);
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategy;
|
||||
|
||||
/**
|
||||
* 人脸组-策略Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-12 11:04:39
|
||||
*/
|
||||
public interface EduFaceGroupStrategyMapper extends BaseMapper<EduFaceGroupStrategy> {
|
||||
|
||||
/**
|
||||
* 处理一周的通行计划
|
||||
*
|
||||
* @param groupStrategy 人脸组-策略Entity
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12 17:59
|
||||
*/
|
||||
void updateWeekPlan(EduFaceGroupStrategy groupStrategy);
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategyPlan;
|
||||
import com.yida.data.user.vo.StrategyPlanVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-12 11:36:19
|
||||
*/
|
||||
public interface EduFaceGroupStrategyPlanMapper extends BaseMapper<EduFaceGroupStrategyPlan> {
|
||||
|
||||
/**
|
||||
* 查询人脸组-策略-通行计划
|
||||
*
|
||||
* @param strategyId 策略id
|
||||
* @return java.util.List<com.yida.data.user.vo.StrategyPlanVO>
|
||||
* @author ZYJ
|
||||
* @date 2022/12/12 14:43
|
||||
*/
|
||||
List<StrategyPlanVO> listStrategyPlan(@Param("strategyId") Long strategyId);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategyPlanTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-通行计划-时间Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-12 11:36:19
|
||||
*/
|
||||
public interface EduFaceGroupStrategyPlanTimeMapper extends BaseMapper<EduFaceGroupStrategyPlanTime> {
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategySpecialDate;
|
||||
import com.yida.data.user.vo.StrategySpecialDateVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-26 13:57:32
|
||||
*/
|
||||
public interface EduFaceGroupStrategySpecialDateMapper extends BaseMapper<EduFaceGroupStrategySpecialDate> {
|
||||
|
||||
/**
|
||||
* 查询特殊日期
|
||||
*
|
||||
* @param strategyId 策略id
|
||||
* @return java.util.List<com.yida.data.user.vo.StrategySpecialDateVO>
|
||||
* @author ZYJ
|
||||
* @date 2022/12/26 17:14
|
||||
*/
|
||||
List<StrategySpecialDateVO> listStrategySpecialDate(@Param("strategyId") Long strategyId);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.user.EduFaceGroupStrategySpecialTime;
|
||||
|
||||
/**
|
||||
* 人脸组-策略-特殊日期-时间Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022-12-26 13:57:32
|
||||
*/
|
||||
public interface EduFaceGroupStrategySpecialTimeMapper extends BaseMapper<EduFaceGroupStrategySpecialTime> {
|
||||
|
||||
}
|
||||
+6
-4
@@ -28,13 +28,14 @@ public interface EduFaceGroupUserMapper extends BaseMapper<EduFaceGroupUser> {
|
||||
|
||||
IPage<EduStudent> listStudentNotImport(
|
||||
@Param("page") Page page,
|
||||
@Param("classId") List<Long> classId,
|
||||
@Param("type") Integer type,
|
||||
@Param("sex") Integer sex,
|
||||
@Param("keyword") String keyword,
|
||||
@Param("schoolId") Long schoolId,
|
||||
@Param("groupId") Long groupId,
|
||||
@Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId);
|
||||
@Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId,
|
||||
@Param("campusId") Long campusId, @Param("sectionId") Long sectionId,
|
||||
@Param("gradeId") Long gradeId, @Param("classId") Long classId);
|
||||
|
||||
IPage<EduStaff> listStaffNotImport(
|
||||
Page page,
|
||||
@@ -44,13 +45,14 @@ public interface EduFaceGroupUserMapper extends BaseMapper<EduFaceGroupUser> {
|
||||
@Param("groupId") Long groupId);
|
||||
|
||||
List<EduStudent> listStudentNotImport(
|
||||
@Param("classId") List<Long> classId,
|
||||
@Param("type") Integer type,
|
||||
@Param("sex") Integer sex,
|
||||
@Param("keyword") String keyword,
|
||||
@Param("schoolId") Long schoolId,
|
||||
@Param("groupId") Long groupId,
|
||||
@Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId);
|
||||
@Param("dormId") Long dormId, @Param("dormRoomId") Long dormRoomId,
|
||||
@Param("campusId") Long campusId, @Param("sectionId") Long sectionId,
|
||||
@Param("gradeId") Long gradeId, @Param("classId") Long classId);
|
||||
|
||||
List<EduStaff> listStaffNotImport(
|
||||
@Param("sex") Integer sex,
|
||||
|
||||
+2
-1
@@ -7,7 +7,6 @@ import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.user.dto.ListStaffDTO;
|
||||
import com.yida.data.user.dto.PageTeacherDTO;
|
||||
import com.yida.data.user.vo.*;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -49,6 +48,8 @@ public interface EduStaffMapper extends BaseMapper<EduStaff> {
|
||||
|
||||
EduStaff getStaffById(Long staffId);
|
||||
|
||||
EduStaff getStaff(@Param("id") Long staffId);
|
||||
|
||||
List<EduStaff> listStaff(@Param("dto") ListStaffDTO dto);
|
||||
|
||||
List<Long> listStaffByDeptId(@Param("deptId") Long deptId, @Param("staffIds") List<Long> staffIds);
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApplyFor;
|
||||
import com.yida.data.user.dto.ListStudentApplyForDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EduStudentApplyForMapper extends BaseMapper<EduStudentApplyFor> {
|
||||
|
||||
|
||||
IPage<EduStudentApplyFor> listStudentApplyFor(@Param("dto") ListStudentApplyForDTO dto, Page page);
|
||||
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.yida.data.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yida.data.common.core.entity.user.EduStudentApply;
|
||||
import com.yida.data.user.dto.ListStudentApplyDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EduStudentApplyMapper extends BaseMapper<EduStudentApply> {
|
||||
|
||||
List<EduStudentApply> getStudentApplyStatus(@Param("studentId") Long studentId,
|
||||
@Param("applyCode") String applyCode);
|
||||
|
||||
IPage<EduStudentApply> listStudentApply(@Param("dto") ListStudentApplyDTO dto, Page page);
|
||||
|
||||
EduStudentApply getStudentApply(@Param("studentId") Long studentId,
|
||||
@Param("applyCode") String applyCode);
|
||||
}
|
||||
+27
-6
@@ -8,14 +8,14 @@ import com.yida.data.common.core.entity.user.EduStudent;
|
||||
import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.school.dto.transaction.ListBuyStudentDTO;
|
||||
import com.yida.data.user.dto.ListStudentDTO;
|
||||
import com.yida.data.user.dto.OutPageStudentDTO;
|
||||
import com.yida.data.user.dto.PageStudentDTO;
|
||||
import com.yida.data.user.dto.PageStudentDormDTO;
|
||||
import com.yida.data.user.excel.SelectStudentDormExportData;
|
||||
import com.yida.data.user.vo.ListParentByStudentIdsVO;
|
||||
import com.yida.data.user.vo.OutPageStudentVO;
|
||||
import com.yida.data.user.vo.StudentClassInfoVO;
|
||||
import com.yida.data.user.vo.StudentDormInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -34,12 +34,17 @@ public interface EduStudentMapper extends BaseMapper<EduStudent> {
|
||||
List<EduStudent> selectStudent(@Param("dto") PageStudentDTO dto);
|
||||
|
||||
EduStudent getStudentWithParent(@Param("studentId") Long studentId, @Param("wxId") String wxId,
|
||||
@Param("schoolId") Long schoolId);
|
||||
|
||||
|
||||
List<EduStudent> getStudentListWithParent(@Param("studentIdList") List<Long> studentIdList, @Param("wxId") String wxId,
|
||||
@Param("schoolId") Long schoolId);
|
||||
|
||||
|
||||
List<EduStudent> listStudentByParent(Long parentId);
|
||||
|
||||
StudentClassInfoVO getStudentInfo(@Param("studentId") Long studentId,
|
||||
@Param("parentMobile") String parentMobile);
|
||||
@Param("parentMobile") String parentMobile);
|
||||
|
||||
List<String> getParentByPhoneAndSchoolId(@Param("phone") List<String> phone, @Param("schoolId") Long schoolId);
|
||||
|
||||
@@ -94,8 +99,11 @@ public interface EduStudentMapper extends BaseMapper<EduStudent> {
|
||||
* @return
|
||||
*/
|
||||
IPage<StudentDormInfoVO> listStudentDormPage(Page page,
|
||||
@Param("dormRoomIds") List<Long> dormRoomIds,
|
||||
@Param("dto") PageStudentDormDTO dto);
|
||||
@Param("dormRoomIds") List<Long> dormRoomIds,
|
||||
@Param("dto") PageStudentDormDTO dto);
|
||||
|
||||
List<EduStudent> listStudentDorm(@Param("dormRoomIds") List<Long> dormRoomIds,
|
||||
@Param("dto") SelectStudentDormExportData selectStudentDormExportData);
|
||||
|
||||
/**
|
||||
* 查询学生对应教师
|
||||
@@ -129,4 +137,17 @@ public interface EduStudentMapper extends BaseMapper<EduStudent> {
|
||||
List<Long> listDormIdsByDeptId(ListStudentDTO dto);
|
||||
|
||||
List<EduStudent> listBaseStudentNoJoin(EduStudent eduStudent);
|
||||
|
||||
IPage<OutPageStudentVO> listStudentOutPage(Page page,
|
||||
@Param("dto") OutPageStudentDTO dto);
|
||||
|
||||
/**
|
||||
* 查询年级人数
|
||||
*
|
||||
* @param gradeId 年级id
|
||||
* @return long
|
||||
* @author ZYJ
|
||||
* @date 2023/4/25 11:47
|
||||
*/
|
||||
long selectGradeStudentNumber(@Param("gradeId") Long gradeId);
|
||||
}
|
||||
|
||||
+17
-5
@@ -7,7 +7,9 @@ import com.yida.data.common.core.entity.user.EduTeacherDept;
|
||||
import com.yida.data.common.core.entity.user.EduUserDept;
|
||||
import com.yida.data.user.vo.TeacherClassVO;
|
||||
import com.yida.data.user.vo.TeacherCourseInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -18,10 +20,10 @@ public interface EduTeacherDeptMapper extends BaseMapper<EduTeacherDept> {
|
||||
List<Dept> listPermissionDeptByTeacher(Long teacherSysId);
|
||||
|
||||
List<EduStaff> listTeacherByClass(@Param("classIds") List<Long> classIds,
|
||||
@Param("teacherName") String teacherName);
|
||||
@Param("teacherName") String teacherName);
|
||||
|
||||
List<EduStaff> listTeacherBySchool(@Param("schoolId") Long schoolId,
|
||||
@Param("name") String name);
|
||||
@Param("name") String name);
|
||||
|
||||
List<Integer> findType(@Param("teacherId") Long teacherId);
|
||||
|
||||
@@ -39,18 +41,18 @@ public interface EduTeacherDeptMapper extends BaseMapper<EduTeacherDept> {
|
||||
|
||||
|
||||
List<Long> selectCoursetList(@Param("teacherId") Long teacherId, @Param("schoolId") Long schoolId,
|
||||
@Param("classId") Long classId);
|
||||
@Param("classId") Long classId);
|
||||
|
||||
List<Long> findClassId(@Param("teacherId") Long teacherId);
|
||||
|
||||
List<TeacherCourseInfoVO> listTeacherCourseByGrade(@Param("gradeId") Long gradeId,
|
||||
@Param("classId") Long classId);
|
||||
@Param("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 根据班级和名称查询教师
|
||||
*/
|
||||
List<EduStaff> listTeacherByClassAndName(@Param("classId") Long classId,
|
||||
@Param("name") String name);
|
||||
@Param("name") String name);
|
||||
|
||||
/**
|
||||
* 查询教师管辖班级
|
||||
@@ -68,4 +70,14 @@ public interface EduTeacherDeptMapper extends BaseMapper<EduTeacherDept> {
|
||||
* @return
|
||||
*/
|
||||
List<EduTeacherDept> listTeacherDept(List<Long> teacherIds);
|
||||
|
||||
/**
|
||||
* 教师数量
|
||||
*
|
||||
* @param schoolId 学校id
|
||||
* @return long
|
||||
* @author ZYJ
|
||||
* @date 2023/4/24 16:59
|
||||
*/
|
||||
long countTeacherNumber(@Param("schoolId") Long schoolId);
|
||||
}
|
||||
|
||||
+5
@@ -22,4 +22,9 @@ public interface EduFaceGroupDeviceService extends IService<EduFaceGroupDevice>
|
||||
* 查询人脸组关联的设备(设备组查询出设备)
|
||||
*/
|
||||
List<Long> listDeviceByFaceGroup(Long faceGroupId);
|
||||
|
||||
/**
|
||||
* 查询人脸组关联的在线设备(设备组查询出设备)
|
||||
*/
|
||||
List<Long> listFaceGroupOnlineDevice(Long faceGroupId);
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import com.yida.data.common.core.entity.user.EduFaceGroup;
|
||||
*/
|
||||
public interface EduFaceGroupService extends IService<EduFaceGroup> {
|
||||
|
||||
IPage<EduFaceGroup> listFaceGroupPage(Page page, String groupName, Long schoolId);
|
||||
IPage<EduFaceGroup> listFaceGroupPage(Page page, String groupName, Long schoolId, Long groupId);
|
||||
|
||||
void removeFaceGroup(Long groupId);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user