|
|
package com.ibeetl.jlw.entity;
|
|
|
|
|
|
import com.ibeetl.admin.core.annotation.Dict;
|
|
|
import com.ibeetl.admin.core.annotation.DictEnum;
|
|
|
import com.ibeetl.admin.core.entity.BaseEntity;
|
|
|
import com.ibeetl.admin.core.util.ValidateConfig;
|
|
|
import com.ibeetl.jlw.enums.StartStatusEnum;
|
|
|
import org.beetl.sql.annotation.entity.AssignID;
|
|
|
import org.beetl.sql.annotation.entity.InsertIgnore;
|
|
|
import org.beetl.sql.annotation.entity.UpdateIgnore;
|
|
|
import org.beetl.sql.fetch.annotation.Fetch;
|
|
|
import org.beetl.sql.fetch.annotation.FetchSql;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/*
|
|
|
* 教师-我的课程-开课-学生签到-配置
|
|
|
* gen by Spring Boot2 Admin 2022-10-11
|
|
|
*/
|
|
|
@Fetch
|
|
|
public class TeacherOpenCourseStudentSigninSetting extends BaseEntity{
|
|
|
|
|
|
//ID
|
|
|
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
|
|
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
|
|
|
@AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.TeacherOpenCourseStudentSigninSetting")
|
|
|
|
|
|
private Long teacherOpenCourseStudentSigninSettingId ;
|
|
|
|
|
|
// 签到场次(时间)
|
|
|
|
|
|
private Date teacherOpenCourseStudentSigninSettingSessionTime;
|
|
|
|
|
|
//开课ID
|
|
|
@Dict(type="teacher_open_course.teacher_open_course_title.teacher_open_course_status=1")
|
|
|
|
|
|
private Long teacherOpenCourseId ;
|
|
|
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private String teacherOpenCourseIdText;
|
|
|
|
|
|
//班级ID集合
|
|
|
private String schoolClassIds ;
|
|
|
|
|
|
@FetchSql(
|
|
|
"@if(strUtil.equalsIgnoreCase(schoolClassIds, 'ALL')) { \n" +
|
|
|
"select '所有班级' \n" +
|
|
|
"@} else { \n" +
|
|
|
" select group_concat(class_name) " +
|
|
|
"from school_class " +
|
|
|
"where 1 = 1 " +
|
|
|
"and find_in_set(class_id, #schoolClassIds#) " +
|
|
|
"and class_status = 1 " +
|
|
|
"order by class_id " +
|
|
|
"@}\n" )
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private String schoolClassIdsText;
|
|
|
|
|
|
// 如果是全部的班级,则查询该课程关联的全部班级
|
|
|
// 否则 取schoolClassIds 字段。
|
|
|
@FetchSql(
|
|
|
"@if(strUtil.equalsIgnoreCase(schoolClassIds, 'ALL')) { \n" +
|
|
|
"select group_concat(distinct(school_class_id)) \n" +
|
|
|
" from teacher_open_course_merge_school_class t \n" +
|
|
|
" where t.teacher_open_course_id = #teacherOpenCourseId# \n" +
|
|
|
" and t.teacher_open_course_merge_school_class_status = 1 \n" +
|
|
|
" group by t.teacher_open_course_id \n" +
|
|
|
"@} else { \n" +
|
|
|
" select #schoolClassIds# " +
|
|
|
"@}\n" )
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private String schoolClassIdsRender;
|
|
|
|
|
|
// 所有班级标识
|
|
|
public static String ALL_SCHOOL_CLASS_IDS_SIGN = "ALL";
|
|
|
|
|
|
//签到方式 (数据字典 student_signin_type)
|
|
|
@Dict(type="student_signin_type")
|
|
|
|
|
|
private String teacherOpenCourseStudentSigninSettingType ;
|
|
|
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private String teacherOpenCourseStudentSigninSettingTypeText ;
|
|
|
|
|
|
//设置的值:数据例子:IP: x.x.x.x-x.x.x.x,验证码:xxxx,手动签到:无需设置
|
|
|
|
|
|
private String teacherOpenCourseStudentSigninSettingValue ;
|
|
|
|
|
|
//签到开始日期
|
|
|
|
|
|
private Date teacherOpenCourseStudentSigninSettingStartTime ;
|
|
|
|
|
|
//签到结束日期
|
|
|
|
|
|
private Date teacherOpenCourseStudentSigninSettingEndTime ;
|
|
|
|
|
|
// 学生签到时间
|
|
|
private Date teacherOpenCourseStudentSigninSettingSigninTime ;
|
|
|
|
|
|
|
|
|
@DictEnum
|
|
|
//开始状态
|
|
|
private StartStatusEnum teacherOpenCourseStudentSigninSettingStartStatus;
|
|
|
|
|
|
//创建时间
|
|
|
|
|
|
private Date teacherOpenCourseStudentSigninSettingAddTime ;
|
|
|
|
|
|
//状态 1正常 2删除
|
|
|
@Dict(type="global_status")
|
|
|
|
|
|
private Integer teacherOpenCourseStudentSigninSettingStatus ;
|
|
|
|
|
|
// 这个开课ID下的签到场次总数量
|
|
|
|
|
|
@FetchSql("select count(1) from teacher_open_course_student_signin_setting " +
|
|
|
"where teacher_open_course_id = #teacherOpenCourseId# and teacher_open_course_student_signin_setting_status = 1 ")
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private Integer signinSettingCount;
|
|
|
|
|
|
// 签到总人数
|
|
|
// teacher_open_course_student_signin_log_tag:10签到 20缺勤
|
|
|
// 同一个课程
|
|
|
|
|
|
@FetchSql("select count(distinct(t.student_id)) " +
|
|
|
"from teacher_open_course_student_signin_log t " +
|
|
|
"left join teacher_open_course_student_signin_setting ta on ta.teacher_open_course_student_signin_setting_id = t.teacher_open_course_student_signin_setting_id " +
|
|
|
"where t.teacher_open_course_id = #teacherOpenCourseId# " +
|
|
|
"and t.teacher_open_course_student_signin_log_tag = 10 " +
|
|
|
"and ta.teacher_open_course_student_signin_setting_id = #teacherOpenCourseStudentSigninSettingId# ")
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private Integer signinTotalCount;
|
|
|
|
|
|
// 学生总人数
|
|
|
|
|
|
@FetchSql("select count(1) from teacher_open_course_merge_student t " +
|
|
|
"inner join student ta on ta.student_id = t.student_id and ta.student_status = 1 " +
|
|
|
"where 1 " +
|
|
|
"and t.teacher_open_course_school_class_merge_student_status = 1 " +
|
|
|
"and t.teacher_open_course_id = #teacherOpenCourseId# " +
|
|
|
"and find_in_set(ta.class_id, #schoolClassIdsRender#) ")
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private Integer signinStudentTotalCount;
|
|
|
|
|
|
// 缺勤 schoolClassIds
|
|
|
|
|
|
@FetchSql("select case when #teacherOpenCourseStudentSigninSettingStartStatus# = 'READY' then 0 else if((#signinStudentTotalCount# - #signinTotalCount#) < 0, 0, (#signinStudentTotalCount# - #signinTotalCount#)) end")
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private Integer unsigninCount;
|
|
|
|
|
|
// 合计到课率 100为单位
|
|
|
|
|
|
@FetchSql("select round(#signinTotalCount# / (if((#signinStudentTotalCount#) <= 0, 1, (#signinStudentTotalCount#))) * 100, 1)")
|
|
|
@UpdateIgnore
|
|
|
@InsertIgnore
|
|
|
private float signinTotalRate;
|
|
|
|
|
|
//组织ID
|
|
|
|
|
|
private Long orgId ;
|
|
|
|
|
|
//用户ID
|
|
|
|
|
|
private Long userId ;
|
|
|
|
|
|
public TeacherOpenCourseStudentSigninSetting(){
|
|
|
}
|
|
|
|
|
|
|
|
|
/**ID
|
|
|
*@return
|
|
|
*/
|
|
|
public Long getTeacherOpenCourseStudentSigninSettingId(){
|
|
|
return teacherOpenCourseStudentSigninSettingId;
|
|
|
}
|
|
|
/**ID
|
|
|
*@param teacherOpenCourseStudentSigninSettingId
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingId(Long teacherOpenCourseStudentSigninSettingId){
|
|
|
this.teacherOpenCourseStudentSigninSettingId = teacherOpenCourseStudentSigninSettingId;
|
|
|
}
|
|
|
|
|
|
/**开课ID
|
|
|
*@return
|
|
|
*/
|
|
|
public Long getTeacherOpenCourseId(){
|
|
|
return teacherOpenCourseId;
|
|
|
}
|
|
|
/**开课ID
|
|
|
*@param teacherOpenCourseId
|
|
|
*/
|
|
|
public void setTeacherOpenCourseId(Long teacherOpenCourseId){
|
|
|
this.teacherOpenCourseId = teacherOpenCourseId;
|
|
|
}
|
|
|
|
|
|
/**班级ID集合
|
|
|
*@return
|
|
|
*/
|
|
|
public String getSchoolClassIds(){
|
|
|
return schoolClassIds;
|
|
|
}
|
|
|
/**班级ID集合
|
|
|
*@param schoolClassIds
|
|
|
*/
|
|
|
public void setSchoolClassIds(String schoolClassIds){
|
|
|
this.schoolClassIds = schoolClassIds;
|
|
|
}
|
|
|
|
|
|
/**签到方式 (数据字典 student_signin_type)
|
|
|
*@return
|
|
|
*/
|
|
|
public String getTeacherOpenCourseStudentSigninSettingType(){
|
|
|
return teacherOpenCourseStudentSigninSettingType;
|
|
|
}
|
|
|
/**签到方式 (数据字典 student_signin_type)
|
|
|
*@param teacherOpenCourseStudentSigninSettingType
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingType(String teacherOpenCourseStudentSigninSettingType){
|
|
|
this.teacherOpenCourseStudentSigninSettingType = teacherOpenCourseStudentSigninSettingType;
|
|
|
}
|
|
|
|
|
|
/**设置的值:数据例子:IP: x.x.x.x-x.x.x.x,验证码:xxxx,手动签到:无需设置
|
|
|
*@return
|
|
|
*/
|
|
|
public String getTeacherOpenCourseStudentSigninSettingValue(){
|
|
|
return teacherOpenCourseStudentSigninSettingValue;
|
|
|
}
|
|
|
/**设置的值:数据例子:IP: x.x.x.x-x.x.x.x,验证码:xxxx,手动签到:无需设置
|
|
|
*@param teacherOpenCourseStudentSigninSettingValue
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingValue(String teacherOpenCourseStudentSigninSettingValue){
|
|
|
this.teacherOpenCourseStudentSigninSettingValue = teacherOpenCourseStudentSigninSettingValue;
|
|
|
}
|
|
|
|
|
|
/**签到开始日期
|
|
|
*@return
|
|
|
*/
|
|
|
public Date getTeacherOpenCourseStudentSigninSettingStartTime(){
|
|
|
return teacherOpenCourseStudentSigninSettingStartTime;
|
|
|
}
|
|
|
/**签到开始日期
|
|
|
*@param teacherOpenCourseStudentSigninSettingStartTime
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingStartTime(Date teacherOpenCourseStudentSigninSettingStartTime){
|
|
|
this.teacherOpenCourseStudentSigninSettingStartTime = teacherOpenCourseStudentSigninSettingStartTime;
|
|
|
}
|
|
|
|
|
|
/**签到结束日期
|
|
|
*@return
|
|
|
*/
|
|
|
public Date getTeacherOpenCourseStudentSigninSettingEndTime(){
|
|
|
return teacherOpenCourseStudentSigninSettingEndTime;
|
|
|
}
|
|
|
/**签到结束日期
|
|
|
*@param teacherOpenCourseStudentSigninSettingEndTime
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingEndTime(Date teacherOpenCourseStudentSigninSettingEndTime){
|
|
|
this.teacherOpenCourseStudentSigninSettingEndTime = teacherOpenCourseStudentSigninSettingEndTime;
|
|
|
}
|
|
|
|
|
|
/**创建时间
|
|
|
*@return
|
|
|
*/
|
|
|
public Date getTeacherOpenCourseStudentSigninSettingAddTime(){
|
|
|
return teacherOpenCourseStudentSigninSettingAddTime;
|
|
|
}
|
|
|
/**创建时间
|
|
|
*@param teacherOpenCourseStudentSigninSettingAddTime
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingAddTime(Date teacherOpenCourseStudentSigninSettingAddTime){
|
|
|
this.teacherOpenCourseStudentSigninSettingAddTime = teacherOpenCourseStudentSigninSettingAddTime;
|
|
|
}
|
|
|
|
|
|
/**状态 1正常 2删除
|
|
|
*@return
|
|
|
*/
|
|
|
public Integer getTeacherOpenCourseStudentSigninSettingStatus(){
|
|
|
return teacherOpenCourseStudentSigninSettingStatus;
|
|
|
}
|
|
|
/**状态 1正常 2删除
|
|
|
*@param teacherOpenCourseStudentSigninSettingStatus
|
|
|
*/
|
|
|
public void setTeacherOpenCourseStudentSigninSettingStatus(Integer teacherOpenCourseStudentSigninSettingStatus){
|
|
|
this.teacherOpenCourseStudentSigninSettingStatus = teacherOpenCourseStudentSigninSettingStatus;
|
|
|
}
|
|
|
|
|
|
/**组织ID
|
|
|
*@return
|
|
|
*/
|
|
|
public Long getOrgId(){
|
|
|
return orgId;
|
|
|
}
|
|
|
/**组织ID
|
|
|
*@param orgId
|
|
|
*/
|
|
|
public void setOrgId(Long orgId){
|
|
|
this.orgId = orgId;
|
|
|
}
|
|
|
|
|
|
/**用户ID
|
|
|
*@return
|
|
|
*/
|
|
|
public Long getUserId(){
|
|
|
return userId;
|
|
|
}
|
|
|
/**用户ID
|
|
|
*@param userId
|
|
|
*/
|
|
|
public void setUserId(Long userId){
|
|
|
this.userId = userId;
|
|
|
}
|
|
|
|
|
|
|
|
|
public StartStatusEnum getTeacherOpenCourseStudentSigninSettingStartStatus() {
|
|
|
return teacherOpenCourseStudentSigninSettingStartStatus;
|
|
|
}
|
|
|
|
|
|
public void setTeacherOpenCourseStudentSigninSettingStartStatus(StartStatusEnum teacherOpenCourseStudentSigninSettingStartStatus) {
|
|
|
this.teacherOpenCourseStudentSigninSettingStartStatus = teacherOpenCourseStudentSigninSettingStartStatus;
|
|
|
}
|
|
|
|
|
|
public Date getTeacherOpenCourseStudentSigninSettingSessionTime() {
|
|
|
return teacherOpenCourseStudentSigninSettingSessionTime;
|
|
|
}
|
|
|
|
|
|
public void setTeacherOpenCourseStudentSigninSettingSessionTime(Date teacherOpenCourseStudentSigninSettingSessionTime) {
|
|
|
this.teacherOpenCourseStudentSigninSettingSessionTime = teacherOpenCourseStudentSigninSettingSessionTime;
|
|
|
}
|
|
|
|
|
|
public Integer getSigninSettingCount() {
|
|
|
return signinSettingCount;
|
|
|
}
|
|
|
|
|
|
public void setSigninSettingCount(Integer signinSettingCount) {
|
|
|
this.signinSettingCount = signinSettingCount;
|
|
|
}
|
|
|
|
|
|
public Integer getSigninTotalCount() {
|
|
|
return signinTotalCount;
|
|
|
}
|
|
|
|
|
|
public void setSigninTotalCount(Integer signinTotalCount) {
|
|
|
this.signinTotalCount = signinTotalCount;
|
|
|
}
|
|
|
|
|
|
public Integer getUnsigninCount() {
|
|
|
return unsigninCount;
|
|
|
}
|
|
|
|
|
|
public void setUnsigninCount(Integer unsigninCount) {
|
|
|
this.unsigninCount = unsigninCount;
|
|
|
}
|
|
|
|
|
|
public float getSigninTotalRate() {
|
|
|
return signinTotalRate;
|
|
|
}
|
|
|
|
|
|
public void setSigninTotalRate(float signinTotalRate) {
|
|
|
this.signinTotalRate = signinTotalRate;
|
|
|
}
|
|
|
|
|
|
public String getSchoolClassIdsRender() {
|
|
|
return schoolClassIdsRender;
|
|
|
}
|
|
|
|
|
|
public void setSchoolClassIdsRender(String schoolClassIdsRender) {
|
|
|
this.schoolClassIdsRender = schoolClassIdsRender;
|
|
|
}
|
|
|
|
|
|
public Integer getSigninStudentTotalCount() {
|
|
|
return signinStudentTotalCount;
|
|
|
}
|
|
|
|
|
|
public void setSigninStudentTotalCount(Integer signinStudentTotalCount) {
|
|
|
this.signinStudentTotalCount = signinStudentTotalCount;
|
|
|
}
|
|
|
|
|
|
public String getSchoolClassIdsText() {
|
|
|
return schoolClassIdsText;
|
|
|
}
|
|
|
|
|
|
public void setSchoolClassIdsText(String schoolClassIdsText) {
|
|
|
this.schoolClassIdsText = schoolClassIdsText;
|
|
|
}
|
|
|
|
|
|
public String getTeacherOpenCourseStudentSigninSettingTypeText() {
|
|
|
return teacherOpenCourseStudentSigninSettingTypeText;
|
|
|
}
|
|
|
|
|
|
public void setTeacherOpenCourseStudentSigninSettingTypeText(String teacherOpenCourseStudentSigninSettingTypeText) {
|
|
|
this.teacherOpenCourseStudentSigninSettingTypeText = teacherOpenCourseStudentSigninSettingTypeText;
|
|
|
}
|
|
|
|
|
|
public String getTeacherOpenCourseIdText() {
|
|
|
return teacherOpenCourseIdText;
|
|
|
}
|
|
|
|
|
|
public void setTeacherOpenCourseIdText(String teacherOpenCourseIdText) {
|
|
|
this.teacherOpenCourseIdText = teacherOpenCourseIdText;
|
|
|
}
|
|
|
|
|
|
public Date getTeacherOpenCourseStudentSigninSettingSigninTime() {
|
|
|
return teacherOpenCourseStudentSigninSettingSigninTime;
|
|
|
}
|
|
|
|
|
|
public void setTeacherOpenCourseStudentSigninSettingSigninTime(Date teacherOpenCourseStudentSigninSettingSigninTime) {
|
|
|
this.teacherOpenCourseStudentSigninSettingSigninTime = teacherOpenCourseStudentSigninSettingSigninTime;
|
|
|
}
|
|
|
}
|