成绩看板

beetlsql3-dev
xuliangtong 3 years ago
parent 50b00807e5
commit ac35df3287

@ -139,3 +139,4 @@ create table teacher_open_course_score_weight
alter table teacher_open_course_score_weight comment '教师-我的课程-成绩权重'; alter table teacher_open_course_score_weight comment '教师-我的课程-成绩权重';
ALTER TABLE teacher_open_course_score_dashboard ADD COLUMN teacher_open_course_id bigint(20) COMMENT '课程开课ID';

@ -80,6 +80,8 @@ public class TeacherOpenCourseScoreDashboard extends BaseEntity{
//创建时间 //创建时间
private Date createTime ; private Date createTime ;
//课程开课ID
private Date teacherOpenCourseId;
public TeacherOpenCourseScoreDashboard(){ public TeacherOpenCourseScoreDashboard(){
} }
@ -279,5 +281,11 @@ public class TeacherOpenCourseScoreDashboard extends BaseEntity{
this.createTime = createTime; this.createTime = createTime;
} }
public Date getTeacherOpenCourseId() {
return teacherOpenCourseId;
}
public void setTeacherOpenCourseId(Date teacherOpenCourseId) {
this.teacherOpenCourseId = teacherOpenCourseId;
}
} }

@ -379,4 +379,5 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<Teac
} }
} }

@ -11,14 +11,12 @@ import com.ibeetl.admin.core.util.ConvertUtil;
import com.ibeetl.admin.core.util.PlatformException; import com.ibeetl.admin.core.util.PlatformException;
import com.ibeetl.admin.core.util.TimeTool; import com.ibeetl.admin.core.util.TimeTool;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.beetl.sql.core.engine.PageQuery; import org.beetl.sql.core.engine.PageQuery;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
@ -349,14 +347,14 @@ public class TeacherOpenCourseScoreDashboardController {
//头部样式 //头部样式
HSSFCellStyle headerStyle = workbook.createCellStyle(); HSSFCellStyle headerStyle = workbook.createCellStyle();
//垂直居中 //垂直居中
headerStyle.setVerticalAlignment(headerStyle.getVerticalAlignmentEnum().CENTER); headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
//水平居中 //水平居中
headerStyle.setAlignment(HorizontalAlignment.CENTER); headerStyle.setAlignment(HorizontalAlignment.CENTER);
//单元格样式 //单元格样式
HSSFCellStyle cellStyle = workbook.createCellStyle(); HSSFCellStyle cellStyle = workbook.createCellStyle();
//垂直居中 //垂直居中
cellStyle.setVerticalAlignment(cellStyle.getVerticalAlignmentEnum().CENTER); cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
//水平居左 //水平居左
cellStyle.setAlignment(HorizontalAlignment.CENTER); cellStyle.setAlignment(HorizontalAlignment.CENTER);
//自动换行 //自动换行
@ -428,4 +426,21 @@ public class TeacherOpenCourseScoreDashboardController {
} }
} }
/**
*
* @param map teacherOpenCourseId ID
* @return
*/
@PostMapping("/updateGrades")
public JsonResult<Object> updateGrades(@RequestBody Map<String, Object> map) {
String teacherOpenCourseId = MapUtils.getString(map, "teacherOpenCourseId");
if (StringUtils.isEmpty(teacherOpenCourseId)) {
return JsonResult.failMessage("课程开课ID不能为空");
}
return JsonResult.success();
}
} }

@ -47,6 +47,9 @@ public class TeacherOpenCourseScoreDashboardQuery extends PageParam {
private Long userId; private Long userId;
@Query(name = "创建时间", display = false) @Query(name = "创建时间", display = false)
private Date createTime; private Date createTime;
@Query(name = "课程开课ID", display = false)
private Date teacherOpenCourseId;
private String teacherOpenCourseScoreDashboardIdPlural; private String teacherOpenCourseScoreDashboardIdPlural;
private String studentIdPlural; private String studentIdPlural;
@ -148,6 +151,14 @@ public class TeacherOpenCourseScoreDashboardQuery extends PageParam {
this.createTime = createTime; this.createTime = createTime;
} }
public Date getTeacherOpenCourseId() {
return teacherOpenCourseId;
}
public void setTeacherOpenCourseId(Date teacherOpenCourseId) {
this.teacherOpenCourseId = teacherOpenCourseId;
}
public TeacherOpenCourseScoreDashboard pojo(){ public TeacherOpenCourseScoreDashboard pojo(){
TeacherOpenCourseScoreDashboard pojo = new TeacherOpenCourseScoreDashboard(); TeacherOpenCourseScoreDashboard pojo = new TeacherOpenCourseScoreDashboard();
pojo.setTeacherOpenCourseScoreDashboardId(this.getTeacherOpenCourseScoreDashboardId()); pojo.setTeacherOpenCourseScoreDashboardId(this.getTeacherOpenCourseScoreDashboardId());
@ -165,6 +176,7 @@ public class TeacherOpenCourseScoreDashboardQuery extends PageParam {
pojo.setOrgId(this.getOrgId()); pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId()); pojo.setUserId(this.getUserId());
pojo.setCreateTime(this.getCreateTime()); pojo.setCreateTime(this.getCreateTime());
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
return pojo; return pojo;
} }

@ -67,6 +67,9 @@ queryByCondition
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
queryByConditionQuery queryByConditionQuery
@ -136,6 +139,9 @@ queryByConditionQuery
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
@ -260,6 +266,13 @@ updateGivenByIds
create_time = #createTime# , create_time = #createTime# ,
@} @}
@} @}
@if(contain("teacherOpenCourseId",_given)){
@if(isEmpty(teacherOpenCourseId)){
teacher_open_course_id = null ,
@}else{
teacher_open_course_id = #teacherOpenCourseId# ,
@}
@}
teacher_open_course_score_dashboard_id = teacher_open_course_score_dashboard_id teacher_open_course_score_dashboard_id = teacher_open_course_score_dashboard_id
where find_in_set(teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#) where find_in_set(teacher_open_course_score_dashboard_id,#teacherOpenCourseScoreDashboardIdPlural#)
@ -318,6 +331,9 @@ getTeacherOpenCourseScoreDashboardValues
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
getValuesByQuery getValuesByQuery
@ -385,7 +401,9 @@ getValuesByQuery
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
@ -468,6 +486,9 @@ getExcelValues
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
) )
UNION ALL UNION ALL
( (
@ -543,6 +564,9 @@ getExcelValues
@if(!isEmpty(createTime)){ @if(!isEmpty(createTime)){
and t.create_time =#createTime# and t.create_time =#createTime#
@} @}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
) )
)t )t

Loading…
Cancel
Save