beetlsql3-dev
xuliangtong 2 years ago
parent ecae02676c
commit 039c201ec9

@ -2,7 +2,10 @@ package com.ibeetl.jlw.entity;
import javax.validation.constraints.NotNull;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.ibeetl.admin.core.entity.BaseEntity;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.annotation.entity.*;
import com.ibeetl.admin.core.util.ValidateConfig;
@ -11,6 +14,8 @@ import com.ibeetl.admin.core.annotation.Dict;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/*
* --
@ -40,6 +45,7 @@ public class StudentHandsOnTaskReport extends BaseEntity{
//文件地址PDF
private String reportFile ;
private Map<String, Object> reportFileMap;
//报告分值
@ -234,4 +240,15 @@ public class StudentHandsOnTaskReport extends BaseEntity{
public void setStudentId(Long studentId) {
this.studentId = studentId;
}
public Map<String, Object> getReportFileMap() {
if (StringUtils.isNotEmpty(reportFile)) {
return JSONObject.parseObject(reportFile, new TypeReference<Map<String, Object>>(){});
}
return reportFileMap;
}
public void setReportFileMap(Map<String, Object> reportFileMap) {
this.reportFileMap = reportFileMap;
}
}

@ -94,9 +94,16 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
String msg = "";
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
Long handsOnTaskId = studentHandsOnTaskReport.getHandsOnTaskId();
StudentHandsOnTaskReport studentHandsOnTaskReport1 = this.sqlManager.lambdaQuery(StudentHandsOnTaskReport.class).andEq(StudentHandsOnTaskReport::getHandsOnTaskId, handsOnTaskId).singleSimple();
if (handsOnTaskId == null) {
return JsonResult.success();
}
StudentHandsOnTaskReport studentHandsOnTaskReport1 = this.sqlManager.lambdaQuery(StudentHandsOnTaskReport.class)
.andEq(StudentHandsOnTaskReport::getHandsOnTaskId, handsOnTaskId).singleSimple();
if (studentHandsOnTaskReport1 != null) {
deleteById(studentHandsOnTaskReport1.getStudentHandsOnTaskReportId());
studentHandsOnTaskReport1.setReportScore(studentHandsOnTaskReportQuery.getReportScore());
studentHandsOnTaskReport1.setReportComment(studentHandsOnTaskReportQuery.getReportComment());
update(studentHandsOnTaskReport1);
return JsonResult.success();
}
if (StringUtils.isNotEmpty(studentHandsOnTaskReport.getReportFile())) {
studentHandsOnTaskReport.setReportScore(BigDecimal.valueOf(100));

@ -67,7 +67,18 @@ queryByCondition
@if(!isEmpty(studentName)){
and t2.student_name =#studentName#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
queryByConditionQuery
===
@ -136,6 +147,18 @@ queryByConditionQuery
@if(!isEmpty(studentName)){
and t2.student_name =#studentName#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
@ -268,6 +291,18 @@ getStudentHandsOnTaskReportValues
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
getValuesByQuery
@ -326,6 +361,18 @@ getValuesByQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
getValuesByQueryNotWithPermission
@ -384,6 +431,18 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(teacherId)){
and t.teacher_id =#teacherId#
@}
@if(!isEmpty(teacherIdPlural)){
and find_in_set(t.teacher_id,#teacherIdPlural#)
@}
@if(!isEmpty(studentId)){
and t.student_id =#studentId#
@}
@if(!isEmpty(studentIdPlural)){
and find_in_set(t.student_id,#studentIdPlural#)
@}
getReportList
===

Loading…
Cancel
Save