rong.liu 4 years ago
commit 341b725f5c
  1. 4
      src/main/java/com/msdw/tms/api/AchievementManagementApi.java
  2. 10
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  3. 13
      src/main/java/com/msdw/tms/controller/ClassTeachingController.java
  4. 5
      src/main/java/com/msdw/tms/controller/StudentController.java
  5. 2
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  6. 2
      src/main/java/com/msdw/tms/entity/vo/StudentVo.java
  7. 2
      src/main/java/com/msdw/tms/service/AchievementManagementService.java
  8. 5
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  9. 16
      src/main/java/com/msdw/tms/service/impl/ClassTeachingServiceImpl.java
  10. 26
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  11. 2
      src/main/resources/mapper/tms/ExperimentalTeachingDao.xml
  12. 7
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  13. 3
      src/main/resources/mapper/tms/StudentDao.xml

@ -85,4 +85,8 @@ public interface AchievementManagementApi {
@ApiOperation(value = "成绩管理:虚拟仿真实验成绩管理", notes = "成绩管理:虚拟仿真实验成绩管理")
R getImitationAchievement(@ApiParam(value = "projectId", required = false) Integer projectId);
@ApiOperation(value = "成绩管理:实验教学成绩管理", notes = "成绩管理:实验教学成绩管理")
R getTeachAchievement(@RequestParam(required = true) Integer id);
}

@ -287,4 +287,14 @@ public class AchievementManagementController implements AchievementManagementApi
List<AchievementManagementVO> result = service.getImitationAchievement(projectId);
return R.ok().put("data", result);
}
/**
* 成绩管理:实验教学成绩管理
*/
@Override
@GetMapping("/getTeachAchievement")
public R getTeachAchievement(@RequestParam(required = true) Integer id) {
List<AchievementManagementVO> result = service.getTeachAchievement(id);
return R.ok().put("data", result);
}
}

@ -54,9 +54,16 @@ public class ClassTeachingController implements ClassTeachingApi {
if (!StringUtils.isEmpty(condition)) {
recordVo.setCondition(condition);
}
if (!StringUtils.isEmpty(month)) {
// 设置固定时间(当自定义时间为空时)
if (!StringUtils.isEmpty(month) && StringUtils.isEmpty(startTime) && StringUtils.isEmpty(endTime)) {
recordVo.setMonth(month);
} else {
}
// 设置自定义时间
if (!StringUtils.isEmpty(startTime) || !StringUtils.isEmpty(endTime)) {
recordVo.setStartTime(startTime);
recordVo.setEndTime(endTime);
}
/*else {
recordVo.setMonth(null);
if (!StringUtils.isEmpty(startTime)) {
recordVo.setStartTime(startTime);
@ -64,7 +71,7 @@ public class ClassTeachingController implements ClassTeachingApi {
if (!StringUtils.isEmpty(endTime)) {
recordVo.setEndTime(endTime);
}
}
}*/
recordVo.setSchoolId(schoolId);
PageUtils page1 = classTeachingService.queryClassRecord(page, size, recordVo);
return R.ok().put("page", page1);

@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
@ -46,7 +47,7 @@ public class StudentController implements StudentControllerApi{
@Transactional
@Override
@PostMapping("/addStudent")
public R addStudent(@RequestBody StudentVo studentVo){
public R addStudent(@RequestBody @Valid StudentVo studentVo){
studentVo.setSchoolId(ConstantUtils.Keda_schoolId);
String account = studentVo.getAccount();
String phone = studentVo.getPhone();
@ -130,7 +131,7 @@ public class StudentController implements StudentControllerApi{
@Override
@Transactional
@PutMapping("/updateStudent")
public R updateStudent(@RequestBody StudentVo studentVo) {
public R updateStudent(@RequestBody @Valid StudentVo studentVo) {
studentVo.setSchoolId(ConstantUtils.Keda_schoolId);//设定学校id
Integer studentId = studentVo.getStudentId();

@ -77,4 +77,6 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
//虚拟仿真成绩管理查询
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -5,6 +5,7 @@ import com.msdw.tms.entity.UserInfoEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
@ -19,6 +20,7 @@ public class StudentVo extends StudentEntity {
//用户姓名
private String userName;
//用户账号
@Pattern(regexp = "^[0-9a-zA-Z]*$",message = "账号只能为数字或字母!")
private String account;
//密码
private String password;

@ -47,4 +47,6 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R deleteReportByProjectId(Integer projectId);
List<AchievementManagementVO> getImitationAchievement(Integer projectId);
List<AchievementManagementVO> getTeachAchievement(Integer id);
}

@ -299,4 +299,9 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
return list;
}
@Override
public List<AchievementManagementVO> getTeachAchievement(Integer id) {
return achievementManagementDao.getTeachAchievement(id);
}
}

@ -19,6 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.concurrent.locks.Lock;
@Service
public class ClassTeachingServiceImpl extends ServiceImpl<ExperimentalTeachingDao, ExperimentalTeachingEntity> implements ClassTeachingService {
@ -55,7 +57,19 @@ public class ClassTeachingServiceImpl extends ServiceImpl<ExperimentalTeachingDa
// IPage<ProjectRecordVo> schoolRecord = this.classMapper.getByClassRecord(page1, recordVo);
// PageUtils pageUtils = new PageUtils(schoolRecord);
ExperimentalTeachingVO vo = new ExperimentalTeachingVO();
BeanUtils.copyProperties(recordVo,vo);
// 状态
vo.setStatus(recordVo.getStatus());
// 月份
vo.setMonth(recordVo.getMonth());
// 学校
vo.setSchoolId(recordVo.getSchoolId());
// 开始时间
vo.setStartTime(recordVo.getStartTime());
// 结束时间
vo.setStopTime(recordVo.getEndTime());
// 查询条件
vo.setSearchContent(recordVo.getCondition());
// BeanUtils.copyProperties(recordVo,vo);
ExperimentalTeachingDao userDao = this.getBaseMapper();
IPage<ExperimentalTeachingEntity> list = userDao.queryExperimentalTeaching(page1, vo);
for (int i = 0; i < list.getRecords().size(); i++) {

@ -82,10 +82,9 @@
</insert>
<update id="deleteReport">
UPDATE tms_project_record tpr,hr_experimental_report tcr
SET tpr.isdel = 1, tcr.isdel = 1
WHERE tpr.recordId = #{recordId}
AND tcr.reportId = #{reportId}
UPDATE tms_project_record tpr,tms_experimental_report ter
SET tpr.isdel = 1, ter.isdel = 1
WHERE tpr.recordId = #{recordId} AND ter.reportId = #{reportId}
</update>
<update id="updateComment">
UPDATE tms_experimental_report
@ -504,4 +503,23 @@
AND re.isdel = 0;
</select>
<select id="getTeachAchievement" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT r.recordId, schoolName,tet.experimental_class_name, userName, workNumber, score, submitTime, ter.reportId
from tms_project_record r
inner join student s on s.userId = r.userId
inner join hr_user_info u on u.userId = r.userId
inner join school sch on sch.schoolId = u.schoolId
inner join tms_experimental_report ter on r.recordId = ter.eventId
inner join tms_experimental_teaching tet on r.projectId = tet.project_id
WHERE
tet.id = #{id}
AND r.isdel = 0
AND s.isdel = 0
AND u.isdel = 0
AND sch.isdel = 0
AND ter.isdel = 0
AND tet.is_del = 0
</select>
</mapper>

@ -39,7 +39,7 @@
AND creation_time between #{exp.startTime} and #{exp.stopTime}
</if>
<if test="exp.searchContent!=null">
AND (project_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') )
AND (experimental_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') )
</if>
<if test="exp.month!=null">
AND DATE_SUB(CURDATE(), INTERVAL #{exp.month} month ) &lt;= date(creation_time)

@ -58,7 +58,8 @@
INNER JOIN hr_project_management t ON t.projectId = c.projectId
INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId}
and r.isdel = 0
-- 教师端逻辑删除,学生端不做判断
-- and r.isdel = 0
and projectPermissions = #{projectPermissions}
and t.systemId = #{systemId}
GROUP BY c.recordId desc
@ -70,7 +71,7 @@
ter.reportId,
tpr.recordId,
tpr.projectId,
projectName,
tp.projectName,
score,
timeSum,
startingTime as startTime,
@ -82,7 +83,7 @@
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid}
AND tpr.isdel = #{pro.isdel}
AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0
AND
ter.eventId = tpr.recordId

@ -44,8 +44,7 @@
AND l.isdel = 0
AND s.isdel = 0
<if test="searchContent!=null">AND (u.account LIKE CONCAT('%',#{searchContent},'%') OR u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%'))</if>
ORDER BY
lastLoginTime DESC,studentId DESC
ORDER BY studentId DESC
</select>
<select id="queryStudentIdNumber" resultType="java.lang.Integer">

Loading…
Cancel
Save